diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 4415c028214..66c5fb48df5 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -57,11 +57,10 @@
"packages/google-cloud-gkeconnect-gateway": "2.0.5",
"packages/google-cloud-gkehub": "3.2.2",
"packages/google-cloud-gkemulticloud": "0.1.4",
- "packages/google-cloud-kms": "3.1.0",
- "packages/google-cloud-ids": "2.1.2",
"packages/google-cloud-iap": "2.0.3",
"packages/google-cloud-ids": "2.1.2",
"packages/google-cloud-iot": "3.1.2",
+ "packages/google-cloud-kms": "3.1.0",
"packages/google-cloud-language": "5.1.2",
"packages/google-cloud-lifesciences": "2.1.2",
"packages/google-cloud-managedidentities": "2.1.3",
@@ -81,6 +80,7 @@
"packages/google-cloud-phishingprotection": "3.0.6",
"packages/google-cloud-policytroubleshooter": "2.0.6",
"packages/google-cloud-privatecatalog": "2.0.4",
+ "packages/google-cloud-recaptchaenterprise": "3.1.1",
"packages/google-cloud-recommender": "5.0.4",
"packages/google-cloud-redis": "3.1.5",
"packages/google-cloud-resourcemanager": "4.1.3",
diff --git a/packages/google-cloud-recaptchaenterprise/.OwlBot.yaml b/packages/google-cloud-recaptchaenterprise/.OwlBot.yaml
new file mode 100644
index 00000000000..11e36782453
--- /dev/null
+++ b/packages/google-cloud-recaptchaenterprise/.OwlBot.yaml
@@ -0,0 +1,21 @@
+# 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
+#
+# 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.
+
+deep-remove-regex:
+ - /owl-bot-staging
+
+deep-copy-regex:
+ - source: /google/cloud/recaptchaenterprise/(.*)/.*-nodejs
+ dest: /owl-bot-staging/google-cloud-recaptchaenterprise/$1
+
diff --git a/packages/google-cloud-recaptchaenterprise/.eslintignore b/packages/google-cloud-recaptchaenterprise/.eslintignore
new file mode 100644
index 00000000000..ea5b04aebe6
--- /dev/null
+++ b/packages/google-cloud-recaptchaenterprise/.eslintignore
@@ -0,0 +1,7 @@
+**/node_modules
+**/coverage
+test/fixtures
+build/
+docs/
+protos/
+samples/generated/
diff --git a/packages/google-cloud-recaptchaenterprise/.eslintrc.json b/packages/google-cloud-recaptchaenterprise/.eslintrc.json
new file mode 100644
index 00000000000..78215349546
--- /dev/null
+++ b/packages/google-cloud-recaptchaenterprise/.eslintrc.json
@@ -0,0 +1,3 @@
+{
+ "extends": "./node_modules/gts"
+}
diff --git a/packages/google-cloud-recaptchaenterprise/.gitattributes b/packages/google-cloud-recaptchaenterprise/.gitattributes
new file mode 100644
index 00000000000..33739cb74e4
--- /dev/null
+++ b/packages/google-cloud-recaptchaenterprise/.gitattributes
@@ -0,0 +1,4 @@
+*.ts text eol=lf
+*.js text eol=lf
+protos/* linguist-generated
+**/api-extractor.json linguist-language=JSON-with-Comments
diff --git a/packages/google-cloud-recaptchaenterprise/.gitignore b/packages/google-cloud-recaptchaenterprise/.gitignore
new file mode 100644
index 00000000000..5d32b23782f
--- /dev/null
+++ b/packages/google-cloud-recaptchaenterprise/.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/packages/google-cloud-recaptchaenterprise/.jsdoc.js b/packages/google-cloud-recaptchaenterprise/.jsdoc.js
new file mode 100644
index 00000000000..fd8d38512d4
--- /dev/null
+++ b/packages/google-cloud-recaptchaenterprise/.jsdoc.js
@@ -0,0 +1,55 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// ** This file 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 2022 Google LLC',
+ includeDate: false,
+ sourceFiles: false,
+ systemName: '@google-cloud/recaptcha-enterprise',
+ theme: 'lumen',
+ default: {
+ outputSourceFiles: false
+ }
+ },
+ markdown: {
+ idInHeadings: true
+ }
+};
diff --git a/packages/google-cloud-recaptchaenterprise/.mocharc.js b/packages/google-cloud-recaptchaenterprise/.mocharc.js
new file mode 100644
index 00000000000..cdb7b752160
--- /dev/null
+++ b/packages/google-cloud-recaptchaenterprise/.mocharc.js
@@ -0,0 +1,29 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.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.
+const config = {
+ "enable-source-maps": true,
+ "throw-deprecation": true,
+ "timeout": 10000,
+ "recursive": true
+}
+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/packages/google-cloud-recaptchaenterprise/.nycrc b/packages/google-cloud-recaptchaenterprise/.nycrc
new file mode 100644
index 00000000000..b18d5472b62
--- /dev/null
+++ b/packages/google-cloud-recaptchaenterprise/.nycrc
@@ -0,0 +1,24 @@
+{
+ "report-dir": "./.coverage",
+ "reporter": ["text", "lcov"],
+ "exclude": [
+ "**/*-test",
+ "**/.coverage",
+ "**/apis",
+ "**/benchmark",
+ "**/conformance",
+ "**/docs",
+ "**/samples",
+ "**/scripts",
+ "**/protos",
+ "**/test",
+ "**/*.d.ts",
+ ".jsdoc.js",
+ "**/.jsdoc.js",
+ "karma.conf.js",
+ "webpack-tests.config.js",
+ "webpack.config.js"
+ ],
+ "exclude-after-remap": false,
+ "all": true
+}
diff --git a/packages/google-cloud-recaptchaenterprise/.prettierignore b/packages/google-cloud-recaptchaenterprise/.prettierignore
new file mode 100644
index 00000000000..9340ad9b86d
--- /dev/null
+++ b/packages/google-cloud-recaptchaenterprise/.prettierignore
@@ -0,0 +1,6 @@
+**/node_modules
+**/coverage
+test/fixtures
+build/
+docs/
+protos/
diff --git a/packages/google-cloud-recaptchaenterprise/.prettierrc.js b/packages/google-cloud-recaptchaenterprise/.prettierrc.js
new file mode 100644
index 00000000000..d546a4ad546
--- /dev/null
+++ b/packages/google-cloud-recaptchaenterprise/.prettierrc.js
@@ -0,0 +1,17 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+module.exports = {
+ ...require('gts/.prettierrc.json')
+}
diff --git a/packages/google-cloud-recaptchaenterprise/.repo-metadata.json b/packages/google-cloud-recaptchaenterprise/.repo-metadata.json
new file mode 100644
index 00000000000..078cbb15f0b
--- /dev/null
+++ b/packages/google-cloud-recaptchaenterprise/.repo-metadata.json
@@ -0,0 +1,16 @@
+{
+ "client_documentation": "https://cloud.google.com/nodejs/docs/reference/recaptcha-enterprise/latest",
+ "api_id": "recaptchaenterprise.googleapis.com",
+ "distribution_name": "@google-cloud/recaptcha-enterprise",
+ "release_level": "stable",
+ "default_version": "v1",
+ "language": "nodejs",
+ "name_pretty": "Google Cloud reCAPTCHA Enterprise",
+ "repo": "googleapis/google-cloud-node",
+ "product_documentation": "https://cloud.google.com/recaptcha-enterprise/docs/",
+ "requires_billing": true,
+ "name": "recaptcha-enterprise",
+ "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues",
+ "api_shortname": "recaptchaenterprise",
+ "library_type": "GAPIC_AUTO"
+}
diff --git a/packages/google-cloud-recaptchaenterprise/CHANGELOG.md b/packages/google-cloud-recaptchaenterprise/CHANGELOG.md
new file mode 100644
index 00000000000..42cf3fec26e
--- /dev/null
+++ b/packages/google-cloud-recaptchaenterprise/CHANGELOG.md
@@ -0,0 +1,354 @@
+# Changelog
+
+[npm history][1]
+
+[1]: https://www.npmjs.com/package/@google-cloud/recaptcha-enterprise?activeTab=versions
+
+## [3.1.1](https://github.com/googleapis/nodejs-recaptcha-enterprise/compare/v3.1.0...v3.1.1) (2022-11-11)
+
+
+### Bug Fixes
+
+* **deps:** Use google-gax v3.5.2 ([#415](https://github.com/googleapis/nodejs-recaptcha-enterprise/issues/415)) ([c6c07ec](https://github.com/googleapis/nodejs-recaptcha-enterprise/commit/c6c07ecfc53d1983dbd7d87a3a6e917629bf1cf3))
+* Regenerated protos JS and TS definitions ([#419](https://github.com/googleapis/nodejs-recaptcha-enterprise/issues/419)) ([932b9c7](https://github.com/googleapis/nodejs-recaptcha-enterprise/commit/932b9c7a3dcfd2fbed34647d2050c22a34e79b5a))
+
+## [3.1.0](https://github.com/googleapis/nodejs-recaptcha-enterprise/compare/v3.0.4...v3.1.0) (2022-10-13)
+
+
+### Features
+
+* Add RetrieveLegacySecretKey method ([#411](https://github.com/googleapis/nodejs-recaptcha-enterprise/issues/411)) ([2e8fa59](https://github.com/googleapis/nodejs-recaptcha-enterprise/commit/2e8fa599b514e9e666bd04d009dd503318c205e4))
+
+## [3.0.4](https://github.com/googleapis/nodejs-recaptcha-enterprise/compare/v3.0.3...v3.0.4) (2022-09-22)
+
+
+### Bug Fixes
+
+* Allow passing gax instance to client constructor ([#403](https://github.com/googleapis/nodejs-recaptcha-enterprise/issues/403)) ([4e53af0](https://github.com/googleapis/nodejs-recaptcha-enterprise/commit/4e53af0efb857467f4100700243c269c2d35b2fd))
+* Do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-recaptcha-enterprise/issues/1553)) ([#402](https://github.com/googleapis/nodejs-recaptcha-enterprise/issues/402)) ([a0508d7](https://github.com/googleapis/nodejs-recaptcha-enterprise/commit/a0508d77f3d4e46338b714555163b85c4d6871af))
+* Preserve default values in x-goog-request-params header ([#408](https://github.com/googleapis/nodejs-recaptcha-enterprise/issues/408)) ([53d8757](https://github.com/googleapis/nodejs-recaptcha-enterprise/commit/53d8757169e872522d8b1e6d2854bf75aac375fa))
+* use google-gax v3.3.0 ([a0508d7](https://github.com/googleapis/nodejs-recaptcha-enterprise/commit/a0508d77f3d4e46338b714555163b85c4d6871af))
+
+## [3.0.3](https://github.com/googleapis/nodejs-recaptcha-enterprise/compare/v3.0.2...v3.0.3) (2022-08-23)
+
+
+### Bug Fixes
+
+* better support for fallback mode ([#396](https://github.com/googleapis/nodejs-recaptcha-enterprise/issues/396)) ([a3dde75](https://github.com/googleapis/nodejs-recaptcha-enterprise/commit/a3dde75d3080a30c5613703041d48ec466403511))
+* change import long to require ([#398](https://github.com/googleapis/nodejs-recaptcha-enterprise/issues/398)) ([6d14b20](https://github.com/googleapis/nodejs-recaptcha-enterprise/commit/6d14b2030dd5ca2bf6fdc7ba72c45d05ac19bd1a))
+* remove pip install statements ([#1546](https://github.com/googleapis/nodejs-recaptcha-enterprise/issues/1546)) ([#401](https://github.com/googleapis/nodejs-recaptcha-enterprise/issues/401)) ([82e9ae9](https://github.com/googleapis/nodejs-recaptcha-enterprise/commit/82e9ae9361edbb1c98284d6946ae299fbf607faf))
+
+## [3.0.2](https://github.com/googleapis/nodejs-recaptcha-enterprise/compare/v3.0.1...v3.0.2) (2022-06-30)
+
+
+### Bug Fixes
+
+* **docs:** describe fallback rest option ([#387](https://github.com/googleapis/nodejs-recaptcha-enterprise/issues/387)) ([fe11f09](https://github.com/googleapis/nodejs-recaptcha-enterprise/commit/fe11f09fb6b12af1194ac63bccec4c6a79f5d9a4))
+
+## [3.0.1](https://github.com/googleapis/nodejs-recaptcha-enterprise/compare/v3.0.0...v3.0.1) (2022-06-16)
+
+
+### Bug Fixes
+
+* set the right field number for reCAPTCHA private password leak ([#385](https://github.com/googleapis/nodejs-recaptcha-enterprise/issues/385)) ([1d571f3](https://github.com/googleapis/nodejs-recaptcha-enterprise/commit/1d571f3eb1eeb8f83bb52a32a39ee527e8411af1))
+
+## [3.0.0](https://github.com/googleapis/nodejs-recaptcha-enterprise/compare/v2.5.0...v3.0.0) (2022-05-19)
+
+
+### ⚠ BREAKING CHANGES
+
+* update library to use Node 12 (#374)
+* rename parent to project in SearchRelatedAccountGroupMembershipsRequest (#370)
+* remove key management API (#366)
+
+### Features
+
+* Add support for Password Check through the private_password_leak_verification field in the reCAPTCHA Assessment ([#376](https://github.com/googleapis/nodejs-recaptcha-enterprise/issues/376)) ([7c1583c](https://github.com/googleapis/nodejs-recaptcha-enterprise/commit/7c1583c6854d9a567fd135f5ba1629250fe5f8ce))
+
+
+### Bug Fixes
+
+* remove key management API ([#366](https://github.com/googleapis/nodejs-recaptcha-enterprise/issues/366)) ([44a5a4b](https://github.com/googleapis/nodejs-recaptcha-enterprise/commit/44a5a4be5ee8fedd9258d28cd2151f15961dba5c))
+* rename parent to project in SearchRelatedAccountGroupMembershipsRequest ([#370](https://github.com/googleapis/nodejs-recaptcha-enterprise/issues/370)) ([aad0883](https://github.com/googleapis/nodejs-recaptcha-enterprise/commit/aad0883aa839e16ab76c3057678cf7583652466a))
+
+
+### Build System
+
+* update library to use Node 12 ([#374](https://github.com/googleapis/nodejs-recaptcha-enterprise/issues/374)) ([4042ae2](https://github.com/googleapis/nodejs-recaptcha-enterprise/commit/4042ae2304c92b7c74187c3874807be80ad72537))
+
+## [2.5.0](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v2.4.0...v2.5.0) (2021-12-10)
+
+
+### Features
+
+* add new reCAPTCHA Enterprise fraud annotations ([#334](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/334)) ([24fdff1](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/24fdff1520fb8ff3192be7d256f7a7875d5803b6))
+
+## [2.4.0](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v2.3.0...v2.4.0) (2021-11-09)
+
+
+### Features
+
+* add reCAPTCHA Enterprise account defender API methods ([#328](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/328)) ([2099c50](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/2099c503c2bb91347761b083140c66f22b042a0d))
+
+## [2.3.0](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v2.2.1...v2.3.0) (2021-09-16)
+
+
+### Features
+
+* add GetMetrics and MigrateKey methods to reCAPTCHA enterprise API ([#318](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/318)) ([55b1adc](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/55b1adc261879db1b073f3ad9cd3453c09d1e8d8))
+
+### [2.2.1](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v2.2.0...v2.2.1) (2021-09-09)
+
+
+### Bug Fixes
+
+* **build:** switch primary branch to main ([#315](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/315)) ([2fc99ad](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/2fc99ad6d478bc98f8d3cf39ba19780b13449db3))
+
+## [2.2.0](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v2.1.7...v2.2.0) (2021-08-23)
+
+
+### Features
+
+* turns on self-signed JWT feature flag ([#311](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/311)) ([c12da34](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/c12da3410a4ebc87884d9caaaba7c700b396c6b4))
+
+### [2.1.7](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v2.1.6...v2.1.7) (2021-08-17)
+
+
+### Bug Fixes
+
+* **deps:** google-gax v2.24.1 ([#309](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/309)) ([de80090](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/de800902327bad13ee6145ecbbb6b90d11cb8f59))
+
+### [2.1.6](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v2.1.5...v2.1.6) (2021-07-16)
+
+
+### Bug Fixes
+
+* Updating WORKSPACE files to use the newest version of the Typescript generator. ([#299](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/299)) ([6787e23](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/6787e23374c3ef97b4f267bf629ae03bf58f321a))
+
+### [2.1.5](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v2.1.4...v2.1.5) (2021-07-12)
+
+
+### Bug Fixes
+
+* **deps:** google-gax v2.17.1 ([#297](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/297)) ([15640f1](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/15640f1a4a931caa9ece4b749994e7d6d609200e))
+
+### [2.1.4](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v2.1.3...v2.1.4) (2021-06-30)
+
+
+### Bug Fixes
+
+* **deps:** google-gax v2.17.0 with mTLS ([#294](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/294)) ([45c12e5](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/45c12e5a7f9dbb40f054f7a4d9da0477010f6b00))
+
+### [2.1.3](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v2.1.2...v2.1.3) (2021-06-24)
+
+
+### Bug Fixes
+
+* make request optional in all cases ([#290](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/290)) ([e18a1d1](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/e18a1d1131bed1ce355f9e91811a68b0799ca696))
+
+### [2.1.2](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v2.1.1...v2.1.2) (2021-05-25)
+
+
+### Bug Fixes
+
+* GoogleAdsError missing using generator version after 1.3.0 ([#279](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/279)) ([6dc35a7](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/6dc35a7c158b3981d7854969d37ff0ddebbbe6de))
+
+### [2.1.1](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v2.1.0...v2.1.1) (2021-05-12)
+
+
+### Bug Fixes
+
+* **deps:** require google-gax v2.12.0 ([#270](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/270)) ([ab16a25](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/ab16a254b7da037039a51277495e65bbc983f1c7))
+* use require() to load JSON protos ([#273](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/273)) ([fdbc0fe](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/fdbc0fe7d12c1f70f3f592028c30c455a1526ee2))
+
+## [2.1.0](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v2.0.3...v2.1.0) (2021-01-07)
+
+
+### Features
+
+* introduces style enumeration ([#234](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/234)) ([35f1bb6](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/35f1bb6de0d16a10cc9e18ab7cf5aadd332bd0d8))
+
+### [2.0.3](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v2.0.2...v2.0.3) (2020-11-25)
+
+
+### Bug Fixes
+
+* **browser:** check for fetch on window ([#226](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/226)) ([8eb79dd](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/8eb79dd2b9f1eb7d4848aef63bf3bf236928fc67))
+
+### [2.0.2](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v2.0.1...v2.0.2) (2020-11-06)
+
+
+### Bug Fixes
+
+* do not modify options object, use defaultScopes ([#222](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/222)) ([807b692](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/807b6925ce52d14b3e7b2afa75fc54da805ce604))
+
+### [2.0.1](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v2.0.0...v2.0.1) (2020-07-06)
+
+
+### Bug Fixes
+
+* proper fallback option handling ([#180](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/180)) ([52fe53d](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/52fe53d93402d247036b31badde5d57fa4f1ee78))
+
+## [2.0.0](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v1.8.0...v2.0.0) (2020-05-12)
+
+
+### ⚠ BREAKING CHANGES
+
+* Remove RecaptchaEnterpriseServiceV1Beta1Client.
+* The library now supports Node.js v10+. The last version to support Node.js v8 is tagged legacy-8 on NPM.
+
+### Features
+
+* drop node8 support, support for async iterators ([#145](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/145)) ([cc4cc51](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/cc4cc51ec7b1ff8d5078b8524a9e7240639d72c3))
+
+
+### Bug Fixes
+
+* export explicit version from protos.js ([#150](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/150)) ([0bfb3c7](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/0bfb3c74a6eaaa906ee34224675ea8dad2e5a055))
+* regen protos and tests, formatting ([#169](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/169)) ([731fe3b](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/731fe3b8236478772a7cc311d0c26ee804080184))
+* remove eslint, update gax, fix generated protos, run the generator ([#155](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/155)) ([21b09f5](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/21b09f555632c6f36d1a487ccac3567064077a49))
+* synth.py clean up for multiple version ([#172](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/172)) ([ee1c250](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/ee1c2509b43b340a731aa98674ebceeab5ccdb2a))
+
+## [1.8.0](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v1.7.0...v1.8.0) (2020-03-25)
+
+
+### Features
+
+* add the v1 API surface ([#141](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/141)) ([bb1bd33](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/bb1bd33c1f51d37ca8db15ce7579259560250530))
+
+## [1.7.0](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v1.6.0...v1.7.0) (2020-03-10)
+
+
+### Features
+
+* deferred client initialization ([#128](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/128)) ([3de999e](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/3de999e1d4efc823dd52844a7ee19ec9b8c3ebfd))
+
+## [1.6.0](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v1.5.3...v1.6.0) (2020-03-05)
+
+
+### Features
+
+* export protos in src/index.ts ([ffd77ca](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/ffd77caffcec5d341517e7b82e58d1c50288ea22))
+
+### [1.5.3](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v1.5.2...v1.5.3) (2020-02-12)
+
+
+### Bug Fixes
+
+* pass x-goog-request-params header for streaming calls ([983411e](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/983411e0a115c6be6fe9ac0001d333bfef5e81a8))
+
+### [1.5.2](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v1.5.1...v1.5.2) (2020-01-28)
+
+
+### Bug Fixes
+
+* enum, bytes, and Long types now accept strings ([394cfd8](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/394cfd824a655245d1430afd68682b51e99b90d3))
+
+### [1.5.1](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v1.5.0...v1.5.1) (2020-01-09)
+
+
+### Bug Fixes
+
+* proper routing headers ([4d1b1d3](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/4d1b1d31da7e5ca064ad2d26f0a1b1103251bdfa))
+
+## [1.5.0](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v1.4.0...v1.5.0) (2020-01-02)
+
+
+### Features
+
+* move to typescript code generation ([#87](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/87)) ([11051db](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/11051db91512f6abb21988d6b7049ce9904a656c))
+
+## [1.4.0](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v1.3.1...v1.4.0) (2019-12-10)
+
+
+### Features
+
+* add crud support for keys ([#84](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/84)) ([adfc3f9](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/adfc3f954f79110ad73425e2da9381fa6c02152d))
+* add plural and singular resource descriptor ([#78](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/78)) ([a67ffa7](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/a67ffa751551f4d6346c806e82b2311030b7ab61))
+
+
+### Bug Fixes
+
+* **deps:** pin TypeScript below 3.7.0 ([0e96508](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/0e965087f253c8474143051c06a955d2797cbcf4))
+* **docs:** bump the release level to beta ([#76](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/76)) ([8a2e2c0](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/8a2e2c005d5d73a57cff2056cc212736610060a6))
+* **docs:** snippets are now replaced in jsdoc comments ([#74](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/74)) ([b3c31fc](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/b3c31fced63701a8e70b5f0ce3373466626ee960))
+
+### [1.3.1](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v1.3.0...v1.3.1) (2019-10-22)
+
+
+### Bug Fixes
+
+* **deps:** bump google-gax to 1.7.5 ([#68](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/68)) ([0605bb8](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/0605bb8ce6a246fb31f4d54f4fbc126f1924f331))
+
+## [1.3.0](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v1.2.0...v1.3.0) (2019-10-12)
+
+
+### Features
+
+* update scopes and classifications ([#60](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/60)) ([b216630](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/b216630a5abd910e908d0b81d0dfe24a4ddd66b5))
+
+
+### Bug Fixes
+
+* use compatible version of google-gax ([dfb174a](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/dfb174aa8848f66e83d4f9f125ce3b7aaac282e2))
+
+## [1.2.0](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v1.1.4...v1.2.0) (2019-09-16)
+
+
+### Features
+
+* load protos from JSON, grpc-fallback support ([7a4b2a6](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/7a4b2a6))
+
+### [1.1.4](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v1.1.3...v1.1.4) (2019-08-26)
+
+
+### Bug Fixes
+
+* include the correct version of node in a header ([#46](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/46)) ([2cc8099](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/2cc8099))
+
+### [1.1.3](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v1.1.2...v1.1.3) (2019-08-05)
+
+
+### Bug Fixes
+
+* allow calls with no request, add JSON proto ([ab643f8](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/ab643f8))
+
+### [1.1.2](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v1.1.1...v1.1.2) (2019-06-26)
+
+
+### Bug Fixes
+
+* **docs:** link to reference docs section on googleapis.dev ([#35](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/35)) ([14ada6b](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/14ada6b))
+
+### [1.1.1](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v1.1.0...v1.1.1) (2019-06-14)
+
+
+### Bug Fixes
+
+* **docs:** move to new client docs URL ([#32](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/32)) ([6a95276](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/6a95276))
+
+## [1.1.0](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v1.0.0...v1.1.0) (2019-06-05)
+
+
+### Features
+
+* support apiEndpoint override in client constructor ([#30](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/30)) ([1192afd](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/1192afd))
+
+## 1.0.0 (2019-05-14)
+
+
+### Bug Fixes
+
+* **deps:** update dependency google-gax to v1 ([#17](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/17)) ([0f9e159](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/0f9e159))
+* DEADLINE_EXCEEDED retry code is idempotent ([#10](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/10)) ([746151c](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/746151c))
+* do not retry request on DEADLINE_EXCEEDED ([a6e9f4a](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/a6e9f4a))
+
+
+### Build System
+
+* upgrade engines field to >=8.10.0 ([#2](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/2)) ([94d6a49](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/94d6a49))
+
+
+### BREAKING CHANGES
+
+* upgrade engines field to >=8.10.0 (#2)
diff --git a/packages/google-cloud-recaptchaenterprise/CODE_OF_CONDUCT.md b/packages/google-cloud-recaptchaenterprise/CODE_OF_CONDUCT.md
new file mode 100644
index 00000000000..2add2547a81
--- /dev/null
+++ b/packages/google-cloud-recaptchaenterprise/CODE_OF_CONDUCT.md
@@ -0,0 +1,94 @@
+
+# Code of Conduct
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as
+contributors and maintainers pledge to making participation in our project and
+our community a harassment-free experience for everyone, regardless of age, body
+size, disability, ethnicity, gender identity and expression, level of
+experience, education, socio-economic status, nationality, personal appearance,
+race, religion, or sexual identity and orientation.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment
+include:
+
+* Using welcoming and inclusive language
+* Being respectful of differing viewpoints and experiences
+* Gracefully accepting constructive criticism
+* Focusing on what is best for the community
+* Showing empathy towards other community members
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery and unwelcome sexual attention or
+ advances
+* Trolling, insulting/derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or electronic
+ address, without explicit permission
+* Other conduct which could reasonably be considered inappropriate in a
+ professional setting
+
+## Our Responsibilities
+
+Project maintainers are responsible for clarifying the standards of acceptable
+behavior and are expected to take appropriate and fair corrective action in
+response to any instances of unacceptable behavior.
+
+Project maintainers have the right and responsibility to remove, edit, or reject
+comments, commits, code, wiki edits, issues, and other contributions that are
+not aligned to this Code of Conduct, or to ban temporarily or permanently any
+contributor for other behaviors that they deem inappropriate, threatening,
+offensive, or harmful.
+
+## Scope
+
+This Code of Conduct applies both within project spaces and in public spaces
+when an individual is representing the project or its community. Examples of
+representing a project or community include using an official project e-mail
+address, posting via an official social media account, or acting as an appointed
+representative at an online or offline event. Representation of a project may be
+further defined and clarified by project maintainers.
+
+This Code of Conduct also applies outside the project spaces when the Project
+Steward has a reasonable belief that an individual's behavior may have a
+negative impact on the project or its community.
+
+## Conflict Resolution
+
+We do not believe that all conflict is bad; healthy debate and disagreement
+often yield positive results. However, it is never okay to be disrespectful or
+to engage in behavior that violates the project’s code of conduct.
+
+If you see someone violating the code of conduct, you are encouraged to address
+the behavior directly with those involved. Many issues can be resolved quickly
+and easily, and this gives people more control over the outcome of their
+dispute. If you are unable to resolve the matter for any reason, or if the
+behavior is threatening or harassing, report it. We are dedicated to providing
+an environment where participants feel welcome and safe.
+
+Reports should be directed to *googleapis-stewards@google.com*, the
+Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to
+receive and address reported violations of the code of conduct. They will then
+work with a committee consisting of representatives from the Open Source
+Programs Office and the Google Open Source Strategy team. If for any reason you
+are uncomfortable reaching out to the Project Steward, please email
+opensource@google.com.
+
+We will investigate every complaint, but you may not receive a direct response.
+We will use our discretion in determining when and how to follow up on reported
+incidents, which may range from not taking action to permanent expulsion from
+the project and project-sponsored spaces. We will notify the accused of the
+report and provide them an opportunity to discuss it before any action is taken.
+The identity of the reporter will be omitted from the details of the report
+supplied to the accused. In potentially harmful situations, such as ongoing
+harassment or threats to anyone's safety, we may take action without notice.
+
+## Attribution
+
+This Code of Conduct is adapted from the Contributor Covenant, version 1.4,
+available at
+https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
\ No newline at end of file
diff --git a/packages/google-cloud-recaptchaenterprise/CONTRIBUTING.md b/packages/google-cloud-recaptchaenterprise/CONTRIBUTING.md
new file mode 100644
index 00000000000..3f52f24fcca
--- /dev/null
+++ b/packages/google-cloud-recaptchaenterprise/CONTRIBUTING.md
@@ -0,0 +1,76 @@
+# How to become a contributor and submit your own code
+
+**Table of contents**
+
+* [Contributor License Agreements](#contributor-license-agreements)
+* [Contributing a patch](#contributing-a-patch)
+* [Running the tests](#running-the-tests)
+* [Releasing the library](#releasing-the-library)
+
+## Contributor License Agreements
+
+We'd love to accept your sample apps and patches! Before we can take them, we
+have to jump a couple of legal hurdles.
+
+Please fill out either the individual or corporate Contributor License Agreement
+(CLA).
+
+ * If you are an individual writing original source code and you're sure you
+ own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual).
+ * If you work for a company that wants to allow you to contribute your work,
+ then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate).
+
+Follow either of the two links above to access the appropriate CLA and
+instructions for how to sign and return it. Once we receive it, we'll be able to
+accept your pull requests.
+
+## Contributing A Patch
+
+1. Submit an issue describing your proposed change to the repo in question.
+1. The repo owner will respond to your issue promptly.
+1. If your proposed change is accepted, and you haven't already done so, sign a
+ Contributor License Agreement (see details above).
+1. Fork the desired repo, develop and test your code changes.
+1. Ensure that your code adheres to the existing style in the code to which
+ you are contributing.
+1. Ensure that your code has an appropriate set of tests which all pass.
+1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling.
+1. Submit a pull request.
+
+### Before you begin
+
+1. [Select or create a Cloud Platform project][projects].
+1. [Enable billing for your project][billing].
+1. [Enable the Google Cloud reCAPTCHA Enterprise API][enable_api].
+1. [Set up authentication with a service account][auth] so you can access the
+ API from your local workstation.
+
+
+## Running the tests
+
+1. [Prepare your environment for Node.js setup][setup].
+
+1. Install dependencies:
+
+ npm install
+
+1. Run the tests:
+
+ # Run unit tests.
+ npm test
+
+ # Run sample integration tests.
+ npm run samples-test
+
+ # Run all system tests.
+ npm run system-test
+
+1. Lint (and maybe fix) any changes:
+
+ npm run fix
+
+[setup]: https://cloud.google.com/nodejs/docs/setup
+[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=recaptchaenterprise.googleapis.com
+[auth]: https://cloud.google.com/docs/authentication/getting-started
\ No newline at end of file
diff --git a/packages/google-cloud-recaptchaenterprise/LICENSE b/packages/google-cloud-recaptchaenterprise/LICENSE
new file mode 100644
index 00000000000..d6456956733
--- /dev/null
+++ b/packages/google-cloud-recaptchaenterprise/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.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.
diff --git a/packages/google-cloud-recaptchaenterprise/README.md b/packages/google-cloud-recaptchaenterprise/README.md
new file mode 100644
index 00000000000..e4866ae5969
--- /dev/null
+++ b/packages/google-cloud-recaptchaenterprise/README.md
@@ -0,0 +1,154 @@
+[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
+[//]: # "To regenerate it, use `python -m synthtool`."
+
+
+# [Google Cloud reCAPTCHA Enterprise: Node.js Client](https://github.com/googleapis/google-cloud-node)
+
+[](https://cloud.google.com/terms/launch-stages)
+[](https://www.npmjs.org/package/@google-cloud/recaptcha-enterprise)
+
+
+
+
+reCAPTCHA Enterprise API client for Node.js
+
+
+A comprehensive list of changes in each version may be found in
+[the CHANGELOG](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-recaptchaenterprise/CHANGELOG.md).
+
+* [Google Cloud reCAPTCHA Enterprise Node.js Client API Reference][client-docs]
+* [Google Cloud reCAPTCHA Enterprise Documentation][product-docs]
+* [github.com/googleapis/google-cloud-node/packages/google-cloud-recaptchaenterprise](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-recaptchaenterprise)
+
+Read more about the client libraries for Cloud APIs, including the older
+Google APIs Client Libraries, in [Client Libraries Explained][explained].
+
+[explained]: https://cloud.google.com/apis/docs/client-libraries-explained
+
+**Table of contents:**
+
+
+* [Quickstart](#quickstart)
+ * [Before you begin](#before-you-begin)
+ * [Installing the client library](#installing-the-client-library)
+
+* [Samples](#samples)
+* [Versioning](#versioning)
+* [Contributing](#contributing)
+* [License](#license)
+
+## Quickstart
+
+### Before you begin
+
+1. [Select or create a Cloud Platform project][projects].
+1. [Enable billing for your project][billing].
+1. [Enable the Google Cloud reCAPTCHA Enterprise API][enable_api].
+1. [Set up authentication with a service account][auth] so you can access the
+ API from your local workstation.
+
+### Installing the client library
+
+```bash
+npm install @google-cloud/recaptcha-enterprise
+```
+
+
+
+
+## Samples
+
+Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample.
+
+| Sample | Source Code | Try it |
+| --------------------------- | --------------------------------- | ------ |
+| Recaptcha_enterprise_service.annotate_assessment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/recaptcha_enterprise_service.annotate_assessment.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=/workspace/google-cloud-node/samples/generated/v1/recaptcha_enterprise_service.annotate_assessment.js,samples/README.md) |
+| Recaptcha_enterprise_service.create_assessment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/recaptcha_enterprise_service.create_assessment.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=/workspace/google-cloud-node/samples/generated/v1/recaptcha_enterprise_service.create_assessment.js,samples/README.md) |
+| Recaptcha_enterprise_service.create_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/recaptcha_enterprise_service.create_key.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=/workspace/google-cloud-node/samples/generated/v1/recaptcha_enterprise_service.create_key.js,samples/README.md) |
+| Recaptcha_enterprise_service.delete_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/recaptcha_enterprise_service.delete_key.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=/workspace/google-cloud-node/samples/generated/v1/recaptcha_enterprise_service.delete_key.js,samples/README.md) |
+| Recaptcha_enterprise_service.get_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/recaptcha_enterprise_service.get_key.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=/workspace/google-cloud-node/samples/generated/v1/recaptcha_enterprise_service.get_key.js,samples/README.md) |
+| Recaptcha_enterprise_service.get_metrics | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/recaptcha_enterprise_service.get_metrics.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=/workspace/google-cloud-node/samples/generated/v1/recaptcha_enterprise_service.get_metrics.js,samples/README.md) |
+| Recaptcha_enterprise_service.list_keys | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/recaptcha_enterprise_service.list_keys.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=/workspace/google-cloud-node/samples/generated/v1/recaptcha_enterprise_service.list_keys.js,samples/README.md) |
+| Recaptcha_enterprise_service.list_related_account_group_memberships | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/recaptcha_enterprise_service.list_related_account_group_memberships.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=/workspace/google-cloud-node/samples/generated/v1/recaptcha_enterprise_service.list_related_account_group_memberships.js,samples/README.md) |
+| Recaptcha_enterprise_service.list_related_account_groups | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/recaptcha_enterprise_service.list_related_account_groups.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=/workspace/google-cloud-node/samples/generated/v1/recaptcha_enterprise_service.list_related_account_groups.js,samples/README.md) |
+| Recaptcha_enterprise_service.migrate_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/recaptcha_enterprise_service.migrate_key.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=/workspace/google-cloud-node/samples/generated/v1/recaptcha_enterprise_service.migrate_key.js,samples/README.md) |
+| Recaptcha_enterprise_service.retrieve_legacy_secret_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/recaptcha_enterprise_service.retrieve_legacy_secret_key.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=/workspace/google-cloud-node/samples/generated/v1/recaptcha_enterprise_service.retrieve_legacy_secret_key.js,samples/README.md) |
+| Recaptcha_enterprise_service.search_related_account_group_memberships | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/recaptcha_enterprise_service.search_related_account_group_memberships.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=/workspace/google-cloud-node/samples/generated/v1/recaptcha_enterprise_service.search_related_account_group_memberships.js,samples/README.md) |
+| Recaptcha_enterprise_service.update_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/recaptcha_enterprise_service.update_key.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=/workspace/google-cloud-node/samples/generated/v1/recaptcha_enterprise_service.update_key.js,samples/README.md) |
+| Recaptcha_enterprise_service_v1_beta1.annotate_assessment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/recaptcha_enterprise_service_v1_beta1.annotate_assessment.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=/workspace/google-cloud-node/samples/generated/v1beta1/recaptcha_enterprise_service_v1_beta1.annotate_assessment.js,samples/README.md) |
+| Recaptcha_enterprise_service_v1_beta1.create_assessment | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/recaptcha_enterprise_service_v1_beta1.create_assessment.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=/workspace/google-cloud-node/samples/generated/v1beta1/recaptcha_enterprise_service_v1_beta1.create_assessment.js,samples/README.md) |
+| Recaptcha_enterprise_service_v1_beta1.create_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/recaptcha_enterprise_service_v1_beta1.create_key.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=/workspace/google-cloud-node/samples/generated/v1beta1/recaptcha_enterprise_service_v1_beta1.create_key.js,samples/README.md) |
+| Recaptcha_enterprise_service_v1_beta1.delete_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/recaptcha_enterprise_service_v1_beta1.delete_key.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=/workspace/google-cloud-node/samples/generated/v1beta1/recaptcha_enterprise_service_v1_beta1.delete_key.js,samples/README.md) |
+| Recaptcha_enterprise_service_v1_beta1.get_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/recaptcha_enterprise_service_v1_beta1.get_key.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=/workspace/google-cloud-node/samples/generated/v1beta1/recaptcha_enterprise_service_v1_beta1.get_key.js,samples/README.md) |
+| Recaptcha_enterprise_service_v1_beta1.list_keys | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/recaptcha_enterprise_service_v1_beta1.list_keys.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=/workspace/google-cloud-node/samples/generated/v1beta1/recaptcha_enterprise_service_v1_beta1.list_keys.js,samples/README.md) |
+| Recaptcha_enterprise_service_v1_beta1.update_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/recaptcha_enterprise_service_v1_beta1.update_key.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=/workspace/google-cloud-node/samples/generated/v1beta1/recaptcha_enterprise_service_v1_beta1.update_key.js,samples/README.md) |
+
+
+
+The [Google Cloud reCAPTCHA Enterprise Node.js Client API Reference][client-docs] documentation
+also contains samples.
+
+## Supported Node.js Versions
+
+Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/).
+Libraries are compatible with all current _active_ and _maintenance_ versions of
+Node.js.
+If you are using an end-of-life version of Node.js, we recommend that you update
+as soon as possible to an actively supported LTS version.
+
+Google's client libraries support legacy versions of Node.js runtimes on a
+best-efforts basis with the following warnings:
+
+* Legacy versions are not tested in continuous integration.
+* Some security patches and features cannot be backported.
+* Dependencies cannot be kept up-to-date.
+
+Client libraries targeting some end-of-life versions of Node.js are available, and
+can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag).
+The dist-tags follow the naming convention `legacy-(version)`.
+For example, `npm install @google-cloud/recaptcha-enterprise@legacy-8` installs client libraries
+for versions compatible with Node.js 8.
+
+## Versioning
+
+This library follows [Semantic Versioning](http://semver.org/).
+
+
+
+This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways
+unless absolutely necessary (e.g. because of critical security issues) or with
+an extensive deprecation period. Issues and requests against **stable** libraries
+are addressed with the highest priority.
+
+
+
+
+
+
+More Information: [Google Cloud Platform Launch Stages][launch_stages]
+
+[launch_stages]: https://cloud.google.com/terms/launch-stages
+
+## Contributing
+
+Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md).
+
+Please note that this `README.md`, the `samples/README.md`,
+and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`)
+are generated from a central template. To edit one of these files, make an edit
+to its templates in
+[directory](https://github.com/googleapis/synthtool).
+
+## License
+
+Apache Version 2.0
+
+See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
+
+[client-docs]: https://cloud.google.com/nodejs/docs/reference/recaptcha-enterprise/latest
+[product-docs]: https://cloud.google.com/recaptcha-enterprise/docs/
+[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
+[projects]: https://console.cloud.google.com/project
+[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
+[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=recaptchaenterprise.googleapis.com
+[auth]: https://cloud.google.com/docs/authentication/getting-started
diff --git a/packages/google-cloud-recaptchaenterprise/linkinator.config.json b/packages/google-cloud-recaptchaenterprise/linkinator.config.json
new file mode 100644
index 00000000000..befd23c8633
--- /dev/null
+++ b/packages/google-cloud-recaptchaenterprise/linkinator.config.json
@@ -0,0 +1,16 @@
+{
+ "recurse": true,
+ "skip": [
+ "https://codecov.io/gh/googleapis/",
+ "www.googleapis.com",
+ "img.shields.io",
+ "https://console.cloud.google.com/cloudshell",
+ "https://support.google.com"
+ ],
+ "silent": true,
+ "concurrency": 5,
+ "retry": true,
+ "retryErrors": true,
+ "retryErrorsCount": 5,
+ "retryErrorsJitter": 3000
+}
diff --git a/packages/google-cloud-recaptchaenterprise/package.json b/packages/google-cloud-recaptchaenterprise/package.json
new file mode 100644
index 00000000000..b397bf38278
--- /dev/null
+++ b/packages/google-cloud-recaptchaenterprise/package.json
@@ -0,0 +1,74 @@
+{
+ "repository": {
+ "type": "git",
+ "directory": "packages/google-cloud-recaptchaenterprise",
+ "url": "https://github.com/googleapis/google-cloud-node.git"
+ },
+ "name": "@google-cloud/recaptcha-enterprise",
+ "version": "3.1.1",
+ "author": "Google LLC",
+ "description": "reCAPTCHA Enterprise API client for Node.js",
+ "main": "build/src/index.js",
+ "files": [
+ "build/protos",
+ "build/src",
+ "AUTHORS",
+ "COPYING"
+ ],
+ "keywords": [
+ "google apis client",
+ "google api client",
+ "google apis",
+ "google api",
+ "google",
+ "google cloud platform",
+ "google cloud",
+ "cloud",
+ "google recaptchaenterprise",
+ "recaptchaenterprise",
+ "reCAPTCHA Enterprise API"
+ ],
+ "dependencies": {
+ "google-gax": "^3.5.2"
+ },
+ "devDependencies": {
+ "@types/mocha": "^9.0.0",
+ "@types/node": "^18.0.0",
+ "@types/sinon": "^10.0.0",
+ "c8": "^7.0.0",
+ "gts": "^3.1.0",
+ "jsdoc": "^4.0.0",
+ "jsdoc-fresh": "^2.0.0",
+ "jsdoc-region-tag": "^2.0.0",
+ "linkinator": "^4.0.0",
+ "mocha": "^9.2.2",
+ "null-loader": "^4.0.0",
+ "pack-n-play": "^1.0.0-2",
+ "sinon": "^14.0.0",
+ "ts-loader": "^9.0.0",
+ "typescript": "^4.6.4",
+ "webpack": "^5.0.0",
+ "webpack-cli": "^4.0.0"
+ },
+ "scripts": {
+ "lint": "gts check",
+ "fix": "gts fix",
+ "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test",
+ "system-test": "npm run compile && c8 mocha build/system-test",
+ "docs": "jsdoc -c .jsdoc.js",
+ "test": "c8 mocha build/test",
+ "docs-test": "linkinator docs",
+ "clean": "gts clean",
+ "compile": "tsc -p . && cp -r protos build/",
+ "compile-protos": "compileProtos src",
+ "predocs-test": "npm run docs",
+ "prepare": "npm run compile",
+ "prelint": "cd samples; npm link ../; npm install",
+ "precompile": "gts clean"
+ },
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-recaptchaenterprise"
+}
diff --git a/packages/google-cloud-recaptchaenterprise/protos/google/cloud/common_resources.proto b/packages/google-cloud-recaptchaenterprise/protos/google/cloud/common_resources.proto
new file mode 100644
index 00000000000..56c9f800d5e
--- /dev/null
+++ b/packages/google-cloud-recaptchaenterprise/protos/google/cloud/common_resources.proto
@@ -0,0 +1,52 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.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.
+
+// This file contains stub messages for common resources in GCP.
+// It is not intended to be directly generated, and is instead used by
+// other tooling to be able to match common resource patterns.
+syntax = "proto3";
+
+package google.cloud;
+
+import "google/api/resource.proto";
+
+
+option (google.api.resource_definition) = {
+ type: "cloudresourcemanager.googleapis.com/Project"
+ pattern: "projects/{project}"
+};
+
+
+option (google.api.resource_definition) = {
+ type: "cloudresourcemanager.googleapis.com/Organization"
+ pattern: "organizations/{organization}"
+};
+
+
+option (google.api.resource_definition) = {
+ type: "cloudresourcemanager.googleapis.com/Folder"
+ pattern: "folders/{folder}"
+};
+
+
+option (google.api.resource_definition) = {
+ type: "cloudbilling.googleapis.com/BillingAccount"
+ pattern: "billingAccounts/{billing_account}"
+};
+
+option (google.api.resource_definition) = {
+ type: "locations.googleapis.com/Location"
+ pattern: "projects/{project}/locations/{location}"
+};
+
diff --git a/packages/google-cloud-recaptchaenterprise/protos/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto b/packages/google-cloud-recaptchaenterprise/protos/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto
new file mode 100644
index 00000000000..9376f342ce5
--- /dev/null
+++ b/packages/google-cloud-recaptchaenterprise/protos/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto
@@ -0,0 +1,998 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.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.recaptchaenterprise.v1;
+
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.RecaptchaEnterprise.V1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/recaptchaenterprise/v1;recaptchaenterprise";
+option java_multiple_files = true;
+option java_outer_classname = "RecaptchaEnterpriseProto";
+option java_package = "com.google.recaptchaenterprise.v1";
+option objc_class_prefix = "GCRE";
+option php_namespace = "Google\\Cloud\\RecaptchaEnterprise\\V1";
+option ruby_package = "Google::Cloud::RecaptchaEnterprise::V1";
+
+// Service to determine the likelihood an event is legitimate.
+service RecaptchaEnterpriseService {
+ option (google.api.default_host) = "recaptchaenterprise.googleapis.com";
+ option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
+
+ // Creates an Assessment of the likelihood an event is legitimate.
+ rpc CreateAssessment(CreateAssessmentRequest) returns (Assessment) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*}/assessments"
+ body: "assessment"
+ };
+ option (google.api.method_signature) = "parent,assessment";
+ }
+
+ // Annotates a previously created Assessment to provide additional information
+ // on whether the event turned out to be authentic or fraudulent.
+ rpc AnnotateAssessment(AnnotateAssessmentRequest) returns (AnnotateAssessmentResponse) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/assessments/*}:annotate"
+ body: "*"
+ };
+ option (google.api.method_signature) = "name,annotation";
+ }
+
+ // Creates a new reCAPTCHA Enterprise key.
+ rpc CreateKey(CreateKeyRequest) returns (Key) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*}/keys"
+ body: "key"
+ };
+ }
+
+ // Returns the list of all keys that belong to a project.
+ rpc ListKeys(ListKeysRequest) returns (ListKeysResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*}/keys"
+ };
+ }
+
+ // Returns the secret key related to the specified public key.
+ // You must use the legacy secret key only in a 3rd party integration with
+ // legacy reCAPTCHA.
+ rpc RetrieveLegacySecretKey(RetrieveLegacySecretKeyRequest) returns (RetrieveLegacySecretKeyResponse) {
+ option (google.api.http) = {
+ get: "/v1/{key=projects/*/keys/*}:retrieveLegacySecretKey"
+ };
+ option (google.api.method_signature) = "key";
+ }
+
+ // Returns the specified key.
+ rpc GetKey(GetKeyRequest) returns (Key) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/keys/*}"
+ };
+ }
+
+ // Updates the specified key.
+ rpc UpdateKey(UpdateKeyRequest) returns (Key) {
+ option (google.api.http) = {
+ patch: "/v1/{key.name=projects/*/keys/*}"
+ body: "key"
+ };
+ }
+
+ // Deletes the specified key.
+ rpc DeleteKey(DeleteKeyRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/{name=projects/*/keys/*}"
+ };
+ }
+
+ // Migrates an existing key from reCAPTCHA to reCAPTCHA Enterprise.
+ // Once a key is migrated, it can be used from either product. SiteVerify
+ // requests are billed as CreateAssessment calls. You must be
+ // authenticated as one of the current owners of the reCAPTCHA Site Key, and
+ // your user must have the reCAPTCHA Enterprise Admin IAM role in the
+ // destination project.
+ rpc MigrateKey(MigrateKeyRequest) returns (Key) {
+ option (google.api.http) = {
+ post: "/v1/{name=projects/*/keys/*}:migrate"
+ body: "*"
+ };
+ }
+
+ // Get some aggregated metrics for a Key. This data can be used to build
+ // dashboards.
+ rpc GetMetrics(GetMetricsRequest) returns (Metrics) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*/keys/*/metrics}"
+ };
+ option (google.api.method_signature) = "name";
+ }
+
+ // List groups of related accounts.
+ rpc ListRelatedAccountGroups(ListRelatedAccountGroupsRequest) returns (ListRelatedAccountGroupsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*}/relatedaccountgroups"
+ };
+ option (google.api.method_signature) = "parent";
+ }
+
+ // Get memberships in a group of related accounts.
+ rpc ListRelatedAccountGroupMemberships(ListRelatedAccountGroupMembershipsRequest) returns (ListRelatedAccountGroupMembershipsResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*/relatedaccountgroups/*}/memberships"
+ };
+ option (google.api.method_signature) = "parent";
+ }
+
+ // Search group memberships related to a given account.
+ rpc SearchRelatedAccountGroupMemberships(SearchRelatedAccountGroupMembershipsRequest) returns (SearchRelatedAccountGroupMembershipsResponse) {
+ option (google.api.http) = {
+ post: "/v1/{project=projects/*}/relatedaccountgroupmemberships:search"
+ body: "*"
+ };
+ option (google.api.method_signature) = "project,hashed_account_id";
+ }
+}
+
+// The create assessment request message.
+message CreateAssessmentRequest {
+ // Required. The name of the project in which the assessment will be created,
+ // in the format "projects/{project}".
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudresourcemanager.googleapis.com/Project"
+ }
+ ];
+
+ // Required. The assessment details.
+ Assessment assessment = 2 [(google.api.field_behavior) = REQUIRED];
+}
+
+// The request message to annotate an Assessment.
+message AnnotateAssessmentRequest {
+ // Enum that represents the types of annotations.
+ enum Annotation {
+ // Default unspecified type.
+ ANNOTATION_UNSPECIFIED = 0;
+
+ // Provides information that the event turned out to be legitimate.
+ LEGITIMATE = 1;
+
+ // Provides information that the event turned out to be fraudulent.
+ FRAUDULENT = 2;
+
+ // Provides information that the event was related to a login event in which
+ // the user typed the correct password. Deprecated, prefer indicating
+ // CORRECT_PASSWORD through the reasons field instead.
+ PASSWORD_CORRECT = 3 [deprecated = true];
+
+ // Provides information that the event was related to a login event in which
+ // the user typed the incorrect password. Deprecated, prefer indicating
+ // INCORRECT_PASSWORD through the reasons field instead.
+ PASSWORD_INCORRECT = 4 [deprecated = true];
+ }
+
+ // Enum that represents potential reasons for annotating an assessment.
+ enum Reason {
+ // Default unspecified reason.
+ REASON_UNSPECIFIED = 0;
+
+ // Indicates that the transaction had a chargeback issued with no other
+ // details. When possible, specify the type by using CHARGEBACK_FRAUD or
+ // CHARGEBACK_DISPUTE instead.
+ CHARGEBACK = 1;
+
+ // Indicates that the transaction had a chargeback issued related to an
+ // alleged unauthorized transaction from the cardholder's perspective (for
+ // example, the card number was stolen).
+ CHARGEBACK_FRAUD = 8;
+
+ // Indicates that the transaction had a chargeback issued related to the
+ // cardholder having provided their card details but allegedly not being
+ // satisfied with the purchase (for example, misrepresentation, attempted
+ // cancellation).
+ CHARGEBACK_DISPUTE = 9;
+
+ // Indicates that the completed payment transaction was refunded by the
+ // seller.
+ REFUND = 10;
+
+ // Indicates that the completed payment transaction was determined to be
+ // fraudulent by the seller, and was cancelled and refunded as a result.
+ REFUND_FRAUD = 11;
+
+ // Indicates that the payment transaction was accepted, and the user was
+ // charged.
+ TRANSACTION_ACCEPTED = 12;
+
+ // Indicates that the payment transaction was declined, for example due to
+ // invalid card details.
+ TRANSACTION_DECLINED = 13;
+
+ // Indicates the transaction associated with the assessment is suspected of
+ // being fraudulent based on the payment method, billing details, shipping
+ // address or other transaction information.
+ PAYMENT_HEURISTICS = 2;
+
+ // Indicates that the user was served a 2FA challenge. An old assessment
+ // with `ENUM_VALUES.INITIATED_TWO_FACTOR` reason that has not been
+ // overwritten with `PASSED_TWO_FACTOR` is treated as an abandoned 2FA flow.
+ // This is equivalent to `FAILED_TWO_FACTOR`.
+ INITIATED_TWO_FACTOR = 7;
+
+ // Indicates that the user passed a 2FA challenge.
+ PASSED_TWO_FACTOR = 3;
+
+ // Indicates that the user failed a 2FA challenge.
+ FAILED_TWO_FACTOR = 4;
+
+ // Indicates the user provided the correct password.
+ CORRECT_PASSWORD = 5;
+
+ // Indicates the user provided an incorrect password.
+ INCORRECT_PASSWORD = 6;
+
+ // Indicates that the user sent unwanted and abusive messages to other users
+ // of the platform, such as spam, scams, phishing, or social engineering.
+ SOCIAL_SPAM = 14;
+ }
+
+ // Required. The resource name of the Assessment, in the format
+ // "projects/{project}/assessments/{assessment}".
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "recaptchaenterprise.googleapis.com/Assessment"
+ }
+ ];
+
+ // Optional. The annotation that will be assigned to the Event. This field can be left
+ // empty to provide reasons that apply to an event without concluding whether
+ // the event is legitimate or fraudulent.
+ Annotation annotation = 2 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. Optional reasons for the annotation that will be assigned to the Event.
+ repeated Reason reasons = 3 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. Unique stable hashed user identifier to apply to the assessment.
+ // This is an alternative to setting the hashed_account_id in
+ // CreateAssessment, for example when the account identifier is not yet known
+ // in the initial request. It is recommended that the identifier is hashed
+ // using hmac-sha256 with stable secret.
+ bytes hashed_account_id = 4 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Empty response for AnnotateAssessment.
+message AnnotateAssessmentResponse {
+
+}
+
+// Private password leak verification info.
+message PrivatePasswordLeakVerification {
+ // Optional. Exactly 26-bit prefix of the SHA-256 hash of the canonicalized username. It
+ // is used to look up password leaks associated with that hash prefix.
+ bytes lookup_hash_prefix = 1 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. Encrypted Scrypt hash of the canonicalized username+password. It is
+ // re-encrypted by the server and returned through
+ // `reencrypted_user_credentials_hash`.
+ bytes encrypted_user_credentials_hash = 2 [(google.api.field_behavior) = OPTIONAL];
+
+ // Output only. List of prefixes of the encrypted potential password leaks that matched the
+ // given parameters. They must be compared with the client-side decryption
+ // prefix of `reencrypted_user_credentials_hash`
+ repeated bytes encrypted_leak_match_prefixes = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. Corresponds to the re-encryption of the `encrypted_user_credentials_hash`
+ // field. It is used to match potential password leaks within
+ // `encrypted_leak_match_prefixes`.
+ bytes reencrypted_user_credentials_hash = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
+}
+
+// A recaptcha assessment resource.
+message Assessment {
+ option (google.api.resource) = {
+ type: "recaptchaenterprise.googleapis.com/Assessment"
+ pattern: "projects/{project}/assessments/{assessment}"
+ };
+
+ // Output only. The resource name for the Assessment in the format
+ // "projects/{project}/assessments/{assessment}".
+ string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // The event being assessed.
+ Event event = 2;
+
+ // Output only. The risk analysis result for the event being assessed.
+ RiskAnalysis risk_analysis = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. Properties of the provided event token.
+ TokenProperties token_properties = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Assessment returned by account defender when a hashed_account_id is
+ // provided.
+ AccountDefenderAssessment account_defender_assessment = 6;
+
+ // The private password leak verification field contains the parameters that
+ // are used to to check for leaks privately without sharing user credentials.
+ PrivatePasswordLeakVerification private_password_leak_verification = 8;
+}
+
+message Event {
+ // Optional. The user response token provided by the reCAPTCHA client-side integration
+ // on your site.
+ string token = 1 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. The site key that was used to invoke reCAPTCHA on your site and generate
+ // the token.
+ string site_key = 2 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. The user agent present in the request from the user's device related to
+ // this event.
+ string user_agent = 3 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. The IP address in the request from the user's device related to this event.
+ string user_ip_address = 4 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. The expected action for this type of event. This should be the same action
+ // provided at token generation time on client-side platforms already
+ // integrated with recaptcha enterprise.
+ string expected_action = 5 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. Unique stable hashed user identifier for the request. The identifier must
+ // be hashed using hmac-sha256 with stable secret.
+ bytes hashed_account_id = 6 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Risk analysis result for an event.
+message RiskAnalysis {
+ // Reasons contributing to the risk analysis verdict.
+ enum ClassificationReason {
+ // Default unspecified type.
+ CLASSIFICATION_REASON_UNSPECIFIED = 0;
+
+ // Interactions matched the behavior of an automated agent.
+ AUTOMATION = 1;
+
+ // The event originated from an illegitimate environment.
+ UNEXPECTED_ENVIRONMENT = 2;
+
+ // Traffic volume from the event source is higher than normal.
+ TOO_MUCH_TRAFFIC = 3;
+
+ // Interactions with the site were significantly different than expected
+ // patterns.
+ UNEXPECTED_USAGE_PATTERNS = 4;
+
+ // Too little traffic has been received from this site thus far to generate
+ // quality risk analysis.
+ LOW_CONFIDENCE_SCORE = 5;
+ }
+
+ // Legitimate event score from 0.0 to 1.0.
+ // (1.0 means very likely legitimate traffic while 0.0 means very likely
+ // non-legitimate traffic).
+ float score = 1;
+
+ // Reasons contributing to the risk analysis verdict.
+ repeated ClassificationReason reasons = 2;
+}
+
+message TokenProperties {
+ // Enum that represents the types of invalid token reasons.
+ enum InvalidReason {
+ // Default unspecified type.
+ INVALID_REASON_UNSPECIFIED = 0;
+
+ // If the failure reason was not accounted for.
+ UNKNOWN_INVALID_REASON = 1;
+
+ // The provided user verification token was malformed.
+ MALFORMED = 2;
+
+ // The user verification token had expired.
+ EXPIRED = 3;
+
+ // The user verification had already been seen.
+ DUPE = 4;
+
+ // The user verification token was not present.
+ MISSING = 5;
+
+ // A retriable error (such as network failure) occurred on the browser.
+ // Could easily be simulated by an attacker.
+ BROWSER_ERROR = 6;
+ }
+
+ // Whether the provided user response token is valid. When valid = false, the
+ // reason could be specified in invalid_reason or it could also be due to
+ // a user failing to solve a challenge or a sitekey mismatch (i.e the sitekey
+ // used to generate the token was different than the one specified in the
+ // assessment).
+ bool valid = 1;
+
+ // Reason associated with the response when valid = false.
+ InvalidReason invalid_reason = 2;
+
+ // The timestamp corresponding to the generation of the token.
+ google.protobuf.Timestamp create_time = 3;
+
+ // The hostname of the page on which the token was generated (Web keys only).
+ string hostname = 4;
+
+ // Action name provided at token generation.
+ string action = 5;
+}
+
+// Account defender risk assessment.
+message AccountDefenderAssessment {
+ // Labels returned by account defender for this request.
+ enum AccountDefenderLabel {
+ // Default unspecified type.
+ ACCOUNT_DEFENDER_LABEL_UNSPECIFIED = 0;
+
+ // The request matches a known good profile for the user.
+ PROFILE_MATCH = 1;
+
+ // The request is potentially a suspicious login event and must be further
+ // verified either through multi-factor authentication or another system.
+ SUSPICIOUS_LOGIN_ACTIVITY = 2;
+
+ // The request matched a profile that previously had suspicious account
+ // creation behavior. This can mean that this is a fake account.
+ SUSPICIOUS_ACCOUNT_CREATION = 3;
+
+ // The account in the request has a high number of related accounts. It does
+ // not necessarily imply that the account is bad but can require further
+ // investigation.
+ RELATED_ACCOUNTS_NUMBER_HIGH = 4;
+ }
+
+ // Labels for this request.
+ repeated AccountDefenderLabel labels = 1;
+}
+
+// The create key request message.
+message CreateKeyRequest {
+ // Required. The name of the project in which the key will be created, in the
+ // format "projects/{project}".
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudresourcemanager.googleapis.com/Project"
+ }
+ ];
+
+ // Required. Information to create a reCAPTCHA Enterprise key.
+ Key key = 2 [(google.api.field_behavior) = REQUIRED];
+}
+
+// The list keys request message.
+message ListKeysRequest {
+ // Required. The name of the project that contains the keys that will be
+ // listed, in the format "projects/{project}".
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudresourcemanager.googleapis.com/Project"
+ }
+ ];
+
+ // Optional. The maximum number of keys to return. Default is 10. Max limit is
+ // 1000.
+ int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. The next_page_token value returned from a previous.
+ // ListKeysRequest, if any.
+ string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Response to request to list keys in a project.
+message ListKeysResponse {
+ // Key details.
+ repeated Key keys = 1;
+
+ // Token to retrieve the next page of results. It is set to empty if no keys
+ // remain in results.
+ string next_page_token = 2;
+}
+
+// The retrieve legacy secret key request message.
+message RetrieveLegacySecretKeyRequest {
+ // Required. The public key name linked to the requested secret key in the format
+ // "projects/{project}/keys/{key}".
+ string key = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "recaptchaenterprise.googleapis.com/Key"
+ }
+ ];
+}
+
+// The get key request message.
+message GetKeyRequest {
+ // Required. The name of the requested key, in the format
+ // "projects/{project}/keys/{key}".
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "recaptchaenterprise.googleapis.com/Key"
+ }
+ ];
+}
+
+// The update key request message.
+message UpdateKeyRequest {
+ // Required. The key to update.
+ Key key = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // Optional. The mask to control which fields of the key get updated. If the mask is not
+ // present, all fields will be updated.
+ google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// The delete key request message.
+message DeleteKeyRequest {
+ // Required. The name of the key to be deleted, in the format
+ // "projects/{project}/keys/{key}".
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "recaptchaenterprise.googleapis.com/Key"
+ }
+ ];
+}
+
+// The migrate key request message.
+message MigrateKeyRequest {
+ // Required. The name of the key to be migrated, in the format
+ // "projects/{project}/keys/{key}".
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "recaptchaenterprise.googleapis.com/Key"
+ }
+ ];
+}
+
+// The get metrics request message.
+message GetMetricsRequest {
+ // Required. The name of the requested metrics, in the format
+ // "projects/{project}/keys/{key}/metrics".
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "recaptchaenterprise.googleapis.com/Metrics"
+ }
+ ];
+}
+
+// Metrics for a single Key.
+message Metrics {
+ option (google.api.resource) = {
+ type: "recaptchaenterprise.googleapis.com/Metrics"
+ pattern: "projects/{project}/keys/{key}/metrics"
+ };
+
+ // Output only. The name of the metrics, in the format
+ // "projects/{project}/keys/{key}/metrics".
+ string name = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Inclusive start time aligned to a day (UTC).
+ google.protobuf.Timestamp start_time = 1;
+
+ // Metrics will be continuous and in order by dates, and in the granularity
+ // of day. All Key types should have score-based data.
+ repeated ScoreMetrics score_metrics = 2;
+
+ // Metrics will be continuous and in order by dates, and in the granularity
+ // of day. Only challenge-based keys (CHECKBOX, INVISIBLE), will have
+ // challenge-based data.
+ repeated ChallengeMetrics challenge_metrics = 3;
+}
+
+// Secret key is used only in legacy reCAPTCHA. It must be used in a 3rd party
+// integration with legacy reCAPTCHA.
+message RetrieveLegacySecretKeyResponse {
+ // The secret key (also known as shared secret) authorizes communication
+ // between your application backend and the reCAPTCHA Enterprise server to
+ // create an assessment.
+ // The secret key needs to be kept safe for security purposes.
+ string legacy_secret_key = 1;
+}
+
+// A key used to identify and configure applications (web and/or mobile) that
+// use reCAPTCHA Enterprise.
+message Key {
+ option (google.api.resource) = {
+ type: "recaptchaenterprise.googleapis.com/Key"
+ pattern: "projects/{project}/keys/{key}"
+ };
+
+ // The resource name for the Key in the format
+ // "projects/{project}/keys/{key}".
+ string name = 1;
+
+ // Human-readable display name of this key. Modifiable by user.
+ string display_name = 2;
+
+ // Platform specific settings for this key. The key can only be used on a
+ // platform for which the settings are enabled.
+ oneof platform_settings {
+ // Settings for keys that can be used by websites.
+ WebKeySettings web_settings = 3;
+
+ // Settings for keys that can be used by Android apps.
+ AndroidKeySettings android_settings = 4;
+
+ // Settings for keys that can be used by iOS apps.
+ IOSKeySettings ios_settings = 5;
+ }
+
+ // See
+ // Creating and managing labels.
+ map labels = 6;
+
+ // The timestamp corresponding to the creation of this Key.
+ google.protobuf.Timestamp create_time = 7;
+
+ // Options for user acceptance testing.
+ TestingOptions testing_options = 9;
+
+ // Settings for WAF
+ WafSettings waf_settings = 10;
+}
+
+// Options for user acceptance testing.
+message TestingOptions {
+ // Enum that represents the challenge option for challenge-based (CHECKBOX,
+ // INVISIBLE) testing keys.
+ enum TestingChallenge {
+ // Perform the normal risk analysis and return either nocaptcha or a
+ // challenge depending on risk and trust factors.
+ TESTING_CHALLENGE_UNSPECIFIED = 0;
+
+ // Challenge requests for this key always return a nocaptcha, which
+ // does not require a solution.
+ NOCAPTCHA = 1;
+
+ // Challenge requests for this key always return an unsolvable
+ // challenge.
+ UNSOLVABLE_CHALLENGE = 2;
+ }
+
+ // All assessments for this Key will return this score. Must be between 0
+ // (likely not legitimate) and 1 (likely legitimate) inclusive.
+ float testing_score = 1;
+
+ // For challenge-based keys only (CHECKBOX, INVISIBLE), all challenge requests
+ // for this site will return nocaptcha if NOCAPTCHA, or an unsolvable
+ // challenge if CHALLENGE.
+ TestingChallenge testing_challenge = 2;
+}
+
+// Settings specific to keys that can be used by websites.
+message WebKeySettings {
+ // Enum that represents the integration types for web keys.
+ enum IntegrationType {
+ // Default type that indicates this enum hasn't been specified. This is not
+ // a valid IntegrationType, one of the other types must be specified
+ // instead.
+ INTEGRATION_TYPE_UNSPECIFIED = 0;
+
+ // Only used to produce scores. It doesn't display the "I'm not a robot"
+ // checkbox and never shows captcha challenges.
+ SCORE = 1;
+
+ // Displays the "I'm not a robot" checkbox and may show captcha challenges
+ // after it is checked.
+ CHECKBOX = 2;
+
+ // Doesn't display the "I'm not a robot" checkbox, but may show captcha
+ // challenges after risk analysis.
+ INVISIBLE = 3;
+ }
+
+ // Enum that represents the possible challenge frequency and difficulty
+ // configurations for a web key.
+ enum ChallengeSecurityPreference {
+ // Default type that indicates this enum hasn't been specified.
+ CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED = 0;
+
+ // Key tends to show fewer and easier challenges.
+ USABILITY = 1;
+
+ // Key tends to show balanced (in amount and difficulty) challenges.
+ BALANCE = 2;
+
+ // Key tends to show more and harder challenges.
+ SECURITY = 3;
+ }
+
+ // If set to true, it means allowed_domains will not be enforced.
+ bool allow_all_domains = 3;
+
+ // Domains or subdomains of websites allowed to use the key. All subdomains
+ // of an allowed domain are automatically allowed. A valid domain requires a
+ // host and must not include any path, port, query or fragment.
+ // Examples: 'example.com' or 'subdomain.example.com'
+ repeated string allowed_domains = 1;
+
+ // If set to true, the key can be used on AMP (Accelerated Mobile Pages)
+ // websites. This is supported only for the SCORE integration type.
+ bool allow_amp_traffic = 2;
+
+ // Required. Describes how this key is integrated with the website.
+ IntegrationType integration_type = 4 [(google.api.field_behavior) = REQUIRED];
+
+ // Settings for the frequency and difficulty at which this key triggers
+ // captcha challenges. This should only be specified for IntegrationTypes
+ // CHECKBOX and INVISIBLE.
+ ChallengeSecurityPreference challenge_security_preference = 5;
+}
+
+// Settings specific to keys that can be used by Android apps.
+message AndroidKeySettings {
+ // If set to true, allowed_package_names are not enforced.
+ bool allow_all_package_names = 2;
+
+ // Android package names of apps allowed to use the key.
+ // Example: 'com.companyname.appname'
+ repeated string allowed_package_names = 1;
+}
+
+// Settings specific to keys that can be used by iOS apps.
+message IOSKeySettings {
+ // If set to true, allowed_bundle_ids are not enforced.
+ bool allow_all_bundle_ids = 2;
+
+ // iOS bundle ids of apps allowed to use the key.
+ // Example: 'com.companyname.productname.appname'
+ repeated string allowed_bundle_ids = 1;
+}
+
+// Score distribution.
+message ScoreDistribution {
+ // Map key is score value multiplied by 100. The scores are discrete values
+ // between [0, 1]. The maximum number of buckets is on order of a few dozen,
+ // but typically much lower (ie. 10).
+ map score_buckets = 1;
+}
+
+// Metrics related to scoring.
+message ScoreMetrics {
+ // Aggregated score metrics for all traffic.
+ ScoreDistribution overall_metrics = 1;
+
+ // Action-based metrics. The map key is the action name which specified by the
+ // site owners at time of the "execute" client-side call.
+ // Populated only for SCORE keys.
+ map action_metrics = 2;
+}
+
+// Metrics related to challenges.
+message ChallengeMetrics {
+ // Count of reCAPTCHA checkboxes or badges rendered. This is mostly equivalent
+ // to a count of pageloads for pages that include reCAPTCHA.
+ int64 pageload_count = 1;
+
+ // Count of nocaptchas (successful verification without a challenge) issued.
+ int64 nocaptcha_count = 2;
+
+ // Count of submitted challenge solutions that were incorrect or otherwise
+ // deemed suspicious such that a subsequent challenge was triggered.
+ int64 failed_count = 3;
+
+ // Count of nocaptchas (successful verification without a challenge) plus
+ // submitted challenge solutions that were correct and resulted in
+ // verification.
+ int64 passed_count = 4;
+}
+
+// The request message to list memberships in a related account group.
+message ListRelatedAccountGroupMembershipsRequest {
+ // Required. The resource name for the related account group in the format
+ // `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`.
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ child_type: "recaptchaenterprise.googleapis.com/RelatedAccountGroupMembership"
+ }
+ ];
+
+ // Optional. The maximum number of accounts to return. The service might return fewer
+ // than this value.
+ // If unspecified, at most 50 accounts are returned.
+ // The maximum value is 1000; values above 1000 are coerced to 1000.
+ int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. A page token, received from a previous `ListRelatedAccountGroupMemberships`
+ // call.
+ //
+ // When paginating, all other parameters provided to
+ // `ListRelatedAccountGroupMemberships` must match the call that provided the
+ // page token.
+ string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// The response to a `ListRelatedAccountGroupMemberships` call.
+message ListRelatedAccountGroupMembershipsResponse {
+ // The memberships listed by the query.
+ repeated RelatedAccountGroupMembership related_account_group_memberships = 1;
+
+ // A token, which can be sent as `page_token` to retrieve the next page.
+ // If this field is omitted, there are no subsequent pages.
+ string next_page_token = 2;
+}
+
+// The request message to list related account groups.
+message ListRelatedAccountGroupsRequest {
+ // Required. The name of the project to list related account groups from, in the format
+ // "projects/{project}".
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ child_type: "recaptchaenterprise.googleapis.com/RelatedAccountGroup"
+ }
+ ];
+
+ // Optional. The maximum number of groups to return. The service might return fewer than
+ // this value.
+ // If unspecified, at most 50 groups are returned.
+ // The maximum value is 1000; values above 1000 are coerced to 1000.
+ int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. A page token, received from a previous `ListRelatedAccountGroups` call.
+ // Provide this to retrieve the subsequent page.
+ //
+ // When paginating, all other parameters provided to
+ // `ListRelatedAccountGroups` must match the call that provided the page
+ // token.
+ string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// The response to a `ListRelatedAccountGroups` call.
+message ListRelatedAccountGroupsResponse {
+ // The groups of related accounts listed by the query.
+ repeated RelatedAccountGroup related_account_groups = 1;
+
+ // A token, which can be sent as `page_token` to retrieve the next page.
+ // If this field is omitted, there are no subsequent pages.
+ string next_page_token = 2;
+}
+
+// The request message to search related account group memberships.
+message SearchRelatedAccountGroupMembershipsRequest {
+ // Required. The name of the project to search related account group memberships from.
+ // Specify the project name in the following format: "projects/{project}".
+ string project = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ child_type: "recaptchaenterprise.googleapis.com/RelatedAccountGroupMembership"
+ }
+ ];
+
+ // Optional. The unique stable hashed user identifier we should search connections to.
+ // The identifier should correspond to a `hashed_account_id` provided in a
+ // previous `CreateAssessment` or `AnnotateAssessment` call.
+ bytes hashed_account_id = 2 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. The maximum number of groups to return. The service might return fewer than
+ // this value.
+ // If unspecified, at most 50 groups are returned.
+ // The maximum value is 1000; values above 1000 are coerced to 1000.
+ int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. A page token, received from a previous
+ // `SearchRelatedAccountGroupMemberships` call. Provide this to retrieve the
+ // subsequent page.
+ //
+ // When paginating, all other parameters provided to
+ // `SearchRelatedAccountGroupMemberships` must match the call that provided
+ // the page token.
+ string page_token = 4 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// The response to a `SearchRelatedAccountGroupMemberships` call.
+message SearchRelatedAccountGroupMembershipsResponse {
+ // The queried memberships.
+ repeated RelatedAccountGroupMembership related_account_group_memberships = 1;
+
+ // A token, which can be sent as `page_token` to retrieve the next page.
+ // If this field is omitted, there are no subsequent pages.
+ string next_page_token = 2;
+}
+
+// A membership in a group of related accounts.
+message RelatedAccountGroupMembership {
+ option (google.api.resource) = {
+ type: "recaptchaenterprise.googleapis.com/RelatedAccountGroupMembership"
+ pattern: "projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}"
+ };
+
+ // Required. The resource name for this membership in the format
+ // `projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}`.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "recaptchaenterprise.googleapis.com/RelatedAccountGroupMembership"
+ }
+ ];
+
+ // The unique stable hashed user identifier of the member. The identifier
+ // corresponds to a `hashed_account_id` provided in a previous
+ // `CreateAssessment` or `AnnotateAssessment` call.
+ bytes hashed_account_id = 2;
+}
+
+// A group of related accounts.
+message RelatedAccountGroup {
+ option (google.api.resource) = {
+ type: "recaptchaenterprise.googleapis.com/RelatedAccountGroup"
+ pattern: "projects/{project}/relatedaccountgroups/{relatedaccountgroup}"
+ };
+
+ // Required. The resource name for the related account group in the format
+ // `projects/{project}/relatedaccountgroups/{related_account_group}`.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "recaptchaenterprise.googleapis.com/RelatedAccountGroup"
+ }
+ ];
+}
+
+// Settings specific to keys that can be used for WAF (Web Application
+// Firewall).
+message WafSettings {
+ // Supported WAF features. For more information, see
+ // https://cloud.google.com/recaptcha-enterprise/docs/usecase#comparison_of_features.
+ enum WafFeature {
+ // Undefined feature.
+ WAF_FEATURE_UNSPECIFIED = 0;
+
+ // Redirects suspicious traffic to reCAPTCHA.
+ CHALLENGE_PAGE = 1;
+
+ // Use reCAPTCHA session-tokens to protect the whole user session on the
+ // site's domain.
+ SESSION_TOKEN = 2;
+
+ // Use reCAPTCHA action-tokens to protect user actions.
+ ACTION_TOKEN = 3;
+ }
+
+ // Web Application Firewalls supported by reCAPTCHA Enterprise.
+ enum WafService {
+ // Undefined WAF
+ WAF_SERVICE_UNSPECIFIED = 0;
+
+ // Cloud Armor
+ CA = 1;
+ }
+
+ // Required. The WAF service that uses this key.
+ WafService waf_service = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // Required. The WAF feature for which this key is enabled.
+ WafFeature waf_feature = 2 [(google.api.field_behavior) = REQUIRED];
+}
diff --git a/packages/google-cloud-recaptchaenterprise/protos/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto b/packages/google-cloud-recaptchaenterprise/protos/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto
new file mode 100644
index 00000000000..28a07a8e51b
--- /dev/null
+++ b/packages/google-cloud-recaptchaenterprise/protos/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto
@@ -0,0 +1,350 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.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.recaptchaenterprise.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.RecaptchaEnterprise.V1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/recaptchaenterprise/v1beta1;recaptchaenterprise";
+option java_multiple_files = true;
+option java_outer_classname = "RecaptchaEnterpriseProto";
+option java_package = "com.google.recaptchaenterprise.v1beta1";
+option objc_class_prefix = "GCRE";
+option php_namespace = "Google\\Cloud\\RecaptchaEnterprise\\V1beta1";
+option ruby_package = "Google::Cloud::RecaptchaEnterprise::V1beta1";
+
+// Service to determine the likelihood an event is legitimate.
+service RecaptchaEnterpriseServiceV1Beta1 {
+ option (google.api.default_host) = "recaptchaenterprise.googleapis.com";
+ option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
+
+ // Creates an Assessment of the likelihood an event is legitimate.
+ rpc CreateAssessment(CreateAssessmentRequest) returns (Assessment) {
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*}/assessments"
+ body: "assessment"
+ };
+ option (google.api.method_signature) = "parent,assessment";
+ }
+
+ // Annotates a previously created Assessment to provide additional information
+ // on whether the event turned out to be authentic or fradulent.
+ rpc AnnotateAssessment(AnnotateAssessmentRequest) returns (AnnotateAssessmentResponse) {
+ option (google.api.http) = {
+ post: "/v1beta1/{name=projects/*/assessments/*}:annotate"
+ body: "*"
+ };
+ option (google.api.method_signature) = "name,annotation";
+ }
+}
+
+// The create assessment request message.
+message CreateAssessmentRequest {
+ // Required. The name of the project in which the assessment will be created,
+ // in the format "projects/{project_number}".
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudresourcemanager.googleapis.com/Project"
+ }
+ ];
+
+ // Required. The assessment details.
+ Assessment assessment = 2 [(google.api.field_behavior) = REQUIRED];
+}
+
+// The request message to annotate an Assessment.
+message AnnotateAssessmentRequest {
+ // Enum that represents the types of annotations.
+ enum Annotation {
+ // Default unspecified type.
+ ANNOTATION_UNSPECIFIED = 0;
+
+ // Provides information that the event turned out to be legitimate.
+ LEGITIMATE = 1;
+
+ // Provides information that the event turned out to be fraudulent.
+ FRAUDULENT = 2;
+
+ // Provides information that the event was related to a login event in which
+ // the user typed the correct password. Deprecated, prefer indicating
+ // CORRECT_PASSWORD through the reasons field instead.
+ PASSWORD_CORRECT = 3 [deprecated = true];
+
+ // Provides information that the event was related to a login event in which
+ // the user typed the incorrect password. Deprecated, prefer indicating
+ // INCORRECT_PASSWORD through the reasons field instead.
+ PASSWORD_INCORRECT = 4 [deprecated = true];
+ }
+
+ // Enum that represents potential reasons for annotating an assessment.
+ enum Reason {
+ // Default unspecified reason.
+ REASON_UNSPECIFIED = 0;
+
+ // Indicates a chargeback issued for the transaction with no other details.
+ // When possible, specify the type by using CHARGEBACK_FRAUD or
+ // CHARGEBACK_DISPUTE instead.
+ CHARGEBACK = 1;
+
+ // Indicates a chargeback related to an alleged unauthorized transaction
+ // from the cardholder's perspective (for example, the card number was
+ // stolen).
+ CHARGEBACK_FRAUD = 8;
+
+ // Indicates a chargeback related to the cardholder having provided their
+ // card details but allegedly not being satisfied with the purchase
+ // (for example, misrepresentation, attempted cancellation).
+ CHARGEBACK_DISPUTE = 9;
+
+ // Indicates the transaction associated with the assessment is suspected of
+ // being fraudulent based on the payment method, billing details, shipping
+ // address or other transaction information.
+ PAYMENT_HEURISTICS = 2;
+
+ // Indicates that the user was served a 2FA challenge. An old assessment
+ // with `ENUM_VALUES.INITIATED_TWO_FACTOR` reason that has not been
+ // overwritten with `PASSED_TWO_FACTOR` is treated as an abandoned 2FA flow.
+ // This is equivalent to `FAILED_TWO_FACTOR`.
+ INITIATED_TWO_FACTOR = 7;
+
+ // Indicates that the user passed a 2FA challenge.
+ PASSED_TWO_FACTOR = 3;
+
+ // Indicates that the user failed a 2FA challenge.
+ FAILED_TWO_FACTOR = 4;
+
+ // Indicates the user provided the correct password.
+ CORRECT_PASSWORD = 5;
+
+ // Indicates the user provided an incorrect password.
+ INCORRECT_PASSWORD = 6;
+ }
+
+ // Required. The resource name of the Assessment, in the format
+ // "projects/{project_number}/assessments/{assessment_id}".
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "recaptchaenterprise.googleapis.com/Assessment"
+ }
+ ];
+
+ // Optional. The annotation that will be assigned to the Event. This field can be left
+ // empty to provide reasons that apply to an event without concluding whether
+ // the event is legitimate or fraudulent.
+ Annotation annotation = 2 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. Optional reasons for the annotation that will be assigned to the Event.
+ repeated Reason reasons = 3 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. Optional unique stable hashed user identifier to apply to the assessment.
+ // This is an alternative to setting the hashed_account_id in
+ // CreateAssessment, for example when the account identifier is not yet known
+ // in the initial request. It is recommended that the identifier is hashed
+ // using hmac-sha256 with stable secret.
+ bytes hashed_account_id = 4 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Empty response for AnnotateAssessment.
+message AnnotateAssessmentResponse {
+
+}
+
+// Password leak verification info.
+message PasswordLeakVerification {
+ // Optional. Scrypt hash of the username+password that the customer wants to verify
+ // against a known password leak.
+ bytes hashed_user_credentials = 1 [(google.api.field_behavior) = OPTIONAL];
+
+ // Output only. Whether or not the user's credentials are present in a known leak.
+ bool credentials_leaked = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Optional. The username part of the user credentials for which we want to trigger a
+ // leak check in canonicalized form. This is the same data used to create the
+ // hashed_user_credentials on the customer side.
+ string canonicalized_username = 3 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// A recaptcha assessment resource.
+message Assessment {
+ option (google.api.resource) = {
+ type: "recaptchaenterprise.googleapis.com/Assessment"
+ pattern: "projects/{project}/assessments/{assessment}"
+ };
+
+ // Reasons contributing to the risk analysis verdict.
+ enum ClassificationReason {
+ // Default unspecified type.
+ CLASSIFICATION_REASON_UNSPECIFIED = 0;
+
+ // Interactions matched the behavior of an automated agent.
+ AUTOMATION = 1;
+
+ // The event originated from an illegitimate environment.
+ UNEXPECTED_ENVIRONMENT = 2;
+
+ // Traffic volume from the event source is higher than normal.
+ TOO_MUCH_TRAFFIC = 3;
+
+ // Interactions with the site were significantly different than expected
+ // patterns.
+ UNEXPECTED_USAGE_PATTERNS = 4;
+
+ // Too little traffic has been received from this site thus far to generate
+ // quality risk analysis.
+ LOW_CONFIDENCE_SCORE = 5;
+ }
+
+ // Output only. The resource name for the Assessment in the format
+ // "projects/{project_number}/assessments/{assessment_id}".
+ string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // The event being assessed.
+ Event event = 2;
+
+ // Output only. Legitimate event score from 0.0 to 1.0.
+ // (1.0 means very likely legitimate traffic while 0.0 means very likely
+ // non-legitimate traffic).
+ float score = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. Properties of the provided event token.
+ TokenProperties token_properties = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Output only. Reasons contributing to the risk analysis verdict.
+ repeated ClassificationReason reasons = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Information about the user's credentials used to check for leaks.
+ // This feature is part of the Early Access Program (EAP). Exercise caution,
+ // and do not deploy integrations based on this feature in a production
+ // environment.
+ PasswordLeakVerification password_leak_verification = 7;
+
+ // Assessment returned by Account Defender when a hashed_account_id is
+ // provided.
+ AccountDefenderAssessment account_defender_assessment = 8;
+}
+
+message Event {
+ // Optional. The user response token provided by the reCAPTCHA client-side integration
+ // on your site.
+ string token = 1 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. The site key that was used to invoke reCAPTCHA on your site and generate
+ // the token.
+ string site_key = 2 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. The user agent present in the request from the user's device related to
+ // this event.
+ string user_agent = 3 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. The IP address in the request from the user's device related to this event.
+ string user_ip_address = 4 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. The expected action for this type of event. This should be the same action
+ // provided at token generation time on client-side platforms already
+ // integrated with recaptcha enterprise.
+ string expected_action = 5 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. Optional unique stable hashed user identifier for the request. The
+ // identifier should ideally be hashed using sha256 with stable secret.
+ bytes hashed_account_id = 6 [(google.api.field_behavior) = OPTIONAL];
+}
+
+message TokenProperties {
+ // Enum that represents the types of invalid token reasons.
+ enum InvalidReason {
+ // Default unspecified type.
+ INVALID_REASON_UNSPECIFIED = 0;
+
+ // If the failure reason was not accounted for.
+ UNKNOWN_INVALID_REASON = 1;
+
+ // The provided user verification token was malformed.
+ MALFORMED = 2;
+
+ // The user verification token had expired.
+ EXPIRED = 3;
+
+ // The user verification had already been seen.
+ DUPE = 4;
+
+ // The user verification token did not match the provided site key.
+ // This may be a configuration error (e.g. development keys used in
+ // production) or end users trying to use verification tokens from other
+ // sites.
+ SITE_MISMATCH = 5 [deprecated = true];
+
+ // The user verification token was not present. It is a required input.
+ MISSING = 6;
+
+ // A retriable error (such as network failure) occurred on the browser.
+ // Could easily be simulated by an attacker.
+ BROWSER_ERROR = 7;
+ }
+
+ // Whether the provided user response token is valid. When valid = false, the
+ // reason could be specified in invalid_reason or it could also be due to
+ // a user failing to solve a challenge or a sitekey mismatch (i.e the sitekey
+ // used to generate the token was different than the one specified in the
+ // assessment).
+ bool valid = 1;
+
+ // Reason associated with the response when valid = false.
+ InvalidReason invalid_reason = 2;
+
+ // The timestamp corresponding to the generation of the token.
+ google.protobuf.Timestamp create_time = 3;
+
+ // The hostname of the page on which the token was generated.
+ string hostname = 4;
+
+ // Action name provided at token generation.
+ string action = 5;
+}
+
+// Account Defender risk assessment.
+message AccountDefenderAssessment {
+ // Labels returned by Account Defender for this request.
+ enum AccountDefenderLabel {
+ // Default unspecified type.
+ ACCOUNT_DEFENDER_LABEL_UNSPECIFIED = 0;
+
+ // The request matches a known good profile for the user.
+ PROFILE_MATCH = 1;
+
+ // The request is potentially a suspicious login event and should be further
+ // verified either via multi-factor authentication or another system.
+ SUSPICIOUS_LOGIN_ACTIVITY = 2;
+
+ // The request matched a profile that previously had suspicious account
+ // creation behavior. This could mean this is a fake account.
+ SUSPICIOUS_ACCOUNT_CREATION = 3;
+
+ // The account in the request has a high number of related accounts. It does
+ // not necessarily imply that the account is bad but could require
+ // investigating.
+ RELATED_ACCOUNTS_NUMBER_HIGH = 4;
+ }
+
+ // Labels for this request.
+ repeated AccountDefenderLabel labels = 1;
+}
diff --git a/packages/google-cloud-recaptchaenterprise/protos/protos.d.ts b/packages/google-cloud-recaptchaenterprise/protos/protos.d.ts
new file mode 100644
index 00000000000..819d15cf6a6
--- /dev/null
+++ b/packages/google-cloud-recaptchaenterprise/protos/protos.d.ts
@@ -0,0 +1,9694 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.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 recaptchaenterprise. */
+ namespace recaptchaenterprise {
+
+ /** Namespace v1. */
+ namespace v1 {
+
+ /** Represents a RecaptchaEnterpriseService */
+ class RecaptchaEnterpriseService extends $protobuf.rpc.Service {
+
+ /**
+ * Constructs a new RecaptchaEnterpriseService 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 RecaptchaEnterpriseService 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): RecaptchaEnterpriseService;
+
+ /**
+ * Calls CreateAssessment.
+ * @param request CreateAssessmentRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and Assessment
+ */
+ public createAssessment(request: google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.CreateAssessmentCallback): void;
+
+ /**
+ * Calls CreateAssessment.
+ * @param request CreateAssessmentRequest message or plain object
+ * @returns Promise
+ */
+ public createAssessment(request: google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest): Promise;
+
+ /**
+ * Calls AnnotateAssessment.
+ * @param request AnnotateAssessmentRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and AnnotateAssessmentResponse
+ */
+ public annotateAssessment(request: google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.AnnotateAssessmentCallback): void;
+
+ /**
+ * Calls AnnotateAssessment.
+ * @param request AnnotateAssessmentRequest message or plain object
+ * @returns Promise
+ */
+ public annotateAssessment(request: google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest): Promise;
+
+ /**
+ * Calls CreateKey.
+ * @param request CreateKeyRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and Key
+ */
+ public createKey(request: google.cloud.recaptchaenterprise.v1.ICreateKeyRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.CreateKeyCallback): void;
+
+ /**
+ * Calls CreateKey.
+ * @param request CreateKeyRequest message or plain object
+ * @returns Promise
+ */
+ public createKey(request: google.cloud.recaptchaenterprise.v1.ICreateKeyRequest): Promise;
+
+ /**
+ * Calls ListKeys.
+ * @param request ListKeysRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and ListKeysResponse
+ */
+ public listKeys(request: google.cloud.recaptchaenterprise.v1.IListKeysRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.ListKeysCallback): void;
+
+ /**
+ * Calls ListKeys.
+ * @param request ListKeysRequest message or plain object
+ * @returns Promise
+ */
+ public listKeys(request: google.cloud.recaptchaenterprise.v1.IListKeysRequest): Promise;
+
+ /**
+ * Calls RetrieveLegacySecretKey.
+ * @param request RetrieveLegacySecretKeyRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and RetrieveLegacySecretKeyResponse
+ */
+ public retrieveLegacySecretKey(request: google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.RetrieveLegacySecretKeyCallback): void;
+
+ /**
+ * Calls RetrieveLegacySecretKey.
+ * @param request RetrieveLegacySecretKeyRequest message or plain object
+ * @returns Promise
+ */
+ public retrieveLegacySecretKey(request: google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyRequest): Promise;
+
+ /**
+ * Calls GetKey.
+ * @param request GetKeyRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and Key
+ */
+ public getKey(request: google.cloud.recaptchaenterprise.v1.IGetKeyRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.GetKeyCallback): void;
+
+ /**
+ * Calls GetKey.
+ * @param request GetKeyRequest message or plain object
+ * @returns Promise
+ */
+ public getKey(request: google.cloud.recaptchaenterprise.v1.IGetKeyRequest): Promise;
+
+ /**
+ * Calls UpdateKey.
+ * @param request UpdateKeyRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and Key
+ */
+ public updateKey(request: google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.UpdateKeyCallback): void;
+
+ /**
+ * Calls UpdateKey.
+ * @param request UpdateKeyRequest message or plain object
+ * @returns Promise
+ */
+ public updateKey(request: google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest): Promise;
+
+ /**
+ * Calls DeleteKey.
+ * @param request DeleteKeyRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and Empty
+ */
+ public deleteKey(request: google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.DeleteKeyCallback): void;
+
+ /**
+ * Calls DeleteKey.
+ * @param request DeleteKeyRequest message or plain object
+ * @returns Promise
+ */
+ public deleteKey(request: google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest): Promise;
+
+ /**
+ * Calls MigrateKey.
+ * @param request MigrateKeyRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and Key
+ */
+ public migrateKey(request: google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.MigrateKeyCallback): void;
+
+ /**
+ * Calls MigrateKey.
+ * @param request MigrateKeyRequest message or plain object
+ * @returns Promise
+ */
+ public migrateKey(request: google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest): Promise;
+
+ /**
+ * Calls GetMetrics.
+ * @param request GetMetricsRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and Metrics
+ */
+ public getMetrics(request: google.cloud.recaptchaenterprise.v1.IGetMetricsRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.GetMetricsCallback): void;
+
+ /**
+ * Calls GetMetrics.
+ * @param request GetMetricsRequest message or plain object
+ * @returns Promise
+ */
+ public getMetrics(request: google.cloud.recaptchaenterprise.v1.IGetMetricsRequest): Promise;
+
+ /**
+ * Calls ListRelatedAccountGroups.
+ * @param request ListRelatedAccountGroupsRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and ListRelatedAccountGroupsResponse
+ */
+ public listRelatedAccountGroups(request: google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.ListRelatedAccountGroupsCallback): void;
+
+ /**
+ * Calls ListRelatedAccountGroups.
+ * @param request ListRelatedAccountGroupsRequest message or plain object
+ * @returns Promise
+ */
+ public listRelatedAccountGroups(request: google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest): Promise;
+
+ /**
+ * Calls ListRelatedAccountGroupMemberships.
+ * @param request ListRelatedAccountGroupMembershipsRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and ListRelatedAccountGroupMembershipsResponse
+ */
+ public listRelatedAccountGroupMemberships(request: google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.ListRelatedAccountGroupMembershipsCallback): void;
+
+ /**
+ * Calls ListRelatedAccountGroupMemberships.
+ * @param request ListRelatedAccountGroupMembershipsRequest message or plain object
+ * @returns Promise
+ */
+ public listRelatedAccountGroupMemberships(request: google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest): Promise;
+
+ /**
+ * Calls SearchRelatedAccountGroupMemberships.
+ * @param request SearchRelatedAccountGroupMembershipsRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and SearchRelatedAccountGroupMembershipsResponse
+ */
+ public searchRelatedAccountGroupMemberships(request: google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.SearchRelatedAccountGroupMembershipsCallback): void;
+
+ /**
+ * Calls SearchRelatedAccountGroupMemberships.
+ * @param request SearchRelatedAccountGroupMembershipsRequest message or plain object
+ * @returns Promise
+ */
+ public searchRelatedAccountGroupMemberships(request: google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest): Promise;
+ }
+
+ namespace RecaptchaEnterpriseService {
+
+ /**
+ * Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|createAssessment}.
+ * @param error Error, if any
+ * @param [response] Assessment
+ */
+ type CreateAssessmentCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.Assessment) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|annotateAssessment}.
+ * @param error Error, if any
+ * @param [response] AnnotateAssessmentResponse
+ */
+ type AnnotateAssessmentCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|createKey}.
+ * @param error Error, if any
+ * @param [response] Key
+ */
+ type CreateKeyCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.Key) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|listKeys}.
+ * @param error Error, if any
+ * @param [response] ListKeysResponse
+ */
+ type ListKeysCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.ListKeysResponse) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|retrieveLegacySecretKey}.
+ * @param error Error, if any
+ * @param [response] RetrieveLegacySecretKeyResponse
+ */
+ type RetrieveLegacySecretKeyCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|getKey}.
+ * @param error Error, if any
+ * @param [response] Key
+ */
+ type GetKeyCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.Key) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|updateKey}.
+ * @param error Error, if any
+ * @param [response] Key
+ */
+ type UpdateKeyCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.Key) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|deleteKey}.
+ * @param error Error, if any
+ * @param [response] Empty
+ */
+ type DeleteKeyCallback = (error: (Error|null), response?: google.protobuf.Empty) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|migrateKey}.
+ * @param error Error, if any
+ * @param [response] Key
+ */
+ type MigrateKeyCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.Key) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|getMetrics}.
+ * @param error Error, if any
+ * @param [response] Metrics
+ */
+ type GetMetricsCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.Metrics) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|listRelatedAccountGroups}.
+ * @param error Error, if any
+ * @param [response] ListRelatedAccountGroupsResponse
+ */
+ type ListRelatedAccountGroupsCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|listRelatedAccountGroupMemberships}.
+ * @param error Error, if any
+ * @param [response] ListRelatedAccountGroupMembershipsResponse
+ */
+ type ListRelatedAccountGroupMembershipsCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|searchRelatedAccountGroupMemberships}.
+ * @param error Error, if any
+ * @param [response] SearchRelatedAccountGroupMembershipsResponse
+ */
+ type SearchRelatedAccountGroupMembershipsCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse) => void;
+ }
+
+ /** Properties of a CreateAssessmentRequest. */
+ interface ICreateAssessmentRequest {
+
+ /** CreateAssessmentRequest parent */
+ parent?: (string|null);
+
+ /** CreateAssessmentRequest assessment */
+ assessment?: (google.cloud.recaptchaenterprise.v1.IAssessment|null);
+ }
+
+ /** Represents a CreateAssessmentRequest. */
+ class CreateAssessmentRequest implements ICreateAssessmentRequest {
+
+ /**
+ * Constructs a new CreateAssessmentRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest);
+
+ /** CreateAssessmentRequest parent. */
+ public parent: string;
+
+ /** CreateAssessmentRequest assessment. */
+ public assessment?: (google.cloud.recaptchaenterprise.v1.IAssessment|null);
+
+ /**
+ * Creates a new CreateAssessmentRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns CreateAssessmentRequest instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest): google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest;
+
+ /**
+ * Encodes the specified CreateAssessmentRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest.verify|verify} messages.
+ * @param message CreateAssessmentRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified CreateAssessmentRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest.verify|verify} messages.
+ * @param message CreateAssessmentRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a CreateAssessmentRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns CreateAssessmentRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest;
+
+ /**
+ * Decodes a CreateAssessmentRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns CreateAssessmentRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest;
+
+ /**
+ * Verifies a CreateAssessmentRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a CreateAssessmentRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns CreateAssessmentRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest;
+
+ /**
+ * Creates a plain object from a CreateAssessmentRequest message. Also converts values to other types if specified.
+ * @param message CreateAssessmentRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this CreateAssessmentRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for CreateAssessmentRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an AnnotateAssessmentRequest. */
+ interface IAnnotateAssessmentRequest {
+
+ /** AnnotateAssessmentRequest name */
+ name?: (string|null);
+
+ /** AnnotateAssessmentRequest annotation */
+ annotation?: (google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation|keyof typeof google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation|null);
+
+ /** AnnotateAssessmentRequest reasons */
+ reasons?: (google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason[]|null);
+
+ /** AnnotateAssessmentRequest hashedAccountId */
+ hashedAccountId?: (Uint8Array|string|null);
+ }
+
+ /** Represents an AnnotateAssessmentRequest. */
+ class AnnotateAssessmentRequest implements IAnnotateAssessmentRequest {
+
+ /**
+ * Constructs a new AnnotateAssessmentRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest);
+
+ /** AnnotateAssessmentRequest name. */
+ public name: string;
+
+ /** AnnotateAssessmentRequest annotation. */
+ public annotation: (google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation|keyof typeof google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation);
+
+ /** AnnotateAssessmentRequest reasons. */
+ public reasons: google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason[];
+
+ /** AnnotateAssessmentRequest hashedAccountId. */
+ public hashedAccountId: (Uint8Array|string);
+
+ /**
+ * Creates a new AnnotateAssessmentRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns AnnotateAssessmentRequest instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest): google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest;
+
+ /**
+ * Encodes the specified AnnotateAssessmentRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.verify|verify} messages.
+ * @param message AnnotateAssessmentRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified AnnotateAssessmentRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.verify|verify} messages.
+ * @param message AnnotateAssessmentRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an AnnotateAssessmentRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns AnnotateAssessmentRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest;
+
+ /**
+ * Decodes an AnnotateAssessmentRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns AnnotateAssessmentRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest;
+
+ /**
+ * Verifies an AnnotateAssessmentRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an AnnotateAssessmentRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns AnnotateAssessmentRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest;
+
+ /**
+ * Creates a plain object from an AnnotateAssessmentRequest message. Also converts values to other types if specified.
+ * @param message AnnotateAssessmentRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this AnnotateAssessmentRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for AnnotateAssessmentRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace AnnotateAssessmentRequest {
+
+ /** Annotation enum. */
+ enum Annotation {
+ ANNOTATION_UNSPECIFIED = 0,
+ LEGITIMATE = 1,
+ FRAUDULENT = 2,
+ PASSWORD_CORRECT = 3,
+ PASSWORD_INCORRECT = 4
+ }
+
+ /** Reason enum. */
+ enum Reason {
+ REASON_UNSPECIFIED = 0,
+ CHARGEBACK = 1,
+ CHARGEBACK_FRAUD = 8,
+ CHARGEBACK_DISPUTE = 9,
+ REFUND = 10,
+ REFUND_FRAUD = 11,
+ TRANSACTION_ACCEPTED = 12,
+ TRANSACTION_DECLINED = 13,
+ PAYMENT_HEURISTICS = 2,
+ INITIATED_TWO_FACTOR = 7,
+ PASSED_TWO_FACTOR = 3,
+ FAILED_TWO_FACTOR = 4,
+ CORRECT_PASSWORD = 5,
+ INCORRECT_PASSWORD = 6,
+ SOCIAL_SPAM = 14
+ }
+ }
+
+ /** Properties of an AnnotateAssessmentResponse. */
+ interface IAnnotateAssessmentResponse {
+ }
+
+ /** Represents an AnnotateAssessmentResponse. */
+ class AnnotateAssessmentResponse implements IAnnotateAssessmentResponse {
+
+ /**
+ * Constructs a new AnnotateAssessmentResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentResponse);
+
+ /**
+ * Creates a new AnnotateAssessmentResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns AnnotateAssessmentResponse instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentResponse): google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse;
+
+ /**
+ * Encodes the specified AnnotateAssessmentResponse message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse.verify|verify} messages.
+ * @param message AnnotateAssessmentResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified AnnotateAssessmentResponse message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse.verify|verify} messages.
+ * @param message AnnotateAssessmentResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an AnnotateAssessmentResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns AnnotateAssessmentResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse;
+
+ /**
+ * Decodes an AnnotateAssessmentResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns AnnotateAssessmentResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse;
+
+ /**
+ * Verifies an AnnotateAssessmentResponse message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an AnnotateAssessmentResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns AnnotateAssessmentResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse;
+
+ /**
+ * Creates a plain object from an AnnotateAssessmentResponse message. Also converts values to other types if specified.
+ * @param message AnnotateAssessmentResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this AnnotateAssessmentResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for AnnotateAssessmentResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a PrivatePasswordLeakVerification. */
+ interface IPrivatePasswordLeakVerification {
+
+ /** PrivatePasswordLeakVerification lookupHashPrefix */
+ lookupHashPrefix?: (Uint8Array|string|null);
+
+ /** PrivatePasswordLeakVerification encryptedUserCredentialsHash */
+ encryptedUserCredentialsHash?: (Uint8Array|string|null);
+
+ /** PrivatePasswordLeakVerification encryptedLeakMatchPrefixes */
+ encryptedLeakMatchPrefixes?: (Uint8Array[]|null);
+
+ /** PrivatePasswordLeakVerification reencryptedUserCredentialsHash */
+ reencryptedUserCredentialsHash?: (Uint8Array|string|null);
+ }
+
+ /** Represents a PrivatePasswordLeakVerification. */
+ class PrivatePasswordLeakVerification implements IPrivatePasswordLeakVerification {
+
+ /**
+ * Constructs a new PrivatePasswordLeakVerification.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IPrivatePasswordLeakVerification);
+
+ /** PrivatePasswordLeakVerification lookupHashPrefix. */
+ public lookupHashPrefix: (Uint8Array|string);
+
+ /** PrivatePasswordLeakVerification encryptedUserCredentialsHash. */
+ public encryptedUserCredentialsHash: (Uint8Array|string);
+
+ /** PrivatePasswordLeakVerification encryptedLeakMatchPrefixes. */
+ public encryptedLeakMatchPrefixes: Uint8Array[];
+
+ /** PrivatePasswordLeakVerification reencryptedUserCredentialsHash. */
+ public reencryptedUserCredentialsHash: (Uint8Array|string);
+
+ /**
+ * Creates a new PrivatePasswordLeakVerification instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns PrivatePasswordLeakVerification instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IPrivatePasswordLeakVerification): google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification;
+
+ /**
+ * Encodes the specified PrivatePasswordLeakVerification message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification.verify|verify} messages.
+ * @param message PrivatePasswordLeakVerification message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IPrivatePasswordLeakVerification, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified PrivatePasswordLeakVerification message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification.verify|verify} messages.
+ * @param message PrivatePasswordLeakVerification message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IPrivatePasswordLeakVerification, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a PrivatePasswordLeakVerification message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns PrivatePasswordLeakVerification
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification;
+
+ /**
+ * Decodes a PrivatePasswordLeakVerification message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns PrivatePasswordLeakVerification
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification;
+
+ /**
+ * Verifies a PrivatePasswordLeakVerification message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a PrivatePasswordLeakVerification message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns PrivatePasswordLeakVerification
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification;
+
+ /**
+ * Creates a plain object from a PrivatePasswordLeakVerification message. Also converts values to other types if specified.
+ * @param message PrivatePasswordLeakVerification
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this PrivatePasswordLeakVerification to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for PrivatePasswordLeakVerification
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an Assessment. */
+ interface IAssessment {
+
+ /** Assessment name */
+ name?: (string|null);
+
+ /** Assessment event */
+ event?: (google.cloud.recaptchaenterprise.v1.IEvent|null);
+
+ /** Assessment riskAnalysis */
+ riskAnalysis?: (google.cloud.recaptchaenterprise.v1.IRiskAnalysis|null);
+
+ /** Assessment tokenProperties */
+ tokenProperties?: (google.cloud.recaptchaenterprise.v1.ITokenProperties|null);
+
+ /** Assessment accountDefenderAssessment */
+ accountDefenderAssessment?: (google.cloud.recaptchaenterprise.v1.IAccountDefenderAssessment|null);
+
+ /** Assessment privatePasswordLeakVerification */
+ privatePasswordLeakVerification?: (google.cloud.recaptchaenterprise.v1.IPrivatePasswordLeakVerification|null);
+ }
+
+ /** Represents an Assessment. */
+ class Assessment implements IAssessment {
+
+ /**
+ * Constructs a new Assessment.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IAssessment);
+
+ /** Assessment name. */
+ public name: string;
+
+ /** Assessment event. */
+ public event?: (google.cloud.recaptchaenterprise.v1.IEvent|null);
+
+ /** Assessment riskAnalysis. */
+ public riskAnalysis?: (google.cloud.recaptchaenterprise.v1.IRiskAnalysis|null);
+
+ /** Assessment tokenProperties. */
+ public tokenProperties?: (google.cloud.recaptchaenterprise.v1.ITokenProperties|null);
+
+ /** Assessment accountDefenderAssessment. */
+ public accountDefenderAssessment?: (google.cloud.recaptchaenterprise.v1.IAccountDefenderAssessment|null);
+
+ /** Assessment privatePasswordLeakVerification. */
+ public privatePasswordLeakVerification?: (google.cloud.recaptchaenterprise.v1.IPrivatePasswordLeakVerification|null);
+
+ /**
+ * Creates a new Assessment instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Assessment instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IAssessment): google.cloud.recaptchaenterprise.v1.Assessment;
+
+ /**
+ * Encodes the specified Assessment message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.Assessment.verify|verify} messages.
+ * @param message Assessment message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IAssessment, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Assessment message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.Assessment.verify|verify} messages.
+ * @param message Assessment message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IAssessment, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an Assessment message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Assessment
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.Assessment;
+
+ /**
+ * Decodes an Assessment message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Assessment
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.Assessment;
+
+ /**
+ * Verifies an Assessment message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an Assessment message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Assessment
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.Assessment;
+
+ /**
+ * Creates a plain object from an Assessment message. Also converts values to other types if specified.
+ * @param message Assessment
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.Assessment, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Assessment to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Assessment
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an Event. */
+ interface IEvent {
+
+ /** Event token */
+ token?: (string|null);
+
+ /** Event siteKey */
+ siteKey?: (string|null);
+
+ /** Event userAgent */
+ userAgent?: (string|null);
+
+ /** Event userIpAddress */
+ userIpAddress?: (string|null);
+
+ /** Event expectedAction */
+ expectedAction?: (string|null);
+
+ /** Event hashedAccountId */
+ hashedAccountId?: (Uint8Array|string|null);
+ }
+
+ /** Represents an Event. */
+ class Event implements IEvent {
+
+ /**
+ * Constructs a new Event.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IEvent);
+
+ /** Event token. */
+ public token: string;
+
+ /** Event siteKey. */
+ public siteKey: string;
+
+ /** Event userAgent. */
+ public userAgent: string;
+
+ /** Event userIpAddress. */
+ public userIpAddress: string;
+
+ /** Event expectedAction. */
+ public expectedAction: string;
+
+ /** Event hashedAccountId. */
+ public hashedAccountId: (Uint8Array|string);
+
+ /**
+ * Creates a new Event instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Event instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IEvent): google.cloud.recaptchaenterprise.v1.Event;
+
+ /**
+ * Encodes the specified Event message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.Event.verify|verify} messages.
+ * @param message Event message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IEvent, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Event message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.Event.verify|verify} messages.
+ * @param message Event message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IEvent, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an Event message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Event
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.Event;
+
+ /**
+ * Decodes an Event message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Event
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.Event;
+
+ /**
+ * Verifies an Event message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an Event message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Event
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.Event;
+
+ /**
+ * Creates a plain object from an Event message. Also converts values to other types if specified.
+ * @param message Event
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.Event, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Event to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Event
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a RiskAnalysis. */
+ interface IRiskAnalysis {
+
+ /** RiskAnalysis score */
+ score?: (number|null);
+
+ /** RiskAnalysis reasons */
+ reasons?: (google.cloud.recaptchaenterprise.v1.RiskAnalysis.ClassificationReason[]|null);
+ }
+
+ /** Represents a RiskAnalysis. */
+ class RiskAnalysis implements IRiskAnalysis {
+
+ /**
+ * Constructs a new RiskAnalysis.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IRiskAnalysis);
+
+ /** RiskAnalysis score. */
+ public score: number;
+
+ /** RiskAnalysis reasons. */
+ public reasons: google.cloud.recaptchaenterprise.v1.RiskAnalysis.ClassificationReason[];
+
+ /**
+ * Creates a new RiskAnalysis instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns RiskAnalysis instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IRiskAnalysis): google.cloud.recaptchaenterprise.v1.RiskAnalysis;
+
+ /**
+ * Encodes the specified RiskAnalysis message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.RiskAnalysis.verify|verify} messages.
+ * @param message RiskAnalysis message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IRiskAnalysis, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified RiskAnalysis message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.RiskAnalysis.verify|verify} messages.
+ * @param message RiskAnalysis message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IRiskAnalysis, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a RiskAnalysis message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns RiskAnalysis
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.RiskAnalysis;
+
+ /**
+ * Decodes a RiskAnalysis message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns RiskAnalysis
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.RiskAnalysis;
+
+ /**
+ * Verifies a RiskAnalysis message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a RiskAnalysis message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns RiskAnalysis
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.RiskAnalysis;
+
+ /**
+ * Creates a plain object from a RiskAnalysis message. Also converts values to other types if specified.
+ * @param message RiskAnalysis
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.RiskAnalysis, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this RiskAnalysis to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for RiskAnalysis
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace RiskAnalysis {
+
+ /** ClassificationReason enum. */
+ enum ClassificationReason {
+ CLASSIFICATION_REASON_UNSPECIFIED = 0,
+ AUTOMATION = 1,
+ UNEXPECTED_ENVIRONMENT = 2,
+ TOO_MUCH_TRAFFIC = 3,
+ UNEXPECTED_USAGE_PATTERNS = 4,
+ LOW_CONFIDENCE_SCORE = 5
+ }
+ }
+
+ /** Properties of a TokenProperties. */
+ interface ITokenProperties {
+
+ /** TokenProperties valid */
+ valid?: (boolean|null);
+
+ /** TokenProperties invalidReason */
+ invalidReason?: (google.cloud.recaptchaenterprise.v1.TokenProperties.InvalidReason|keyof typeof google.cloud.recaptchaenterprise.v1.TokenProperties.InvalidReason|null);
+
+ /** TokenProperties createTime */
+ createTime?: (google.protobuf.ITimestamp|null);
+
+ /** TokenProperties hostname */
+ hostname?: (string|null);
+
+ /** TokenProperties action */
+ action?: (string|null);
+ }
+
+ /** Represents a TokenProperties. */
+ class TokenProperties implements ITokenProperties {
+
+ /**
+ * Constructs a new TokenProperties.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.ITokenProperties);
+
+ /** TokenProperties valid. */
+ public valid: boolean;
+
+ /** TokenProperties invalidReason. */
+ public invalidReason: (google.cloud.recaptchaenterprise.v1.TokenProperties.InvalidReason|keyof typeof google.cloud.recaptchaenterprise.v1.TokenProperties.InvalidReason);
+
+ /** TokenProperties createTime. */
+ public createTime?: (google.protobuf.ITimestamp|null);
+
+ /** TokenProperties hostname. */
+ public hostname: string;
+
+ /** TokenProperties action. */
+ public action: string;
+
+ /**
+ * Creates a new TokenProperties instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns TokenProperties instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.ITokenProperties): google.cloud.recaptchaenterprise.v1.TokenProperties;
+
+ /**
+ * Encodes the specified TokenProperties message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.TokenProperties.verify|verify} messages.
+ * @param message TokenProperties message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.ITokenProperties, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified TokenProperties message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.TokenProperties.verify|verify} messages.
+ * @param message TokenProperties message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.ITokenProperties, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a TokenProperties message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns TokenProperties
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.TokenProperties;
+
+ /**
+ * Decodes a TokenProperties message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns TokenProperties
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.TokenProperties;
+
+ /**
+ * Verifies a TokenProperties message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a TokenProperties message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns TokenProperties
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.TokenProperties;
+
+ /**
+ * Creates a plain object from a TokenProperties message. Also converts values to other types if specified.
+ * @param message TokenProperties
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.TokenProperties, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this TokenProperties to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for TokenProperties
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace TokenProperties {
+
+ /** InvalidReason enum. */
+ enum InvalidReason {
+ INVALID_REASON_UNSPECIFIED = 0,
+ UNKNOWN_INVALID_REASON = 1,
+ MALFORMED = 2,
+ EXPIRED = 3,
+ DUPE = 4,
+ MISSING = 5,
+ BROWSER_ERROR = 6
+ }
+ }
+
+ /** Properties of an AccountDefenderAssessment. */
+ interface IAccountDefenderAssessment {
+
+ /** AccountDefenderAssessment labels */
+ labels?: (google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountDefenderLabel[]|null);
+ }
+
+ /** Represents an AccountDefenderAssessment. */
+ class AccountDefenderAssessment implements IAccountDefenderAssessment {
+
+ /**
+ * Constructs a new AccountDefenderAssessment.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IAccountDefenderAssessment);
+
+ /** AccountDefenderAssessment labels. */
+ public labels: google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountDefenderLabel[];
+
+ /**
+ * Creates a new AccountDefenderAssessment instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns AccountDefenderAssessment instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IAccountDefenderAssessment): google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment;
+
+ /**
+ * Encodes the specified AccountDefenderAssessment message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.verify|verify} messages.
+ * @param message AccountDefenderAssessment message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IAccountDefenderAssessment, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified AccountDefenderAssessment message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.verify|verify} messages.
+ * @param message AccountDefenderAssessment message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IAccountDefenderAssessment, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an AccountDefenderAssessment message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns AccountDefenderAssessment
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment;
+
+ /**
+ * Decodes an AccountDefenderAssessment message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns AccountDefenderAssessment
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment;
+
+ /**
+ * Verifies an AccountDefenderAssessment message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an AccountDefenderAssessment message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns AccountDefenderAssessment
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment;
+
+ /**
+ * Creates a plain object from an AccountDefenderAssessment message. Also converts values to other types if specified.
+ * @param message AccountDefenderAssessment
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this AccountDefenderAssessment to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for AccountDefenderAssessment
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace AccountDefenderAssessment {
+
+ /** AccountDefenderLabel enum. */
+ enum AccountDefenderLabel {
+ ACCOUNT_DEFENDER_LABEL_UNSPECIFIED = 0,
+ PROFILE_MATCH = 1,
+ SUSPICIOUS_LOGIN_ACTIVITY = 2,
+ SUSPICIOUS_ACCOUNT_CREATION = 3,
+ RELATED_ACCOUNTS_NUMBER_HIGH = 4
+ }
+ }
+
+ /** Properties of a CreateKeyRequest. */
+ interface ICreateKeyRequest {
+
+ /** CreateKeyRequest parent */
+ parent?: (string|null);
+
+ /** CreateKeyRequest key */
+ key?: (google.cloud.recaptchaenterprise.v1.IKey|null);
+ }
+
+ /** Represents a CreateKeyRequest. */
+ class CreateKeyRequest implements ICreateKeyRequest {
+
+ /**
+ * Constructs a new CreateKeyRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.ICreateKeyRequest);
+
+ /** CreateKeyRequest parent. */
+ public parent: string;
+
+ /** CreateKeyRequest key. */
+ public key?: (google.cloud.recaptchaenterprise.v1.IKey|null);
+
+ /**
+ * Creates a new CreateKeyRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns CreateKeyRequest instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.ICreateKeyRequest): google.cloud.recaptchaenterprise.v1.CreateKeyRequest;
+
+ /**
+ * Encodes the specified CreateKeyRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.CreateKeyRequest.verify|verify} messages.
+ * @param message CreateKeyRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.ICreateKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified CreateKeyRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.CreateKeyRequest.verify|verify} messages.
+ * @param message CreateKeyRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.ICreateKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a CreateKeyRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns CreateKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.CreateKeyRequest;
+
+ /**
+ * Decodes a CreateKeyRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns CreateKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.CreateKeyRequest;
+
+ /**
+ * Verifies a CreateKeyRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a CreateKeyRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns CreateKeyRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.CreateKeyRequest;
+
+ /**
+ * Creates a plain object from a CreateKeyRequest message. Also converts values to other types if specified.
+ * @param message CreateKeyRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.CreateKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this CreateKeyRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for CreateKeyRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ListKeysRequest. */
+ interface IListKeysRequest {
+
+ /** ListKeysRequest parent */
+ parent?: (string|null);
+
+ /** ListKeysRequest pageSize */
+ pageSize?: (number|null);
+
+ /** ListKeysRequest pageToken */
+ pageToken?: (string|null);
+ }
+
+ /** Represents a ListKeysRequest. */
+ class ListKeysRequest implements IListKeysRequest {
+
+ /**
+ * Constructs a new ListKeysRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IListKeysRequest);
+
+ /** ListKeysRequest parent. */
+ public parent: string;
+
+ /** ListKeysRequest pageSize. */
+ public pageSize: number;
+
+ /** ListKeysRequest pageToken. */
+ public pageToken: string;
+
+ /**
+ * Creates a new ListKeysRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ListKeysRequest instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IListKeysRequest): google.cloud.recaptchaenterprise.v1.ListKeysRequest;
+
+ /**
+ * Encodes the specified ListKeysRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ListKeysRequest.verify|verify} messages.
+ * @param message ListKeysRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IListKeysRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ListKeysRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ListKeysRequest.verify|verify} messages.
+ * @param message ListKeysRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IListKeysRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ListKeysRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ListKeysRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.ListKeysRequest;
+
+ /**
+ * Decodes a ListKeysRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ListKeysRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.ListKeysRequest;
+
+ /**
+ * Verifies a ListKeysRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ListKeysRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ListKeysRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.ListKeysRequest;
+
+ /**
+ * Creates a plain object from a ListKeysRequest message. Also converts values to other types if specified.
+ * @param message ListKeysRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.ListKeysRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ListKeysRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ListKeysRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ListKeysResponse. */
+ interface IListKeysResponse {
+
+ /** ListKeysResponse keys */
+ keys?: (google.cloud.recaptchaenterprise.v1.IKey[]|null);
+
+ /** ListKeysResponse nextPageToken */
+ nextPageToken?: (string|null);
+ }
+
+ /** Represents a ListKeysResponse. */
+ class ListKeysResponse implements IListKeysResponse {
+
+ /**
+ * Constructs a new ListKeysResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IListKeysResponse);
+
+ /** ListKeysResponse keys. */
+ public keys: google.cloud.recaptchaenterprise.v1.IKey[];
+
+ /** ListKeysResponse nextPageToken. */
+ public nextPageToken: string;
+
+ /**
+ * Creates a new ListKeysResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ListKeysResponse instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IListKeysResponse): google.cloud.recaptchaenterprise.v1.ListKeysResponse;
+
+ /**
+ * Encodes the specified ListKeysResponse message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ListKeysResponse.verify|verify} messages.
+ * @param message ListKeysResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IListKeysResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ListKeysResponse message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ListKeysResponse.verify|verify} messages.
+ * @param message ListKeysResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IListKeysResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ListKeysResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ListKeysResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.ListKeysResponse;
+
+ /**
+ * Decodes a ListKeysResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ListKeysResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.ListKeysResponse;
+
+ /**
+ * Verifies a ListKeysResponse message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ListKeysResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ListKeysResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.ListKeysResponse;
+
+ /**
+ * Creates a plain object from a ListKeysResponse message. Also converts values to other types if specified.
+ * @param message ListKeysResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.ListKeysResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ListKeysResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ListKeysResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a RetrieveLegacySecretKeyRequest. */
+ interface IRetrieveLegacySecretKeyRequest {
+
+ /** RetrieveLegacySecretKeyRequest key */
+ key?: (string|null);
+ }
+
+ /** Represents a RetrieveLegacySecretKeyRequest. */
+ class RetrieveLegacySecretKeyRequest implements IRetrieveLegacySecretKeyRequest {
+
+ /**
+ * Constructs a new RetrieveLegacySecretKeyRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyRequest);
+
+ /** RetrieveLegacySecretKeyRequest key. */
+ public key: string;
+
+ /**
+ * Creates a new RetrieveLegacySecretKeyRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns RetrieveLegacySecretKeyRequest instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyRequest): google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest;
+
+ /**
+ * Encodes the specified RetrieveLegacySecretKeyRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest.verify|verify} messages.
+ * @param message RetrieveLegacySecretKeyRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified RetrieveLegacySecretKeyRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest.verify|verify} messages.
+ * @param message RetrieveLegacySecretKeyRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a RetrieveLegacySecretKeyRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns RetrieveLegacySecretKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest;
+
+ /**
+ * Decodes a RetrieveLegacySecretKeyRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns RetrieveLegacySecretKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest;
+
+ /**
+ * Verifies a RetrieveLegacySecretKeyRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a RetrieveLegacySecretKeyRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns RetrieveLegacySecretKeyRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest;
+
+ /**
+ * Creates a plain object from a RetrieveLegacySecretKeyRequest message. Also converts values to other types if specified.
+ * @param message RetrieveLegacySecretKeyRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this RetrieveLegacySecretKeyRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for RetrieveLegacySecretKeyRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a GetKeyRequest. */
+ interface IGetKeyRequest {
+
+ /** GetKeyRequest name */
+ name?: (string|null);
+ }
+
+ /** Represents a GetKeyRequest. */
+ class GetKeyRequest implements IGetKeyRequest {
+
+ /**
+ * Constructs a new GetKeyRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IGetKeyRequest);
+
+ /** GetKeyRequest name. */
+ public name: string;
+
+ /**
+ * Creates a new GetKeyRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns GetKeyRequest instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IGetKeyRequest): google.cloud.recaptchaenterprise.v1.GetKeyRequest;
+
+ /**
+ * Encodes the specified GetKeyRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.GetKeyRequest.verify|verify} messages.
+ * @param message GetKeyRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IGetKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified GetKeyRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.GetKeyRequest.verify|verify} messages.
+ * @param message GetKeyRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IGetKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a GetKeyRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns GetKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.GetKeyRequest;
+
+ /**
+ * Decodes a GetKeyRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns GetKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.GetKeyRequest;
+
+ /**
+ * Verifies a GetKeyRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a GetKeyRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns GetKeyRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.GetKeyRequest;
+
+ /**
+ * Creates a plain object from a GetKeyRequest message. Also converts values to other types if specified.
+ * @param message GetKeyRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.GetKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this GetKeyRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for GetKeyRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an UpdateKeyRequest. */
+ interface IUpdateKeyRequest {
+
+ /** UpdateKeyRequest key */
+ key?: (google.cloud.recaptchaenterprise.v1.IKey|null);
+
+ /** UpdateKeyRequest updateMask */
+ updateMask?: (google.protobuf.IFieldMask|null);
+ }
+
+ /** Represents an UpdateKeyRequest. */
+ class UpdateKeyRequest implements IUpdateKeyRequest {
+
+ /**
+ * Constructs a new UpdateKeyRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest);
+
+ /** UpdateKeyRequest key. */
+ public key?: (google.cloud.recaptchaenterprise.v1.IKey|null);
+
+ /** UpdateKeyRequest updateMask. */
+ public updateMask?: (google.protobuf.IFieldMask|null);
+
+ /**
+ * Creates a new UpdateKeyRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns UpdateKeyRequest instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest): google.cloud.recaptchaenterprise.v1.UpdateKeyRequest;
+
+ /**
+ * Encodes the specified UpdateKeyRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.UpdateKeyRequest.verify|verify} messages.
+ * @param message UpdateKeyRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified UpdateKeyRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.UpdateKeyRequest.verify|verify} messages.
+ * @param message UpdateKeyRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an UpdateKeyRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns UpdateKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.UpdateKeyRequest;
+
+ /**
+ * Decodes an UpdateKeyRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns UpdateKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.UpdateKeyRequest;
+
+ /**
+ * Verifies an UpdateKeyRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an UpdateKeyRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns UpdateKeyRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.UpdateKeyRequest;
+
+ /**
+ * Creates a plain object from an UpdateKeyRequest message. Also converts values to other types if specified.
+ * @param message UpdateKeyRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.UpdateKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this UpdateKeyRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for UpdateKeyRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a DeleteKeyRequest. */
+ interface IDeleteKeyRequest {
+
+ /** DeleteKeyRequest name */
+ name?: (string|null);
+ }
+
+ /** Represents a DeleteKeyRequest. */
+ class DeleteKeyRequest implements IDeleteKeyRequest {
+
+ /**
+ * Constructs a new DeleteKeyRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest);
+
+ /** DeleteKeyRequest name. */
+ public name: string;
+
+ /**
+ * Creates a new DeleteKeyRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns DeleteKeyRequest instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest): google.cloud.recaptchaenterprise.v1.DeleteKeyRequest;
+
+ /**
+ * Encodes the specified DeleteKeyRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.DeleteKeyRequest.verify|verify} messages.
+ * @param message DeleteKeyRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified DeleteKeyRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.DeleteKeyRequest.verify|verify} messages.
+ * @param message DeleteKeyRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a DeleteKeyRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns DeleteKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.DeleteKeyRequest;
+
+ /**
+ * Decodes a DeleteKeyRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns DeleteKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.DeleteKeyRequest;
+
+ /**
+ * Verifies a DeleteKeyRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a DeleteKeyRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns DeleteKeyRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.DeleteKeyRequest;
+
+ /**
+ * Creates a plain object from a DeleteKeyRequest message. Also converts values to other types if specified.
+ * @param message DeleteKeyRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.DeleteKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this DeleteKeyRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for DeleteKeyRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a MigrateKeyRequest. */
+ interface IMigrateKeyRequest {
+
+ /** MigrateKeyRequest name */
+ name?: (string|null);
+ }
+
+ /** Represents a MigrateKeyRequest. */
+ class MigrateKeyRequest implements IMigrateKeyRequest {
+
+ /**
+ * Constructs a new MigrateKeyRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest);
+
+ /** MigrateKeyRequest name. */
+ public name: string;
+
+ /**
+ * Creates a new MigrateKeyRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns MigrateKeyRequest instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest): google.cloud.recaptchaenterprise.v1.MigrateKeyRequest;
+
+ /**
+ * Encodes the specified MigrateKeyRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.MigrateKeyRequest.verify|verify} messages.
+ * @param message MigrateKeyRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified MigrateKeyRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.MigrateKeyRequest.verify|verify} messages.
+ * @param message MigrateKeyRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a MigrateKeyRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns MigrateKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.MigrateKeyRequest;
+
+ /**
+ * Decodes a MigrateKeyRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns MigrateKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.MigrateKeyRequest;
+
+ /**
+ * Verifies a MigrateKeyRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a MigrateKeyRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns MigrateKeyRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.MigrateKeyRequest;
+
+ /**
+ * Creates a plain object from a MigrateKeyRequest message. Also converts values to other types if specified.
+ * @param message MigrateKeyRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.MigrateKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this MigrateKeyRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for MigrateKeyRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a GetMetricsRequest. */
+ interface IGetMetricsRequest {
+
+ /** GetMetricsRequest name */
+ name?: (string|null);
+ }
+
+ /** Represents a GetMetricsRequest. */
+ class GetMetricsRequest implements IGetMetricsRequest {
+
+ /**
+ * Constructs a new GetMetricsRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IGetMetricsRequest);
+
+ /** GetMetricsRequest name. */
+ public name: string;
+
+ /**
+ * Creates a new GetMetricsRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns GetMetricsRequest instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IGetMetricsRequest): google.cloud.recaptchaenterprise.v1.GetMetricsRequest;
+
+ /**
+ * Encodes the specified GetMetricsRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.GetMetricsRequest.verify|verify} messages.
+ * @param message GetMetricsRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IGetMetricsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified GetMetricsRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.GetMetricsRequest.verify|verify} messages.
+ * @param message GetMetricsRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IGetMetricsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a GetMetricsRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns GetMetricsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.GetMetricsRequest;
+
+ /**
+ * Decodes a GetMetricsRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns GetMetricsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.GetMetricsRequest;
+
+ /**
+ * Verifies a GetMetricsRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a GetMetricsRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns GetMetricsRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.GetMetricsRequest;
+
+ /**
+ * Creates a plain object from a GetMetricsRequest message. Also converts values to other types if specified.
+ * @param message GetMetricsRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.GetMetricsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this GetMetricsRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for GetMetricsRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a Metrics. */
+ interface IMetrics {
+
+ /** Metrics name */
+ name?: (string|null);
+
+ /** Metrics startTime */
+ startTime?: (google.protobuf.ITimestamp|null);
+
+ /** Metrics scoreMetrics */
+ scoreMetrics?: (google.cloud.recaptchaenterprise.v1.IScoreMetrics[]|null);
+
+ /** Metrics challengeMetrics */
+ challengeMetrics?: (google.cloud.recaptchaenterprise.v1.IChallengeMetrics[]|null);
+ }
+
+ /** Represents a Metrics. */
+ class Metrics implements IMetrics {
+
+ /**
+ * Constructs a new Metrics.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IMetrics);
+
+ /** Metrics name. */
+ public name: string;
+
+ /** Metrics startTime. */
+ public startTime?: (google.protobuf.ITimestamp|null);
+
+ /** Metrics scoreMetrics. */
+ public scoreMetrics: google.cloud.recaptchaenterprise.v1.IScoreMetrics[];
+
+ /** Metrics challengeMetrics. */
+ public challengeMetrics: google.cloud.recaptchaenterprise.v1.IChallengeMetrics[];
+
+ /**
+ * Creates a new Metrics instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Metrics instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IMetrics): google.cloud.recaptchaenterprise.v1.Metrics;
+
+ /**
+ * Encodes the specified Metrics message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.Metrics.verify|verify} messages.
+ * @param message Metrics message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IMetrics, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Metrics message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.Metrics.verify|verify} messages.
+ * @param message Metrics message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IMetrics, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Metrics message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Metrics
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.Metrics;
+
+ /**
+ * Decodes a Metrics message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Metrics
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.Metrics;
+
+ /**
+ * Verifies a Metrics message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a Metrics message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Metrics
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.Metrics;
+
+ /**
+ * Creates a plain object from a Metrics message. Also converts values to other types if specified.
+ * @param message Metrics
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.Metrics, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Metrics to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Metrics
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a RetrieveLegacySecretKeyResponse. */
+ interface IRetrieveLegacySecretKeyResponse {
+
+ /** RetrieveLegacySecretKeyResponse legacySecretKey */
+ legacySecretKey?: (string|null);
+ }
+
+ /** Represents a RetrieveLegacySecretKeyResponse. */
+ class RetrieveLegacySecretKeyResponse implements IRetrieveLegacySecretKeyResponse {
+
+ /**
+ * Constructs a new RetrieveLegacySecretKeyResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyResponse);
+
+ /** RetrieveLegacySecretKeyResponse legacySecretKey. */
+ public legacySecretKey: string;
+
+ /**
+ * Creates a new RetrieveLegacySecretKeyResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns RetrieveLegacySecretKeyResponse instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyResponse): google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse;
+
+ /**
+ * Encodes the specified RetrieveLegacySecretKeyResponse message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse.verify|verify} messages.
+ * @param message RetrieveLegacySecretKeyResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified RetrieveLegacySecretKeyResponse message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse.verify|verify} messages.
+ * @param message RetrieveLegacySecretKeyResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a RetrieveLegacySecretKeyResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns RetrieveLegacySecretKeyResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse;
+
+ /**
+ * Decodes a RetrieveLegacySecretKeyResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns RetrieveLegacySecretKeyResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse;
+
+ /**
+ * Verifies a RetrieveLegacySecretKeyResponse message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a RetrieveLegacySecretKeyResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns RetrieveLegacySecretKeyResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse;
+
+ /**
+ * Creates a plain object from a RetrieveLegacySecretKeyResponse message. Also converts values to other types if specified.
+ * @param message RetrieveLegacySecretKeyResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this RetrieveLegacySecretKeyResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for RetrieveLegacySecretKeyResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a Key. */
+ interface IKey {
+
+ /** Key name */
+ name?: (string|null);
+
+ /** Key displayName */
+ displayName?: (string|null);
+
+ /** Key webSettings */
+ webSettings?: (google.cloud.recaptchaenterprise.v1.IWebKeySettings|null);
+
+ /** Key androidSettings */
+ androidSettings?: (google.cloud.recaptchaenterprise.v1.IAndroidKeySettings|null);
+
+ /** Key iosSettings */
+ iosSettings?: (google.cloud.recaptchaenterprise.v1.IIOSKeySettings|null);
+
+ /** Key labels */
+ labels?: ({ [k: string]: string }|null);
+
+ /** Key createTime */
+ createTime?: (google.protobuf.ITimestamp|null);
+
+ /** Key testingOptions */
+ testingOptions?: (google.cloud.recaptchaenterprise.v1.ITestingOptions|null);
+
+ /** Key wafSettings */
+ wafSettings?: (google.cloud.recaptchaenterprise.v1.IWafSettings|null);
+ }
+
+ /** Represents a Key. */
+ class Key implements IKey {
+
+ /**
+ * Constructs a new Key.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IKey);
+
+ /** Key name. */
+ public name: string;
+
+ /** Key displayName. */
+ public displayName: string;
+
+ /** Key webSettings. */
+ public webSettings?: (google.cloud.recaptchaenterprise.v1.IWebKeySettings|null);
+
+ /** Key androidSettings. */
+ public androidSettings?: (google.cloud.recaptchaenterprise.v1.IAndroidKeySettings|null);
+
+ /** Key iosSettings. */
+ public iosSettings?: (google.cloud.recaptchaenterprise.v1.IIOSKeySettings|null);
+
+ /** Key labels. */
+ public labels: { [k: string]: string };
+
+ /** Key createTime. */
+ public createTime?: (google.protobuf.ITimestamp|null);
+
+ /** Key testingOptions. */
+ public testingOptions?: (google.cloud.recaptchaenterprise.v1.ITestingOptions|null);
+
+ /** Key wafSettings. */
+ public wafSettings?: (google.cloud.recaptchaenterprise.v1.IWafSettings|null);
+
+ /** Key platformSettings. */
+ public platformSettings?: ("webSettings"|"androidSettings"|"iosSettings");
+
+ /**
+ * Creates a new Key instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Key instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IKey): google.cloud.recaptchaenterprise.v1.Key;
+
+ /**
+ * Encodes the specified Key message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.Key.verify|verify} messages.
+ * @param message Key message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IKey, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Key message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.Key.verify|verify} messages.
+ * @param message Key message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IKey, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Key message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Key
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.Key;
+
+ /**
+ * Decodes a Key message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Key
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.Key;
+
+ /**
+ * Verifies a Key message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a Key message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Key
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.Key;
+
+ /**
+ * Creates a plain object from a Key message. Also converts values to other types if specified.
+ * @param message Key
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.Key, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Key to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Key
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a TestingOptions. */
+ interface ITestingOptions {
+
+ /** TestingOptions testingScore */
+ testingScore?: (number|null);
+
+ /** TestingOptions testingChallenge */
+ testingChallenge?: (google.cloud.recaptchaenterprise.v1.TestingOptions.TestingChallenge|keyof typeof google.cloud.recaptchaenterprise.v1.TestingOptions.TestingChallenge|null);
+ }
+
+ /** Represents a TestingOptions. */
+ class TestingOptions implements ITestingOptions {
+
+ /**
+ * Constructs a new TestingOptions.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.ITestingOptions);
+
+ /** TestingOptions testingScore. */
+ public testingScore: number;
+
+ /** TestingOptions testingChallenge. */
+ public testingChallenge: (google.cloud.recaptchaenterprise.v1.TestingOptions.TestingChallenge|keyof typeof google.cloud.recaptchaenterprise.v1.TestingOptions.TestingChallenge);
+
+ /**
+ * Creates a new TestingOptions instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns TestingOptions instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.ITestingOptions): google.cloud.recaptchaenterprise.v1.TestingOptions;
+
+ /**
+ * Encodes the specified TestingOptions message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.TestingOptions.verify|verify} messages.
+ * @param message TestingOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.ITestingOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified TestingOptions message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.TestingOptions.verify|verify} messages.
+ * @param message TestingOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.ITestingOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a TestingOptions message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns TestingOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.TestingOptions;
+
+ /**
+ * Decodes a TestingOptions message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns TestingOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.TestingOptions;
+
+ /**
+ * Verifies a TestingOptions message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a TestingOptions message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns TestingOptions
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.TestingOptions;
+
+ /**
+ * Creates a plain object from a TestingOptions message. Also converts values to other types if specified.
+ * @param message TestingOptions
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.TestingOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this TestingOptions to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for TestingOptions
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace TestingOptions {
+
+ /** TestingChallenge enum. */
+ enum TestingChallenge {
+ TESTING_CHALLENGE_UNSPECIFIED = 0,
+ NOCAPTCHA = 1,
+ UNSOLVABLE_CHALLENGE = 2
+ }
+ }
+
+ /** Properties of a WebKeySettings. */
+ interface IWebKeySettings {
+
+ /** WebKeySettings allowAllDomains */
+ allowAllDomains?: (boolean|null);
+
+ /** WebKeySettings allowedDomains */
+ allowedDomains?: (string[]|null);
+
+ /** WebKeySettings allowAmpTraffic */
+ allowAmpTraffic?: (boolean|null);
+
+ /** WebKeySettings integrationType */
+ integrationType?: (google.cloud.recaptchaenterprise.v1.WebKeySettings.IntegrationType|keyof typeof google.cloud.recaptchaenterprise.v1.WebKeySettings.IntegrationType|null);
+
+ /** WebKeySettings challengeSecurityPreference */
+ challengeSecurityPreference?: (google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference|keyof typeof google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference|null);
+ }
+
+ /** Represents a WebKeySettings. */
+ class WebKeySettings implements IWebKeySettings {
+
+ /**
+ * Constructs a new WebKeySettings.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IWebKeySettings);
+
+ /** WebKeySettings allowAllDomains. */
+ public allowAllDomains: boolean;
+
+ /** WebKeySettings allowedDomains. */
+ public allowedDomains: string[];
+
+ /** WebKeySettings allowAmpTraffic. */
+ public allowAmpTraffic: boolean;
+
+ /** WebKeySettings integrationType. */
+ public integrationType: (google.cloud.recaptchaenterprise.v1.WebKeySettings.IntegrationType|keyof typeof google.cloud.recaptchaenterprise.v1.WebKeySettings.IntegrationType);
+
+ /** WebKeySettings challengeSecurityPreference. */
+ public challengeSecurityPreference: (google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference|keyof typeof google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference);
+
+ /**
+ * Creates a new WebKeySettings instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns WebKeySettings instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IWebKeySettings): google.cloud.recaptchaenterprise.v1.WebKeySettings;
+
+ /**
+ * Encodes the specified WebKeySettings message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.WebKeySettings.verify|verify} messages.
+ * @param message WebKeySettings message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IWebKeySettings, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified WebKeySettings message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.WebKeySettings.verify|verify} messages.
+ * @param message WebKeySettings message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IWebKeySettings, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a WebKeySettings message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns WebKeySettings
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.WebKeySettings;
+
+ /**
+ * Decodes a WebKeySettings message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns WebKeySettings
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.WebKeySettings;
+
+ /**
+ * Verifies a WebKeySettings message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a WebKeySettings message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns WebKeySettings
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.WebKeySettings;
+
+ /**
+ * Creates a plain object from a WebKeySettings message. Also converts values to other types if specified.
+ * @param message WebKeySettings
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.WebKeySettings, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this WebKeySettings to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for WebKeySettings
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace WebKeySettings {
+
+ /** IntegrationType enum. */
+ enum IntegrationType {
+ INTEGRATION_TYPE_UNSPECIFIED = 0,
+ SCORE = 1,
+ CHECKBOX = 2,
+ INVISIBLE = 3
+ }
+
+ /** ChallengeSecurityPreference enum. */
+ enum ChallengeSecurityPreference {
+ CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED = 0,
+ USABILITY = 1,
+ BALANCE = 2,
+ SECURITY = 3
+ }
+ }
+
+ /** Properties of an AndroidKeySettings. */
+ interface IAndroidKeySettings {
+
+ /** AndroidKeySettings allowAllPackageNames */
+ allowAllPackageNames?: (boolean|null);
+
+ /** AndroidKeySettings allowedPackageNames */
+ allowedPackageNames?: (string[]|null);
+ }
+
+ /** Represents an AndroidKeySettings. */
+ class AndroidKeySettings implements IAndroidKeySettings {
+
+ /**
+ * Constructs a new AndroidKeySettings.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IAndroidKeySettings);
+
+ /** AndroidKeySettings allowAllPackageNames. */
+ public allowAllPackageNames: boolean;
+
+ /** AndroidKeySettings allowedPackageNames. */
+ public allowedPackageNames: string[];
+
+ /**
+ * Creates a new AndroidKeySettings instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns AndroidKeySettings instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IAndroidKeySettings): google.cloud.recaptchaenterprise.v1.AndroidKeySettings;
+
+ /**
+ * Encodes the specified AndroidKeySettings message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.AndroidKeySettings.verify|verify} messages.
+ * @param message AndroidKeySettings message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IAndroidKeySettings, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified AndroidKeySettings message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.AndroidKeySettings.verify|verify} messages.
+ * @param message AndroidKeySettings message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IAndroidKeySettings, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an AndroidKeySettings message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns AndroidKeySettings
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.AndroidKeySettings;
+
+ /**
+ * Decodes an AndroidKeySettings message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns AndroidKeySettings
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.AndroidKeySettings;
+
+ /**
+ * Verifies an AndroidKeySettings message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an AndroidKeySettings message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns AndroidKeySettings
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.AndroidKeySettings;
+
+ /**
+ * Creates a plain object from an AndroidKeySettings message. Also converts values to other types if specified.
+ * @param message AndroidKeySettings
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.AndroidKeySettings, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this AndroidKeySettings to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for AndroidKeySettings
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a IOSKeySettings. */
+ interface IIOSKeySettings {
+
+ /** IOSKeySettings allowAllBundleIds */
+ allowAllBundleIds?: (boolean|null);
+
+ /** IOSKeySettings allowedBundleIds */
+ allowedBundleIds?: (string[]|null);
+ }
+
+ /** Represents a IOSKeySettings. */
+ class IOSKeySettings implements IIOSKeySettings {
+
+ /**
+ * Constructs a new IOSKeySettings.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IIOSKeySettings);
+
+ /** IOSKeySettings allowAllBundleIds. */
+ public allowAllBundleIds: boolean;
+
+ /** IOSKeySettings allowedBundleIds. */
+ public allowedBundleIds: string[];
+
+ /**
+ * Creates a new IOSKeySettings instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns IOSKeySettings instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IIOSKeySettings): google.cloud.recaptchaenterprise.v1.IOSKeySettings;
+
+ /**
+ * Encodes the specified IOSKeySettings message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.IOSKeySettings.verify|verify} messages.
+ * @param message IOSKeySettings message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IIOSKeySettings, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified IOSKeySettings message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.IOSKeySettings.verify|verify} messages.
+ * @param message IOSKeySettings message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IIOSKeySettings, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a IOSKeySettings message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns IOSKeySettings
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.IOSKeySettings;
+
+ /**
+ * Decodes a IOSKeySettings message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns IOSKeySettings
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.IOSKeySettings;
+
+ /**
+ * Verifies a IOSKeySettings message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a IOSKeySettings message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns IOSKeySettings
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.IOSKeySettings;
+
+ /**
+ * Creates a plain object from a IOSKeySettings message. Also converts values to other types if specified.
+ * @param message IOSKeySettings
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.IOSKeySettings, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this IOSKeySettings to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for IOSKeySettings
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ScoreDistribution. */
+ interface IScoreDistribution {
+
+ /** ScoreDistribution scoreBuckets */
+ scoreBuckets?: ({ [k: string]: (number|Long|string) }|null);
+ }
+
+ /** Represents a ScoreDistribution. */
+ class ScoreDistribution implements IScoreDistribution {
+
+ /**
+ * Constructs a new ScoreDistribution.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IScoreDistribution);
+
+ /** ScoreDistribution scoreBuckets. */
+ public scoreBuckets: { [k: string]: (number|Long|string) };
+
+ /**
+ * Creates a new ScoreDistribution instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ScoreDistribution instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IScoreDistribution): google.cloud.recaptchaenterprise.v1.ScoreDistribution;
+
+ /**
+ * Encodes the specified ScoreDistribution message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ScoreDistribution.verify|verify} messages.
+ * @param message ScoreDistribution message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IScoreDistribution, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ScoreDistribution message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ScoreDistribution.verify|verify} messages.
+ * @param message ScoreDistribution message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IScoreDistribution, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ScoreDistribution message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ScoreDistribution
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.ScoreDistribution;
+
+ /**
+ * Decodes a ScoreDistribution message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ScoreDistribution
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.ScoreDistribution;
+
+ /**
+ * Verifies a ScoreDistribution message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ScoreDistribution message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ScoreDistribution
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.ScoreDistribution;
+
+ /**
+ * Creates a plain object from a ScoreDistribution message. Also converts values to other types if specified.
+ * @param message ScoreDistribution
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.ScoreDistribution, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ScoreDistribution to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ScoreDistribution
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ScoreMetrics. */
+ interface IScoreMetrics {
+
+ /** ScoreMetrics overallMetrics */
+ overallMetrics?: (google.cloud.recaptchaenterprise.v1.IScoreDistribution|null);
+
+ /** ScoreMetrics actionMetrics */
+ actionMetrics?: ({ [k: string]: google.cloud.recaptchaenterprise.v1.IScoreDistribution }|null);
+ }
+
+ /** Represents a ScoreMetrics. */
+ class ScoreMetrics implements IScoreMetrics {
+
+ /**
+ * Constructs a new ScoreMetrics.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IScoreMetrics);
+
+ /** ScoreMetrics overallMetrics. */
+ public overallMetrics?: (google.cloud.recaptchaenterprise.v1.IScoreDistribution|null);
+
+ /** ScoreMetrics actionMetrics. */
+ public actionMetrics: { [k: string]: google.cloud.recaptchaenterprise.v1.IScoreDistribution };
+
+ /**
+ * Creates a new ScoreMetrics instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ScoreMetrics instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IScoreMetrics): google.cloud.recaptchaenterprise.v1.ScoreMetrics;
+
+ /**
+ * Encodes the specified ScoreMetrics message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ScoreMetrics.verify|verify} messages.
+ * @param message ScoreMetrics message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IScoreMetrics, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ScoreMetrics message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ScoreMetrics.verify|verify} messages.
+ * @param message ScoreMetrics message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IScoreMetrics, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ScoreMetrics message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ScoreMetrics
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.ScoreMetrics;
+
+ /**
+ * Decodes a ScoreMetrics message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ScoreMetrics
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.ScoreMetrics;
+
+ /**
+ * Verifies a ScoreMetrics message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ScoreMetrics message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ScoreMetrics
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.ScoreMetrics;
+
+ /**
+ * Creates a plain object from a ScoreMetrics message. Also converts values to other types if specified.
+ * @param message ScoreMetrics
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.ScoreMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ScoreMetrics to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ScoreMetrics
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ChallengeMetrics. */
+ interface IChallengeMetrics {
+
+ /** ChallengeMetrics pageloadCount */
+ pageloadCount?: (number|Long|string|null);
+
+ /** ChallengeMetrics nocaptchaCount */
+ nocaptchaCount?: (number|Long|string|null);
+
+ /** ChallengeMetrics failedCount */
+ failedCount?: (number|Long|string|null);
+
+ /** ChallengeMetrics passedCount */
+ passedCount?: (number|Long|string|null);
+ }
+
+ /** Represents a ChallengeMetrics. */
+ class ChallengeMetrics implements IChallengeMetrics {
+
+ /**
+ * Constructs a new ChallengeMetrics.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IChallengeMetrics);
+
+ /** ChallengeMetrics pageloadCount. */
+ public pageloadCount: (number|Long|string);
+
+ /** ChallengeMetrics nocaptchaCount. */
+ public nocaptchaCount: (number|Long|string);
+
+ /** ChallengeMetrics failedCount. */
+ public failedCount: (number|Long|string);
+
+ /** ChallengeMetrics passedCount. */
+ public passedCount: (number|Long|string);
+
+ /**
+ * Creates a new ChallengeMetrics instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ChallengeMetrics instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IChallengeMetrics): google.cloud.recaptchaenterprise.v1.ChallengeMetrics;
+
+ /**
+ * Encodes the specified ChallengeMetrics message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ChallengeMetrics.verify|verify} messages.
+ * @param message ChallengeMetrics message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IChallengeMetrics, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ChallengeMetrics message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ChallengeMetrics.verify|verify} messages.
+ * @param message ChallengeMetrics message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IChallengeMetrics, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ChallengeMetrics message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ChallengeMetrics
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.ChallengeMetrics;
+
+ /**
+ * Decodes a ChallengeMetrics message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ChallengeMetrics
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.ChallengeMetrics;
+
+ /**
+ * Verifies a ChallengeMetrics message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ChallengeMetrics message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ChallengeMetrics
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.ChallengeMetrics;
+
+ /**
+ * Creates a plain object from a ChallengeMetrics message. Also converts values to other types if specified.
+ * @param message ChallengeMetrics
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.ChallengeMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ChallengeMetrics to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ChallengeMetrics
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ListRelatedAccountGroupMembershipsRequest. */
+ interface IListRelatedAccountGroupMembershipsRequest {
+
+ /** ListRelatedAccountGroupMembershipsRequest parent */
+ parent?: (string|null);
+
+ /** ListRelatedAccountGroupMembershipsRequest pageSize */
+ pageSize?: (number|null);
+
+ /** ListRelatedAccountGroupMembershipsRequest pageToken */
+ pageToken?: (string|null);
+ }
+
+ /** Represents a ListRelatedAccountGroupMembershipsRequest. */
+ class ListRelatedAccountGroupMembershipsRequest implements IListRelatedAccountGroupMembershipsRequest {
+
+ /**
+ * Constructs a new ListRelatedAccountGroupMembershipsRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest);
+
+ /** ListRelatedAccountGroupMembershipsRequest parent. */
+ public parent: string;
+
+ /** ListRelatedAccountGroupMembershipsRequest pageSize. */
+ public pageSize: number;
+
+ /** ListRelatedAccountGroupMembershipsRequest pageToken. */
+ public pageToken: string;
+
+ /**
+ * Creates a new ListRelatedAccountGroupMembershipsRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ListRelatedAccountGroupMembershipsRequest instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest): google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest;
+
+ /**
+ * Encodes the specified ListRelatedAccountGroupMembershipsRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest.verify|verify} messages.
+ * @param message ListRelatedAccountGroupMembershipsRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ListRelatedAccountGroupMembershipsRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest.verify|verify} messages.
+ * @param message ListRelatedAccountGroupMembershipsRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ListRelatedAccountGroupMembershipsRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ListRelatedAccountGroupMembershipsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest;
+
+ /**
+ * Decodes a ListRelatedAccountGroupMembershipsRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ListRelatedAccountGroupMembershipsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest;
+
+ /**
+ * Verifies a ListRelatedAccountGroupMembershipsRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ListRelatedAccountGroupMembershipsRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ListRelatedAccountGroupMembershipsRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest;
+
+ /**
+ * Creates a plain object from a ListRelatedAccountGroupMembershipsRequest message. Also converts values to other types if specified.
+ * @param message ListRelatedAccountGroupMembershipsRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ListRelatedAccountGroupMembershipsRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ListRelatedAccountGroupMembershipsRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ListRelatedAccountGroupMembershipsResponse. */
+ interface IListRelatedAccountGroupMembershipsResponse {
+
+ /** ListRelatedAccountGroupMembershipsResponse relatedAccountGroupMemberships */
+ relatedAccountGroupMemberships?: (google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership[]|null);
+
+ /** ListRelatedAccountGroupMembershipsResponse nextPageToken */
+ nextPageToken?: (string|null);
+ }
+
+ /** Represents a ListRelatedAccountGroupMembershipsResponse. */
+ class ListRelatedAccountGroupMembershipsResponse implements IListRelatedAccountGroupMembershipsResponse {
+
+ /**
+ * Constructs a new ListRelatedAccountGroupMembershipsResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsResponse);
+
+ /** ListRelatedAccountGroupMembershipsResponse relatedAccountGroupMemberships. */
+ public relatedAccountGroupMemberships: google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership[];
+
+ /** ListRelatedAccountGroupMembershipsResponse nextPageToken. */
+ public nextPageToken: string;
+
+ /**
+ * Creates a new ListRelatedAccountGroupMembershipsResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ListRelatedAccountGroupMembershipsResponse instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsResponse): google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse;
+
+ /**
+ * Encodes the specified ListRelatedAccountGroupMembershipsResponse message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse.verify|verify} messages.
+ * @param message ListRelatedAccountGroupMembershipsResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ListRelatedAccountGroupMembershipsResponse message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse.verify|verify} messages.
+ * @param message ListRelatedAccountGroupMembershipsResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ListRelatedAccountGroupMembershipsResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ListRelatedAccountGroupMembershipsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse;
+
+ /**
+ * Decodes a ListRelatedAccountGroupMembershipsResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ListRelatedAccountGroupMembershipsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse;
+
+ /**
+ * Verifies a ListRelatedAccountGroupMembershipsResponse message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ListRelatedAccountGroupMembershipsResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ListRelatedAccountGroupMembershipsResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse;
+
+ /**
+ * Creates a plain object from a ListRelatedAccountGroupMembershipsResponse message. Also converts values to other types if specified.
+ * @param message ListRelatedAccountGroupMembershipsResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ListRelatedAccountGroupMembershipsResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ListRelatedAccountGroupMembershipsResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ListRelatedAccountGroupsRequest. */
+ interface IListRelatedAccountGroupsRequest {
+
+ /** ListRelatedAccountGroupsRequest parent */
+ parent?: (string|null);
+
+ /** ListRelatedAccountGroupsRequest pageSize */
+ pageSize?: (number|null);
+
+ /** ListRelatedAccountGroupsRequest pageToken */
+ pageToken?: (string|null);
+ }
+
+ /** Represents a ListRelatedAccountGroupsRequest. */
+ class ListRelatedAccountGroupsRequest implements IListRelatedAccountGroupsRequest {
+
+ /**
+ * Constructs a new ListRelatedAccountGroupsRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest);
+
+ /** ListRelatedAccountGroupsRequest parent. */
+ public parent: string;
+
+ /** ListRelatedAccountGroupsRequest pageSize. */
+ public pageSize: number;
+
+ /** ListRelatedAccountGroupsRequest pageToken. */
+ public pageToken: string;
+
+ /**
+ * Creates a new ListRelatedAccountGroupsRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ListRelatedAccountGroupsRequest instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest): google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest;
+
+ /**
+ * Encodes the specified ListRelatedAccountGroupsRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest.verify|verify} messages.
+ * @param message ListRelatedAccountGroupsRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ListRelatedAccountGroupsRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest.verify|verify} messages.
+ * @param message ListRelatedAccountGroupsRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ListRelatedAccountGroupsRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ListRelatedAccountGroupsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest;
+
+ /**
+ * Decodes a ListRelatedAccountGroupsRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ListRelatedAccountGroupsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest;
+
+ /**
+ * Verifies a ListRelatedAccountGroupsRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ListRelatedAccountGroupsRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ListRelatedAccountGroupsRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest;
+
+ /**
+ * Creates a plain object from a ListRelatedAccountGroupsRequest message. Also converts values to other types if specified.
+ * @param message ListRelatedAccountGroupsRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ListRelatedAccountGroupsRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ListRelatedAccountGroupsRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ListRelatedAccountGroupsResponse. */
+ interface IListRelatedAccountGroupsResponse {
+
+ /** ListRelatedAccountGroupsResponse relatedAccountGroups */
+ relatedAccountGroups?: (google.cloud.recaptchaenterprise.v1.IRelatedAccountGroup[]|null);
+
+ /** ListRelatedAccountGroupsResponse nextPageToken */
+ nextPageToken?: (string|null);
+ }
+
+ /** Represents a ListRelatedAccountGroupsResponse. */
+ class ListRelatedAccountGroupsResponse implements IListRelatedAccountGroupsResponse {
+
+ /**
+ * Constructs a new ListRelatedAccountGroupsResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsResponse);
+
+ /** ListRelatedAccountGroupsResponse relatedAccountGroups. */
+ public relatedAccountGroups: google.cloud.recaptchaenterprise.v1.IRelatedAccountGroup[];
+
+ /** ListRelatedAccountGroupsResponse nextPageToken. */
+ public nextPageToken: string;
+
+ /**
+ * Creates a new ListRelatedAccountGroupsResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ListRelatedAccountGroupsResponse instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsResponse): google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse;
+
+ /**
+ * Encodes the specified ListRelatedAccountGroupsResponse message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse.verify|verify} messages.
+ * @param message ListRelatedAccountGroupsResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ListRelatedAccountGroupsResponse message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse.verify|verify} messages.
+ * @param message ListRelatedAccountGroupsResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ListRelatedAccountGroupsResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ListRelatedAccountGroupsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse;
+
+ /**
+ * Decodes a ListRelatedAccountGroupsResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ListRelatedAccountGroupsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse;
+
+ /**
+ * Verifies a ListRelatedAccountGroupsResponse message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ListRelatedAccountGroupsResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ListRelatedAccountGroupsResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse;
+
+ /**
+ * Creates a plain object from a ListRelatedAccountGroupsResponse message. Also converts values to other types if specified.
+ * @param message ListRelatedAccountGroupsResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ListRelatedAccountGroupsResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ListRelatedAccountGroupsResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a SearchRelatedAccountGroupMembershipsRequest. */
+ interface ISearchRelatedAccountGroupMembershipsRequest {
+
+ /** SearchRelatedAccountGroupMembershipsRequest project */
+ project?: (string|null);
+
+ /** SearchRelatedAccountGroupMembershipsRequest hashedAccountId */
+ hashedAccountId?: (Uint8Array|string|null);
+
+ /** SearchRelatedAccountGroupMembershipsRequest pageSize */
+ pageSize?: (number|null);
+
+ /** SearchRelatedAccountGroupMembershipsRequest pageToken */
+ pageToken?: (string|null);
+ }
+
+ /** Represents a SearchRelatedAccountGroupMembershipsRequest. */
+ class SearchRelatedAccountGroupMembershipsRequest implements ISearchRelatedAccountGroupMembershipsRequest {
+
+ /**
+ * Constructs a new SearchRelatedAccountGroupMembershipsRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest);
+
+ /** SearchRelatedAccountGroupMembershipsRequest project. */
+ public project: string;
+
+ /** SearchRelatedAccountGroupMembershipsRequest hashedAccountId. */
+ public hashedAccountId: (Uint8Array|string);
+
+ /** SearchRelatedAccountGroupMembershipsRequest pageSize. */
+ public pageSize: number;
+
+ /** SearchRelatedAccountGroupMembershipsRequest pageToken. */
+ public pageToken: string;
+
+ /**
+ * Creates a new SearchRelatedAccountGroupMembershipsRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns SearchRelatedAccountGroupMembershipsRequest instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest): google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest;
+
+ /**
+ * Encodes the specified SearchRelatedAccountGroupMembershipsRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest.verify|verify} messages.
+ * @param message SearchRelatedAccountGroupMembershipsRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified SearchRelatedAccountGroupMembershipsRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest.verify|verify} messages.
+ * @param message SearchRelatedAccountGroupMembershipsRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a SearchRelatedAccountGroupMembershipsRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns SearchRelatedAccountGroupMembershipsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest;
+
+ /**
+ * Decodes a SearchRelatedAccountGroupMembershipsRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns SearchRelatedAccountGroupMembershipsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest;
+
+ /**
+ * Verifies a SearchRelatedAccountGroupMembershipsRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a SearchRelatedAccountGroupMembershipsRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns SearchRelatedAccountGroupMembershipsRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest;
+
+ /**
+ * Creates a plain object from a SearchRelatedAccountGroupMembershipsRequest message. Also converts values to other types if specified.
+ * @param message SearchRelatedAccountGroupMembershipsRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this SearchRelatedAccountGroupMembershipsRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for SearchRelatedAccountGroupMembershipsRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a SearchRelatedAccountGroupMembershipsResponse. */
+ interface ISearchRelatedAccountGroupMembershipsResponse {
+
+ /** SearchRelatedAccountGroupMembershipsResponse relatedAccountGroupMemberships */
+ relatedAccountGroupMemberships?: (google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership[]|null);
+
+ /** SearchRelatedAccountGroupMembershipsResponse nextPageToken */
+ nextPageToken?: (string|null);
+ }
+
+ /** Represents a SearchRelatedAccountGroupMembershipsResponse. */
+ class SearchRelatedAccountGroupMembershipsResponse implements ISearchRelatedAccountGroupMembershipsResponse {
+
+ /**
+ * Constructs a new SearchRelatedAccountGroupMembershipsResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsResponse);
+
+ /** SearchRelatedAccountGroupMembershipsResponse relatedAccountGroupMemberships. */
+ public relatedAccountGroupMemberships: google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership[];
+
+ /** SearchRelatedAccountGroupMembershipsResponse nextPageToken. */
+ public nextPageToken: string;
+
+ /**
+ * Creates a new SearchRelatedAccountGroupMembershipsResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns SearchRelatedAccountGroupMembershipsResponse instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsResponse): google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse;
+
+ /**
+ * Encodes the specified SearchRelatedAccountGroupMembershipsResponse message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse.verify|verify} messages.
+ * @param message SearchRelatedAccountGroupMembershipsResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified SearchRelatedAccountGroupMembershipsResponse message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse.verify|verify} messages.
+ * @param message SearchRelatedAccountGroupMembershipsResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a SearchRelatedAccountGroupMembershipsResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns SearchRelatedAccountGroupMembershipsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse;
+
+ /**
+ * Decodes a SearchRelatedAccountGroupMembershipsResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns SearchRelatedAccountGroupMembershipsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse;
+
+ /**
+ * Verifies a SearchRelatedAccountGroupMembershipsResponse message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a SearchRelatedAccountGroupMembershipsResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns SearchRelatedAccountGroupMembershipsResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse;
+
+ /**
+ * Creates a plain object from a SearchRelatedAccountGroupMembershipsResponse message. Also converts values to other types if specified.
+ * @param message SearchRelatedAccountGroupMembershipsResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this SearchRelatedAccountGroupMembershipsResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for SearchRelatedAccountGroupMembershipsResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a RelatedAccountGroupMembership. */
+ interface IRelatedAccountGroupMembership {
+
+ /** RelatedAccountGroupMembership name */
+ name?: (string|null);
+
+ /** RelatedAccountGroupMembership hashedAccountId */
+ hashedAccountId?: (Uint8Array|string|null);
+ }
+
+ /** Represents a RelatedAccountGroupMembership. */
+ class RelatedAccountGroupMembership implements IRelatedAccountGroupMembership {
+
+ /**
+ * Constructs a new RelatedAccountGroupMembership.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership);
+
+ /** RelatedAccountGroupMembership name. */
+ public name: string;
+
+ /** RelatedAccountGroupMembership hashedAccountId. */
+ public hashedAccountId: (Uint8Array|string);
+
+ /**
+ * Creates a new RelatedAccountGroupMembership instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns RelatedAccountGroupMembership instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership): google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership;
+
+ /**
+ * Encodes the specified RelatedAccountGroupMembership message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership.verify|verify} messages.
+ * @param message RelatedAccountGroupMembership message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified RelatedAccountGroupMembership message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership.verify|verify} messages.
+ * @param message RelatedAccountGroupMembership message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a RelatedAccountGroupMembership message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns RelatedAccountGroupMembership
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership;
+
+ /**
+ * Decodes a RelatedAccountGroupMembership message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns RelatedAccountGroupMembership
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership;
+
+ /**
+ * Verifies a RelatedAccountGroupMembership message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a RelatedAccountGroupMembership message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns RelatedAccountGroupMembership
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership;
+
+ /**
+ * Creates a plain object from a RelatedAccountGroupMembership message. Also converts values to other types if specified.
+ * @param message RelatedAccountGroupMembership
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this RelatedAccountGroupMembership to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for RelatedAccountGroupMembership
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a RelatedAccountGroup. */
+ interface IRelatedAccountGroup {
+
+ /** RelatedAccountGroup name */
+ name?: (string|null);
+ }
+
+ /** Represents a RelatedAccountGroup. */
+ class RelatedAccountGroup implements IRelatedAccountGroup {
+
+ /**
+ * Constructs a new RelatedAccountGroup.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IRelatedAccountGroup);
+
+ /** RelatedAccountGroup name. */
+ public name: string;
+
+ /**
+ * Creates a new RelatedAccountGroup instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns RelatedAccountGroup instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IRelatedAccountGroup): google.cloud.recaptchaenterprise.v1.RelatedAccountGroup;
+
+ /**
+ * Encodes the specified RelatedAccountGroup message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.RelatedAccountGroup.verify|verify} messages.
+ * @param message RelatedAccountGroup message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IRelatedAccountGroup, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified RelatedAccountGroup message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.RelatedAccountGroup.verify|verify} messages.
+ * @param message RelatedAccountGroup message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IRelatedAccountGroup, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a RelatedAccountGroup message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns RelatedAccountGroup
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.RelatedAccountGroup;
+
+ /**
+ * Decodes a RelatedAccountGroup message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns RelatedAccountGroup
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.RelatedAccountGroup;
+
+ /**
+ * Verifies a RelatedAccountGroup message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a RelatedAccountGroup message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns RelatedAccountGroup
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.RelatedAccountGroup;
+
+ /**
+ * Creates a plain object from a RelatedAccountGroup message. Also converts values to other types if specified.
+ * @param message RelatedAccountGroup
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.RelatedAccountGroup, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this RelatedAccountGroup to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for RelatedAccountGroup
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a WafSettings. */
+ interface IWafSettings {
+
+ /** WafSettings wafService */
+ wafService?: (google.cloud.recaptchaenterprise.v1.WafSettings.WafService|keyof typeof google.cloud.recaptchaenterprise.v1.WafSettings.WafService|null);
+
+ /** WafSettings wafFeature */
+ wafFeature?: (google.cloud.recaptchaenterprise.v1.WafSettings.WafFeature|keyof typeof google.cloud.recaptchaenterprise.v1.WafSettings.WafFeature|null);
+ }
+
+ /** Represents a WafSettings. */
+ class WafSettings implements IWafSettings {
+
+ /**
+ * Constructs a new WafSettings.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1.IWafSettings);
+
+ /** WafSettings wafService. */
+ public wafService: (google.cloud.recaptchaenterprise.v1.WafSettings.WafService|keyof typeof google.cloud.recaptchaenterprise.v1.WafSettings.WafService);
+
+ /** WafSettings wafFeature. */
+ public wafFeature: (google.cloud.recaptchaenterprise.v1.WafSettings.WafFeature|keyof typeof google.cloud.recaptchaenterprise.v1.WafSettings.WafFeature);
+
+ /**
+ * Creates a new WafSettings instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns WafSettings instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1.IWafSettings): google.cloud.recaptchaenterprise.v1.WafSettings;
+
+ /**
+ * Encodes the specified WafSettings message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.WafSettings.verify|verify} messages.
+ * @param message WafSettings message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1.IWafSettings, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified WafSettings message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.WafSettings.verify|verify} messages.
+ * @param message WafSettings message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IWafSettings, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a WafSettings message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns WafSettings
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.WafSettings;
+
+ /**
+ * Decodes a WafSettings message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns WafSettings
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.WafSettings;
+
+ /**
+ * Verifies a WafSettings message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a WafSettings message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns WafSettings
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.WafSettings;
+
+ /**
+ * Creates a plain object from a WafSettings message. Also converts values to other types if specified.
+ * @param message WafSettings
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1.WafSettings, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this WafSettings to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for WafSettings
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace WafSettings {
+
+ /** WafFeature enum. */
+ enum WafFeature {
+ WAF_FEATURE_UNSPECIFIED = 0,
+ CHALLENGE_PAGE = 1,
+ SESSION_TOKEN = 2,
+ ACTION_TOKEN = 3
+ }
+
+ /** WafService enum. */
+ enum WafService {
+ WAF_SERVICE_UNSPECIFIED = 0,
+ CA = 1
+ }
+ }
+ }
+
+ /** Namespace v1beta1. */
+ namespace v1beta1 {
+
+ /** Represents a RecaptchaEnterpriseServiceV1Beta1 */
+ class RecaptchaEnterpriseServiceV1Beta1 extends $protobuf.rpc.Service {
+
+ /**
+ * Constructs a new RecaptchaEnterpriseServiceV1Beta1 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 RecaptchaEnterpriseServiceV1Beta1 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): RecaptchaEnterpriseServiceV1Beta1;
+
+ /**
+ * Calls CreateAssessment.
+ * @param request CreateAssessmentRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and Assessment
+ */
+ public createAssessment(request: google.cloud.recaptchaenterprise.v1beta1.ICreateAssessmentRequest, callback: google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1.CreateAssessmentCallback): void;
+
+ /**
+ * Calls CreateAssessment.
+ * @param request CreateAssessmentRequest message or plain object
+ * @returns Promise
+ */
+ public createAssessment(request: google.cloud.recaptchaenterprise.v1beta1.ICreateAssessmentRequest): Promise;
+
+ /**
+ * Calls AnnotateAssessment.
+ * @param request AnnotateAssessmentRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and AnnotateAssessmentResponse
+ */
+ public annotateAssessment(request: google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentRequest, callback: google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1.AnnotateAssessmentCallback): void;
+
+ /**
+ * Calls AnnotateAssessment.
+ * @param request AnnotateAssessmentRequest message or plain object
+ * @returns Promise
+ */
+ public annotateAssessment(request: google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentRequest): Promise;
+ }
+
+ namespace RecaptchaEnterpriseServiceV1Beta1 {
+
+ /**
+ * Callback as used by {@link google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1|createAssessment}.
+ * @param error Error, if any
+ * @param [response] Assessment
+ */
+ type CreateAssessmentCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1beta1.Assessment) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1|annotateAssessment}.
+ * @param error Error, if any
+ * @param [response] AnnotateAssessmentResponse
+ */
+ type AnnotateAssessmentCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse) => void;
+ }
+
+ /** Properties of a CreateAssessmentRequest. */
+ interface ICreateAssessmentRequest {
+
+ /** CreateAssessmentRequest parent */
+ parent?: (string|null);
+
+ /** CreateAssessmentRequest assessment */
+ assessment?: (google.cloud.recaptchaenterprise.v1beta1.IAssessment|null);
+ }
+
+ /** Represents a CreateAssessmentRequest. */
+ class CreateAssessmentRequest implements ICreateAssessmentRequest {
+
+ /**
+ * Constructs a new CreateAssessmentRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1beta1.ICreateAssessmentRequest);
+
+ /** CreateAssessmentRequest parent. */
+ public parent: string;
+
+ /** CreateAssessmentRequest assessment. */
+ public assessment?: (google.cloud.recaptchaenterprise.v1beta1.IAssessment|null);
+
+ /**
+ * Creates a new CreateAssessmentRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns CreateAssessmentRequest instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1beta1.ICreateAssessmentRequest): google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest;
+
+ /**
+ * Encodes the specified CreateAssessmentRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest.verify|verify} messages.
+ * @param message CreateAssessmentRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1beta1.ICreateAssessmentRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified CreateAssessmentRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest.verify|verify} messages.
+ * @param message CreateAssessmentRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1beta1.ICreateAssessmentRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a CreateAssessmentRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns CreateAssessmentRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest;
+
+ /**
+ * Decodes a CreateAssessmentRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns CreateAssessmentRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest;
+
+ /**
+ * Verifies a CreateAssessmentRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a CreateAssessmentRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns CreateAssessmentRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest;
+
+ /**
+ * Creates a plain object from a CreateAssessmentRequest message. Also converts values to other types if specified.
+ * @param message CreateAssessmentRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this CreateAssessmentRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for CreateAssessmentRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an AnnotateAssessmentRequest. */
+ interface IAnnotateAssessmentRequest {
+
+ /** AnnotateAssessmentRequest name */
+ name?: (string|null);
+
+ /** AnnotateAssessmentRequest annotation */
+ annotation?: (google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation|keyof typeof google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation|null);
+
+ /** AnnotateAssessmentRequest reasons */
+ reasons?: (google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Reason[]|null);
+
+ /** AnnotateAssessmentRequest hashedAccountId */
+ hashedAccountId?: (Uint8Array|string|null);
+ }
+
+ /** Represents an AnnotateAssessmentRequest. */
+ class AnnotateAssessmentRequest implements IAnnotateAssessmentRequest {
+
+ /**
+ * Constructs a new AnnotateAssessmentRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentRequest);
+
+ /** AnnotateAssessmentRequest name. */
+ public name: string;
+
+ /** AnnotateAssessmentRequest annotation. */
+ public annotation: (google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation|keyof typeof google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation);
+
+ /** AnnotateAssessmentRequest reasons. */
+ public reasons: google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Reason[];
+
+ /** AnnotateAssessmentRequest hashedAccountId. */
+ public hashedAccountId: (Uint8Array|string);
+
+ /**
+ * Creates a new AnnotateAssessmentRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns AnnotateAssessmentRequest instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentRequest): google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest;
+
+ /**
+ * Encodes the specified AnnotateAssessmentRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.verify|verify} messages.
+ * @param message AnnotateAssessmentRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified AnnotateAssessmentRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.verify|verify} messages.
+ * @param message AnnotateAssessmentRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an AnnotateAssessmentRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns AnnotateAssessmentRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest;
+
+ /**
+ * Decodes an AnnotateAssessmentRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns AnnotateAssessmentRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest;
+
+ /**
+ * Verifies an AnnotateAssessmentRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an AnnotateAssessmentRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns AnnotateAssessmentRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest;
+
+ /**
+ * Creates a plain object from an AnnotateAssessmentRequest message. Also converts values to other types if specified.
+ * @param message AnnotateAssessmentRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this AnnotateAssessmentRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for AnnotateAssessmentRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace AnnotateAssessmentRequest {
+
+ /** Annotation enum. */
+ enum Annotation {
+ ANNOTATION_UNSPECIFIED = 0,
+ LEGITIMATE = 1,
+ FRAUDULENT = 2,
+ PASSWORD_CORRECT = 3,
+ PASSWORD_INCORRECT = 4
+ }
+
+ /** Reason enum. */
+ enum Reason {
+ REASON_UNSPECIFIED = 0,
+ CHARGEBACK = 1,
+ CHARGEBACK_FRAUD = 8,
+ CHARGEBACK_DISPUTE = 9,
+ PAYMENT_HEURISTICS = 2,
+ INITIATED_TWO_FACTOR = 7,
+ PASSED_TWO_FACTOR = 3,
+ FAILED_TWO_FACTOR = 4,
+ CORRECT_PASSWORD = 5,
+ INCORRECT_PASSWORD = 6
+ }
+ }
+
+ /** Properties of an AnnotateAssessmentResponse. */
+ interface IAnnotateAssessmentResponse {
+ }
+
+ /** Represents an AnnotateAssessmentResponse. */
+ class AnnotateAssessmentResponse implements IAnnotateAssessmentResponse {
+
+ /**
+ * Constructs a new AnnotateAssessmentResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentResponse);
+
+ /**
+ * Creates a new AnnotateAssessmentResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns AnnotateAssessmentResponse instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentResponse): google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse;
+
+ /**
+ * Encodes the specified AnnotateAssessmentResponse message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse.verify|verify} messages.
+ * @param message AnnotateAssessmentResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified AnnotateAssessmentResponse message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse.verify|verify} messages.
+ * @param message AnnotateAssessmentResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an AnnotateAssessmentResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns AnnotateAssessmentResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse;
+
+ /**
+ * Decodes an AnnotateAssessmentResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns AnnotateAssessmentResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse;
+
+ /**
+ * Verifies an AnnotateAssessmentResponse message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an AnnotateAssessmentResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns AnnotateAssessmentResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse;
+
+ /**
+ * Creates a plain object from an AnnotateAssessmentResponse message. Also converts values to other types if specified.
+ * @param message AnnotateAssessmentResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this AnnotateAssessmentResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for AnnotateAssessmentResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a PasswordLeakVerification. */
+ interface IPasswordLeakVerification {
+
+ /** PasswordLeakVerification hashedUserCredentials */
+ hashedUserCredentials?: (Uint8Array|string|null);
+
+ /** PasswordLeakVerification credentialsLeaked */
+ credentialsLeaked?: (boolean|null);
+
+ /** PasswordLeakVerification canonicalizedUsername */
+ canonicalizedUsername?: (string|null);
+ }
+
+ /** Represents a PasswordLeakVerification. */
+ class PasswordLeakVerification implements IPasswordLeakVerification {
+
+ /**
+ * Constructs a new PasswordLeakVerification.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1beta1.IPasswordLeakVerification);
+
+ /** PasswordLeakVerification hashedUserCredentials. */
+ public hashedUserCredentials: (Uint8Array|string);
+
+ /** PasswordLeakVerification credentialsLeaked. */
+ public credentialsLeaked: boolean;
+
+ /** PasswordLeakVerification canonicalizedUsername. */
+ public canonicalizedUsername: string;
+
+ /**
+ * Creates a new PasswordLeakVerification instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns PasswordLeakVerification instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1beta1.IPasswordLeakVerification): google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification;
+
+ /**
+ * Encodes the specified PasswordLeakVerification message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification.verify|verify} messages.
+ * @param message PasswordLeakVerification message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1beta1.IPasswordLeakVerification, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified PasswordLeakVerification message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification.verify|verify} messages.
+ * @param message PasswordLeakVerification message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1beta1.IPasswordLeakVerification, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a PasswordLeakVerification message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns PasswordLeakVerification
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification;
+
+ /**
+ * Decodes a PasswordLeakVerification message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns PasswordLeakVerification
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification;
+
+ /**
+ * Verifies a PasswordLeakVerification message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a PasswordLeakVerification message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns PasswordLeakVerification
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification;
+
+ /**
+ * Creates a plain object from a PasswordLeakVerification message. Also converts values to other types if specified.
+ * @param message PasswordLeakVerification
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this PasswordLeakVerification to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for PasswordLeakVerification
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an Assessment. */
+ interface IAssessment {
+
+ /** Assessment name */
+ name?: (string|null);
+
+ /** Assessment event */
+ event?: (google.cloud.recaptchaenterprise.v1beta1.IEvent|null);
+
+ /** Assessment score */
+ score?: (number|null);
+
+ /** Assessment tokenProperties */
+ tokenProperties?: (google.cloud.recaptchaenterprise.v1beta1.ITokenProperties|null);
+
+ /** Assessment reasons */
+ reasons?: (google.cloud.recaptchaenterprise.v1beta1.Assessment.ClassificationReason[]|null);
+
+ /** Assessment passwordLeakVerification */
+ passwordLeakVerification?: (google.cloud.recaptchaenterprise.v1beta1.IPasswordLeakVerification|null);
+
+ /** Assessment accountDefenderAssessment */
+ accountDefenderAssessment?: (google.cloud.recaptchaenterprise.v1beta1.IAccountDefenderAssessment|null);
+ }
+
+ /** Represents an Assessment. */
+ class Assessment implements IAssessment {
+
+ /**
+ * Constructs a new Assessment.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1beta1.IAssessment);
+
+ /** Assessment name. */
+ public name: string;
+
+ /** Assessment event. */
+ public event?: (google.cloud.recaptchaenterprise.v1beta1.IEvent|null);
+
+ /** Assessment score. */
+ public score: number;
+
+ /** Assessment tokenProperties. */
+ public tokenProperties?: (google.cloud.recaptchaenterprise.v1beta1.ITokenProperties|null);
+
+ /** Assessment reasons. */
+ public reasons: google.cloud.recaptchaenterprise.v1beta1.Assessment.ClassificationReason[];
+
+ /** Assessment passwordLeakVerification. */
+ public passwordLeakVerification?: (google.cloud.recaptchaenterprise.v1beta1.IPasswordLeakVerification|null);
+
+ /** Assessment accountDefenderAssessment. */
+ public accountDefenderAssessment?: (google.cloud.recaptchaenterprise.v1beta1.IAccountDefenderAssessment|null);
+
+ /**
+ * Creates a new Assessment instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Assessment instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1beta1.IAssessment): google.cloud.recaptchaenterprise.v1beta1.Assessment;
+
+ /**
+ * Encodes the specified Assessment message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.Assessment.verify|verify} messages.
+ * @param message Assessment message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1beta1.IAssessment, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Assessment message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.Assessment.verify|verify} messages.
+ * @param message Assessment message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1beta1.IAssessment, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an Assessment message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Assessment
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1beta1.Assessment;
+
+ /**
+ * Decodes an Assessment message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Assessment
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1beta1.Assessment;
+
+ /**
+ * Verifies an Assessment message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an Assessment message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Assessment
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1beta1.Assessment;
+
+ /**
+ * Creates a plain object from an Assessment message. Also converts values to other types if specified.
+ * @param message Assessment
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1beta1.Assessment, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Assessment to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Assessment
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace Assessment {
+
+ /** ClassificationReason enum. */
+ enum ClassificationReason {
+ CLASSIFICATION_REASON_UNSPECIFIED = 0,
+ AUTOMATION = 1,
+ UNEXPECTED_ENVIRONMENT = 2,
+ TOO_MUCH_TRAFFIC = 3,
+ UNEXPECTED_USAGE_PATTERNS = 4,
+ LOW_CONFIDENCE_SCORE = 5
+ }
+ }
+
+ /** Properties of an Event. */
+ interface IEvent {
+
+ /** Event token */
+ token?: (string|null);
+
+ /** Event siteKey */
+ siteKey?: (string|null);
+
+ /** Event userAgent */
+ userAgent?: (string|null);
+
+ /** Event userIpAddress */
+ userIpAddress?: (string|null);
+
+ /** Event expectedAction */
+ expectedAction?: (string|null);
+
+ /** Event hashedAccountId */
+ hashedAccountId?: (Uint8Array|string|null);
+ }
+
+ /** Represents an Event. */
+ class Event implements IEvent {
+
+ /**
+ * Constructs a new Event.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1beta1.IEvent);
+
+ /** Event token. */
+ public token: string;
+
+ /** Event siteKey. */
+ public siteKey: string;
+
+ /** Event userAgent. */
+ public userAgent: string;
+
+ /** Event userIpAddress. */
+ public userIpAddress: string;
+
+ /** Event expectedAction. */
+ public expectedAction: string;
+
+ /** Event hashedAccountId. */
+ public hashedAccountId: (Uint8Array|string);
+
+ /**
+ * Creates a new Event instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Event instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1beta1.IEvent): google.cloud.recaptchaenterprise.v1beta1.Event;
+
+ /**
+ * Encodes the specified Event message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.Event.verify|verify} messages.
+ * @param message Event message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1beta1.IEvent, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Event message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.Event.verify|verify} messages.
+ * @param message Event message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1beta1.IEvent, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an Event message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Event
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1beta1.Event;
+
+ /**
+ * Decodes an Event message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Event
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1beta1.Event;
+
+ /**
+ * Verifies an Event message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an Event message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Event
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1beta1.Event;
+
+ /**
+ * Creates a plain object from an Event message. Also converts values to other types if specified.
+ * @param message Event
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1beta1.Event, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Event to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Event
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a TokenProperties. */
+ interface ITokenProperties {
+
+ /** TokenProperties valid */
+ valid?: (boolean|null);
+
+ /** TokenProperties invalidReason */
+ invalidReason?: (google.cloud.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason|keyof typeof google.cloud.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason|null);
+
+ /** TokenProperties createTime */
+ createTime?: (google.protobuf.ITimestamp|null);
+
+ /** TokenProperties hostname */
+ hostname?: (string|null);
+
+ /** TokenProperties action */
+ action?: (string|null);
+ }
+
+ /** Represents a TokenProperties. */
+ class TokenProperties implements ITokenProperties {
+
+ /**
+ * Constructs a new TokenProperties.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1beta1.ITokenProperties);
+
+ /** TokenProperties valid. */
+ public valid: boolean;
+
+ /** TokenProperties invalidReason. */
+ public invalidReason: (google.cloud.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason|keyof typeof google.cloud.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason);
+
+ /** TokenProperties createTime. */
+ public createTime?: (google.protobuf.ITimestamp|null);
+
+ /** TokenProperties hostname. */
+ public hostname: string;
+
+ /** TokenProperties action. */
+ public action: string;
+
+ /**
+ * Creates a new TokenProperties instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns TokenProperties instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1beta1.ITokenProperties): google.cloud.recaptchaenterprise.v1beta1.TokenProperties;
+
+ /**
+ * Encodes the specified TokenProperties message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.TokenProperties.verify|verify} messages.
+ * @param message TokenProperties message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1beta1.ITokenProperties, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified TokenProperties message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.TokenProperties.verify|verify} messages.
+ * @param message TokenProperties message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1beta1.ITokenProperties, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a TokenProperties message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns TokenProperties
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1beta1.TokenProperties;
+
+ /**
+ * Decodes a TokenProperties message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns TokenProperties
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1beta1.TokenProperties;
+
+ /**
+ * Verifies a TokenProperties message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a TokenProperties message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns TokenProperties
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1beta1.TokenProperties;
+
+ /**
+ * Creates a plain object from a TokenProperties message. Also converts values to other types if specified.
+ * @param message TokenProperties
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1beta1.TokenProperties, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this TokenProperties to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for TokenProperties
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace TokenProperties {
+
+ /** InvalidReason enum. */
+ enum InvalidReason {
+ INVALID_REASON_UNSPECIFIED = 0,
+ UNKNOWN_INVALID_REASON = 1,
+ MALFORMED = 2,
+ EXPIRED = 3,
+ DUPE = 4,
+ SITE_MISMATCH = 5,
+ MISSING = 6,
+ BROWSER_ERROR = 7
+ }
+ }
+
+ /** Properties of an AccountDefenderAssessment. */
+ interface IAccountDefenderAssessment {
+
+ /** AccountDefenderAssessment labels */
+ labels?: (google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment.AccountDefenderLabel[]|null);
+ }
+
+ /** Represents an AccountDefenderAssessment. */
+ class AccountDefenderAssessment implements IAccountDefenderAssessment {
+
+ /**
+ * Constructs a new AccountDefenderAssessment.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.recaptchaenterprise.v1beta1.IAccountDefenderAssessment);
+
+ /** AccountDefenderAssessment labels. */
+ public labels: google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment.AccountDefenderLabel[];
+
+ /**
+ * Creates a new AccountDefenderAssessment instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns AccountDefenderAssessment instance
+ */
+ public static create(properties?: google.cloud.recaptchaenterprise.v1beta1.IAccountDefenderAssessment): google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment;
+
+ /**
+ * Encodes the specified AccountDefenderAssessment message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment.verify|verify} messages.
+ * @param message AccountDefenderAssessment message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.recaptchaenterprise.v1beta1.IAccountDefenderAssessment, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified AccountDefenderAssessment message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment.verify|verify} messages.
+ * @param message AccountDefenderAssessment message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1beta1.IAccountDefenderAssessment, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an AccountDefenderAssessment message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns AccountDefenderAssessment
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment;
+
+ /**
+ * Decodes an AccountDefenderAssessment message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns AccountDefenderAssessment
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment;
+
+ /**
+ * Verifies an AccountDefenderAssessment message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an AccountDefenderAssessment message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns AccountDefenderAssessment
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment;
+
+ /**
+ * Creates a plain object from an AccountDefenderAssessment message. Also converts values to other types if specified.
+ * @param message AccountDefenderAssessment
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this AccountDefenderAssessment to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for AccountDefenderAssessment
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace AccountDefenderAssessment {
+
+ /** AccountDefenderLabel enum. */
+ enum AccountDefenderLabel {
+ ACCOUNT_DEFENDER_LABEL_UNSPECIFIED = 0,
+ PROFILE_MATCH = 1,
+ SUSPICIOUS_LOGIN_ACTIVITY = 2,
+ SUSPICIOUS_ACCOUNT_CREATION = 3,
+ RELATED_ACCOUNTS_NUMBER_HIGH = 4
+ }
+ }
+ }
+ }
+ }
+
+ /** 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;
+ }
+
+ /** 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
+ }
+
+ /** 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;
+ }
+
+ /** 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?: (string|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: string;
+
+ /**
+ * 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);
+ }
+
+ /** 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[];
+
+ /**
+ * 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;
+ }
+
+ /** 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_REQUIRED = 2,
+ LABEL_REPEATED = 3
+ }
+ }
+
+ /** 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 phpGenericServices */
+ phpGenericServices?: (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 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 phpGenericServices. */
+ public phpGenericServices: 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 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 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 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 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 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
+ }
+ }
+
+ /** Properties of an OneofOptions. */
+ interface IOneofOptions {
+
+ /** 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 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 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 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 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 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 deprecated */
+ deprecated?: (boolean|null);
+
+ /** ServiceOptions uninterpretedOption */
+ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null);
+
+ /** ServiceOptions .google.api.defaultHost */
+ ".google.api.defaultHost"?: (string|null);
+
+ /** ServiceOptions .google.api.oauthScopes */
+ ".google.api.oauthScopes"?: (string|null);
+ }
+
+ /** Represents a ServiceOptions. */
+ class ServiceOptions implements IServiceOptions {
+
+ /**
+ * Constructs a new ServiceOptions.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IServiceOptions);
+
+ /** 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 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 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 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 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 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;
+ }
+ }
+}
diff --git a/packages/google-cloud-recaptchaenterprise/protos/protos.js b/packages/google-cloud-recaptchaenterprise/protos/protos.js
new file mode 100644
index 00000000000..479c0761672
--- /dev/null
+++ b/packages/google-cloud-recaptchaenterprise/protos/protos.js
@@ -0,0 +1,25039 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.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_recaptcha_enterprise_protos || ($protobuf.roots._google_cloud_recaptcha_enterprise_protos = {});
+
+ $root.google = (function() {
+
+ /**
+ * Namespace google.
+ * @exports google
+ * @namespace
+ */
+ var google = {};
+
+ google.cloud = (function() {
+
+ /**
+ * Namespace cloud.
+ * @memberof google
+ * @namespace
+ */
+ var cloud = {};
+
+ cloud.recaptchaenterprise = (function() {
+
+ /**
+ * Namespace recaptchaenterprise.
+ * @memberof google.cloud
+ * @namespace
+ */
+ var recaptchaenterprise = {};
+
+ recaptchaenterprise.v1 = (function() {
+
+ /**
+ * Namespace v1.
+ * @memberof google.cloud.recaptchaenterprise
+ * @namespace
+ */
+ var v1 = {};
+
+ v1.RecaptchaEnterpriseService = (function() {
+
+ /**
+ * Constructs a new RecaptchaEnterpriseService service.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a RecaptchaEnterpriseService
+ * @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 RecaptchaEnterpriseService(rpcImpl, requestDelimited, responseDelimited) {
+ $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
+ }
+
+ (RecaptchaEnterpriseService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = RecaptchaEnterpriseService;
+
+ /**
+ * Creates new RecaptchaEnterpriseService service using the specified rpc implementation.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @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 {RecaptchaEnterpriseService} RPC service. Useful where requests and/or responses are streamed.
+ */
+ RecaptchaEnterpriseService.create = function create(rpcImpl, requestDelimited, responseDelimited) {
+ return new this(rpcImpl, requestDelimited, responseDelimited);
+ };
+
+ /**
+ * Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|createAssessment}.
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @typedef CreateAssessmentCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.recaptchaenterprise.v1.Assessment} [response] Assessment
+ */
+
+ /**
+ * Calls CreateAssessment.
+ * @function createAssessment
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @instance
+ * @param {google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest} request CreateAssessmentRequest message or plain object
+ * @param {google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.CreateAssessmentCallback} callback Node-style callback called with the error, if any, and Assessment
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(RecaptchaEnterpriseService.prototype.createAssessment = function createAssessment(request, callback) {
+ return this.rpcCall(createAssessment, $root.google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest, $root.google.cloud.recaptchaenterprise.v1.Assessment, request, callback);
+ }, "name", { value: "CreateAssessment" });
+
+ /**
+ * Calls CreateAssessment.
+ * @function createAssessment
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @instance
+ * @param {google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest} request CreateAssessmentRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|annotateAssessment}.
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @typedef AnnotateAssessmentCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse} [response] AnnotateAssessmentResponse
+ */
+
+ /**
+ * Calls AnnotateAssessment.
+ * @function annotateAssessment
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @instance
+ * @param {google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest} request AnnotateAssessmentRequest message or plain object
+ * @param {google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.AnnotateAssessmentCallback} callback Node-style callback called with the error, if any, and AnnotateAssessmentResponse
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(RecaptchaEnterpriseService.prototype.annotateAssessment = function annotateAssessment(request, callback) {
+ return this.rpcCall(annotateAssessment, $root.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest, $root.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse, request, callback);
+ }, "name", { value: "AnnotateAssessment" });
+
+ /**
+ * Calls AnnotateAssessment.
+ * @function annotateAssessment
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @instance
+ * @param {google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest} request AnnotateAssessmentRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|createKey}.
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @typedef CreateKeyCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.recaptchaenterprise.v1.Key} [response] Key
+ */
+
+ /**
+ * Calls CreateKey.
+ * @function createKey
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @instance
+ * @param {google.cloud.recaptchaenterprise.v1.ICreateKeyRequest} request CreateKeyRequest message or plain object
+ * @param {google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.CreateKeyCallback} callback Node-style callback called with the error, if any, and Key
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(RecaptchaEnterpriseService.prototype.createKey = function createKey(request, callback) {
+ return this.rpcCall(createKey, $root.google.cloud.recaptchaenterprise.v1.CreateKeyRequest, $root.google.cloud.recaptchaenterprise.v1.Key, request, callback);
+ }, "name", { value: "CreateKey" });
+
+ /**
+ * Calls CreateKey.
+ * @function createKey
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @instance
+ * @param {google.cloud.recaptchaenterprise.v1.ICreateKeyRequest} request CreateKeyRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|listKeys}.
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @typedef ListKeysCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.recaptchaenterprise.v1.ListKeysResponse} [response] ListKeysResponse
+ */
+
+ /**
+ * Calls ListKeys.
+ * @function listKeys
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @instance
+ * @param {google.cloud.recaptchaenterprise.v1.IListKeysRequest} request ListKeysRequest message or plain object
+ * @param {google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.ListKeysCallback} callback Node-style callback called with the error, if any, and ListKeysResponse
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(RecaptchaEnterpriseService.prototype.listKeys = function listKeys(request, callback) {
+ return this.rpcCall(listKeys, $root.google.cloud.recaptchaenterprise.v1.ListKeysRequest, $root.google.cloud.recaptchaenterprise.v1.ListKeysResponse, request, callback);
+ }, "name", { value: "ListKeys" });
+
+ /**
+ * Calls ListKeys.
+ * @function listKeys
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @instance
+ * @param {google.cloud.recaptchaenterprise.v1.IListKeysRequest} request ListKeysRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|retrieveLegacySecretKey}.
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @typedef RetrieveLegacySecretKeyCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse} [response] RetrieveLegacySecretKeyResponse
+ */
+
+ /**
+ * Calls RetrieveLegacySecretKey.
+ * @function retrieveLegacySecretKey
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @instance
+ * @param {google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyRequest} request RetrieveLegacySecretKeyRequest message or plain object
+ * @param {google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.RetrieveLegacySecretKeyCallback} callback Node-style callback called with the error, if any, and RetrieveLegacySecretKeyResponse
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(RecaptchaEnterpriseService.prototype.retrieveLegacySecretKey = function retrieveLegacySecretKey(request, callback) {
+ return this.rpcCall(retrieveLegacySecretKey, $root.google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest, $root.google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse, request, callback);
+ }, "name", { value: "RetrieveLegacySecretKey" });
+
+ /**
+ * Calls RetrieveLegacySecretKey.
+ * @function retrieveLegacySecretKey
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @instance
+ * @param {google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyRequest} request RetrieveLegacySecretKeyRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|getKey}.
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @typedef GetKeyCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.recaptchaenterprise.v1.Key} [response] Key
+ */
+
+ /**
+ * Calls GetKey.
+ * @function getKey
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @instance
+ * @param {google.cloud.recaptchaenterprise.v1.IGetKeyRequest} request GetKeyRequest message or plain object
+ * @param {google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.GetKeyCallback} callback Node-style callback called with the error, if any, and Key
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(RecaptchaEnterpriseService.prototype.getKey = function getKey(request, callback) {
+ return this.rpcCall(getKey, $root.google.cloud.recaptchaenterprise.v1.GetKeyRequest, $root.google.cloud.recaptchaenterprise.v1.Key, request, callback);
+ }, "name", { value: "GetKey" });
+
+ /**
+ * Calls GetKey.
+ * @function getKey
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @instance
+ * @param {google.cloud.recaptchaenterprise.v1.IGetKeyRequest} request GetKeyRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|updateKey}.
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @typedef UpdateKeyCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.recaptchaenterprise.v1.Key} [response] Key
+ */
+
+ /**
+ * Calls UpdateKey.
+ * @function updateKey
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @instance
+ * @param {google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest} request UpdateKeyRequest message or plain object
+ * @param {google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.UpdateKeyCallback} callback Node-style callback called with the error, if any, and Key
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(RecaptchaEnterpriseService.prototype.updateKey = function updateKey(request, callback) {
+ return this.rpcCall(updateKey, $root.google.cloud.recaptchaenterprise.v1.UpdateKeyRequest, $root.google.cloud.recaptchaenterprise.v1.Key, request, callback);
+ }, "name", { value: "UpdateKey" });
+
+ /**
+ * Calls UpdateKey.
+ * @function updateKey
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @instance
+ * @param {google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest} request UpdateKeyRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|deleteKey}.
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @typedef DeleteKeyCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.protobuf.Empty} [response] Empty
+ */
+
+ /**
+ * Calls DeleteKey.
+ * @function deleteKey
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @instance
+ * @param {google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest} request DeleteKeyRequest message or plain object
+ * @param {google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.DeleteKeyCallback} callback Node-style callback called with the error, if any, and Empty
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(RecaptchaEnterpriseService.prototype.deleteKey = function deleteKey(request, callback) {
+ return this.rpcCall(deleteKey, $root.google.cloud.recaptchaenterprise.v1.DeleteKeyRequest, $root.google.protobuf.Empty, request, callback);
+ }, "name", { value: "DeleteKey" });
+
+ /**
+ * Calls DeleteKey.
+ * @function deleteKey
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @instance
+ * @param {google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest} request DeleteKeyRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|migrateKey}.
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @typedef MigrateKeyCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.recaptchaenterprise.v1.Key} [response] Key
+ */
+
+ /**
+ * Calls MigrateKey.
+ * @function migrateKey
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @instance
+ * @param {google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest} request MigrateKeyRequest message or plain object
+ * @param {google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.MigrateKeyCallback} callback Node-style callback called with the error, if any, and Key
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(RecaptchaEnterpriseService.prototype.migrateKey = function migrateKey(request, callback) {
+ return this.rpcCall(migrateKey, $root.google.cloud.recaptchaenterprise.v1.MigrateKeyRequest, $root.google.cloud.recaptchaenterprise.v1.Key, request, callback);
+ }, "name", { value: "MigrateKey" });
+
+ /**
+ * Calls MigrateKey.
+ * @function migrateKey
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @instance
+ * @param {google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest} request MigrateKeyRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|getMetrics}.
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @typedef GetMetricsCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.recaptchaenterprise.v1.Metrics} [response] Metrics
+ */
+
+ /**
+ * Calls GetMetrics.
+ * @function getMetrics
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @instance
+ * @param {google.cloud.recaptchaenterprise.v1.IGetMetricsRequest} request GetMetricsRequest message or plain object
+ * @param {google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.GetMetricsCallback} callback Node-style callback called with the error, if any, and Metrics
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(RecaptchaEnterpriseService.prototype.getMetrics = function getMetrics(request, callback) {
+ return this.rpcCall(getMetrics, $root.google.cloud.recaptchaenterprise.v1.GetMetricsRequest, $root.google.cloud.recaptchaenterprise.v1.Metrics, request, callback);
+ }, "name", { value: "GetMetrics" });
+
+ /**
+ * Calls GetMetrics.
+ * @function getMetrics
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @instance
+ * @param {google.cloud.recaptchaenterprise.v1.IGetMetricsRequest} request GetMetricsRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|listRelatedAccountGroups}.
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @typedef ListRelatedAccountGroupsCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse} [response] ListRelatedAccountGroupsResponse
+ */
+
+ /**
+ * Calls ListRelatedAccountGroups.
+ * @function listRelatedAccountGroups
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @instance
+ * @param {google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest} request ListRelatedAccountGroupsRequest message or plain object
+ * @param {google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.ListRelatedAccountGroupsCallback} callback Node-style callback called with the error, if any, and ListRelatedAccountGroupsResponse
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(RecaptchaEnterpriseService.prototype.listRelatedAccountGroups = function listRelatedAccountGroups(request, callback) {
+ return this.rpcCall(listRelatedAccountGroups, $root.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest, $root.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse, request, callback);
+ }, "name", { value: "ListRelatedAccountGroups" });
+
+ /**
+ * Calls ListRelatedAccountGroups.
+ * @function listRelatedAccountGroups
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @instance
+ * @param {google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest} request ListRelatedAccountGroupsRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|listRelatedAccountGroupMemberships}.
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @typedef ListRelatedAccountGroupMembershipsCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse} [response] ListRelatedAccountGroupMembershipsResponse
+ */
+
+ /**
+ * Calls ListRelatedAccountGroupMemberships.
+ * @function listRelatedAccountGroupMemberships
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @instance
+ * @param {google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest} request ListRelatedAccountGroupMembershipsRequest message or plain object
+ * @param {google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.ListRelatedAccountGroupMembershipsCallback} callback Node-style callback called with the error, if any, and ListRelatedAccountGroupMembershipsResponse
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(RecaptchaEnterpriseService.prototype.listRelatedAccountGroupMemberships = function listRelatedAccountGroupMemberships(request, callback) {
+ return this.rpcCall(listRelatedAccountGroupMemberships, $root.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest, $root.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse, request, callback);
+ }, "name", { value: "ListRelatedAccountGroupMemberships" });
+
+ /**
+ * Calls ListRelatedAccountGroupMemberships.
+ * @function listRelatedAccountGroupMemberships
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @instance
+ * @param {google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest} request ListRelatedAccountGroupMembershipsRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|searchRelatedAccountGroupMemberships}.
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @typedef SearchRelatedAccountGroupMembershipsCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse} [response] SearchRelatedAccountGroupMembershipsResponse
+ */
+
+ /**
+ * Calls SearchRelatedAccountGroupMemberships.
+ * @function searchRelatedAccountGroupMemberships
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @instance
+ * @param {google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest} request SearchRelatedAccountGroupMembershipsRequest message or plain object
+ * @param {google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.SearchRelatedAccountGroupMembershipsCallback} callback Node-style callback called with the error, if any, and SearchRelatedAccountGroupMembershipsResponse
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(RecaptchaEnterpriseService.prototype.searchRelatedAccountGroupMemberships = function searchRelatedAccountGroupMemberships(request, callback) {
+ return this.rpcCall(searchRelatedAccountGroupMemberships, $root.google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest, $root.google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse, request, callback);
+ }, "name", { value: "SearchRelatedAccountGroupMemberships" });
+
+ /**
+ * Calls SearchRelatedAccountGroupMemberships.
+ * @function searchRelatedAccountGroupMemberships
+ * @memberof google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService
+ * @instance
+ * @param {google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest} request SearchRelatedAccountGroupMembershipsRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ return RecaptchaEnterpriseService;
+ })();
+
+ v1.CreateAssessmentRequest = (function() {
+
+ /**
+ * Properties of a CreateAssessmentRequest.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface ICreateAssessmentRequest
+ * @property {string|null} [parent] CreateAssessmentRequest parent
+ * @property {google.cloud.recaptchaenterprise.v1.IAssessment|null} [assessment] CreateAssessmentRequest assessment
+ */
+
+ /**
+ * Constructs a new CreateAssessmentRequest.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a CreateAssessmentRequest.
+ * @implements ICreateAssessmentRequest
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest=} [properties] Properties to set
+ */
+ function CreateAssessmentRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * CreateAssessmentRequest parent.
+ * @member {string} parent
+ * @memberof google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest
+ * @instance
+ */
+ CreateAssessmentRequest.prototype.parent = "";
+
+ /**
+ * CreateAssessmentRequest assessment.
+ * @member {google.cloud.recaptchaenterprise.v1.IAssessment|null|undefined} assessment
+ * @memberof google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest
+ * @instance
+ */
+ CreateAssessmentRequest.prototype.assessment = null;
+
+ /**
+ * Creates a new CreateAssessmentRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest} CreateAssessmentRequest instance
+ */
+ CreateAssessmentRequest.create = function create(properties) {
+ return new CreateAssessmentRequest(properties);
+ };
+
+ /**
+ * Encodes the specified CreateAssessmentRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest} message CreateAssessmentRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CreateAssessmentRequest.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.assessment != null && Object.hasOwnProperty.call(message, "assessment"))
+ $root.google.cloud.recaptchaenterprise.v1.Assessment.encode(message.assessment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified CreateAssessmentRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest} message CreateAssessmentRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CreateAssessmentRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a CreateAssessmentRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest} CreateAssessmentRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CreateAssessmentRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.parent = reader.string();
+ break;
+ }
+ case 2: {
+ message.assessment = $root.google.cloud.recaptchaenterprise.v1.Assessment.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a CreateAssessmentRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest} CreateAssessmentRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CreateAssessmentRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a CreateAssessmentRequest message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ CreateAssessmentRequest.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.assessment != null && message.hasOwnProperty("assessment")) {
+ var error = $root.google.cloud.recaptchaenterprise.v1.Assessment.verify(message.assessment);
+ if (error)
+ return "assessment." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a CreateAssessmentRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest} CreateAssessmentRequest
+ */
+ CreateAssessmentRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest();
+ if (object.parent != null)
+ message.parent = String(object.parent);
+ if (object.assessment != null) {
+ if (typeof object.assessment !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest.assessment: object expected");
+ message.assessment = $root.google.cloud.recaptchaenterprise.v1.Assessment.fromObject(object.assessment);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a CreateAssessmentRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest} message CreateAssessmentRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ CreateAssessmentRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.parent = "";
+ object.assessment = null;
+ }
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ object.parent = message.parent;
+ if (message.assessment != null && message.hasOwnProperty("assessment"))
+ object.assessment = $root.google.cloud.recaptchaenterprise.v1.Assessment.toObject(message.assessment, options);
+ return object;
+ };
+
+ /**
+ * Converts this CreateAssessmentRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ CreateAssessmentRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for CreateAssessmentRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ CreateAssessmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest";
+ };
+
+ return CreateAssessmentRequest;
+ })();
+
+ v1.AnnotateAssessmentRequest = (function() {
+
+ /**
+ * Properties of an AnnotateAssessmentRequest.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IAnnotateAssessmentRequest
+ * @property {string|null} [name] AnnotateAssessmentRequest name
+ * @property {google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation|null} [annotation] AnnotateAssessmentRequest annotation
+ * @property {Array.|null} [reasons] AnnotateAssessmentRequest reasons
+ * @property {Uint8Array|null} [hashedAccountId] AnnotateAssessmentRequest hashedAccountId
+ */
+
+ /**
+ * Constructs a new AnnotateAssessmentRequest.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents an AnnotateAssessmentRequest.
+ * @implements IAnnotateAssessmentRequest
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest=} [properties] Properties to set
+ */
+ function AnnotateAssessmentRequest(properties) {
+ this.reasons = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * AnnotateAssessmentRequest name.
+ * @member {string} name
+ * @memberof google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest
+ * @instance
+ */
+ AnnotateAssessmentRequest.prototype.name = "";
+
+ /**
+ * AnnotateAssessmentRequest annotation.
+ * @member {google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation} annotation
+ * @memberof google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest
+ * @instance
+ */
+ AnnotateAssessmentRequest.prototype.annotation = 0;
+
+ /**
+ * AnnotateAssessmentRequest reasons.
+ * @member {Array.} reasons
+ * @memberof google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest
+ * @instance
+ */
+ AnnotateAssessmentRequest.prototype.reasons = $util.emptyArray;
+
+ /**
+ * AnnotateAssessmentRequest hashedAccountId.
+ * @member {Uint8Array} hashedAccountId
+ * @memberof google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest
+ * @instance
+ */
+ AnnotateAssessmentRequest.prototype.hashedAccountId = $util.newBuffer([]);
+
+ /**
+ * Creates a new AnnotateAssessmentRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest} AnnotateAssessmentRequest instance
+ */
+ AnnotateAssessmentRequest.create = function create(properties) {
+ return new AnnotateAssessmentRequest(properties);
+ };
+
+ /**
+ * Encodes the specified AnnotateAssessmentRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest} message AnnotateAssessmentRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ AnnotateAssessmentRequest.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ if (message.annotation != null && Object.hasOwnProperty.call(message, "annotation"))
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.annotation);
+ if (message.reasons != null && message.reasons.length) {
+ writer.uint32(/* id 3, wireType 2 =*/26).fork();
+ for (var i = 0; i < message.reasons.length; ++i)
+ writer.int32(message.reasons[i]);
+ writer.ldelim();
+ }
+ if (message.hashedAccountId != null && Object.hasOwnProperty.call(message, "hashedAccountId"))
+ writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.hashedAccountId);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified AnnotateAssessmentRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest} message AnnotateAssessmentRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ AnnotateAssessmentRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an AnnotateAssessmentRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest} AnnotateAssessmentRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ AnnotateAssessmentRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 2: {
+ message.annotation = reader.int32();
+ break;
+ }
+ case 3: {
+ if (!(message.reasons && message.reasons.length))
+ message.reasons = [];
+ if ((tag & 7) === 2) {
+ var end2 = reader.uint32() + reader.pos;
+ while (reader.pos < end2)
+ message.reasons.push(reader.int32());
+ } else
+ message.reasons.push(reader.int32());
+ break;
+ }
+ case 4: {
+ message.hashedAccountId = reader.bytes();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an AnnotateAssessmentRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest} AnnotateAssessmentRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ AnnotateAssessmentRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an AnnotateAssessmentRequest message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ AnnotateAssessmentRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.annotation != null && message.hasOwnProperty("annotation"))
+ switch (message.annotation) {
+ default:
+ return "annotation: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ break;
+ }
+ if (message.reasons != null && message.hasOwnProperty("reasons")) {
+ if (!Array.isArray(message.reasons))
+ return "reasons: array expected";
+ for (var i = 0; i < message.reasons.length; ++i)
+ switch (message.reasons[i]) {
+ default:
+ return "reasons: enum value[] expected";
+ case 0:
+ case 1:
+ case 8:
+ case 9:
+ case 10:
+ case 11:
+ case 12:
+ case 13:
+ case 2:
+ case 7:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 14:
+ break;
+ }
+ }
+ if (message.hashedAccountId != null && message.hasOwnProperty("hashedAccountId"))
+ if (!(message.hashedAccountId && typeof message.hashedAccountId.length === "number" || $util.isString(message.hashedAccountId)))
+ return "hashedAccountId: buffer expected";
+ return null;
+ };
+
+ /**
+ * Creates an AnnotateAssessmentRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest} AnnotateAssessmentRequest
+ */
+ AnnotateAssessmentRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest();
+ if (object.name != null)
+ message.name = String(object.name);
+ switch (object.annotation) {
+ default:
+ if (typeof object.annotation === "number") {
+ message.annotation = object.annotation;
+ break;
+ }
+ break;
+ case "ANNOTATION_UNSPECIFIED":
+ case 0:
+ message.annotation = 0;
+ break;
+ case "LEGITIMATE":
+ case 1:
+ message.annotation = 1;
+ break;
+ case "FRAUDULENT":
+ case 2:
+ message.annotation = 2;
+ break;
+ case "PASSWORD_CORRECT":
+ case 3:
+ message.annotation = 3;
+ break;
+ case "PASSWORD_INCORRECT":
+ case 4:
+ message.annotation = 4;
+ break;
+ }
+ if (object.reasons) {
+ if (!Array.isArray(object.reasons))
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.reasons: array expected");
+ message.reasons = [];
+ for (var i = 0; i < object.reasons.length; ++i)
+ switch (object.reasons[i]) {
+ default:
+ if (typeof object.reasons[i] === "number") {
+ message.reasons[i] = object.reasons[i];
+ break;
+ }
+ case "REASON_UNSPECIFIED":
+ case 0:
+ message.reasons[i] = 0;
+ break;
+ case "CHARGEBACK":
+ case 1:
+ message.reasons[i] = 1;
+ break;
+ case "CHARGEBACK_FRAUD":
+ case 8:
+ message.reasons[i] = 8;
+ break;
+ case "CHARGEBACK_DISPUTE":
+ case 9:
+ message.reasons[i] = 9;
+ break;
+ case "REFUND":
+ case 10:
+ message.reasons[i] = 10;
+ break;
+ case "REFUND_FRAUD":
+ case 11:
+ message.reasons[i] = 11;
+ break;
+ case "TRANSACTION_ACCEPTED":
+ case 12:
+ message.reasons[i] = 12;
+ break;
+ case "TRANSACTION_DECLINED":
+ case 13:
+ message.reasons[i] = 13;
+ break;
+ case "PAYMENT_HEURISTICS":
+ case 2:
+ message.reasons[i] = 2;
+ break;
+ case "INITIATED_TWO_FACTOR":
+ case 7:
+ message.reasons[i] = 7;
+ break;
+ case "PASSED_TWO_FACTOR":
+ case 3:
+ message.reasons[i] = 3;
+ break;
+ case "FAILED_TWO_FACTOR":
+ case 4:
+ message.reasons[i] = 4;
+ break;
+ case "CORRECT_PASSWORD":
+ case 5:
+ message.reasons[i] = 5;
+ break;
+ case "INCORRECT_PASSWORD":
+ case 6:
+ message.reasons[i] = 6;
+ break;
+ case "SOCIAL_SPAM":
+ case 14:
+ message.reasons[i] = 14;
+ break;
+ }
+ }
+ if (object.hashedAccountId != null)
+ if (typeof object.hashedAccountId === "string")
+ $util.base64.decode(object.hashedAccountId, message.hashedAccountId = $util.newBuffer($util.base64.length(object.hashedAccountId)), 0);
+ else if (object.hashedAccountId.length >= 0)
+ message.hashedAccountId = object.hashedAccountId;
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an AnnotateAssessmentRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest} message AnnotateAssessmentRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ AnnotateAssessmentRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.reasons = [];
+ if (options.defaults) {
+ object.name = "";
+ object.annotation = options.enums === String ? "ANNOTATION_UNSPECIFIED" : 0;
+ if (options.bytes === String)
+ object.hashedAccountId = "";
+ else {
+ object.hashedAccountId = [];
+ if (options.bytes !== Array)
+ object.hashedAccountId = $util.newBuffer(object.hashedAccountId);
+ }
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.annotation != null && message.hasOwnProperty("annotation"))
+ object.annotation = options.enums === String ? $root.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation[message.annotation] === undefined ? message.annotation : $root.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation[message.annotation] : message.annotation;
+ if (message.reasons && message.reasons.length) {
+ object.reasons = [];
+ for (var j = 0; j < message.reasons.length; ++j)
+ object.reasons[j] = options.enums === String ? $root.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason[message.reasons[j]] === undefined ? message.reasons[j] : $root.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason[message.reasons[j]] : message.reasons[j];
+ }
+ if (message.hashedAccountId != null && message.hasOwnProperty("hashedAccountId"))
+ object.hashedAccountId = options.bytes === String ? $util.base64.encode(message.hashedAccountId, 0, message.hashedAccountId.length) : options.bytes === Array ? Array.prototype.slice.call(message.hashedAccountId) : message.hashedAccountId;
+ return object;
+ };
+
+ /**
+ * Converts this AnnotateAssessmentRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ AnnotateAssessmentRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for AnnotateAssessmentRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ AnnotateAssessmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest";
+ };
+
+ /**
+ * Annotation enum.
+ * @name google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation
+ * @enum {number}
+ * @property {number} ANNOTATION_UNSPECIFIED=0 ANNOTATION_UNSPECIFIED value
+ * @property {number} LEGITIMATE=1 LEGITIMATE value
+ * @property {number} FRAUDULENT=2 FRAUDULENT value
+ * @property {number} PASSWORD_CORRECT=3 PASSWORD_CORRECT value
+ * @property {number} PASSWORD_INCORRECT=4 PASSWORD_INCORRECT value
+ */
+ AnnotateAssessmentRequest.Annotation = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "ANNOTATION_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "LEGITIMATE"] = 1;
+ values[valuesById[2] = "FRAUDULENT"] = 2;
+ values[valuesById[3] = "PASSWORD_CORRECT"] = 3;
+ values[valuesById[4] = "PASSWORD_INCORRECT"] = 4;
+ return values;
+ })();
+
+ /**
+ * Reason enum.
+ * @name google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason
+ * @enum {number}
+ * @property {number} REASON_UNSPECIFIED=0 REASON_UNSPECIFIED value
+ * @property {number} CHARGEBACK=1 CHARGEBACK value
+ * @property {number} CHARGEBACK_FRAUD=8 CHARGEBACK_FRAUD value
+ * @property {number} CHARGEBACK_DISPUTE=9 CHARGEBACK_DISPUTE value
+ * @property {number} REFUND=10 REFUND value
+ * @property {number} REFUND_FRAUD=11 REFUND_FRAUD value
+ * @property {number} TRANSACTION_ACCEPTED=12 TRANSACTION_ACCEPTED value
+ * @property {number} TRANSACTION_DECLINED=13 TRANSACTION_DECLINED value
+ * @property {number} PAYMENT_HEURISTICS=2 PAYMENT_HEURISTICS value
+ * @property {number} INITIATED_TWO_FACTOR=7 INITIATED_TWO_FACTOR value
+ * @property {number} PASSED_TWO_FACTOR=3 PASSED_TWO_FACTOR value
+ * @property {number} FAILED_TWO_FACTOR=4 FAILED_TWO_FACTOR value
+ * @property {number} CORRECT_PASSWORD=5 CORRECT_PASSWORD value
+ * @property {number} INCORRECT_PASSWORD=6 INCORRECT_PASSWORD value
+ * @property {number} SOCIAL_SPAM=14 SOCIAL_SPAM value
+ */
+ AnnotateAssessmentRequest.Reason = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "REASON_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "CHARGEBACK"] = 1;
+ values[valuesById[8] = "CHARGEBACK_FRAUD"] = 8;
+ values[valuesById[9] = "CHARGEBACK_DISPUTE"] = 9;
+ values[valuesById[10] = "REFUND"] = 10;
+ values[valuesById[11] = "REFUND_FRAUD"] = 11;
+ values[valuesById[12] = "TRANSACTION_ACCEPTED"] = 12;
+ values[valuesById[13] = "TRANSACTION_DECLINED"] = 13;
+ values[valuesById[2] = "PAYMENT_HEURISTICS"] = 2;
+ values[valuesById[7] = "INITIATED_TWO_FACTOR"] = 7;
+ values[valuesById[3] = "PASSED_TWO_FACTOR"] = 3;
+ values[valuesById[4] = "FAILED_TWO_FACTOR"] = 4;
+ values[valuesById[5] = "CORRECT_PASSWORD"] = 5;
+ values[valuesById[6] = "INCORRECT_PASSWORD"] = 6;
+ values[valuesById[14] = "SOCIAL_SPAM"] = 14;
+ return values;
+ })();
+
+ return AnnotateAssessmentRequest;
+ })();
+
+ v1.AnnotateAssessmentResponse = (function() {
+
+ /**
+ * Properties of an AnnotateAssessmentResponse.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IAnnotateAssessmentResponse
+ */
+
+ /**
+ * Constructs a new AnnotateAssessmentResponse.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents an AnnotateAssessmentResponse.
+ * @implements IAnnotateAssessmentResponse
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentResponse=} [properties] Properties to set
+ */
+ function AnnotateAssessmentResponse(properties) {
+ if (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 AnnotateAssessmentResponse instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentResponse=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse} AnnotateAssessmentResponse instance
+ */
+ AnnotateAssessmentResponse.create = function create(properties) {
+ return new AnnotateAssessmentResponse(properties);
+ };
+
+ /**
+ * Encodes the specified AnnotateAssessmentResponse message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentResponse} message AnnotateAssessmentResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ AnnotateAssessmentResponse.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified AnnotateAssessmentResponse message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentResponse} message AnnotateAssessmentResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ AnnotateAssessmentResponse.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an AnnotateAssessmentResponse message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse} AnnotateAssessmentResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ AnnotateAssessmentResponse.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an AnnotateAssessmentResponse message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse} AnnotateAssessmentResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ AnnotateAssessmentResponse.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an AnnotateAssessmentResponse message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ AnnotateAssessmentResponse.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ return null;
+ };
+
+ /**
+ * Creates an AnnotateAssessmentResponse message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse} AnnotateAssessmentResponse
+ */
+ AnnotateAssessmentResponse.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse)
+ return object;
+ return new $root.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse();
+ };
+
+ /**
+ * Creates a plain object from an AnnotateAssessmentResponse message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse} message AnnotateAssessmentResponse
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ AnnotateAssessmentResponse.toObject = function toObject() {
+ return {};
+ };
+
+ /**
+ * Converts this AnnotateAssessmentResponse to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ AnnotateAssessmentResponse.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for AnnotateAssessmentResponse
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ AnnotateAssessmentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse";
+ };
+
+ return AnnotateAssessmentResponse;
+ })();
+
+ v1.PrivatePasswordLeakVerification = (function() {
+
+ /**
+ * Properties of a PrivatePasswordLeakVerification.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IPrivatePasswordLeakVerification
+ * @property {Uint8Array|null} [lookupHashPrefix] PrivatePasswordLeakVerification lookupHashPrefix
+ * @property {Uint8Array|null} [encryptedUserCredentialsHash] PrivatePasswordLeakVerification encryptedUserCredentialsHash
+ * @property {Array.|null} [encryptedLeakMatchPrefixes] PrivatePasswordLeakVerification encryptedLeakMatchPrefixes
+ * @property {Uint8Array|null} [reencryptedUserCredentialsHash] PrivatePasswordLeakVerification reencryptedUserCredentialsHash
+ */
+
+ /**
+ * Constructs a new PrivatePasswordLeakVerification.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a PrivatePasswordLeakVerification.
+ * @implements IPrivatePasswordLeakVerification
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IPrivatePasswordLeakVerification=} [properties] Properties to set
+ */
+ function PrivatePasswordLeakVerification(properties) {
+ this.encryptedLeakMatchPrefixes = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * PrivatePasswordLeakVerification lookupHashPrefix.
+ * @member {Uint8Array} lookupHashPrefix
+ * @memberof google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification
+ * @instance
+ */
+ PrivatePasswordLeakVerification.prototype.lookupHashPrefix = $util.newBuffer([]);
+
+ /**
+ * PrivatePasswordLeakVerification encryptedUserCredentialsHash.
+ * @member {Uint8Array} encryptedUserCredentialsHash
+ * @memberof google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification
+ * @instance
+ */
+ PrivatePasswordLeakVerification.prototype.encryptedUserCredentialsHash = $util.newBuffer([]);
+
+ /**
+ * PrivatePasswordLeakVerification encryptedLeakMatchPrefixes.
+ * @member {Array.} encryptedLeakMatchPrefixes
+ * @memberof google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification
+ * @instance
+ */
+ PrivatePasswordLeakVerification.prototype.encryptedLeakMatchPrefixes = $util.emptyArray;
+
+ /**
+ * PrivatePasswordLeakVerification reencryptedUserCredentialsHash.
+ * @member {Uint8Array} reencryptedUserCredentialsHash
+ * @memberof google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification
+ * @instance
+ */
+ PrivatePasswordLeakVerification.prototype.reencryptedUserCredentialsHash = $util.newBuffer([]);
+
+ /**
+ * Creates a new PrivatePasswordLeakVerification instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IPrivatePasswordLeakVerification=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification} PrivatePasswordLeakVerification instance
+ */
+ PrivatePasswordLeakVerification.create = function create(properties) {
+ return new PrivatePasswordLeakVerification(properties);
+ };
+
+ /**
+ * Encodes the specified PrivatePasswordLeakVerification message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IPrivatePasswordLeakVerification} message PrivatePasswordLeakVerification message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ PrivatePasswordLeakVerification.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.lookupHashPrefix != null && Object.hasOwnProperty.call(message, "lookupHashPrefix"))
+ writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.lookupHashPrefix);
+ if (message.encryptedUserCredentialsHash != null && Object.hasOwnProperty.call(message, "encryptedUserCredentialsHash"))
+ writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.encryptedUserCredentialsHash);
+ if (message.encryptedLeakMatchPrefixes != null && message.encryptedLeakMatchPrefixes.length)
+ for (var i = 0; i < message.encryptedLeakMatchPrefixes.length; ++i)
+ writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.encryptedLeakMatchPrefixes[i]);
+ if (message.reencryptedUserCredentialsHash != null && Object.hasOwnProperty.call(message, "reencryptedUserCredentialsHash"))
+ writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.reencryptedUserCredentialsHash);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified PrivatePasswordLeakVerification message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IPrivatePasswordLeakVerification} message PrivatePasswordLeakVerification message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ PrivatePasswordLeakVerification.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a PrivatePasswordLeakVerification message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification} PrivatePasswordLeakVerification
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ PrivatePasswordLeakVerification.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.lookupHashPrefix = reader.bytes();
+ break;
+ }
+ case 2: {
+ message.encryptedUserCredentialsHash = reader.bytes();
+ break;
+ }
+ case 3: {
+ if (!(message.encryptedLeakMatchPrefixes && message.encryptedLeakMatchPrefixes.length))
+ message.encryptedLeakMatchPrefixes = [];
+ message.encryptedLeakMatchPrefixes.push(reader.bytes());
+ break;
+ }
+ case 4: {
+ message.reencryptedUserCredentialsHash = reader.bytes();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a PrivatePasswordLeakVerification message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification} PrivatePasswordLeakVerification
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ PrivatePasswordLeakVerification.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a PrivatePasswordLeakVerification message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ PrivatePasswordLeakVerification.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.lookupHashPrefix != null && message.hasOwnProperty("lookupHashPrefix"))
+ if (!(message.lookupHashPrefix && typeof message.lookupHashPrefix.length === "number" || $util.isString(message.lookupHashPrefix)))
+ return "lookupHashPrefix: buffer expected";
+ if (message.encryptedUserCredentialsHash != null && message.hasOwnProperty("encryptedUserCredentialsHash"))
+ if (!(message.encryptedUserCredentialsHash && typeof message.encryptedUserCredentialsHash.length === "number" || $util.isString(message.encryptedUserCredentialsHash)))
+ return "encryptedUserCredentialsHash: buffer expected";
+ if (message.encryptedLeakMatchPrefixes != null && message.hasOwnProperty("encryptedLeakMatchPrefixes")) {
+ if (!Array.isArray(message.encryptedLeakMatchPrefixes))
+ return "encryptedLeakMatchPrefixes: array expected";
+ for (var i = 0; i < message.encryptedLeakMatchPrefixes.length; ++i)
+ if (!(message.encryptedLeakMatchPrefixes[i] && typeof message.encryptedLeakMatchPrefixes[i].length === "number" || $util.isString(message.encryptedLeakMatchPrefixes[i])))
+ return "encryptedLeakMatchPrefixes: buffer[] expected";
+ }
+ if (message.reencryptedUserCredentialsHash != null && message.hasOwnProperty("reencryptedUserCredentialsHash"))
+ if (!(message.reencryptedUserCredentialsHash && typeof message.reencryptedUserCredentialsHash.length === "number" || $util.isString(message.reencryptedUserCredentialsHash)))
+ return "reencryptedUserCredentialsHash: buffer expected";
+ return null;
+ };
+
+ /**
+ * Creates a PrivatePasswordLeakVerification message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification} PrivatePasswordLeakVerification
+ */
+ PrivatePasswordLeakVerification.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification();
+ if (object.lookupHashPrefix != null)
+ if (typeof object.lookupHashPrefix === "string")
+ $util.base64.decode(object.lookupHashPrefix, message.lookupHashPrefix = $util.newBuffer($util.base64.length(object.lookupHashPrefix)), 0);
+ else if (object.lookupHashPrefix.length >= 0)
+ message.lookupHashPrefix = object.lookupHashPrefix;
+ if (object.encryptedUserCredentialsHash != null)
+ if (typeof object.encryptedUserCredentialsHash === "string")
+ $util.base64.decode(object.encryptedUserCredentialsHash, message.encryptedUserCredentialsHash = $util.newBuffer($util.base64.length(object.encryptedUserCredentialsHash)), 0);
+ else if (object.encryptedUserCredentialsHash.length >= 0)
+ message.encryptedUserCredentialsHash = object.encryptedUserCredentialsHash;
+ if (object.encryptedLeakMatchPrefixes) {
+ if (!Array.isArray(object.encryptedLeakMatchPrefixes))
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification.encryptedLeakMatchPrefixes: array expected");
+ message.encryptedLeakMatchPrefixes = [];
+ for (var i = 0; i < object.encryptedLeakMatchPrefixes.length; ++i)
+ if (typeof object.encryptedLeakMatchPrefixes[i] === "string")
+ $util.base64.decode(object.encryptedLeakMatchPrefixes[i], message.encryptedLeakMatchPrefixes[i] = $util.newBuffer($util.base64.length(object.encryptedLeakMatchPrefixes[i])), 0);
+ else if (object.encryptedLeakMatchPrefixes[i].length >= 0)
+ message.encryptedLeakMatchPrefixes[i] = object.encryptedLeakMatchPrefixes[i];
+ }
+ if (object.reencryptedUserCredentialsHash != null)
+ if (typeof object.reencryptedUserCredentialsHash === "string")
+ $util.base64.decode(object.reencryptedUserCredentialsHash, message.reencryptedUserCredentialsHash = $util.newBuffer($util.base64.length(object.reencryptedUserCredentialsHash)), 0);
+ else if (object.reencryptedUserCredentialsHash.length >= 0)
+ message.reencryptedUserCredentialsHash = object.reencryptedUserCredentialsHash;
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a PrivatePasswordLeakVerification message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification} message PrivatePasswordLeakVerification
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ PrivatePasswordLeakVerification.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.encryptedLeakMatchPrefixes = [];
+ if (options.defaults) {
+ if (options.bytes === String)
+ object.lookupHashPrefix = "";
+ else {
+ object.lookupHashPrefix = [];
+ if (options.bytes !== Array)
+ object.lookupHashPrefix = $util.newBuffer(object.lookupHashPrefix);
+ }
+ if (options.bytes === String)
+ object.encryptedUserCredentialsHash = "";
+ else {
+ object.encryptedUserCredentialsHash = [];
+ if (options.bytes !== Array)
+ object.encryptedUserCredentialsHash = $util.newBuffer(object.encryptedUserCredentialsHash);
+ }
+ if (options.bytes === String)
+ object.reencryptedUserCredentialsHash = "";
+ else {
+ object.reencryptedUserCredentialsHash = [];
+ if (options.bytes !== Array)
+ object.reencryptedUserCredentialsHash = $util.newBuffer(object.reencryptedUserCredentialsHash);
+ }
+ }
+ if (message.lookupHashPrefix != null && message.hasOwnProperty("lookupHashPrefix"))
+ object.lookupHashPrefix = options.bytes === String ? $util.base64.encode(message.lookupHashPrefix, 0, message.lookupHashPrefix.length) : options.bytes === Array ? Array.prototype.slice.call(message.lookupHashPrefix) : message.lookupHashPrefix;
+ if (message.encryptedUserCredentialsHash != null && message.hasOwnProperty("encryptedUserCredentialsHash"))
+ object.encryptedUserCredentialsHash = options.bytes === String ? $util.base64.encode(message.encryptedUserCredentialsHash, 0, message.encryptedUserCredentialsHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedUserCredentialsHash) : message.encryptedUserCredentialsHash;
+ if (message.encryptedLeakMatchPrefixes && message.encryptedLeakMatchPrefixes.length) {
+ object.encryptedLeakMatchPrefixes = [];
+ for (var j = 0; j < message.encryptedLeakMatchPrefixes.length; ++j)
+ object.encryptedLeakMatchPrefixes[j] = options.bytes === String ? $util.base64.encode(message.encryptedLeakMatchPrefixes[j], 0, message.encryptedLeakMatchPrefixes[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedLeakMatchPrefixes[j]) : message.encryptedLeakMatchPrefixes[j];
+ }
+ if (message.reencryptedUserCredentialsHash != null && message.hasOwnProperty("reencryptedUserCredentialsHash"))
+ object.reencryptedUserCredentialsHash = options.bytes === String ? $util.base64.encode(message.reencryptedUserCredentialsHash, 0, message.reencryptedUserCredentialsHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.reencryptedUserCredentialsHash) : message.reencryptedUserCredentialsHash;
+ return object;
+ };
+
+ /**
+ * Converts this PrivatePasswordLeakVerification to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ PrivatePasswordLeakVerification.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for PrivatePasswordLeakVerification
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ PrivatePasswordLeakVerification.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification";
+ };
+
+ return PrivatePasswordLeakVerification;
+ })();
+
+ v1.Assessment = (function() {
+
+ /**
+ * Properties of an Assessment.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IAssessment
+ * @property {string|null} [name] Assessment name
+ * @property {google.cloud.recaptchaenterprise.v1.IEvent|null} [event] Assessment event
+ * @property {google.cloud.recaptchaenterprise.v1.IRiskAnalysis|null} [riskAnalysis] Assessment riskAnalysis
+ * @property {google.cloud.recaptchaenterprise.v1.ITokenProperties|null} [tokenProperties] Assessment tokenProperties
+ * @property {google.cloud.recaptchaenterprise.v1.IAccountDefenderAssessment|null} [accountDefenderAssessment] Assessment accountDefenderAssessment
+ * @property {google.cloud.recaptchaenterprise.v1.IPrivatePasswordLeakVerification|null} [privatePasswordLeakVerification] Assessment privatePasswordLeakVerification
+ */
+
+ /**
+ * Constructs a new Assessment.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents an Assessment.
+ * @implements IAssessment
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IAssessment=} [properties] Properties to set
+ */
+ function Assessment(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * Assessment name.
+ * @member {string} name
+ * @memberof google.cloud.recaptchaenterprise.v1.Assessment
+ * @instance
+ */
+ Assessment.prototype.name = "";
+
+ /**
+ * Assessment event.
+ * @member {google.cloud.recaptchaenterprise.v1.IEvent|null|undefined} event
+ * @memberof google.cloud.recaptchaenterprise.v1.Assessment
+ * @instance
+ */
+ Assessment.prototype.event = null;
+
+ /**
+ * Assessment riskAnalysis.
+ * @member {google.cloud.recaptchaenterprise.v1.IRiskAnalysis|null|undefined} riskAnalysis
+ * @memberof google.cloud.recaptchaenterprise.v1.Assessment
+ * @instance
+ */
+ Assessment.prototype.riskAnalysis = null;
+
+ /**
+ * Assessment tokenProperties.
+ * @member {google.cloud.recaptchaenterprise.v1.ITokenProperties|null|undefined} tokenProperties
+ * @memberof google.cloud.recaptchaenterprise.v1.Assessment
+ * @instance
+ */
+ Assessment.prototype.tokenProperties = null;
+
+ /**
+ * Assessment accountDefenderAssessment.
+ * @member {google.cloud.recaptchaenterprise.v1.IAccountDefenderAssessment|null|undefined} accountDefenderAssessment
+ * @memberof google.cloud.recaptchaenterprise.v1.Assessment
+ * @instance
+ */
+ Assessment.prototype.accountDefenderAssessment = null;
+
+ /**
+ * Assessment privatePasswordLeakVerification.
+ * @member {google.cloud.recaptchaenterprise.v1.IPrivatePasswordLeakVerification|null|undefined} privatePasswordLeakVerification
+ * @memberof google.cloud.recaptchaenterprise.v1.Assessment
+ * @instance
+ */
+ Assessment.prototype.privatePasswordLeakVerification = null;
+
+ /**
+ * Creates a new Assessment instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.Assessment
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IAssessment=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.Assessment} Assessment instance
+ */
+ Assessment.create = function create(properties) {
+ return new Assessment(properties);
+ };
+
+ /**
+ * Encodes the specified Assessment message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.Assessment.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.Assessment
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IAssessment} message Assessment message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Assessment.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ if (message.event != null && Object.hasOwnProperty.call(message, "event"))
+ $root.google.cloud.recaptchaenterprise.v1.Event.encode(message.event, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ if (message.riskAnalysis != null && Object.hasOwnProperty.call(message, "riskAnalysis"))
+ $root.google.cloud.recaptchaenterprise.v1.RiskAnalysis.encode(message.riskAnalysis, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ if (message.tokenProperties != null && Object.hasOwnProperty.call(message, "tokenProperties"))
+ $root.google.cloud.recaptchaenterprise.v1.TokenProperties.encode(message.tokenProperties, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
+ if (message.accountDefenderAssessment != null && Object.hasOwnProperty.call(message, "accountDefenderAssessment"))
+ $root.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.encode(message.accountDefenderAssessment, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
+ if (message.privatePasswordLeakVerification != null && Object.hasOwnProperty.call(message, "privatePasswordLeakVerification"))
+ $root.google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification.encode(message.privatePasswordLeakVerification, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified Assessment message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.Assessment.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.Assessment
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IAssessment} message Assessment message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Assessment.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an Assessment message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.Assessment
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.Assessment} Assessment
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Assessment.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.Assessment();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 2: {
+ message.event = $root.google.cloud.recaptchaenterprise.v1.Event.decode(reader, reader.uint32());
+ break;
+ }
+ case 3: {
+ message.riskAnalysis = $root.google.cloud.recaptchaenterprise.v1.RiskAnalysis.decode(reader, reader.uint32());
+ break;
+ }
+ case 4: {
+ message.tokenProperties = $root.google.cloud.recaptchaenterprise.v1.TokenProperties.decode(reader, reader.uint32());
+ break;
+ }
+ case 6: {
+ message.accountDefenderAssessment = $root.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.decode(reader, reader.uint32());
+ break;
+ }
+ case 8: {
+ message.privatePasswordLeakVerification = $root.google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an Assessment message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.Assessment
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.Assessment} Assessment
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Assessment.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an Assessment message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.Assessment
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ Assessment.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.event != null && message.hasOwnProperty("event")) {
+ var error = $root.google.cloud.recaptchaenterprise.v1.Event.verify(message.event);
+ if (error)
+ return "event." + error;
+ }
+ if (message.riskAnalysis != null && message.hasOwnProperty("riskAnalysis")) {
+ var error = $root.google.cloud.recaptchaenterprise.v1.RiskAnalysis.verify(message.riskAnalysis);
+ if (error)
+ return "riskAnalysis." + error;
+ }
+ if (message.tokenProperties != null && message.hasOwnProperty("tokenProperties")) {
+ var error = $root.google.cloud.recaptchaenterprise.v1.TokenProperties.verify(message.tokenProperties);
+ if (error)
+ return "tokenProperties." + error;
+ }
+ if (message.accountDefenderAssessment != null && message.hasOwnProperty("accountDefenderAssessment")) {
+ var error = $root.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.verify(message.accountDefenderAssessment);
+ if (error)
+ return "accountDefenderAssessment." + error;
+ }
+ if (message.privatePasswordLeakVerification != null && message.hasOwnProperty("privatePasswordLeakVerification")) {
+ var error = $root.google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification.verify(message.privatePasswordLeakVerification);
+ if (error)
+ return "privatePasswordLeakVerification." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates an Assessment message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.Assessment
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.Assessment} Assessment
+ */
+ Assessment.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.Assessment)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.Assessment();
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object.event != null) {
+ if (typeof object.event !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.Assessment.event: object expected");
+ message.event = $root.google.cloud.recaptchaenterprise.v1.Event.fromObject(object.event);
+ }
+ if (object.riskAnalysis != null) {
+ if (typeof object.riskAnalysis !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.Assessment.riskAnalysis: object expected");
+ message.riskAnalysis = $root.google.cloud.recaptchaenterprise.v1.RiskAnalysis.fromObject(object.riskAnalysis);
+ }
+ if (object.tokenProperties != null) {
+ if (typeof object.tokenProperties !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.Assessment.tokenProperties: object expected");
+ message.tokenProperties = $root.google.cloud.recaptchaenterprise.v1.TokenProperties.fromObject(object.tokenProperties);
+ }
+ if (object.accountDefenderAssessment != null) {
+ if (typeof object.accountDefenderAssessment !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.Assessment.accountDefenderAssessment: object expected");
+ message.accountDefenderAssessment = $root.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.fromObject(object.accountDefenderAssessment);
+ }
+ if (object.privatePasswordLeakVerification != null) {
+ if (typeof object.privatePasswordLeakVerification !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.Assessment.privatePasswordLeakVerification: object expected");
+ message.privatePasswordLeakVerification = $root.google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification.fromObject(object.privatePasswordLeakVerification);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an Assessment message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.Assessment
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.Assessment} message Assessment
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ Assessment.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.name = "";
+ object.event = null;
+ object.riskAnalysis = null;
+ object.tokenProperties = null;
+ object.accountDefenderAssessment = null;
+ object.privatePasswordLeakVerification = null;
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.event != null && message.hasOwnProperty("event"))
+ object.event = $root.google.cloud.recaptchaenterprise.v1.Event.toObject(message.event, options);
+ if (message.riskAnalysis != null && message.hasOwnProperty("riskAnalysis"))
+ object.riskAnalysis = $root.google.cloud.recaptchaenterprise.v1.RiskAnalysis.toObject(message.riskAnalysis, options);
+ if (message.tokenProperties != null && message.hasOwnProperty("tokenProperties"))
+ object.tokenProperties = $root.google.cloud.recaptchaenterprise.v1.TokenProperties.toObject(message.tokenProperties, options);
+ if (message.accountDefenderAssessment != null && message.hasOwnProperty("accountDefenderAssessment"))
+ object.accountDefenderAssessment = $root.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.toObject(message.accountDefenderAssessment, options);
+ if (message.privatePasswordLeakVerification != null && message.hasOwnProperty("privatePasswordLeakVerification"))
+ object.privatePasswordLeakVerification = $root.google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification.toObject(message.privatePasswordLeakVerification, options);
+ return object;
+ };
+
+ /**
+ * Converts this Assessment to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.Assessment
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ Assessment.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for Assessment
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.Assessment
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ Assessment.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.Assessment";
+ };
+
+ return Assessment;
+ })();
+
+ v1.Event = (function() {
+
+ /**
+ * Properties of an Event.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IEvent
+ * @property {string|null} [token] Event token
+ * @property {string|null} [siteKey] Event siteKey
+ * @property {string|null} [userAgent] Event userAgent
+ * @property {string|null} [userIpAddress] Event userIpAddress
+ * @property {string|null} [expectedAction] Event expectedAction
+ * @property {Uint8Array|null} [hashedAccountId] Event hashedAccountId
+ */
+
+ /**
+ * Constructs a new Event.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents an Event.
+ * @implements IEvent
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IEvent=} [properties] Properties to set
+ */
+ function Event(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * Event token.
+ * @member {string} token
+ * @memberof google.cloud.recaptchaenterprise.v1.Event
+ * @instance
+ */
+ Event.prototype.token = "";
+
+ /**
+ * Event siteKey.
+ * @member {string} siteKey
+ * @memberof google.cloud.recaptchaenterprise.v1.Event
+ * @instance
+ */
+ Event.prototype.siteKey = "";
+
+ /**
+ * Event userAgent.
+ * @member {string} userAgent
+ * @memberof google.cloud.recaptchaenterprise.v1.Event
+ * @instance
+ */
+ Event.prototype.userAgent = "";
+
+ /**
+ * Event userIpAddress.
+ * @member {string} userIpAddress
+ * @memberof google.cloud.recaptchaenterprise.v1.Event
+ * @instance
+ */
+ Event.prototype.userIpAddress = "";
+
+ /**
+ * Event expectedAction.
+ * @member {string} expectedAction
+ * @memberof google.cloud.recaptchaenterprise.v1.Event
+ * @instance
+ */
+ Event.prototype.expectedAction = "";
+
+ /**
+ * Event hashedAccountId.
+ * @member {Uint8Array} hashedAccountId
+ * @memberof google.cloud.recaptchaenterprise.v1.Event
+ * @instance
+ */
+ Event.prototype.hashedAccountId = $util.newBuffer([]);
+
+ /**
+ * Creates a new Event instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.Event
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IEvent=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.Event} Event instance
+ */
+ Event.create = function create(properties) {
+ return new Event(properties);
+ };
+
+ /**
+ * Encodes the specified Event message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.Event.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.Event
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IEvent} message Event message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Event.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.token != null && Object.hasOwnProperty.call(message, "token"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.token);
+ if (message.siteKey != null && Object.hasOwnProperty.call(message, "siteKey"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.siteKey);
+ if (message.userAgent != null && Object.hasOwnProperty.call(message, "userAgent"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.userAgent);
+ if (message.userIpAddress != null && Object.hasOwnProperty.call(message, "userIpAddress"))
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.userIpAddress);
+ if (message.expectedAction != null && Object.hasOwnProperty.call(message, "expectedAction"))
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.expectedAction);
+ if (message.hashedAccountId != null && Object.hasOwnProperty.call(message, "hashedAccountId"))
+ writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.hashedAccountId);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified Event message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.Event.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.Event
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IEvent} message Event message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Event.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an Event message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.Event
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.Event} Event
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Event.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.Event();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.token = reader.string();
+ break;
+ }
+ case 2: {
+ message.siteKey = reader.string();
+ break;
+ }
+ case 3: {
+ message.userAgent = reader.string();
+ break;
+ }
+ case 4: {
+ message.userIpAddress = reader.string();
+ break;
+ }
+ case 5: {
+ message.expectedAction = reader.string();
+ break;
+ }
+ case 6: {
+ message.hashedAccountId = reader.bytes();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an Event message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.Event
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.Event} Event
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Event.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an Event message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.Event
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ Event.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.token != null && message.hasOwnProperty("token"))
+ if (!$util.isString(message.token))
+ return "token: string expected";
+ if (message.siteKey != null && message.hasOwnProperty("siteKey"))
+ if (!$util.isString(message.siteKey))
+ return "siteKey: string expected";
+ if (message.userAgent != null && message.hasOwnProperty("userAgent"))
+ if (!$util.isString(message.userAgent))
+ return "userAgent: string expected";
+ if (message.userIpAddress != null && message.hasOwnProperty("userIpAddress"))
+ if (!$util.isString(message.userIpAddress))
+ return "userIpAddress: string expected";
+ if (message.expectedAction != null && message.hasOwnProperty("expectedAction"))
+ if (!$util.isString(message.expectedAction))
+ return "expectedAction: string expected";
+ if (message.hashedAccountId != null && message.hasOwnProperty("hashedAccountId"))
+ if (!(message.hashedAccountId && typeof message.hashedAccountId.length === "number" || $util.isString(message.hashedAccountId)))
+ return "hashedAccountId: buffer expected";
+ return null;
+ };
+
+ /**
+ * Creates an Event message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.Event
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.Event} Event
+ */
+ Event.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.Event)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.Event();
+ if (object.token != null)
+ message.token = String(object.token);
+ if (object.siteKey != null)
+ message.siteKey = String(object.siteKey);
+ if (object.userAgent != null)
+ message.userAgent = String(object.userAgent);
+ if (object.userIpAddress != null)
+ message.userIpAddress = String(object.userIpAddress);
+ if (object.expectedAction != null)
+ message.expectedAction = String(object.expectedAction);
+ if (object.hashedAccountId != null)
+ if (typeof object.hashedAccountId === "string")
+ $util.base64.decode(object.hashedAccountId, message.hashedAccountId = $util.newBuffer($util.base64.length(object.hashedAccountId)), 0);
+ else if (object.hashedAccountId.length >= 0)
+ message.hashedAccountId = object.hashedAccountId;
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an Event message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.Event
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.Event} message Event
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ Event.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.token = "";
+ object.siteKey = "";
+ object.userAgent = "";
+ object.userIpAddress = "";
+ object.expectedAction = "";
+ if (options.bytes === String)
+ object.hashedAccountId = "";
+ else {
+ object.hashedAccountId = [];
+ if (options.bytes !== Array)
+ object.hashedAccountId = $util.newBuffer(object.hashedAccountId);
+ }
+ }
+ if (message.token != null && message.hasOwnProperty("token"))
+ object.token = message.token;
+ if (message.siteKey != null && message.hasOwnProperty("siteKey"))
+ object.siteKey = message.siteKey;
+ if (message.userAgent != null && message.hasOwnProperty("userAgent"))
+ object.userAgent = message.userAgent;
+ if (message.userIpAddress != null && message.hasOwnProperty("userIpAddress"))
+ object.userIpAddress = message.userIpAddress;
+ if (message.expectedAction != null && message.hasOwnProperty("expectedAction"))
+ object.expectedAction = message.expectedAction;
+ if (message.hashedAccountId != null && message.hasOwnProperty("hashedAccountId"))
+ object.hashedAccountId = options.bytes === String ? $util.base64.encode(message.hashedAccountId, 0, message.hashedAccountId.length) : options.bytes === Array ? Array.prototype.slice.call(message.hashedAccountId) : message.hashedAccountId;
+ return object;
+ };
+
+ /**
+ * Converts this Event to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.Event
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ Event.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for Event
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.Event
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ Event.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.Event";
+ };
+
+ return Event;
+ })();
+
+ v1.RiskAnalysis = (function() {
+
+ /**
+ * Properties of a RiskAnalysis.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IRiskAnalysis
+ * @property {number|null} [score] RiskAnalysis score
+ * @property {Array.|null} [reasons] RiskAnalysis reasons
+ */
+
+ /**
+ * Constructs a new RiskAnalysis.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a RiskAnalysis.
+ * @implements IRiskAnalysis
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IRiskAnalysis=} [properties] Properties to set
+ */
+ function RiskAnalysis(properties) {
+ this.reasons = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * RiskAnalysis score.
+ * @member {number} score
+ * @memberof google.cloud.recaptchaenterprise.v1.RiskAnalysis
+ * @instance
+ */
+ RiskAnalysis.prototype.score = 0;
+
+ /**
+ * RiskAnalysis reasons.
+ * @member {Array.} reasons
+ * @memberof google.cloud.recaptchaenterprise.v1.RiskAnalysis
+ * @instance
+ */
+ RiskAnalysis.prototype.reasons = $util.emptyArray;
+
+ /**
+ * Creates a new RiskAnalysis instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.RiskAnalysis
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IRiskAnalysis=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.RiskAnalysis} RiskAnalysis instance
+ */
+ RiskAnalysis.create = function create(properties) {
+ return new RiskAnalysis(properties);
+ };
+
+ /**
+ * Encodes the specified RiskAnalysis message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.RiskAnalysis.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.RiskAnalysis
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IRiskAnalysis} message RiskAnalysis message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ RiskAnalysis.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.score != null && Object.hasOwnProperty.call(message, "score"))
+ writer.uint32(/* id 1, wireType 5 =*/13).float(message.score);
+ if (message.reasons != null && message.reasons.length) {
+ writer.uint32(/* id 2, wireType 2 =*/18).fork();
+ for (var i = 0; i < message.reasons.length; ++i)
+ writer.int32(message.reasons[i]);
+ writer.ldelim();
+ }
+ return writer;
+ };
+
+ /**
+ * Encodes the specified RiskAnalysis message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.RiskAnalysis.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.RiskAnalysis
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IRiskAnalysis} message RiskAnalysis message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ RiskAnalysis.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a RiskAnalysis message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.RiskAnalysis
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.RiskAnalysis} RiskAnalysis
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ RiskAnalysis.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.RiskAnalysis();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.score = reader.float();
+ break;
+ }
+ case 2: {
+ if (!(message.reasons && message.reasons.length))
+ message.reasons = [];
+ if ((tag & 7) === 2) {
+ var end2 = reader.uint32() + reader.pos;
+ while (reader.pos < end2)
+ message.reasons.push(reader.int32());
+ } else
+ message.reasons.push(reader.int32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a RiskAnalysis message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.RiskAnalysis
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.RiskAnalysis} RiskAnalysis
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ RiskAnalysis.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a RiskAnalysis message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.RiskAnalysis
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ RiskAnalysis.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.score != null && message.hasOwnProperty("score"))
+ if (typeof message.score !== "number")
+ return "score: number expected";
+ if (message.reasons != null && message.hasOwnProperty("reasons")) {
+ if (!Array.isArray(message.reasons))
+ return "reasons: array expected";
+ for (var i = 0; i < message.reasons.length; ++i)
+ switch (message.reasons[i]) {
+ default:
+ return "reasons: enum value[] expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ break;
+ }
+ }
+ return null;
+ };
+
+ /**
+ * Creates a RiskAnalysis message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.RiskAnalysis
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.RiskAnalysis} RiskAnalysis
+ */
+ RiskAnalysis.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.RiskAnalysis)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.RiskAnalysis();
+ if (object.score != null)
+ message.score = Number(object.score);
+ if (object.reasons) {
+ if (!Array.isArray(object.reasons))
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.RiskAnalysis.reasons: array expected");
+ message.reasons = [];
+ for (var i = 0; i < object.reasons.length; ++i)
+ switch (object.reasons[i]) {
+ default:
+ if (typeof object.reasons[i] === "number") {
+ message.reasons[i] = object.reasons[i];
+ break;
+ }
+ case "CLASSIFICATION_REASON_UNSPECIFIED":
+ case 0:
+ message.reasons[i] = 0;
+ break;
+ case "AUTOMATION":
+ case 1:
+ message.reasons[i] = 1;
+ break;
+ case "UNEXPECTED_ENVIRONMENT":
+ case 2:
+ message.reasons[i] = 2;
+ break;
+ case "TOO_MUCH_TRAFFIC":
+ case 3:
+ message.reasons[i] = 3;
+ break;
+ case "UNEXPECTED_USAGE_PATTERNS":
+ case 4:
+ message.reasons[i] = 4;
+ break;
+ case "LOW_CONFIDENCE_SCORE":
+ case 5:
+ message.reasons[i] = 5;
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a RiskAnalysis message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.RiskAnalysis
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.RiskAnalysis} message RiskAnalysis
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ RiskAnalysis.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.reasons = [];
+ if (options.defaults)
+ object.score = 0;
+ if (message.score != null && message.hasOwnProperty("score"))
+ object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
+ if (message.reasons && message.reasons.length) {
+ object.reasons = [];
+ for (var j = 0; j < message.reasons.length; ++j)
+ object.reasons[j] = options.enums === String ? $root.google.cloud.recaptchaenterprise.v1.RiskAnalysis.ClassificationReason[message.reasons[j]] === undefined ? message.reasons[j] : $root.google.cloud.recaptchaenterprise.v1.RiskAnalysis.ClassificationReason[message.reasons[j]] : message.reasons[j];
+ }
+ return object;
+ };
+
+ /**
+ * Converts this RiskAnalysis to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.RiskAnalysis
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ RiskAnalysis.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for RiskAnalysis
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.RiskAnalysis
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ RiskAnalysis.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.RiskAnalysis";
+ };
+
+ /**
+ * ClassificationReason enum.
+ * @name google.cloud.recaptchaenterprise.v1.RiskAnalysis.ClassificationReason
+ * @enum {number}
+ * @property {number} CLASSIFICATION_REASON_UNSPECIFIED=0 CLASSIFICATION_REASON_UNSPECIFIED value
+ * @property {number} AUTOMATION=1 AUTOMATION value
+ * @property {number} UNEXPECTED_ENVIRONMENT=2 UNEXPECTED_ENVIRONMENT value
+ * @property {number} TOO_MUCH_TRAFFIC=3 TOO_MUCH_TRAFFIC value
+ * @property {number} UNEXPECTED_USAGE_PATTERNS=4 UNEXPECTED_USAGE_PATTERNS value
+ * @property {number} LOW_CONFIDENCE_SCORE=5 LOW_CONFIDENCE_SCORE value
+ */
+ RiskAnalysis.ClassificationReason = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "CLASSIFICATION_REASON_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "AUTOMATION"] = 1;
+ values[valuesById[2] = "UNEXPECTED_ENVIRONMENT"] = 2;
+ values[valuesById[3] = "TOO_MUCH_TRAFFIC"] = 3;
+ values[valuesById[4] = "UNEXPECTED_USAGE_PATTERNS"] = 4;
+ values[valuesById[5] = "LOW_CONFIDENCE_SCORE"] = 5;
+ return values;
+ })();
+
+ return RiskAnalysis;
+ })();
+
+ v1.TokenProperties = (function() {
+
+ /**
+ * Properties of a TokenProperties.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface ITokenProperties
+ * @property {boolean|null} [valid] TokenProperties valid
+ * @property {google.cloud.recaptchaenterprise.v1.TokenProperties.InvalidReason|null} [invalidReason] TokenProperties invalidReason
+ * @property {google.protobuf.ITimestamp|null} [createTime] TokenProperties createTime
+ * @property {string|null} [hostname] TokenProperties hostname
+ * @property {string|null} [action] TokenProperties action
+ */
+
+ /**
+ * Constructs a new TokenProperties.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a TokenProperties.
+ * @implements ITokenProperties
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.ITokenProperties=} [properties] Properties to set
+ */
+ function TokenProperties(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * TokenProperties valid.
+ * @member {boolean} valid
+ * @memberof google.cloud.recaptchaenterprise.v1.TokenProperties
+ * @instance
+ */
+ TokenProperties.prototype.valid = false;
+
+ /**
+ * TokenProperties invalidReason.
+ * @member {google.cloud.recaptchaenterprise.v1.TokenProperties.InvalidReason} invalidReason
+ * @memberof google.cloud.recaptchaenterprise.v1.TokenProperties
+ * @instance
+ */
+ TokenProperties.prototype.invalidReason = 0;
+
+ /**
+ * TokenProperties createTime.
+ * @member {google.protobuf.ITimestamp|null|undefined} createTime
+ * @memberof google.cloud.recaptchaenterprise.v1.TokenProperties
+ * @instance
+ */
+ TokenProperties.prototype.createTime = null;
+
+ /**
+ * TokenProperties hostname.
+ * @member {string} hostname
+ * @memberof google.cloud.recaptchaenterprise.v1.TokenProperties
+ * @instance
+ */
+ TokenProperties.prototype.hostname = "";
+
+ /**
+ * TokenProperties action.
+ * @member {string} action
+ * @memberof google.cloud.recaptchaenterprise.v1.TokenProperties
+ * @instance
+ */
+ TokenProperties.prototype.action = "";
+
+ /**
+ * Creates a new TokenProperties instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.TokenProperties
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.ITokenProperties=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.TokenProperties} TokenProperties instance
+ */
+ TokenProperties.create = function create(properties) {
+ return new TokenProperties(properties);
+ };
+
+ /**
+ * Encodes the specified TokenProperties message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.TokenProperties.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.TokenProperties
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.ITokenProperties} message TokenProperties message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ TokenProperties.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.valid != null && Object.hasOwnProperty.call(message, "valid"))
+ writer.uint32(/* id 1, wireType 0 =*/8).bool(message.valid);
+ if (message.invalidReason != null && Object.hasOwnProperty.call(message, "invalidReason"))
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.invalidReason);
+ if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime"))
+ $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname"))
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.hostname);
+ if (message.action != null && Object.hasOwnProperty.call(message, "action"))
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.action);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified TokenProperties message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.TokenProperties.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.TokenProperties
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.ITokenProperties} message TokenProperties message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ TokenProperties.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a TokenProperties message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.TokenProperties
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.TokenProperties} TokenProperties
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ TokenProperties.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.TokenProperties();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.valid = reader.bool();
+ break;
+ }
+ case 2: {
+ message.invalidReason = reader.int32();
+ break;
+ }
+ case 3: {
+ message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
+ break;
+ }
+ case 4: {
+ message.hostname = reader.string();
+ break;
+ }
+ case 5: {
+ message.action = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a TokenProperties message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.TokenProperties
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.TokenProperties} TokenProperties
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ TokenProperties.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a TokenProperties message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.TokenProperties
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ TokenProperties.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.valid != null && message.hasOwnProperty("valid"))
+ if (typeof message.valid !== "boolean")
+ return "valid: boolean expected";
+ if (message.invalidReason != null && message.hasOwnProperty("invalidReason"))
+ switch (message.invalidReason) {
+ default:
+ return "invalidReason: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ break;
+ }
+ if (message.createTime != null && message.hasOwnProperty("createTime")) {
+ var error = $root.google.protobuf.Timestamp.verify(message.createTime);
+ if (error)
+ return "createTime." + error;
+ }
+ if (message.hostname != null && message.hasOwnProperty("hostname"))
+ if (!$util.isString(message.hostname))
+ return "hostname: string expected";
+ if (message.action != null && message.hasOwnProperty("action"))
+ if (!$util.isString(message.action))
+ return "action: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a TokenProperties message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.TokenProperties
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.TokenProperties} TokenProperties
+ */
+ TokenProperties.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.TokenProperties)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.TokenProperties();
+ if (object.valid != null)
+ message.valid = Boolean(object.valid);
+ switch (object.invalidReason) {
+ default:
+ if (typeof object.invalidReason === "number") {
+ message.invalidReason = object.invalidReason;
+ break;
+ }
+ break;
+ case "INVALID_REASON_UNSPECIFIED":
+ case 0:
+ message.invalidReason = 0;
+ break;
+ case "UNKNOWN_INVALID_REASON":
+ case 1:
+ message.invalidReason = 1;
+ break;
+ case "MALFORMED":
+ case 2:
+ message.invalidReason = 2;
+ break;
+ case "EXPIRED":
+ case 3:
+ message.invalidReason = 3;
+ break;
+ case "DUPE":
+ case 4:
+ message.invalidReason = 4;
+ break;
+ case "MISSING":
+ case 5:
+ message.invalidReason = 5;
+ break;
+ case "BROWSER_ERROR":
+ case 6:
+ message.invalidReason = 6;
+ break;
+ }
+ if (object.createTime != null) {
+ if (typeof object.createTime !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.TokenProperties.createTime: object expected");
+ message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime);
+ }
+ if (object.hostname != null)
+ message.hostname = String(object.hostname);
+ if (object.action != null)
+ message.action = String(object.action);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a TokenProperties message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.TokenProperties
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.TokenProperties} message TokenProperties
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ TokenProperties.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.valid = false;
+ object.invalidReason = options.enums === String ? "INVALID_REASON_UNSPECIFIED" : 0;
+ object.createTime = null;
+ object.hostname = "";
+ object.action = "";
+ }
+ if (message.valid != null && message.hasOwnProperty("valid"))
+ object.valid = message.valid;
+ if (message.invalidReason != null && message.hasOwnProperty("invalidReason"))
+ object.invalidReason = options.enums === String ? $root.google.cloud.recaptchaenterprise.v1.TokenProperties.InvalidReason[message.invalidReason] === undefined ? message.invalidReason : $root.google.cloud.recaptchaenterprise.v1.TokenProperties.InvalidReason[message.invalidReason] : message.invalidReason;
+ if (message.createTime != null && message.hasOwnProperty("createTime"))
+ object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options);
+ if (message.hostname != null && message.hasOwnProperty("hostname"))
+ object.hostname = message.hostname;
+ if (message.action != null && message.hasOwnProperty("action"))
+ object.action = message.action;
+ return object;
+ };
+
+ /**
+ * Converts this TokenProperties to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.TokenProperties
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ TokenProperties.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for TokenProperties
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.TokenProperties
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ TokenProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.TokenProperties";
+ };
+
+ /**
+ * InvalidReason enum.
+ * @name google.cloud.recaptchaenterprise.v1.TokenProperties.InvalidReason
+ * @enum {number}
+ * @property {number} INVALID_REASON_UNSPECIFIED=0 INVALID_REASON_UNSPECIFIED value
+ * @property {number} UNKNOWN_INVALID_REASON=1 UNKNOWN_INVALID_REASON value
+ * @property {number} MALFORMED=2 MALFORMED value
+ * @property {number} EXPIRED=3 EXPIRED value
+ * @property {number} DUPE=4 DUPE value
+ * @property {number} MISSING=5 MISSING value
+ * @property {number} BROWSER_ERROR=6 BROWSER_ERROR value
+ */
+ TokenProperties.InvalidReason = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "INVALID_REASON_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "UNKNOWN_INVALID_REASON"] = 1;
+ values[valuesById[2] = "MALFORMED"] = 2;
+ values[valuesById[3] = "EXPIRED"] = 3;
+ values[valuesById[4] = "DUPE"] = 4;
+ values[valuesById[5] = "MISSING"] = 5;
+ values[valuesById[6] = "BROWSER_ERROR"] = 6;
+ return values;
+ })();
+
+ return TokenProperties;
+ })();
+
+ v1.AccountDefenderAssessment = (function() {
+
+ /**
+ * Properties of an AccountDefenderAssessment.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IAccountDefenderAssessment
+ * @property {Array.|null} [labels] AccountDefenderAssessment labels
+ */
+
+ /**
+ * Constructs a new AccountDefenderAssessment.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents an AccountDefenderAssessment.
+ * @implements IAccountDefenderAssessment
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IAccountDefenderAssessment=} [properties] Properties to set
+ */
+ function AccountDefenderAssessment(properties) {
+ this.labels = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * AccountDefenderAssessment labels.
+ * @member {Array.} labels
+ * @memberof google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment
+ * @instance
+ */
+ AccountDefenderAssessment.prototype.labels = $util.emptyArray;
+
+ /**
+ * Creates a new AccountDefenderAssessment instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IAccountDefenderAssessment=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment} AccountDefenderAssessment instance
+ */
+ AccountDefenderAssessment.create = function create(properties) {
+ return new AccountDefenderAssessment(properties);
+ };
+
+ /**
+ * Encodes the specified AccountDefenderAssessment message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IAccountDefenderAssessment} message AccountDefenderAssessment message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ AccountDefenderAssessment.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.labels != null && message.labels.length) {
+ writer.uint32(/* id 1, wireType 2 =*/10).fork();
+ for (var i = 0; i < message.labels.length; ++i)
+ writer.int32(message.labels[i]);
+ writer.ldelim();
+ }
+ return writer;
+ };
+
+ /**
+ * Encodes the specified AccountDefenderAssessment message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IAccountDefenderAssessment} message AccountDefenderAssessment message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ AccountDefenderAssessment.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an AccountDefenderAssessment message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment} AccountDefenderAssessment
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ AccountDefenderAssessment.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.labels && message.labels.length))
+ message.labels = [];
+ if ((tag & 7) === 2) {
+ var end2 = reader.uint32() + reader.pos;
+ while (reader.pos < end2)
+ message.labels.push(reader.int32());
+ } else
+ message.labels.push(reader.int32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an AccountDefenderAssessment message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment} AccountDefenderAssessment
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ AccountDefenderAssessment.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an AccountDefenderAssessment message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ AccountDefenderAssessment.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.labels != null && message.hasOwnProperty("labels")) {
+ if (!Array.isArray(message.labels))
+ return "labels: array expected";
+ for (var i = 0; i < message.labels.length; ++i)
+ switch (message.labels[i]) {
+ default:
+ return "labels: enum value[] expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ break;
+ }
+ }
+ return null;
+ };
+
+ /**
+ * Creates an AccountDefenderAssessment message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment} AccountDefenderAssessment
+ */
+ AccountDefenderAssessment.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment();
+ if (object.labels) {
+ if (!Array.isArray(object.labels))
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.labels: array expected");
+ message.labels = [];
+ for (var i = 0; i < object.labels.length; ++i)
+ switch (object.labels[i]) {
+ default:
+ if (typeof object.labels[i] === "number") {
+ message.labels[i] = object.labels[i];
+ break;
+ }
+ case "ACCOUNT_DEFENDER_LABEL_UNSPECIFIED":
+ case 0:
+ message.labels[i] = 0;
+ break;
+ case "PROFILE_MATCH":
+ case 1:
+ message.labels[i] = 1;
+ break;
+ case "SUSPICIOUS_LOGIN_ACTIVITY":
+ case 2:
+ message.labels[i] = 2;
+ break;
+ case "SUSPICIOUS_ACCOUNT_CREATION":
+ case 3:
+ message.labels[i] = 3;
+ break;
+ case "RELATED_ACCOUNTS_NUMBER_HIGH":
+ case 4:
+ message.labels[i] = 4;
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an AccountDefenderAssessment message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment} message AccountDefenderAssessment
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ AccountDefenderAssessment.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.labels = [];
+ if (message.labels && message.labels.length) {
+ object.labels = [];
+ for (var j = 0; j < message.labels.length; ++j)
+ object.labels[j] = options.enums === String ? $root.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountDefenderLabel[message.labels[j]] === undefined ? message.labels[j] : $root.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountDefenderLabel[message.labels[j]] : message.labels[j];
+ }
+ return object;
+ };
+
+ /**
+ * Converts this AccountDefenderAssessment to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ AccountDefenderAssessment.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for AccountDefenderAssessment
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ AccountDefenderAssessment.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment";
+ };
+
+ /**
+ * AccountDefenderLabel enum.
+ * @name google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.AccountDefenderLabel
+ * @enum {number}
+ * @property {number} ACCOUNT_DEFENDER_LABEL_UNSPECIFIED=0 ACCOUNT_DEFENDER_LABEL_UNSPECIFIED value
+ * @property {number} PROFILE_MATCH=1 PROFILE_MATCH value
+ * @property {number} SUSPICIOUS_LOGIN_ACTIVITY=2 SUSPICIOUS_LOGIN_ACTIVITY value
+ * @property {number} SUSPICIOUS_ACCOUNT_CREATION=3 SUSPICIOUS_ACCOUNT_CREATION value
+ * @property {number} RELATED_ACCOUNTS_NUMBER_HIGH=4 RELATED_ACCOUNTS_NUMBER_HIGH value
+ */
+ AccountDefenderAssessment.AccountDefenderLabel = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "ACCOUNT_DEFENDER_LABEL_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "PROFILE_MATCH"] = 1;
+ values[valuesById[2] = "SUSPICIOUS_LOGIN_ACTIVITY"] = 2;
+ values[valuesById[3] = "SUSPICIOUS_ACCOUNT_CREATION"] = 3;
+ values[valuesById[4] = "RELATED_ACCOUNTS_NUMBER_HIGH"] = 4;
+ return values;
+ })();
+
+ return AccountDefenderAssessment;
+ })();
+
+ v1.CreateKeyRequest = (function() {
+
+ /**
+ * Properties of a CreateKeyRequest.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface ICreateKeyRequest
+ * @property {string|null} [parent] CreateKeyRequest parent
+ * @property {google.cloud.recaptchaenterprise.v1.IKey|null} [key] CreateKeyRequest key
+ */
+
+ /**
+ * Constructs a new CreateKeyRequest.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a CreateKeyRequest.
+ * @implements ICreateKeyRequest
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.ICreateKeyRequest=} [properties] Properties to set
+ */
+ function CreateKeyRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * CreateKeyRequest parent.
+ * @member {string} parent
+ * @memberof google.cloud.recaptchaenterprise.v1.CreateKeyRequest
+ * @instance
+ */
+ CreateKeyRequest.prototype.parent = "";
+
+ /**
+ * CreateKeyRequest key.
+ * @member {google.cloud.recaptchaenterprise.v1.IKey|null|undefined} key
+ * @memberof google.cloud.recaptchaenterprise.v1.CreateKeyRequest
+ * @instance
+ */
+ CreateKeyRequest.prototype.key = null;
+
+ /**
+ * Creates a new CreateKeyRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.CreateKeyRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.ICreateKeyRequest=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.CreateKeyRequest} CreateKeyRequest instance
+ */
+ CreateKeyRequest.create = function create(properties) {
+ return new CreateKeyRequest(properties);
+ };
+
+ /**
+ * Encodes the specified CreateKeyRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.CreateKeyRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.CreateKeyRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.ICreateKeyRequest} message CreateKeyRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CreateKeyRequest.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.key != null && Object.hasOwnProperty.call(message, "key"))
+ $root.google.cloud.recaptchaenterprise.v1.Key.encode(message.key, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified CreateKeyRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.CreateKeyRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.CreateKeyRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.ICreateKeyRequest} message CreateKeyRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CreateKeyRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a CreateKeyRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.CreateKeyRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.CreateKeyRequest} CreateKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CreateKeyRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.CreateKeyRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.parent = reader.string();
+ break;
+ }
+ case 2: {
+ message.key = $root.google.cloud.recaptchaenterprise.v1.Key.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a CreateKeyRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.CreateKeyRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.CreateKeyRequest} CreateKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CreateKeyRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a CreateKeyRequest message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.CreateKeyRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ CreateKeyRequest.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.key != null && message.hasOwnProperty("key")) {
+ var error = $root.google.cloud.recaptchaenterprise.v1.Key.verify(message.key);
+ if (error)
+ return "key." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a CreateKeyRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.CreateKeyRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.CreateKeyRequest} CreateKeyRequest
+ */
+ CreateKeyRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.CreateKeyRequest)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.CreateKeyRequest();
+ if (object.parent != null)
+ message.parent = String(object.parent);
+ if (object.key != null) {
+ if (typeof object.key !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.CreateKeyRequest.key: object expected");
+ message.key = $root.google.cloud.recaptchaenterprise.v1.Key.fromObject(object.key);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a CreateKeyRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.CreateKeyRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.CreateKeyRequest} message CreateKeyRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ CreateKeyRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.parent = "";
+ object.key = null;
+ }
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ object.parent = message.parent;
+ if (message.key != null && message.hasOwnProperty("key"))
+ object.key = $root.google.cloud.recaptchaenterprise.v1.Key.toObject(message.key, options);
+ return object;
+ };
+
+ /**
+ * Converts this CreateKeyRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.CreateKeyRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ CreateKeyRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for CreateKeyRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.CreateKeyRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ CreateKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.CreateKeyRequest";
+ };
+
+ return CreateKeyRequest;
+ })();
+
+ v1.ListKeysRequest = (function() {
+
+ /**
+ * Properties of a ListKeysRequest.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IListKeysRequest
+ * @property {string|null} [parent] ListKeysRequest parent
+ * @property {number|null} [pageSize] ListKeysRequest pageSize
+ * @property {string|null} [pageToken] ListKeysRequest pageToken
+ */
+
+ /**
+ * Constructs a new ListKeysRequest.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a ListKeysRequest.
+ * @implements IListKeysRequest
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IListKeysRequest=} [properties] Properties to set
+ */
+ function ListKeysRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ListKeysRequest parent.
+ * @member {string} parent
+ * @memberof google.cloud.recaptchaenterprise.v1.ListKeysRequest
+ * @instance
+ */
+ ListKeysRequest.prototype.parent = "";
+
+ /**
+ * ListKeysRequest pageSize.
+ * @member {number} pageSize
+ * @memberof google.cloud.recaptchaenterprise.v1.ListKeysRequest
+ * @instance
+ */
+ ListKeysRequest.prototype.pageSize = 0;
+
+ /**
+ * ListKeysRequest pageToken.
+ * @member {string} pageToken
+ * @memberof google.cloud.recaptchaenterprise.v1.ListKeysRequest
+ * @instance
+ */
+ ListKeysRequest.prototype.pageToken = "";
+
+ /**
+ * Creates a new ListKeysRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.ListKeysRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IListKeysRequest=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.ListKeysRequest} ListKeysRequest instance
+ */
+ ListKeysRequest.create = function create(properties) {
+ return new ListKeysRequest(properties);
+ };
+
+ /**
+ * Encodes the specified ListKeysRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ListKeysRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.ListKeysRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IListKeysRequest} message ListKeysRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListKeysRequest.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 ListKeysRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ListKeysRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.ListKeysRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IListKeysRequest} message ListKeysRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListKeysRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ListKeysRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.ListKeysRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.ListKeysRequest} ListKeysRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListKeysRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.ListKeysRequest();
+ 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 ListKeysRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.ListKeysRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.ListKeysRequest} ListKeysRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListKeysRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ListKeysRequest message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.ListKeysRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ListKeysRequest.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 ListKeysRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.ListKeysRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.ListKeysRequest} ListKeysRequest
+ */
+ ListKeysRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.ListKeysRequest)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.ListKeysRequest();
+ 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 ListKeysRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.ListKeysRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.ListKeysRequest} message ListKeysRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ListKeysRequest.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 ListKeysRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.ListKeysRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ListKeysRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ListKeysRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.ListKeysRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ListKeysRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.ListKeysRequest";
+ };
+
+ return ListKeysRequest;
+ })();
+
+ v1.ListKeysResponse = (function() {
+
+ /**
+ * Properties of a ListKeysResponse.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IListKeysResponse
+ * @property {Array.|null} [keys] ListKeysResponse keys
+ * @property {string|null} [nextPageToken] ListKeysResponse nextPageToken
+ */
+
+ /**
+ * Constructs a new ListKeysResponse.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a ListKeysResponse.
+ * @implements IListKeysResponse
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IListKeysResponse=} [properties] Properties to set
+ */
+ function ListKeysResponse(properties) {
+ this.keys = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ListKeysResponse keys.
+ * @member {Array.} keys
+ * @memberof google.cloud.recaptchaenterprise.v1.ListKeysResponse
+ * @instance
+ */
+ ListKeysResponse.prototype.keys = $util.emptyArray;
+
+ /**
+ * ListKeysResponse nextPageToken.
+ * @member {string} nextPageToken
+ * @memberof google.cloud.recaptchaenterprise.v1.ListKeysResponse
+ * @instance
+ */
+ ListKeysResponse.prototype.nextPageToken = "";
+
+ /**
+ * Creates a new ListKeysResponse instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.ListKeysResponse
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IListKeysResponse=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.ListKeysResponse} ListKeysResponse instance
+ */
+ ListKeysResponse.create = function create(properties) {
+ return new ListKeysResponse(properties);
+ };
+
+ /**
+ * Encodes the specified ListKeysResponse message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ListKeysResponse.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.ListKeysResponse
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IListKeysResponse} message ListKeysResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListKeysResponse.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.keys != null && message.keys.length)
+ for (var i = 0; i < message.keys.length; ++i)
+ $root.google.cloud.recaptchaenterprise.v1.Key.encode(message.keys[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 ListKeysResponse message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ListKeysResponse.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.ListKeysResponse
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IListKeysResponse} message ListKeysResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListKeysResponse.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ListKeysResponse message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.ListKeysResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.ListKeysResponse} ListKeysResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListKeysResponse.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.ListKeysResponse();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.keys && message.keys.length))
+ message.keys = [];
+ message.keys.push($root.google.cloud.recaptchaenterprise.v1.Key.decode(reader, reader.uint32()));
+ break;
+ }
+ case 2: {
+ message.nextPageToken = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ListKeysResponse message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.ListKeysResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.ListKeysResponse} ListKeysResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListKeysResponse.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ListKeysResponse message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.ListKeysResponse
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ListKeysResponse.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.keys != null && message.hasOwnProperty("keys")) {
+ if (!Array.isArray(message.keys))
+ return "keys: array expected";
+ for (var i = 0; i < message.keys.length; ++i) {
+ var error = $root.google.cloud.recaptchaenterprise.v1.Key.verify(message.keys[i]);
+ if (error)
+ return "keys." + error;
+ }
+ }
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
+ if (!$util.isString(message.nextPageToken))
+ return "nextPageToken: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a ListKeysResponse message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.ListKeysResponse
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.ListKeysResponse} ListKeysResponse
+ */
+ ListKeysResponse.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.ListKeysResponse)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.ListKeysResponse();
+ if (object.keys) {
+ if (!Array.isArray(object.keys))
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.ListKeysResponse.keys: array expected");
+ message.keys = [];
+ for (var i = 0; i < object.keys.length; ++i) {
+ if (typeof object.keys[i] !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.ListKeysResponse.keys: object expected");
+ message.keys[i] = $root.google.cloud.recaptchaenterprise.v1.Key.fromObject(object.keys[i]);
+ }
+ }
+ if (object.nextPageToken != null)
+ message.nextPageToken = String(object.nextPageToken);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ListKeysResponse message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.ListKeysResponse
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.ListKeysResponse} message ListKeysResponse
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ListKeysResponse.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.keys = [];
+ if (options.defaults)
+ object.nextPageToken = "";
+ if (message.keys && message.keys.length) {
+ object.keys = [];
+ for (var j = 0; j < message.keys.length; ++j)
+ object.keys[j] = $root.google.cloud.recaptchaenterprise.v1.Key.toObject(message.keys[j], options);
+ }
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
+ object.nextPageToken = message.nextPageToken;
+ return object;
+ };
+
+ /**
+ * Converts this ListKeysResponse to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.ListKeysResponse
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ListKeysResponse.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ListKeysResponse
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.ListKeysResponse
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ListKeysResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.ListKeysResponse";
+ };
+
+ return ListKeysResponse;
+ })();
+
+ v1.RetrieveLegacySecretKeyRequest = (function() {
+
+ /**
+ * Properties of a RetrieveLegacySecretKeyRequest.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IRetrieveLegacySecretKeyRequest
+ * @property {string|null} [key] RetrieveLegacySecretKeyRequest key
+ */
+
+ /**
+ * Constructs a new RetrieveLegacySecretKeyRequest.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a RetrieveLegacySecretKeyRequest.
+ * @implements IRetrieveLegacySecretKeyRequest
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyRequest=} [properties] Properties to set
+ */
+ function RetrieveLegacySecretKeyRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * RetrieveLegacySecretKeyRequest key.
+ * @member {string} key
+ * @memberof google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest
+ * @instance
+ */
+ RetrieveLegacySecretKeyRequest.prototype.key = "";
+
+ /**
+ * Creates a new RetrieveLegacySecretKeyRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyRequest=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest} RetrieveLegacySecretKeyRequest instance
+ */
+ RetrieveLegacySecretKeyRequest.create = function create(properties) {
+ return new RetrieveLegacySecretKeyRequest(properties);
+ };
+
+ /**
+ * Encodes the specified RetrieveLegacySecretKeyRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyRequest} message RetrieveLegacySecretKeyRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ RetrieveLegacySecretKeyRequest.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.key != null && Object.hasOwnProperty.call(message, "key"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.key);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified RetrieveLegacySecretKeyRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyRequest} message RetrieveLegacySecretKeyRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ RetrieveLegacySecretKeyRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a RetrieveLegacySecretKeyRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest} RetrieveLegacySecretKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ RetrieveLegacySecretKeyRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.key = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a RetrieveLegacySecretKeyRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest} RetrieveLegacySecretKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ RetrieveLegacySecretKeyRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a RetrieveLegacySecretKeyRequest message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ RetrieveLegacySecretKeyRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.key != null && message.hasOwnProperty("key"))
+ if (!$util.isString(message.key))
+ return "key: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a RetrieveLegacySecretKeyRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest} RetrieveLegacySecretKeyRequest
+ */
+ RetrieveLegacySecretKeyRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest();
+ if (object.key != null)
+ message.key = String(object.key);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a RetrieveLegacySecretKeyRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest} message RetrieveLegacySecretKeyRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ RetrieveLegacySecretKeyRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults)
+ object.key = "";
+ if (message.key != null && message.hasOwnProperty("key"))
+ object.key = message.key;
+ return object;
+ };
+
+ /**
+ * Converts this RetrieveLegacySecretKeyRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ RetrieveLegacySecretKeyRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for RetrieveLegacySecretKeyRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ RetrieveLegacySecretKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest";
+ };
+
+ return RetrieveLegacySecretKeyRequest;
+ })();
+
+ v1.GetKeyRequest = (function() {
+
+ /**
+ * Properties of a GetKeyRequest.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IGetKeyRequest
+ * @property {string|null} [name] GetKeyRequest name
+ */
+
+ /**
+ * Constructs a new GetKeyRequest.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a GetKeyRequest.
+ * @implements IGetKeyRequest
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IGetKeyRequest=} [properties] Properties to set
+ */
+ function GetKeyRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * GetKeyRequest name.
+ * @member {string} name
+ * @memberof google.cloud.recaptchaenterprise.v1.GetKeyRequest
+ * @instance
+ */
+ GetKeyRequest.prototype.name = "";
+
+ /**
+ * Creates a new GetKeyRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.GetKeyRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IGetKeyRequest=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.GetKeyRequest} GetKeyRequest instance
+ */
+ GetKeyRequest.create = function create(properties) {
+ return new GetKeyRequest(properties);
+ };
+
+ /**
+ * Encodes the specified GetKeyRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.GetKeyRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.GetKeyRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IGetKeyRequest} message GetKeyRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GetKeyRequest.encode = function encode(message, writer) {
+ 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 GetKeyRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.GetKeyRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.GetKeyRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IGetKeyRequest} message GetKeyRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GetKeyRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a GetKeyRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.GetKeyRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.GetKeyRequest} GetKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GetKeyRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.GetKeyRequest();
+ 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 GetKeyRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.GetKeyRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.GetKeyRequest} GetKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GetKeyRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a GetKeyRequest message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.GetKeyRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ GetKeyRequest.verify = function verify(message) {
+ if (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 GetKeyRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.GetKeyRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.GetKeyRequest} GetKeyRequest
+ */
+ GetKeyRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.GetKeyRequest)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.GetKeyRequest();
+ if (object.name != null)
+ message.name = String(object.name);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a GetKeyRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.GetKeyRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.GetKeyRequest} message GetKeyRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ GetKeyRequest.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 GetKeyRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.GetKeyRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ GetKeyRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for GetKeyRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.GetKeyRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ GetKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.GetKeyRequest";
+ };
+
+ return GetKeyRequest;
+ })();
+
+ v1.UpdateKeyRequest = (function() {
+
+ /**
+ * Properties of an UpdateKeyRequest.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IUpdateKeyRequest
+ * @property {google.cloud.recaptchaenterprise.v1.IKey|null} [key] UpdateKeyRequest key
+ * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateKeyRequest updateMask
+ */
+
+ /**
+ * Constructs a new UpdateKeyRequest.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents an UpdateKeyRequest.
+ * @implements IUpdateKeyRequest
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest=} [properties] Properties to set
+ */
+ function UpdateKeyRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * UpdateKeyRequest key.
+ * @member {google.cloud.recaptchaenterprise.v1.IKey|null|undefined} key
+ * @memberof google.cloud.recaptchaenterprise.v1.UpdateKeyRequest
+ * @instance
+ */
+ UpdateKeyRequest.prototype.key = null;
+
+ /**
+ * UpdateKeyRequest updateMask.
+ * @member {google.protobuf.IFieldMask|null|undefined} updateMask
+ * @memberof google.cloud.recaptchaenterprise.v1.UpdateKeyRequest
+ * @instance
+ */
+ UpdateKeyRequest.prototype.updateMask = null;
+
+ /**
+ * Creates a new UpdateKeyRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.UpdateKeyRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.UpdateKeyRequest} UpdateKeyRequest instance
+ */
+ UpdateKeyRequest.create = function create(properties) {
+ return new UpdateKeyRequest(properties);
+ };
+
+ /**
+ * Encodes the specified UpdateKeyRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.UpdateKeyRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.UpdateKeyRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest} message UpdateKeyRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ UpdateKeyRequest.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.key != null && Object.hasOwnProperty.call(message, "key"))
+ $root.google.cloud.recaptchaenterprise.v1.Key.encode(message.key, 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();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified UpdateKeyRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.UpdateKeyRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.UpdateKeyRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest} message UpdateKeyRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ UpdateKeyRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an UpdateKeyRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.UpdateKeyRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.UpdateKeyRequest} UpdateKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ UpdateKeyRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.UpdateKeyRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.key = $root.google.cloud.recaptchaenterprise.v1.Key.decode(reader, reader.uint32());
+ break;
+ }
+ case 2: {
+ message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an UpdateKeyRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.UpdateKeyRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.UpdateKeyRequest} UpdateKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ UpdateKeyRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an UpdateKeyRequest message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.UpdateKeyRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ UpdateKeyRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.key != null && message.hasOwnProperty("key")) {
+ var error = $root.google.cloud.recaptchaenterprise.v1.Key.verify(message.key);
+ if (error)
+ return "key." + error;
+ }
+ if (message.updateMask != null && message.hasOwnProperty("updateMask")) {
+ var error = $root.google.protobuf.FieldMask.verify(message.updateMask);
+ if (error)
+ return "updateMask." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates an UpdateKeyRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.UpdateKeyRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.UpdateKeyRequest} UpdateKeyRequest
+ */
+ UpdateKeyRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.UpdateKeyRequest)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.UpdateKeyRequest();
+ if (object.key != null) {
+ if (typeof object.key !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.UpdateKeyRequest.key: object expected");
+ message.key = $root.google.cloud.recaptchaenterprise.v1.Key.fromObject(object.key);
+ }
+ if (object.updateMask != null) {
+ if (typeof object.updateMask !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.UpdateKeyRequest.updateMask: object expected");
+ message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an UpdateKeyRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.UpdateKeyRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.UpdateKeyRequest} message UpdateKeyRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ UpdateKeyRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.key = null;
+ object.updateMask = null;
+ }
+ if (message.key != null && message.hasOwnProperty("key"))
+ object.key = $root.google.cloud.recaptchaenterprise.v1.Key.toObject(message.key, options);
+ if (message.updateMask != null && message.hasOwnProperty("updateMask"))
+ object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options);
+ return object;
+ };
+
+ /**
+ * Converts this UpdateKeyRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.UpdateKeyRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ UpdateKeyRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for UpdateKeyRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.UpdateKeyRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ UpdateKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.UpdateKeyRequest";
+ };
+
+ return UpdateKeyRequest;
+ })();
+
+ v1.DeleteKeyRequest = (function() {
+
+ /**
+ * Properties of a DeleteKeyRequest.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IDeleteKeyRequest
+ * @property {string|null} [name] DeleteKeyRequest name
+ */
+
+ /**
+ * Constructs a new DeleteKeyRequest.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a DeleteKeyRequest.
+ * @implements IDeleteKeyRequest
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest=} [properties] Properties to set
+ */
+ function DeleteKeyRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * DeleteKeyRequest name.
+ * @member {string} name
+ * @memberof google.cloud.recaptchaenterprise.v1.DeleteKeyRequest
+ * @instance
+ */
+ DeleteKeyRequest.prototype.name = "";
+
+ /**
+ * Creates a new DeleteKeyRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.DeleteKeyRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.DeleteKeyRequest} DeleteKeyRequest instance
+ */
+ DeleteKeyRequest.create = function create(properties) {
+ return new DeleteKeyRequest(properties);
+ };
+
+ /**
+ * Encodes the specified DeleteKeyRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.DeleteKeyRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.DeleteKeyRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest} message DeleteKeyRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ DeleteKeyRequest.encode = function encode(message, writer) {
+ 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 DeleteKeyRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.DeleteKeyRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.DeleteKeyRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest} message DeleteKeyRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ DeleteKeyRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a DeleteKeyRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.DeleteKeyRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.DeleteKeyRequest} DeleteKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ DeleteKeyRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.DeleteKeyRequest();
+ 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 DeleteKeyRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.DeleteKeyRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.DeleteKeyRequest} DeleteKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ DeleteKeyRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a DeleteKeyRequest message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.DeleteKeyRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ DeleteKeyRequest.verify = function verify(message) {
+ if (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 DeleteKeyRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.DeleteKeyRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.DeleteKeyRequest} DeleteKeyRequest
+ */
+ DeleteKeyRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.DeleteKeyRequest)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.DeleteKeyRequest();
+ if (object.name != null)
+ message.name = String(object.name);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a DeleteKeyRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.DeleteKeyRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.DeleteKeyRequest} message DeleteKeyRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ DeleteKeyRequest.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 DeleteKeyRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.DeleteKeyRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ DeleteKeyRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for DeleteKeyRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.DeleteKeyRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ DeleteKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.DeleteKeyRequest";
+ };
+
+ return DeleteKeyRequest;
+ })();
+
+ v1.MigrateKeyRequest = (function() {
+
+ /**
+ * Properties of a MigrateKeyRequest.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IMigrateKeyRequest
+ * @property {string|null} [name] MigrateKeyRequest name
+ */
+
+ /**
+ * Constructs a new MigrateKeyRequest.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a MigrateKeyRequest.
+ * @implements IMigrateKeyRequest
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest=} [properties] Properties to set
+ */
+ function MigrateKeyRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * MigrateKeyRequest name.
+ * @member {string} name
+ * @memberof google.cloud.recaptchaenterprise.v1.MigrateKeyRequest
+ * @instance
+ */
+ MigrateKeyRequest.prototype.name = "";
+
+ /**
+ * Creates a new MigrateKeyRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.MigrateKeyRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.MigrateKeyRequest} MigrateKeyRequest instance
+ */
+ MigrateKeyRequest.create = function create(properties) {
+ return new MigrateKeyRequest(properties);
+ };
+
+ /**
+ * Encodes the specified MigrateKeyRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.MigrateKeyRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.MigrateKeyRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest} message MigrateKeyRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ MigrateKeyRequest.encode = function encode(message, writer) {
+ 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 MigrateKeyRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.MigrateKeyRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.MigrateKeyRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest} message MigrateKeyRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ MigrateKeyRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a MigrateKeyRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.MigrateKeyRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.MigrateKeyRequest} MigrateKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ MigrateKeyRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.MigrateKeyRequest();
+ 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 MigrateKeyRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.MigrateKeyRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.MigrateKeyRequest} MigrateKeyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ MigrateKeyRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a MigrateKeyRequest message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.MigrateKeyRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ MigrateKeyRequest.verify = function verify(message) {
+ if (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 MigrateKeyRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.MigrateKeyRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.MigrateKeyRequest} MigrateKeyRequest
+ */
+ MigrateKeyRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.MigrateKeyRequest)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.MigrateKeyRequest();
+ if (object.name != null)
+ message.name = String(object.name);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a MigrateKeyRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.MigrateKeyRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.MigrateKeyRequest} message MigrateKeyRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ MigrateKeyRequest.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 MigrateKeyRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.MigrateKeyRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ MigrateKeyRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for MigrateKeyRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.MigrateKeyRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ MigrateKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.MigrateKeyRequest";
+ };
+
+ return MigrateKeyRequest;
+ })();
+
+ v1.GetMetricsRequest = (function() {
+
+ /**
+ * Properties of a GetMetricsRequest.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IGetMetricsRequest
+ * @property {string|null} [name] GetMetricsRequest name
+ */
+
+ /**
+ * Constructs a new GetMetricsRequest.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a GetMetricsRequest.
+ * @implements IGetMetricsRequest
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IGetMetricsRequest=} [properties] Properties to set
+ */
+ function GetMetricsRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * GetMetricsRequest name.
+ * @member {string} name
+ * @memberof google.cloud.recaptchaenterprise.v1.GetMetricsRequest
+ * @instance
+ */
+ GetMetricsRequest.prototype.name = "";
+
+ /**
+ * Creates a new GetMetricsRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.GetMetricsRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IGetMetricsRequest=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.GetMetricsRequest} GetMetricsRequest instance
+ */
+ GetMetricsRequest.create = function create(properties) {
+ return new GetMetricsRequest(properties);
+ };
+
+ /**
+ * Encodes the specified GetMetricsRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.GetMetricsRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.GetMetricsRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IGetMetricsRequest} message GetMetricsRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GetMetricsRequest.encode = function encode(message, writer) {
+ 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 GetMetricsRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.GetMetricsRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.GetMetricsRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IGetMetricsRequest} message GetMetricsRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GetMetricsRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a GetMetricsRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.GetMetricsRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.GetMetricsRequest} GetMetricsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GetMetricsRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.GetMetricsRequest();
+ 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 GetMetricsRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.GetMetricsRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.GetMetricsRequest} GetMetricsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GetMetricsRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a GetMetricsRequest message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.GetMetricsRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ GetMetricsRequest.verify = function verify(message) {
+ if (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 GetMetricsRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.GetMetricsRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.GetMetricsRequest} GetMetricsRequest
+ */
+ GetMetricsRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.GetMetricsRequest)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.GetMetricsRequest();
+ if (object.name != null)
+ message.name = String(object.name);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a GetMetricsRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.GetMetricsRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.GetMetricsRequest} message GetMetricsRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ GetMetricsRequest.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 GetMetricsRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.GetMetricsRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ GetMetricsRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for GetMetricsRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.GetMetricsRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ GetMetricsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.GetMetricsRequest";
+ };
+
+ return GetMetricsRequest;
+ })();
+
+ v1.Metrics = (function() {
+
+ /**
+ * Properties of a Metrics.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IMetrics
+ * @property {string|null} [name] Metrics name
+ * @property {google.protobuf.ITimestamp|null} [startTime] Metrics startTime
+ * @property {Array.|null} [scoreMetrics] Metrics scoreMetrics
+ * @property {Array.|null} [challengeMetrics] Metrics challengeMetrics
+ */
+
+ /**
+ * Constructs a new Metrics.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a Metrics.
+ * @implements IMetrics
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IMetrics=} [properties] Properties to set
+ */
+ function Metrics(properties) {
+ this.scoreMetrics = [];
+ this.challengeMetrics = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * Metrics name.
+ * @member {string} name
+ * @memberof google.cloud.recaptchaenterprise.v1.Metrics
+ * @instance
+ */
+ Metrics.prototype.name = "";
+
+ /**
+ * Metrics startTime.
+ * @member {google.protobuf.ITimestamp|null|undefined} startTime
+ * @memberof google.cloud.recaptchaenterprise.v1.Metrics
+ * @instance
+ */
+ Metrics.prototype.startTime = null;
+
+ /**
+ * Metrics scoreMetrics.
+ * @member {Array.} scoreMetrics
+ * @memberof google.cloud.recaptchaenterprise.v1.Metrics
+ * @instance
+ */
+ Metrics.prototype.scoreMetrics = $util.emptyArray;
+
+ /**
+ * Metrics challengeMetrics.
+ * @member {Array.} challengeMetrics
+ * @memberof google.cloud.recaptchaenterprise.v1.Metrics
+ * @instance
+ */
+ Metrics.prototype.challengeMetrics = $util.emptyArray;
+
+ /**
+ * Creates a new Metrics instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.Metrics
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IMetrics=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.Metrics} Metrics instance
+ */
+ Metrics.create = function create(properties) {
+ return new Metrics(properties);
+ };
+
+ /**
+ * Encodes the specified Metrics message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.Metrics.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.Metrics
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IMetrics} message Metrics message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Metrics.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime"))
+ $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.scoreMetrics != null && message.scoreMetrics.length)
+ for (var i = 0; i < message.scoreMetrics.length; ++i)
+ $root.google.cloud.recaptchaenterprise.v1.ScoreMetrics.encode(message.scoreMetrics[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ if (message.challengeMetrics != null && message.challengeMetrics.length)
+ for (var i = 0; i < message.challengeMetrics.length; ++i)
+ $root.google.cloud.recaptchaenterprise.v1.ChallengeMetrics.encode(message.challengeMetrics[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.name);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified Metrics message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.Metrics.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.Metrics
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IMetrics} message Metrics message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Metrics.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a Metrics message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.Metrics
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.Metrics} Metrics
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Metrics.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.Metrics();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 4: {
+ message.name = reader.string();
+ break;
+ }
+ case 1: {
+ message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
+ break;
+ }
+ case 2: {
+ if (!(message.scoreMetrics && message.scoreMetrics.length))
+ message.scoreMetrics = [];
+ message.scoreMetrics.push($root.google.cloud.recaptchaenterprise.v1.ScoreMetrics.decode(reader, reader.uint32()));
+ break;
+ }
+ case 3: {
+ if (!(message.challengeMetrics && message.challengeMetrics.length))
+ message.challengeMetrics = [];
+ message.challengeMetrics.push($root.google.cloud.recaptchaenterprise.v1.ChallengeMetrics.decode(reader, reader.uint32()));
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a Metrics message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.Metrics
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.Metrics} Metrics
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Metrics.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a Metrics message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.Metrics
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ Metrics.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.startTime != null && message.hasOwnProperty("startTime")) {
+ var error = $root.google.protobuf.Timestamp.verify(message.startTime);
+ if (error)
+ return "startTime." + error;
+ }
+ if (message.scoreMetrics != null && message.hasOwnProperty("scoreMetrics")) {
+ if (!Array.isArray(message.scoreMetrics))
+ return "scoreMetrics: array expected";
+ for (var i = 0; i < message.scoreMetrics.length; ++i) {
+ var error = $root.google.cloud.recaptchaenterprise.v1.ScoreMetrics.verify(message.scoreMetrics[i]);
+ if (error)
+ return "scoreMetrics." + error;
+ }
+ }
+ if (message.challengeMetrics != null && message.hasOwnProperty("challengeMetrics")) {
+ if (!Array.isArray(message.challengeMetrics))
+ return "challengeMetrics: array expected";
+ for (var i = 0; i < message.challengeMetrics.length; ++i) {
+ var error = $root.google.cloud.recaptchaenterprise.v1.ChallengeMetrics.verify(message.challengeMetrics[i]);
+ if (error)
+ return "challengeMetrics." + error;
+ }
+ }
+ return null;
+ };
+
+ /**
+ * Creates a Metrics message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.Metrics
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.Metrics} Metrics
+ */
+ Metrics.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.Metrics)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.Metrics();
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object.startTime != null) {
+ if (typeof object.startTime !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.Metrics.startTime: object expected");
+ message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime);
+ }
+ if (object.scoreMetrics) {
+ if (!Array.isArray(object.scoreMetrics))
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.Metrics.scoreMetrics: array expected");
+ message.scoreMetrics = [];
+ for (var i = 0; i < object.scoreMetrics.length; ++i) {
+ if (typeof object.scoreMetrics[i] !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.Metrics.scoreMetrics: object expected");
+ message.scoreMetrics[i] = $root.google.cloud.recaptchaenterprise.v1.ScoreMetrics.fromObject(object.scoreMetrics[i]);
+ }
+ }
+ if (object.challengeMetrics) {
+ if (!Array.isArray(object.challengeMetrics))
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.Metrics.challengeMetrics: array expected");
+ message.challengeMetrics = [];
+ for (var i = 0; i < object.challengeMetrics.length; ++i) {
+ if (typeof object.challengeMetrics[i] !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.Metrics.challengeMetrics: object expected");
+ message.challengeMetrics[i] = $root.google.cloud.recaptchaenterprise.v1.ChallengeMetrics.fromObject(object.challengeMetrics[i]);
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a Metrics message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.Metrics
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.Metrics} message Metrics
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ Metrics.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults) {
+ object.scoreMetrics = [];
+ object.challengeMetrics = [];
+ }
+ if (options.defaults) {
+ object.startTime = null;
+ object.name = "";
+ }
+ if (message.startTime != null && message.hasOwnProperty("startTime"))
+ object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options);
+ if (message.scoreMetrics && message.scoreMetrics.length) {
+ object.scoreMetrics = [];
+ for (var j = 0; j < message.scoreMetrics.length; ++j)
+ object.scoreMetrics[j] = $root.google.cloud.recaptchaenterprise.v1.ScoreMetrics.toObject(message.scoreMetrics[j], options);
+ }
+ if (message.challengeMetrics && message.challengeMetrics.length) {
+ object.challengeMetrics = [];
+ for (var j = 0; j < message.challengeMetrics.length; ++j)
+ object.challengeMetrics[j] = $root.google.cloud.recaptchaenterprise.v1.ChallengeMetrics.toObject(message.challengeMetrics[j], options);
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ return object;
+ };
+
+ /**
+ * Converts this Metrics to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.Metrics
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ Metrics.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for Metrics
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.Metrics
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ Metrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.Metrics";
+ };
+
+ return Metrics;
+ })();
+
+ v1.RetrieveLegacySecretKeyResponse = (function() {
+
+ /**
+ * Properties of a RetrieveLegacySecretKeyResponse.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IRetrieveLegacySecretKeyResponse
+ * @property {string|null} [legacySecretKey] RetrieveLegacySecretKeyResponse legacySecretKey
+ */
+
+ /**
+ * Constructs a new RetrieveLegacySecretKeyResponse.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a RetrieveLegacySecretKeyResponse.
+ * @implements IRetrieveLegacySecretKeyResponse
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyResponse=} [properties] Properties to set
+ */
+ function RetrieveLegacySecretKeyResponse(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * RetrieveLegacySecretKeyResponse legacySecretKey.
+ * @member {string} legacySecretKey
+ * @memberof google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse
+ * @instance
+ */
+ RetrieveLegacySecretKeyResponse.prototype.legacySecretKey = "";
+
+ /**
+ * Creates a new RetrieveLegacySecretKeyResponse instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyResponse=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse} RetrieveLegacySecretKeyResponse instance
+ */
+ RetrieveLegacySecretKeyResponse.create = function create(properties) {
+ return new RetrieveLegacySecretKeyResponse(properties);
+ };
+
+ /**
+ * Encodes the specified RetrieveLegacySecretKeyResponse message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyResponse} message RetrieveLegacySecretKeyResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ RetrieveLegacySecretKeyResponse.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.legacySecretKey != null && Object.hasOwnProperty.call(message, "legacySecretKey"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.legacySecretKey);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified RetrieveLegacySecretKeyResponse message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyResponse} message RetrieveLegacySecretKeyResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ RetrieveLegacySecretKeyResponse.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a RetrieveLegacySecretKeyResponse message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse} RetrieveLegacySecretKeyResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ RetrieveLegacySecretKeyResponse.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.legacySecretKey = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a RetrieveLegacySecretKeyResponse message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse} RetrieveLegacySecretKeyResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ RetrieveLegacySecretKeyResponse.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a RetrieveLegacySecretKeyResponse message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ RetrieveLegacySecretKeyResponse.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.legacySecretKey != null && message.hasOwnProperty("legacySecretKey"))
+ if (!$util.isString(message.legacySecretKey))
+ return "legacySecretKey: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a RetrieveLegacySecretKeyResponse message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse} RetrieveLegacySecretKeyResponse
+ */
+ RetrieveLegacySecretKeyResponse.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse();
+ if (object.legacySecretKey != null)
+ message.legacySecretKey = String(object.legacySecretKey);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a RetrieveLegacySecretKeyResponse message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse} message RetrieveLegacySecretKeyResponse
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ RetrieveLegacySecretKeyResponse.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults)
+ object.legacySecretKey = "";
+ if (message.legacySecretKey != null && message.hasOwnProperty("legacySecretKey"))
+ object.legacySecretKey = message.legacySecretKey;
+ return object;
+ };
+
+ /**
+ * Converts this RetrieveLegacySecretKeyResponse to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ RetrieveLegacySecretKeyResponse.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for RetrieveLegacySecretKeyResponse
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ RetrieveLegacySecretKeyResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse";
+ };
+
+ return RetrieveLegacySecretKeyResponse;
+ })();
+
+ v1.Key = (function() {
+
+ /**
+ * Properties of a Key.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IKey
+ * @property {string|null} [name] Key name
+ * @property {string|null} [displayName] Key displayName
+ * @property {google.cloud.recaptchaenterprise.v1.IWebKeySettings|null} [webSettings] Key webSettings
+ * @property {google.cloud.recaptchaenterprise.v1.IAndroidKeySettings|null} [androidSettings] Key androidSettings
+ * @property {google.cloud.recaptchaenterprise.v1.IIOSKeySettings|null} [iosSettings] Key iosSettings
+ * @property {Object.|null} [labels] Key labels
+ * @property {google.protobuf.ITimestamp|null} [createTime] Key createTime
+ * @property {google.cloud.recaptchaenterprise.v1.ITestingOptions|null} [testingOptions] Key testingOptions
+ * @property {google.cloud.recaptchaenterprise.v1.IWafSettings|null} [wafSettings] Key wafSettings
+ */
+
+ /**
+ * Constructs a new Key.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a Key.
+ * @implements IKey
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IKey=} [properties] Properties to set
+ */
+ function Key(properties) {
+ this.labels = {};
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * Key name.
+ * @member {string} name
+ * @memberof google.cloud.recaptchaenterprise.v1.Key
+ * @instance
+ */
+ Key.prototype.name = "";
+
+ /**
+ * Key displayName.
+ * @member {string} displayName
+ * @memberof google.cloud.recaptchaenterprise.v1.Key
+ * @instance
+ */
+ Key.prototype.displayName = "";
+
+ /**
+ * Key webSettings.
+ * @member {google.cloud.recaptchaenterprise.v1.IWebKeySettings|null|undefined} webSettings
+ * @memberof google.cloud.recaptchaenterprise.v1.Key
+ * @instance
+ */
+ Key.prototype.webSettings = null;
+
+ /**
+ * Key androidSettings.
+ * @member {google.cloud.recaptchaenterprise.v1.IAndroidKeySettings|null|undefined} androidSettings
+ * @memberof google.cloud.recaptchaenterprise.v1.Key
+ * @instance
+ */
+ Key.prototype.androidSettings = null;
+
+ /**
+ * Key iosSettings.
+ * @member {google.cloud.recaptchaenterprise.v1.IIOSKeySettings|null|undefined} iosSettings
+ * @memberof google.cloud.recaptchaenterprise.v1.Key
+ * @instance
+ */
+ Key.prototype.iosSettings = null;
+
+ /**
+ * Key labels.
+ * @member {Object.} labels
+ * @memberof google.cloud.recaptchaenterprise.v1.Key
+ * @instance
+ */
+ Key.prototype.labels = $util.emptyObject;
+
+ /**
+ * Key createTime.
+ * @member {google.protobuf.ITimestamp|null|undefined} createTime
+ * @memberof google.cloud.recaptchaenterprise.v1.Key
+ * @instance
+ */
+ Key.prototype.createTime = null;
+
+ /**
+ * Key testingOptions.
+ * @member {google.cloud.recaptchaenterprise.v1.ITestingOptions|null|undefined} testingOptions
+ * @memberof google.cloud.recaptchaenterprise.v1.Key
+ * @instance
+ */
+ Key.prototype.testingOptions = null;
+
+ /**
+ * Key wafSettings.
+ * @member {google.cloud.recaptchaenterprise.v1.IWafSettings|null|undefined} wafSettings
+ * @memberof google.cloud.recaptchaenterprise.v1.Key
+ * @instance
+ */
+ Key.prototype.wafSettings = null;
+
+ // OneOf field names bound to virtual getters and setters
+ var $oneOfFields;
+
+ /**
+ * Key platformSettings.
+ * @member {"webSettings"|"androidSettings"|"iosSettings"|undefined} platformSettings
+ * @memberof google.cloud.recaptchaenterprise.v1.Key
+ * @instance
+ */
+ Object.defineProperty(Key.prototype, "platformSettings", {
+ get: $util.oneOfGetter($oneOfFields = ["webSettings", "androidSettings", "iosSettings"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * Creates a new Key instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.Key
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IKey=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.Key} Key instance
+ */
+ Key.create = function create(properties) {
+ return new Key(properties);
+ };
+
+ /**
+ * Encodes the specified Key message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.Key.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.Key
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IKey} message Key message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Key.encode = function encode(message, writer) {
+ if (!writer)
+ 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.webSettings != null && Object.hasOwnProperty.call(message, "webSettings"))
+ $root.google.cloud.recaptchaenterprise.v1.WebKeySettings.encode(message.webSettings, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ if (message.androidSettings != null && Object.hasOwnProperty.call(message, "androidSettings"))
+ $root.google.cloud.recaptchaenterprise.v1.AndroidKeySettings.encode(message.androidSettings, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
+ if (message.iosSettings != null && Object.hasOwnProperty.call(message, "iosSettings"))
+ $root.google.cloud.recaptchaenterprise.v1.IOSKeySettings.encode(message.iosSettings, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
+ if (message.labels != null && Object.hasOwnProperty.call(message, "labels"))
+ for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i)
+ writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim();
+ if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime"))
+ $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
+ if (message.testingOptions != null && Object.hasOwnProperty.call(message, "testingOptions"))
+ $root.google.cloud.recaptchaenterprise.v1.TestingOptions.encode(message.testingOptions, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
+ if (message.wafSettings != null && Object.hasOwnProperty.call(message, "wafSettings"))
+ $root.google.cloud.recaptchaenterprise.v1.WafSettings.encode(message.wafSettings, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified Key message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.Key.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.Key
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IKey} message Key message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Key.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a Key message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.Key
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.Key} Key
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Key.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.Key(), key, value;
+ 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.webSettings = $root.google.cloud.recaptchaenterprise.v1.WebKeySettings.decode(reader, reader.uint32());
+ break;
+ }
+ case 4: {
+ message.androidSettings = $root.google.cloud.recaptchaenterprise.v1.AndroidKeySettings.decode(reader, reader.uint32());
+ break;
+ }
+ case 5: {
+ message.iosSettings = $root.google.cloud.recaptchaenterprise.v1.IOSKeySettings.decode(reader, reader.uint32());
+ break;
+ }
+ case 6: {
+ if (message.labels === $util.emptyObject)
+ message.labels = {};
+ var end2 = reader.uint32() + reader.pos;
+ key = "";
+ value = "";
+ while (reader.pos < end2) {
+ var tag2 = reader.uint32();
+ switch (tag2 >>> 3) {
+ case 1:
+ key = reader.string();
+ break;
+ case 2:
+ value = reader.string();
+ break;
+ default:
+ reader.skipType(tag2 & 7);
+ break;
+ }
+ }
+ message.labels[key] = value;
+ break;
+ }
+ case 7: {
+ message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
+ break;
+ }
+ case 9: {
+ message.testingOptions = $root.google.cloud.recaptchaenterprise.v1.TestingOptions.decode(reader, reader.uint32());
+ break;
+ }
+ case 10: {
+ message.wafSettings = $root.google.cloud.recaptchaenterprise.v1.WafSettings.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a Key message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.Key
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.Key} Key
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Key.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a Key message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.Key
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ Key.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ var properties = {};
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.displayName != null && message.hasOwnProperty("displayName"))
+ if (!$util.isString(message.displayName))
+ return "displayName: string expected";
+ if (message.webSettings != null && message.hasOwnProperty("webSettings")) {
+ properties.platformSettings = 1;
+ {
+ var error = $root.google.cloud.recaptchaenterprise.v1.WebKeySettings.verify(message.webSettings);
+ if (error)
+ return "webSettings." + error;
+ }
+ }
+ if (message.androidSettings != null && message.hasOwnProperty("androidSettings")) {
+ if (properties.platformSettings === 1)
+ return "platformSettings: multiple values";
+ properties.platformSettings = 1;
+ {
+ var error = $root.google.cloud.recaptchaenterprise.v1.AndroidKeySettings.verify(message.androidSettings);
+ if (error)
+ return "androidSettings." + error;
+ }
+ }
+ if (message.iosSettings != null && message.hasOwnProperty("iosSettings")) {
+ if (properties.platformSettings === 1)
+ return "platformSettings: multiple values";
+ properties.platformSettings = 1;
+ {
+ var error = $root.google.cloud.recaptchaenterprise.v1.IOSKeySettings.verify(message.iosSettings);
+ if (error)
+ return "iosSettings." + error;
+ }
+ }
+ if (message.labels != null && message.hasOwnProperty("labels")) {
+ if (!$util.isObject(message.labels))
+ return "labels: object expected";
+ var key = Object.keys(message.labels);
+ for (var i = 0; i < key.length; ++i)
+ if (!$util.isString(message.labels[key[i]]))
+ return "labels: string{k:string} expected";
+ }
+ if (message.createTime != null && message.hasOwnProperty("createTime")) {
+ var error = $root.google.protobuf.Timestamp.verify(message.createTime);
+ if (error)
+ return "createTime." + error;
+ }
+ if (message.testingOptions != null && message.hasOwnProperty("testingOptions")) {
+ var error = $root.google.cloud.recaptchaenterprise.v1.TestingOptions.verify(message.testingOptions);
+ if (error)
+ return "testingOptions." + error;
+ }
+ if (message.wafSettings != null && message.hasOwnProperty("wafSettings")) {
+ var error = $root.google.cloud.recaptchaenterprise.v1.WafSettings.verify(message.wafSettings);
+ if (error)
+ return "wafSettings." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a Key message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.Key
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.Key} Key
+ */
+ Key.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.Key)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.Key();
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object.displayName != null)
+ message.displayName = String(object.displayName);
+ if (object.webSettings != null) {
+ if (typeof object.webSettings !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.Key.webSettings: object expected");
+ message.webSettings = $root.google.cloud.recaptchaenterprise.v1.WebKeySettings.fromObject(object.webSettings);
+ }
+ if (object.androidSettings != null) {
+ if (typeof object.androidSettings !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.Key.androidSettings: object expected");
+ message.androidSettings = $root.google.cloud.recaptchaenterprise.v1.AndroidKeySettings.fromObject(object.androidSettings);
+ }
+ if (object.iosSettings != null) {
+ if (typeof object.iosSettings !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.Key.iosSettings: object expected");
+ message.iosSettings = $root.google.cloud.recaptchaenterprise.v1.IOSKeySettings.fromObject(object.iosSettings);
+ }
+ if (object.labels) {
+ if (typeof object.labels !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.Key.labels: object expected");
+ message.labels = {};
+ for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i)
+ message.labels[keys[i]] = String(object.labels[keys[i]]);
+ }
+ if (object.createTime != null) {
+ if (typeof object.createTime !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.Key.createTime: object expected");
+ message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime);
+ }
+ if (object.testingOptions != null) {
+ if (typeof object.testingOptions !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.Key.testingOptions: object expected");
+ message.testingOptions = $root.google.cloud.recaptchaenterprise.v1.TestingOptions.fromObject(object.testingOptions);
+ }
+ if (object.wafSettings != null) {
+ if (typeof object.wafSettings !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.Key.wafSettings: object expected");
+ message.wafSettings = $root.google.cloud.recaptchaenterprise.v1.WafSettings.fromObject(object.wafSettings);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a Key message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.Key
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.Key} message Key
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ Key.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.objects || options.defaults)
+ object.labels = {};
+ if (options.defaults) {
+ object.name = "";
+ object.displayName = "";
+ object.createTime = null;
+ object.testingOptions = null;
+ object.wafSettings = 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.webSettings != null && message.hasOwnProperty("webSettings")) {
+ object.webSettings = $root.google.cloud.recaptchaenterprise.v1.WebKeySettings.toObject(message.webSettings, options);
+ if (options.oneofs)
+ object.platformSettings = "webSettings";
+ }
+ if (message.androidSettings != null && message.hasOwnProperty("androidSettings")) {
+ object.androidSettings = $root.google.cloud.recaptchaenterprise.v1.AndroidKeySettings.toObject(message.androidSettings, options);
+ if (options.oneofs)
+ object.platformSettings = "androidSettings";
+ }
+ if (message.iosSettings != null && message.hasOwnProperty("iosSettings")) {
+ object.iosSettings = $root.google.cloud.recaptchaenterprise.v1.IOSKeySettings.toObject(message.iosSettings, options);
+ if (options.oneofs)
+ object.platformSettings = "iosSettings";
+ }
+ var keys2;
+ if (message.labels && (keys2 = Object.keys(message.labels)).length) {
+ object.labels = {};
+ for (var j = 0; j < keys2.length; ++j)
+ object.labels[keys2[j]] = message.labels[keys2[j]];
+ }
+ if (message.createTime != null && message.hasOwnProperty("createTime"))
+ object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options);
+ if (message.testingOptions != null && message.hasOwnProperty("testingOptions"))
+ object.testingOptions = $root.google.cloud.recaptchaenterprise.v1.TestingOptions.toObject(message.testingOptions, options);
+ if (message.wafSettings != null && message.hasOwnProperty("wafSettings"))
+ object.wafSettings = $root.google.cloud.recaptchaenterprise.v1.WafSettings.toObject(message.wafSettings, options);
+ return object;
+ };
+
+ /**
+ * Converts this Key to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.Key
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ Key.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for Key
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.Key
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ Key.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.Key";
+ };
+
+ return Key;
+ })();
+
+ v1.TestingOptions = (function() {
+
+ /**
+ * Properties of a TestingOptions.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface ITestingOptions
+ * @property {number|null} [testingScore] TestingOptions testingScore
+ * @property {google.cloud.recaptchaenterprise.v1.TestingOptions.TestingChallenge|null} [testingChallenge] TestingOptions testingChallenge
+ */
+
+ /**
+ * Constructs a new TestingOptions.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a TestingOptions.
+ * @implements ITestingOptions
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.ITestingOptions=} [properties] Properties to set
+ */
+ function TestingOptions(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * TestingOptions testingScore.
+ * @member {number} testingScore
+ * @memberof google.cloud.recaptchaenterprise.v1.TestingOptions
+ * @instance
+ */
+ TestingOptions.prototype.testingScore = 0;
+
+ /**
+ * TestingOptions testingChallenge.
+ * @member {google.cloud.recaptchaenterprise.v1.TestingOptions.TestingChallenge} testingChallenge
+ * @memberof google.cloud.recaptchaenterprise.v1.TestingOptions
+ * @instance
+ */
+ TestingOptions.prototype.testingChallenge = 0;
+
+ /**
+ * Creates a new TestingOptions instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.TestingOptions
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.ITestingOptions=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.TestingOptions} TestingOptions instance
+ */
+ TestingOptions.create = function create(properties) {
+ return new TestingOptions(properties);
+ };
+
+ /**
+ * Encodes the specified TestingOptions message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.TestingOptions.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.TestingOptions
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.ITestingOptions} message TestingOptions message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ TestingOptions.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.testingScore != null && Object.hasOwnProperty.call(message, "testingScore"))
+ writer.uint32(/* id 1, wireType 5 =*/13).float(message.testingScore);
+ if (message.testingChallenge != null && Object.hasOwnProperty.call(message, "testingChallenge"))
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.testingChallenge);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified TestingOptions message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.TestingOptions.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.TestingOptions
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.ITestingOptions} message TestingOptions message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ TestingOptions.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a TestingOptions message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.TestingOptions
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.TestingOptions} TestingOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ TestingOptions.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.TestingOptions();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.testingScore = reader.float();
+ break;
+ }
+ case 2: {
+ message.testingChallenge = reader.int32();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a TestingOptions message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.TestingOptions
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.TestingOptions} TestingOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ TestingOptions.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a TestingOptions message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.TestingOptions
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ TestingOptions.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.testingScore != null && message.hasOwnProperty("testingScore"))
+ if (typeof message.testingScore !== "number")
+ return "testingScore: number expected";
+ if (message.testingChallenge != null && message.hasOwnProperty("testingChallenge"))
+ switch (message.testingChallenge) {
+ default:
+ return "testingChallenge: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ break;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a TestingOptions message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.TestingOptions
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.TestingOptions} TestingOptions
+ */
+ TestingOptions.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.TestingOptions)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.TestingOptions();
+ if (object.testingScore != null)
+ message.testingScore = Number(object.testingScore);
+ switch (object.testingChallenge) {
+ default:
+ if (typeof object.testingChallenge === "number") {
+ message.testingChallenge = object.testingChallenge;
+ break;
+ }
+ break;
+ case "TESTING_CHALLENGE_UNSPECIFIED":
+ case 0:
+ message.testingChallenge = 0;
+ break;
+ case "NOCAPTCHA":
+ case 1:
+ message.testingChallenge = 1;
+ break;
+ case "UNSOLVABLE_CHALLENGE":
+ case 2:
+ message.testingChallenge = 2;
+ break;
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a TestingOptions message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.TestingOptions
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.TestingOptions} message TestingOptions
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ TestingOptions.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.testingScore = 0;
+ object.testingChallenge = options.enums === String ? "TESTING_CHALLENGE_UNSPECIFIED" : 0;
+ }
+ if (message.testingScore != null && message.hasOwnProperty("testingScore"))
+ object.testingScore = options.json && !isFinite(message.testingScore) ? String(message.testingScore) : message.testingScore;
+ if (message.testingChallenge != null && message.hasOwnProperty("testingChallenge"))
+ object.testingChallenge = options.enums === String ? $root.google.cloud.recaptchaenterprise.v1.TestingOptions.TestingChallenge[message.testingChallenge] === undefined ? message.testingChallenge : $root.google.cloud.recaptchaenterprise.v1.TestingOptions.TestingChallenge[message.testingChallenge] : message.testingChallenge;
+ return object;
+ };
+
+ /**
+ * Converts this TestingOptions to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.TestingOptions
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ TestingOptions.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for TestingOptions
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.TestingOptions
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ TestingOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.TestingOptions";
+ };
+
+ /**
+ * TestingChallenge enum.
+ * @name google.cloud.recaptchaenterprise.v1.TestingOptions.TestingChallenge
+ * @enum {number}
+ * @property {number} TESTING_CHALLENGE_UNSPECIFIED=0 TESTING_CHALLENGE_UNSPECIFIED value
+ * @property {number} NOCAPTCHA=1 NOCAPTCHA value
+ * @property {number} UNSOLVABLE_CHALLENGE=2 UNSOLVABLE_CHALLENGE value
+ */
+ TestingOptions.TestingChallenge = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "TESTING_CHALLENGE_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "NOCAPTCHA"] = 1;
+ values[valuesById[2] = "UNSOLVABLE_CHALLENGE"] = 2;
+ return values;
+ })();
+
+ return TestingOptions;
+ })();
+
+ v1.WebKeySettings = (function() {
+
+ /**
+ * Properties of a WebKeySettings.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IWebKeySettings
+ * @property {boolean|null} [allowAllDomains] WebKeySettings allowAllDomains
+ * @property {Array.|null} [allowedDomains] WebKeySettings allowedDomains
+ * @property {boolean|null} [allowAmpTraffic] WebKeySettings allowAmpTraffic
+ * @property {google.cloud.recaptchaenterprise.v1.WebKeySettings.IntegrationType|null} [integrationType] WebKeySettings integrationType
+ * @property {google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference|null} [challengeSecurityPreference] WebKeySettings challengeSecurityPreference
+ */
+
+ /**
+ * Constructs a new WebKeySettings.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a WebKeySettings.
+ * @implements IWebKeySettings
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IWebKeySettings=} [properties] Properties to set
+ */
+ function WebKeySettings(properties) {
+ this.allowedDomains = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * WebKeySettings allowAllDomains.
+ * @member {boolean} allowAllDomains
+ * @memberof google.cloud.recaptchaenterprise.v1.WebKeySettings
+ * @instance
+ */
+ WebKeySettings.prototype.allowAllDomains = false;
+
+ /**
+ * WebKeySettings allowedDomains.
+ * @member {Array.} allowedDomains
+ * @memberof google.cloud.recaptchaenterprise.v1.WebKeySettings
+ * @instance
+ */
+ WebKeySettings.prototype.allowedDomains = $util.emptyArray;
+
+ /**
+ * WebKeySettings allowAmpTraffic.
+ * @member {boolean} allowAmpTraffic
+ * @memberof google.cloud.recaptchaenterprise.v1.WebKeySettings
+ * @instance
+ */
+ WebKeySettings.prototype.allowAmpTraffic = false;
+
+ /**
+ * WebKeySettings integrationType.
+ * @member {google.cloud.recaptchaenterprise.v1.WebKeySettings.IntegrationType} integrationType
+ * @memberof google.cloud.recaptchaenterprise.v1.WebKeySettings
+ * @instance
+ */
+ WebKeySettings.prototype.integrationType = 0;
+
+ /**
+ * WebKeySettings challengeSecurityPreference.
+ * @member {google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference} challengeSecurityPreference
+ * @memberof google.cloud.recaptchaenterprise.v1.WebKeySettings
+ * @instance
+ */
+ WebKeySettings.prototype.challengeSecurityPreference = 0;
+
+ /**
+ * Creates a new WebKeySettings instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.WebKeySettings
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IWebKeySettings=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.WebKeySettings} WebKeySettings instance
+ */
+ WebKeySettings.create = function create(properties) {
+ return new WebKeySettings(properties);
+ };
+
+ /**
+ * Encodes the specified WebKeySettings message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.WebKeySettings.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.WebKeySettings
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IWebKeySettings} message WebKeySettings message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ WebKeySettings.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.allowedDomains != null && message.allowedDomains.length)
+ for (var i = 0; i < message.allowedDomains.length; ++i)
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.allowedDomains[i]);
+ if (message.allowAmpTraffic != null && Object.hasOwnProperty.call(message, "allowAmpTraffic"))
+ writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAmpTraffic);
+ if (message.allowAllDomains != null && Object.hasOwnProperty.call(message, "allowAllDomains"))
+ writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowAllDomains);
+ if (message.integrationType != null && Object.hasOwnProperty.call(message, "integrationType"))
+ writer.uint32(/* id 4, wireType 0 =*/32).int32(message.integrationType);
+ if (message.challengeSecurityPreference != null && Object.hasOwnProperty.call(message, "challengeSecurityPreference"))
+ writer.uint32(/* id 5, wireType 0 =*/40).int32(message.challengeSecurityPreference);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified WebKeySettings message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.WebKeySettings.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.WebKeySettings
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IWebKeySettings} message WebKeySettings message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ WebKeySettings.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a WebKeySettings message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.WebKeySettings
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.WebKeySettings} WebKeySettings
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ WebKeySettings.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.WebKeySettings();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 3: {
+ message.allowAllDomains = reader.bool();
+ break;
+ }
+ case 1: {
+ if (!(message.allowedDomains && message.allowedDomains.length))
+ message.allowedDomains = [];
+ message.allowedDomains.push(reader.string());
+ break;
+ }
+ case 2: {
+ message.allowAmpTraffic = reader.bool();
+ break;
+ }
+ case 4: {
+ message.integrationType = reader.int32();
+ break;
+ }
+ case 5: {
+ message.challengeSecurityPreference = reader.int32();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a WebKeySettings message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.WebKeySettings
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.WebKeySettings} WebKeySettings
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ WebKeySettings.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a WebKeySettings message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.WebKeySettings
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ WebKeySettings.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.allowAllDomains != null && message.hasOwnProperty("allowAllDomains"))
+ if (typeof message.allowAllDomains !== "boolean")
+ return "allowAllDomains: boolean expected";
+ if (message.allowedDomains != null && message.hasOwnProperty("allowedDomains")) {
+ if (!Array.isArray(message.allowedDomains))
+ return "allowedDomains: array expected";
+ for (var i = 0; i < message.allowedDomains.length; ++i)
+ if (!$util.isString(message.allowedDomains[i]))
+ return "allowedDomains: string[] expected";
+ }
+ if (message.allowAmpTraffic != null && message.hasOwnProperty("allowAmpTraffic"))
+ if (typeof message.allowAmpTraffic !== "boolean")
+ return "allowAmpTraffic: boolean expected";
+ if (message.integrationType != null && message.hasOwnProperty("integrationType"))
+ switch (message.integrationType) {
+ default:
+ return "integrationType: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ break;
+ }
+ if (message.challengeSecurityPreference != null && message.hasOwnProperty("challengeSecurityPreference"))
+ switch (message.challengeSecurityPreference) {
+ default:
+ return "challengeSecurityPreference: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ break;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a WebKeySettings message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.WebKeySettings
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.WebKeySettings} WebKeySettings
+ */
+ WebKeySettings.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.WebKeySettings)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.WebKeySettings();
+ if (object.allowAllDomains != null)
+ message.allowAllDomains = Boolean(object.allowAllDomains);
+ if (object.allowedDomains) {
+ if (!Array.isArray(object.allowedDomains))
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.WebKeySettings.allowedDomains: array expected");
+ message.allowedDomains = [];
+ for (var i = 0; i < object.allowedDomains.length; ++i)
+ message.allowedDomains[i] = String(object.allowedDomains[i]);
+ }
+ if (object.allowAmpTraffic != null)
+ message.allowAmpTraffic = Boolean(object.allowAmpTraffic);
+ switch (object.integrationType) {
+ default:
+ if (typeof object.integrationType === "number") {
+ message.integrationType = object.integrationType;
+ break;
+ }
+ break;
+ case "INTEGRATION_TYPE_UNSPECIFIED":
+ case 0:
+ message.integrationType = 0;
+ break;
+ case "SCORE":
+ case 1:
+ message.integrationType = 1;
+ break;
+ case "CHECKBOX":
+ case 2:
+ message.integrationType = 2;
+ break;
+ case "INVISIBLE":
+ case 3:
+ message.integrationType = 3;
+ break;
+ }
+ switch (object.challengeSecurityPreference) {
+ default:
+ if (typeof object.challengeSecurityPreference === "number") {
+ message.challengeSecurityPreference = object.challengeSecurityPreference;
+ break;
+ }
+ break;
+ case "CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED":
+ case 0:
+ message.challengeSecurityPreference = 0;
+ break;
+ case "USABILITY":
+ case 1:
+ message.challengeSecurityPreference = 1;
+ break;
+ case "BALANCE":
+ case 2:
+ message.challengeSecurityPreference = 2;
+ break;
+ case "SECURITY":
+ case 3:
+ message.challengeSecurityPreference = 3;
+ break;
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a WebKeySettings message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.WebKeySettings
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.WebKeySettings} message WebKeySettings
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ WebKeySettings.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.allowedDomains = [];
+ if (options.defaults) {
+ object.allowAmpTraffic = false;
+ object.allowAllDomains = false;
+ object.integrationType = options.enums === String ? "INTEGRATION_TYPE_UNSPECIFIED" : 0;
+ object.challengeSecurityPreference = options.enums === String ? "CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED" : 0;
+ }
+ if (message.allowedDomains && message.allowedDomains.length) {
+ object.allowedDomains = [];
+ for (var j = 0; j < message.allowedDomains.length; ++j)
+ object.allowedDomains[j] = message.allowedDomains[j];
+ }
+ if (message.allowAmpTraffic != null && message.hasOwnProperty("allowAmpTraffic"))
+ object.allowAmpTraffic = message.allowAmpTraffic;
+ if (message.allowAllDomains != null && message.hasOwnProperty("allowAllDomains"))
+ object.allowAllDomains = message.allowAllDomains;
+ if (message.integrationType != null && message.hasOwnProperty("integrationType"))
+ object.integrationType = options.enums === String ? $root.google.cloud.recaptchaenterprise.v1.WebKeySettings.IntegrationType[message.integrationType] === undefined ? message.integrationType : $root.google.cloud.recaptchaenterprise.v1.WebKeySettings.IntegrationType[message.integrationType] : message.integrationType;
+ if (message.challengeSecurityPreference != null && message.hasOwnProperty("challengeSecurityPreference"))
+ object.challengeSecurityPreference = options.enums === String ? $root.google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference[message.challengeSecurityPreference] === undefined ? message.challengeSecurityPreference : $root.google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference[message.challengeSecurityPreference] : message.challengeSecurityPreference;
+ return object;
+ };
+
+ /**
+ * Converts this WebKeySettings to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.WebKeySettings
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ WebKeySettings.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for WebKeySettings
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.WebKeySettings
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ WebKeySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.WebKeySettings";
+ };
+
+ /**
+ * IntegrationType enum.
+ * @name google.cloud.recaptchaenterprise.v1.WebKeySettings.IntegrationType
+ * @enum {number}
+ * @property {number} INTEGRATION_TYPE_UNSPECIFIED=0 INTEGRATION_TYPE_UNSPECIFIED value
+ * @property {number} SCORE=1 SCORE value
+ * @property {number} CHECKBOX=2 CHECKBOX value
+ * @property {number} INVISIBLE=3 INVISIBLE value
+ */
+ WebKeySettings.IntegrationType = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "INTEGRATION_TYPE_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "SCORE"] = 1;
+ values[valuesById[2] = "CHECKBOX"] = 2;
+ values[valuesById[3] = "INVISIBLE"] = 3;
+ return values;
+ })();
+
+ /**
+ * ChallengeSecurityPreference enum.
+ * @name google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference
+ * @enum {number}
+ * @property {number} CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED=0 CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED value
+ * @property {number} USABILITY=1 USABILITY value
+ * @property {number} BALANCE=2 BALANCE value
+ * @property {number} SECURITY=3 SECURITY value
+ */
+ WebKeySettings.ChallengeSecurityPreference = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "USABILITY"] = 1;
+ values[valuesById[2] = "BALANCE"] = 2;
+ values[valuesById[3] = "SECURITY"] = 3;
+ return values;
+ })();
+
+ return WebKeySettings;
+ })();
+
+ v1.AndroidKeySettings = (function() {
+
+ /**
+ * Properties of an AndroidKeySettings.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IAndroidKeySettings
+ * @property {boolean|null} [allowAllPackageNames] AndroidKeySettings allowAllPackageNames
+ * @property {Array.|null} [allowedPackageNames] AndroidKeySettings allowedPackageNames
+ */
+
+ /**
+ * Constructs a new AndroidKeySettings.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents an AndroidKeySettings.
+ * @implements IAndroidKeySettings
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IAndroidKeySettings=} [properties] Properties to set
+ */
+ function AndroidKeySettings(properties) {
+ this.allowedPackageNames = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * AndroidKeySettings allowAllPackageNames.
+ * @member {boolean} allowAllPackageNames
+ * @memberof google.cloud.recaptchaenterprise.v1.AndroidKeySettings
+ * @instance
+ */
+ AndroidKeySettings.prototype.allowAllPackageNames = false;
+
+ /**
+ * AndroidKeySettings allowedPackageNames.
+ * @member {Array.} allowedPackageNames
+ * @memberof google.cloud.recaptchaenterprise.v1.AndroidKeySettings
+ * @instance
+ */
+ AndroidKeySettings.prototype.allowedPackageNames = $util.emptyArray;
+
+ /**
+ * Creates a new AndroidKeySettings instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.AndroidKeySettings
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IAndroidKeySettings=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.AndroidKeySettings} AndroidKeySettings instance
+ */
+ AndroidKeySettings.create = function create(properties) {
+ return new AndroidKeySettings(properties);
+ };
+
+ /**
+ * Encodes the specified AndroidKeySettings message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.AndroidKeySettings.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.AndroidKeySettings
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IAndroidKeySettings} message AndroidKeySettings message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ AndroidKeySettings.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.allowedPackageNames != null && message.allowedPackageNames.length)
+ for (var i = 0; i < message.allowedPackageNames.length; ++i)
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.allowedPackageNames[i]);
+ if (message.allowAllPackageNames != null && Object.hasOwnProperty.call(message, "allowAllPackageNames"))
+ writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAllPackageNames);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified AndroidKeySettings message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.AndroidKeySettings.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.AndroidKeySettings
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IAndroidKeySettings} message AndroidKeySettings message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ AndroidKeySettings.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an AndroidKeySettings message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.AndroidKeySettings
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.AndroidKeySettings} AndroidKeySettings
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ AndroidKeySettings.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.AndroidKeySettings();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 2: {
+ message.allowAllPackageNames = reader.bool();
+ break;
+ }
+ case 1: {
+ if (!(message.allowedPackageNames && message.allowedPackageNames.length))
+ message.allowedPackageNames = [];
+ message.allowedPackageNames.push(reader.string());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an AndroidKeySettings message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.AndroidKeySettings
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.AndroidKeySettings} AndroidKeySettings
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ AndroidKeySettings.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an AndroidKeySettings message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.AndroidKeySettings
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ AndroidKeySettings.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.allowAllPackageNames != null && message.hasOwnProperty("allowAllPackageNames"))
+ if (typeof message.allowAllPackageNames !== "boolean")
+ return "allowAllPackageNames: boolean expected";
+ if (message.allowedPackageNames != null && message.hasOwnProperty("allowedPackageNames")) {
+ if (!Array.isArray(message.allowedPackageNames))
+ return "allowedPackageNames: array expected";
+ for (var i = 0; i < message.allowedPackageNames.length; ++i)
+ if (!$util.isString(message.allowedPackageNames[i]))
+ return "allowedPackageNames: string[] expected";
+ }
+ return null;
+ };
+
+ /**
+ * Creates an AndroidKeySettings message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.AndroidKeySettings
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.AndroidKeySettings} AndroidKeySettings
+ */
+ AndroidKeySettings.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.AndroidKeySettings)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.AndroidKeySettings();
+ if (object.allowAllPackageNames != null)
+ message.allowAllPackageNames = Boolean(object.allowAllPackageNames);
+ if (object.allowedPackageNames) {
+ if (!Array.isArray(object.allowedPackageNames))
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.AndroidKeySettings.allowedPackageNames: array expected");
+ message.allowedPackageNames = [];
+ for (var i = 0; i < object.allowedPackageNames.length; ++i)
+ message.allowedPackageNames[i] = String(object.allowedPackageNames[i]);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an AndroidKeySettings message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.AndroidKeySettings
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.AndroidKeySettings} message AndroidKeySettings
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ AndroidKeySettings.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.allowedPackageNames = [];
+ if (options.defaults)
+ object.allowAllPackageNames = false;
+ if (message.allowedPackageNames && message.allowedPackageNames.length) {
+ object.allowedPackageNames = [];
+ for (var j = 0; j < message.allowedPackageNames.length; ++j)
+ object.allowedPackageNames[j] = message.allowedPackageNames[j];
+ }
+ if (message.allowAllPackageNames != null && message.hasOwnProperty("allowAllPackageNames"))
+ object.allowAllPackageNames = message.allowAllPackageNames;
+ return object;
+ };
+
+ /**
+ * Converts this AndroidKeySettings to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.AndroidKeySettings
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ AndroidKeySettings.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for AndroidKeySettings
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.AndroidKeySettings
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ AndroidKeySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.AndroidKeySettings";
+ };
+
+ return AndroidKeySettings;
+ })();
+
+ v1.IOSKeySettings = (function() {
+
+ /**
+ * Properties of a IOSKeySettings.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IIOSKeySettings
+ * @property {boolean|null} [allowAllBundleIds] IOSKeySettings allowAllBundleIds
+ * @property {Array.|null} [allowedBundleIds] IOSKeySettings allowedBundleIds
+ */
+
+ /**
+ * Constructs a new IOSKeySettings.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a IOSKeySettings.
+ * @implements IIOSKeySettings
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IIOSKeySettings=} [properties] Properties to set
+ */
+ function IOSKeySettings(properties) {
+ this.allowedBundleIds = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * IOSKeySettings allowAllBundleIds.
+ * @member {boolean} allowAllBundleIds
+ * @memberof google.cloud.recaptchaenterprise.v1.IOSKeySettings
+ * @instance
+ */
+ IOSKeySettings.prototype.allowAllBundleIds = false;
+
+ /**
+ * IOSKeySettings allowedBundleIds.
+ * @member {Array.} allowedBundleIds
+ * @memberof google.cloud.recaptchaenterprise.v1.IOSKeySettings
+ * @instance
+ */
+ IOSKeySettings.prototype.allowedBundleIds = $util.emptyArray;
+
+ /**
+ * Creates a new IOSKeySettings instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.IOSKeySettings
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IIOSKeySettings=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.IOSKeySettings} IOSKeySettings instance
+ */
+ IOSKeySettings.create = function create(properties) {
+ return new IOSKeySettings(properties);
+ };
+
+ /**
+ * Encodes the specified IOSKeySettings message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.IOSKeySettings.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.IOSKeySettings
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IIOSKeySettings} message IOSKeySettings message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ IOSKeySettings.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.allowedBundleIds != null && message.allowedBundleIds.length)
+ for (var i = 0; i < message.allowedBundleIds.length; ++i)
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.allowedBundleIds[i]);
+ if (message.allowAllBundleIds != null && Object.hasOwnProperty.call(message, "allowAllBundleIds"))
+ writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAllBundleIds);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified IOSKeySettings message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.IOSKeySettings.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.IOSKeySettings
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IIOSKeySettings} message IOSKeySettings message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ IOSKeySettings.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a IOSKeySettings message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.IOSKeySettings
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.IOSKeySettings} IOSKeySettings
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ IOSKeySettings.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.IOSKeySettings();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 2: {
+ message.allowAllBundleIds = reader.bool();
+ break;
+ }
+ case 1: {
+ if (!(message.allowedBundleIds && message.allowedBundleIds.length))
+ message.allowedBundleIds = [];
+ message.allowedBundleIds.push(reader.string());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a IOSKeySettings message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.IOSKeySettings
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.IOSKeySettings} IOSKeySettings
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ IOSKeySettings.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a IOSKeySettings message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.IOSKeySettings
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ IOSKeySettings.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.allowAllBundleIds != null && message.hasOwnProperty("allowAllBundleIds"))
+ if (typeof message.allowAllBundleIds !== "boolean")
+ return "allowAllBundleIds: boolean expected";
+ if (message.allowedBundleIds != null && message.hasOwnProperty("allowedBundleIds")) {
+ if (!Array.isArray(message.allowedBundleIds))
+ return "allowedBundleIds: array expected";
+ for (var i = 0; i < message.allowedBundleIds.length; ++i)
+ if (!$util.isString(message.allowedBundleIds[i]))
+ return "allowedBundleIds: string[] expected";
+ }
+ return null;
+ };
+
+ /**
+ * Creates a IOSKeySettings message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.IOSKeySettings
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.IOSKeySettings} IOSKeySettings
+ */
+ IOSKeySettings.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.IOSKeySettings)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.IOSKeySettings();
+ if (object.allowAllBundleIds != null)
+ message.allowAllBundleIds = Boolean(object.allowAllBundleIds);
+ if (object.allowedBundleIds) {
+ if (!Array.isArray(object.allowedBundleIds))
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.IOSKeySettings.allowedBundleIds: array expected");
+ message.allowedBundleIds = [];
+ for (var i = 0; i < object.allowedBundleIds.length; ++i)
+ message.allowedBundleIds[i] = String(object.allowedBundleIds[i]);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a IOSKeySettings message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.IOSKeySettings
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IOSKeySettings} message IOSKeySettings
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ IOSKeySettings.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.allowedBundleIds = [];
+ if (options.defaults)
+ object.allowAllBundleIds = false;
+ if (message.allowedBundleIds && message.allowedBundleIds.length) {
+ object.allowedBundleIds = [];
+ for (var j = 0; j < message.allowedBundleIds.length; ++j)
+ object.allowedBundleIds[j] = message.allowedBundleIds[j];
+ }
+ if (message.allowAllBundleIds != null && message.hasOwnProperty("allowAllBundleIds"))
+ object.allowAllBundleIds = message.allowAllBundleIds;
+ return object;
+ };
+
+ /**
+ * Converts this IOSKeySettings to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.IOSKeySettings
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ IOSKeySettings.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for IOSKeySettings
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.IOSKeySettings
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ IOSKeySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.IOSKeySettings";
+ };
+
+ return IOSKeySettings;
+ })();
+
+ v1.ScoreDistribution = (function() {
+
+ /**
+ * Properties of a ScoreDistribution.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IScoreDistribution
+ * @property {Object.|null} [scoreBuckets] ScoreDistribution scoreBuckets
+ */
+
+ /**
+ * Constructs a new ScoreDistribution.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a ScoreDistribution.
+ * @implements IScoreDistribution
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IScoreDistribution=} [properties] Properties to set
+ */
+ function ScoreDistribution(properties) {
+ this.scoreBuckets = {};
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ScoreDistribution scoreBuckets.
+ * @member {Object.} scoreBuckets
+ * @memberof google.cloud.recaptchaenterprise.v1.ScoreDistribution
+ * @instance
+ */
+ ScoreDistribution.prototype.scoreBuckets = $util.emptyObject;
+
+ /**
+ * Creates a new ScoreDistribution instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.ScoreDistribution
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IScoreDistribution=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.ScoreDistribution} ScoreDistribution instance
+ */
+ ScoreDistribution.create = function create(properties) {
+ return new ScoreDistribution(properties);
+ };
+
+ /**
+ * Encodes the specified ScoreDistribution message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ScoreDistribution.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.ScoreDistribution
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IScoreDistribution} message ScoreDistribution message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ScoreDistribution.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.scoreBuckets != null && Object.hasOwnProperty.call(message, "scoreBuckets"))
+ for (var keys = Object.keys(message.scoreBuckets), i = 0; i < keys.length; ++i)
+ writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 0 =*/8).int32(keys[i]).uint32(/* id 2, wireType 0 =*/16).int64(message.scoreBuckets[keys[i]]).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ScoreDistribution message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ScoreDistribution.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.ScoreDistribution
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IScoreDistribution} message ScoreDistribution message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ScoreDistribution.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ScoreDistribution message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.ScoreDistribution
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.ScoreDistribution} ScoreDistribution
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ScoreDistribution.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.ScoreDistribution(), key, value;
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (message.scoreBuckets === $util.emptyObject)
+ message.scoreBuckets = {};
+ var end2 = reader.uint32() + reader.pos;
+ key = 0;
+ value = 0;
+ while (reader.pos < end2) {
+ var tag2 = reader.uint32();
+ switch (tag2 >>> 3) {
+ case 1:
+ key = reader.int32();
+ break;
+ case 2:
+ value = reader.int64();
+ break;
+ default:
+ reader.skipType(tag2 & 7);
+ break;
+ }
+ }
+ message.scoreBuckets[key] = value;
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ScoreDistribution message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.ScoreDistribution
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.ScoreDistribution} ScoreDistribution
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ScoreDistribution.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ScoreDistribution message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.ScoreDistribution
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ScoreDistribution.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.scoreBuckets != null && message.hasOwnProperty("scoreBuckets")) {
+ if (!$util.isObject(message.scoreBuckets))
+ return "scoreBuckets: object expected";
+ var key = Object.keys(message.scoreBuckets);
+ for (var i = 0; i < key.length; ++i) {
+ if (!$util.key32Re.test(key[i]))
+ return "scoreBuckets: integer key{k:int32} expected";
+ if (!$util.isInteger(message.scoreBuckets[key[i]]) && !(message.scoreBuckets[key[i]] && $util.isInteger(message.scoreBuckets[key[i]].low) && $util.isInteger(message.scoreBuckets[key[i]].high)))
+ return "scoreBuckets: integer|Long{k:int32} expected";
+ }
+ }
+ return null;
+ };
+
+ /**
+ * Creates a ScoreDistribution message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.ScoreDistribution
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.ScoreDistribution} ScoreDistribution
+ */
+ ScoreDistribution.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.ScoreDistribution)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.ScoreDistribution();
+ if (object.scoreBuckets) {
+ if (typeof object.scoreBuckets !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.ScoreDistribution.scoreBuckets: object expected");
+ message.scoreBuckets = {};
+ for (var keys = Object.keys(object.scoreBuckets), i = 0; i < keys.length; ++i)
+ if ($util.Long)
+ (message.scoreBuckets[keys[i]] = $util.Long.fromValue(object.scoreBuckets[keys[i]])).unsigned = false;
+ else if (typeof object.scoreBuckets[keys[i]] === "string")
+ message.scoreBuckets[keys[i]] = parseInt(object.scoreBuckets[keys[i]], 10);
+ else if (typeof object.scoreBuckets[keys[i]] === "number")
+ message.scoreBuckets[keys[i]] = object.scoreBuckets[keys[i]];
+ else if (typeof object.scoreBuckets[keys[i]] === "object")
+ message.scoreBuckets[keys[i]] = new $util.LongBits(object.scoreBuckets[keys[i]].low >>> 0, object.scoreBuckets[keys[i]].high >>> 0).toNumber();
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ScoreDistribution message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.ScoreDistribution
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.ScoreDistribution} message ScoreDistribution
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ScoreDistribution.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.objects || options.defaults)
+ object.scoreBuckets = {};
+ var keys2;
+ if (message.scoreBuckets && (keys2 = Object.keys(message.scoreBuckets)).length) {
+ object.scoreBuckets = {};
+ for (var j = 0; j < keys2.length; ++j)
+ if (typeof message.scoreBuckets[keys2[j]] === "number")
+ object.scoreBuckets[keys2[j]] = options.longs === String ? String(message.scoreBuckets[keys2[j]]) : message.scoreBuckets[keys2[j]];
+ else
+ object.scoreBuckets[keys2[j]] = options.longs === String ? $util.Long.prototype.toString.call(message.scoreBuckets[keys2[j]]) : options.longs === Number ? new $util.LongBits(message.scoreBuckets[keys2[j]].low >>> 0, message.scoreBuckets[keys2[j]].high >>> 0).toNumber() : message.scoreBuckets[keys2[j]];
+ }
+ return object;
+ };
+
+ /**
+ * Converts this ScoreDistribution to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.ScoreDistribution
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ScoreDistribution.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ScoreDistribution
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.ScoreDistribution
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ScoreDistribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.ScoreDistribution";
+ };
+
+ return ScoreDistribution;
+ })();
+
+ v1.ScoreMetrics = (function() {
+
+ /**
+ * Properties of a ScoreMetrics.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IScoreMetrics
+ * @property {google.cloud.recaptchaenterprise.v1.IScoreDistribution|null} [overallMetrics] ScoreMetrics overallMetrics
+ * @property {Object.|null} [actionMetrics] ScoreMetrics actionMetrics
+ */
+
+ /**
+ * Constructs a new ScoreMetrics.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a ScoreMetrics.
+ * @implements IScoreMetrics
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IScoreMetrics=} [properties] Properties to set
+ */
+ function ScoreMetrics(properties) {
+ this.actionMetrics = {};
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ScoreMetrics overallMetrics.
+ * @member {google.cloud.recaptchaenterprise.v1.IScoreDistribution|null|undefined} overallMetrics
+ * @memberof google.cloud.recaptchaenterprise.v1.ScoreMetrics
+ * @instance
+ */
+ ScoreMetrics.prototype.overallMetrics = null;
+
+ /**
+ * ScoreMetrics actionMetrics.
+ * @member {Object.} actionMetrics
+ * @memberof google.cloud.recaptchaenterprise.v1.ScoreMetrics
+ * @instance
+ */
+ ScoreMetrics.prototype.actionMetrics = $util.emptyObject;
+
+ /**
+ * Creates a new ScoreMetrics instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.ScoreMetrics
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IScoreMetrics=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.ScoreMetrics} ScoreMetrics instance
+ */
+ ScoreMetrics.create = function create(properties) {
+ return new ScoreMetrics(properties);
+ };
+
+ /**
+ * Encodes the specified ScoreMetrics message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ScoreMetrics.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.ScoreMetrics
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IScoreMetrics} message ScoreMetrics message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ScoreMetrics.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.overallMetrics != null && Object.hasOwnProperty.call(message, "overallMetrics"))
+ $root.google.cloud.recaptchaenterprise.v1.ScoreDistribution.encode(message.overallMetrics, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.actionMetrics != null && Object.hasOwnProperty.call(message, "actionMetrics"))
+ for (var keys = Object.keys(message.actionMetrics), i = 0; i < keys.length; ++i) {
+ writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
+ $root.google.cloud.recaptchaenterprise.v1.ScoreDistribution.encode(message.actionMetrics[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
+ }
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ScoreMetrics message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ScoreMetrics.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.ScoreMetrics
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IScoreMetrics} message ScoreMetrics message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ScoreMetrics.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ScoreMetrics message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.ScoreMetrics
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.ScoreMetrics} ScoreMetrics
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ScoreMetrics.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.ScoreMetrics(), key, value;
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.overallMetrics = $root.google.cloud.recaptchaenterprise.v1.ScoreDistribution.decode(reader, reader.uint32());
+ break;
+ }
+ case 2: {
+ if (message.actionMetrics === $util.emptyObject)
+ message.actionMetrics = {};
+ 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.recaptchaenterprise.v1.ScoreDistribution.decode(reader, reader.uint32());
+ break;
+ default:
+ reader.skipType(tag2 & 7);
+ break;
+ }
+ }
+ message.actionMetrics[key] = value;
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ScoreMetrics message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.ScoreMetrics
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.ScoreMetrics} ScoreMetrics
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ScoreMetrics.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ScoreMetrics message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.ScoreMetrics
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ScoreMetrics.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.overallMetrics != null && message.hasOwnProperty("overallMetrics")) {
+ var error = $root.google.cloud.recaptchaenterprise.v1.ScoreDistribution.verify(message.overallMetrics);
+ if (error)
+ return "overallMetrics." + error;
+ }
+ if (message.actionMetrics != null && message.hasOwnProperty("actionMetrics")) {
+ if (!$util.isObject(message.actionMetrics))
+ return "actionMetrics: object expected";
+ var key = Object.keys(message.actionMetrics);
+ for (var i = 0; i < key.length; ++i) {
+ var error = $root.google.cloud.recaptchaenterprise.v1.ScoreDistribution.verify(message.actionMetrics[key[i]]);
+ if (error)
+ return "actionMetrics." + error;
+ }
+ }
+ return null;
+ };
+
+ /**
+ * Creates a ScoreMetrics message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.ScoreMetrics
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.ScoreMetrics} ScoreMetrics
+ */
+ ScoreMetrics.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.ScoreMetrics)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.ScoreMetrics();
+ if (object.overallMetrics != null) {
+ if (typeof object.overallMetrics !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.ScoreMetrics.overallMetrics: object expected");
+ message.overallMetrics = $root.google.cloud.recaptchaenterprise.v1.ScoreDistribution.fromObject(object.overallMetrics);
+ }
+ if (object.actionMetrics) {
+ if (typeof object.actionMetrics !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.ScoreMetrics.actionMetrics: object expected");
+ message.actionMetrics = {};
+ for (var keys = Object.keys(object.actionMetrics), i = 0; i < keys.length; ++i) {
+ if (typeof object.actionMetrics[keys[i]] !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.ScoreMetrics.actionMetrics: object expected");
+ message.actionMetrics[keys[i]] = $root.google.cloud.recaptchaenterprise.v1.ScoreDistribution.fromObject(object.actionMetrics[keys[i]]);
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ScoreMetrics message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.ScoreMetrics
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.ScoreMetrics} message ScoreMetrics
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ScoreMetrics.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.objects || options.defaults)
+ object.actionMetrics = {};
+ if (options.defaults)
+ object.overallMetrics = null;
+ if (message.overallMetrics != null && message.hasOwnProperty("overallMetrics"))
+ object.overallMetrics = $root.google.cloud.recaptchaenterprise.v1.ScoreDistribution.toObject(message.overallMetrics, options);
+ var keys2;
+ if (message.actionMetrics && (keys2 = Object.keys(message.actionMetrics)).length) {
+ object.actionMetrics = {};
+ for (var j = 0; j < keys2.length; ++j)
+ object.actionMetrics[keys2[j]] = $root.google.cloud.recaptchaenterprise.v1.ScoreDistribution.toObject(message.actionMetrics[keys2[j]], options);
+ }
+ return object;
+ };
+
+ /**
+ * Converts this ScoreMetrics to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.ScoreMetrics
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ScoreMetrics.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ScoreMetrics
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.ScoreMetrics
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ScoreMetrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.ScoreMetrics";
+ };
+
+ return ScoreMetrics;
+ })();
+
+ v1.ChallengeMetrics = (function() {
+
+ /**
+ * Properties of a ChallengeMetrics.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IChallengeMetrics
+ * @property {number|Long|null} [pageloadCount] ChallengeMetrics pageloadCount
+ * @property {number|Long|null} [nocaptchaCount] ChallengeMetrics nocaptchaCount
+ * @property {number|Long|null} [failedCount] ChallengeMetrics failedCount
+ * @property {number|Long|null} [passedCount] ChallengeMetrics passedCount
+ */
+
+ /**
+ * Constructs a new ChallengeMetrics.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a ChallengeMetrics.
+ * @implements IChallengeMetrics
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IChallengeMetrics=} [properties] Properties to set
+ */
+ function ChallengeMetrics(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ChallengeMetrics pageloadCount.
+ * @member {number|Long} pageloadCount
+ * @memberof google.cloud.recaptchaenterprise.v1.ChallengeMetrics
+ * @instance
+ */
+ ChallengeMetrics.prototype.pageloadCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
+
+ /**
+ * ChallengeMetrics nocaptchaCount.
+ * @member {number|Long} nocaptchaCount
+ * @memberof google.cloud.recaptchaenterprise.v1.ChallengeMetrics
+ * @instance
+ */
+ ChallengeMetrics.prototype.nocaptchaCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
+
+ /**
+ * ChallengeMetrics failedCount.
+ * @member {number|Long} failedCount
+ * @memberof google.cloud.recaptchaenterprise.v1.ChallengeMetrics
+ * @instance
+ */
+ ChallengeMetrics.prototype.failedCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
+
+ /**
+ * ChallengeMetrics passedCount.
+ * @member {number|Long} passedCount
+ * @memberof google.cloud.recaptchaenterprise.v1.ChallengeMetrics
+ * @instance
+ */
+ ChallengeMetrics.prototype.passedCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
+
+ /**
+ * Creates a new ChallengeMetrics instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.ChallengeMetrics
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IChallengeMetrics=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.ChallengeMetrics} ChallengeMetrics instance
+ */
+ ChallengeMetrics.create = function create(properties) {
+ return new ChallengeMetrics(properties);
+ };
+
+ /**
+ * Encodes the specified ChallengeMetrics message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ChallengeMetrics.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.ChallengeMetrics
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IChallengeMetrics} message ChallengeMetrics message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ChallengeMetrics.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.pageloadCount != null && Object.hasOwnProperty.call(message, "pageloadCount"))
+ writer.uint32(/* id 1, wireType 0 =*/8).int64(message.pageloadCount);
+ if (message.nocaptchaCount != null && Object.hasOwnProperty.call(message, "nocaptchaCount"))
+ writer.uint32(/* id 2, wireType 0 =*/16).int64(message.nocaptchaCount);
+ if (message.failedCount != null && Object.hasOwnProperty.call(message, "failedCount"))
+ writer.uint32(/* id 3, wireType 0 =*/24).int64(message.failedCount);
+ if (message.passedCount != null && Object.hasOwnProperty.call(message, "passedCount"))
+ writer.uint32(/* id 4, wireType 0 =*/32).int64(message.passedCount);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ChallengeMetrics message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ChallengeMetrics.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.ChallengeMetrics
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IChallengeMetrics} message ChallengeMetrics message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ChallengeMetrics.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ChallengeMetrics message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.ChallengeMetrics
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.ChallengeMetrics} ChallengeMetrics
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ChallengeMetrics.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.ChallengeMetrics();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.pageloadCount = reader.int64();
+ break;
+ }
+ case 2: {
+ message.nocaptchaCount = reader.int64();
+ break;
+ }
+ case 3: {
+ message.failedCount = reader.int64();
+ break;
+ }
+ case 4: {
+ message.passedCount = reader.int64();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ChallengeMetrics message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.ChallengeMetrics
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.ChallengeMetrics} ChallengeMetrics
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ChallengeMetrics.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ChallengeMetrics message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.ChallengeMetrics
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ChallengeMetrics.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.pageloadCount != null && message.hasOwnProperty("pageloadCount"))
+ if (!$util.isInteger(message.pageloadCount) && !(message.pageloadCount && $util.isInteger(message.pageloadCount.low) && $util.isInteger(message.pageloadCount.high)))
+ return "pageloadCount: integer|Long expected";
+ if (message.nocaptchaCount != null && message.hasOwnProperty("nocaptchaCount"))
+ if (!$util.isInteger(message.nocaptchaCount) && !(message.nocaptchaCount && $util.isInteger(message.nocaptchaCount.low) && $util.isInteger(message.nocaptchaCount.high)))
+ return "nocaptchaCount: integer|Long expected";
+ if (message.failedCount != null && message.hasOwnProperty("failedCount"))
+ if (!$util.isInteger(message.failedCount) && !(message.failedCount && $util.isInteger(message.failedCount.low) && $util.isInteger(message.failedCount.high)))
+ return "failedCount: integer|Long expected";
+ if (message.passedCount != null && message.hasOwnProperty("passedCount"))
+ if (!$util.isInteger(message.passedCount) && !(message.passedCount && $util.isInteger(message.passedCount.low) && $util.isInteger(message.passedCount.high)))
+ return "passedCount: integer|Long expected";
+ return null;
+ };
+
+ /**
+ * Creates a ChallengeMetrics message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.ChallengeMetrics
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.ChallengeMetrics} ChallengeMetrics
+ */
+ ChallengeMetrics.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.ChallengeMetrics)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.ChallengeMetrics();
+ if (object.pageloadCount != null)
+ if ($util.Long)
+ (message.pageloadCount = $util.Long.fromValue(object.pageloadCount)).unsigned = false;
+ else if (typeof object.pageloadCount === "string")
+ message.pageloadCount = parseInt(object.pageloadCount, 10);
+ else if (typeof object.pageloadCount === "number")
+ message.pageloadCount = object.pageloadCount;
+ else if (typeof object.pageloadCount === "object")
+ message.pageloadCount = new $util.LongBits(object.pageloadCount.low >>> 0, object.pageloadCount.high >>> 0).toNumber();
+ if (object.nocaptchaCount != null)
+ if ($util.Long)
+ (message.nocaptchaCount = $util.Long.fromValue(object.nocaptchaCount)).unsigned = false;
+ else if (typeof object.nocaptchaCount === "string")
+ message.nocaptchaCount = parseInt(object.nocaptchaCount, 10);
+ else if (typeof object.nocaptchaCount === "number")
+ message.nocaptchaCount = object.nocaptchaCount;
+ else if (typeof object.nocaptchaCount === "object")
+ message.nocaptchaCount = new $util.LongBits(object.nocaptchaCount.low >>> 0, object.nocaptchaCount.high >>> 0).toNumber();
+ if (object.failedCount != null)
+ if ($util.Long)
+ (message.failedCount = $util.Long.fromValue(object.failedCount)).unsigned = false;
+ else if (typeof object.failedCount === "string")
+ message.failedCount = parseInt(object.failedCount, 10);
+ else if (typeof object.failedCount === "number")
+ message.failedCount = object.failedCount;
+ else if (typeof object.failedCount === "object")
+ message.failedCount = new $util.LongBits(object.failedCount.low >>> 0, object.failedCount.high >>> 0).toNumber();
+ if (object.passedCount != null)
+ if ($util.Long)
+ (message.passedCount = $util.Long.fromValue(object.passedCount)).unsigned = false;
+ else if (typeof object.passedCount === "string")
+ message.passedCount = parseInt(object.passedCount, 10);
+ else if (typeof object.passedCount === "number")
+ message.passedCount = object.passedCount;
+ else if (typeof object.passedCount === "object")
+ message.passedCount = new $util.LongBits(object.passedCount.low >>> 0, object.passedCount.high >>> 0).toNumber();
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ChallengeMetrics message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.ChallengeMetrics
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.ChallengeMetrics} message ChallengeMetrics
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ChallengeMetrics.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.pageloadCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
+ } else
+ object.pageloadCount = options.longs === String ? "0" : 0;
+ if ($util.Long) {
+ var long = new $util.Long(0, 0, false);
+ object.nocaptchaCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
+ } else
+ object.nocaptchaCount = options.longs === String ? "0" : 0;
+ if ($util.Long) {
+ var long = new $util.Long(0, 0, false);
+ object.failedCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
+ } else
+ object.failedCount = options.longs === String ? "0" : 0;
+ if ($util.Long) {
+ var long = new $util.Long(0, 0, false);
+ object.passedCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
+ } else
+ object.passedCount = options.longs === String ? "0" : 0;
+ }
+ if (message.pageloadCount != null && message.hasOwnProperty("pageloadCount"))
+ if (typeof message.pageloadCount === "number")
+ object.pageloadCount = options.longs === String ? String(message.pageloadCount) : message.pageloadCount;
+ else
+ object.pageloadCount = options.longs === String ? $util.Long.prototype.toString.call(message.pageloadCount) : options.longs === Number ? new $util.LongBits(message.pageloadCount.low >>> 0, message.pageloadCount.high >>> 0).toNumber() : message.pageloadCount;
+ if (message.nocaptchaCount != null && message.hasOwnProperty("nocaptchaCount"))
+ if (typeof message.nocaptchaCount === "number")
+ object.nocaptchaCount = options.longs === String ? String(message.nocaptchaCount) : message.nocaptchaCount;
+ else
+ object.nocaptchaCount = options.longs === String ? $util.Long.prototype.toString.call(message.nocaptchaCount) : options.longs === Number ? new $util.LongBits(message.nocaptchaCount.low >>> 0, message.nocaptchaCount.high >>> 0).toNumber() : message.nocaptchaCount;
+ if (message.failedCount != null && message.hasOwnProperty("failedCount"))
+ if (typeof message.failedCount === "number")
+ object.failedCount = options.longs === String ? String(message.failedCount) : message.failedCount;
+ else
+ object.failedCount = options.longs === String ? $util.Long.prototype.toString.call(message.failedCount) : options.longs === Number ? new $util.LongBits(message.failedCount.low >>> 0, message.failedCount.high >>> 0).toNumber() : message.failedCount;
+ if (message.passedCount != null && message.hasOwnProperty("passedCount"))
+ if (typeof message.passedCount === "number")
+ object.passedCount = options.longs === String ? String(message.passedCount) : message.passedCount;
+ else
+ object.passedCount = options.longs === String ? $util.Long.prototype.toString.call(message.passedCount) : options.longs === Number ? new $util.LongBits(message.passedCount.low >>> 0, message.passedCount.high >>> 0).toNumber() : message.passedCount;
+ return object;
+ };
+
+ /**
+ * Converts this ChallengeMetrics to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.ChallengeMetrics
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ChallengeMetrics.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ChallengeMetrics
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.ChallengeMetrics
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ChallengeMetrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.ChallengeMetrics";
+ };
+
+ return ChallengeMetrics;
+ })();
+
+ v1.ListRelatedAccountGroupMembershipsRequest = (function() {
+
+ /**
+ * Properties of a ListRelatedAccountGroupMembershipsRequest.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IListRelatedAccountGroupMembershipsRequest
+ * @property {string|null} [parent] ListRelatedAccountGroupMembershipsRequest parent
+ * @property {number|null} [pageSize] ListRelatedAccountGroupMembershipsRequest pageSize
+ * @property {string|null} [pageToken] ListRelatedAccountGroupMembershipsRequest pageToken
+ */
+
+ /**
+ * Constructs a new ListRelatedAccountGroupMembershipsRequest.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a ListRelatedAccountGroupMembershipsRequest.
+ * @implements IListRelatedAccountGroupMembershipsRequest
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest=} [properties] Properties to set
+ */
+ function ListRelatedAccountGroupMembershipsRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ListRelatedAccountGroupMembershipsRequest parent.
+ * @member {string} parent
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest
+ * @instance
+ */
+ ListRelatedAccountGroupMembershipsRequest.prototype.parent = "";
+
+ /**
+ * ListRelatedAccountGroupMembershipsRequest pageSize.
+ * @member {number} pageSize
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest
+ * @instance
+ */
+ ListRelatedAccountGroupMembershipsRequest.prototype.pageSize = 0;
+
+ /**
+ * ListRelatedAccountGroupMembershipsRequest pageToken.
+ * @member {string} pageToken
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest
+ * @instance
+ */
+ ListRelatedAccountGroupMembershipsRequest.prototype.pageToken = "";
+
+ /**
+ * Creates a new ListRelatedAccountGroupMembershipsRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest} ListRelatedAccountGroupMembershipsRequest instance
+ */
+ ListRelatedAccountGroupMembershipsRequest.create = function create(properties) {
+ return new ListRelatedAccountGroupMembershipsRequest(properties);
+ };
+
+ /**
+ * Encodes the specified ListRelatedAccountGroupMembershipsRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest} message ListRelatedAccountGroupMembershipsRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListRelatedAccountGroupMembershipsRequest.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 ListRelatedAccountGroupMembershipsRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest} message ListRelatedAccountGroupMembershipsRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListRelatedAccountGroupMembershipsRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ListRelatedAccountGroupMembershipsRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest} ListRelatedAccountGroupMembershipsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListRelatedAccountGroupMembershipsRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest();
+ 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 ListRelatedAccountGroupMembershipsRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest} ListRelatedAccountGroupMembershipsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListRelatedAccountGroupMembershipsRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ListRelatedAccountGroupMembershipsRequest message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ListRelatedAccountGroupMembershipsRequest.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 ListRelatedAccountGroupMembershipsRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest} ListRelatedAccountGroupMembershipsRequest
+ */
+ ListRelatedAccountGroupMembershipsRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest();
+ 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 ListRelatedAccountGroupMembershipsRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest} message ListRelatedAccountGroupMembershipsRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ListRelatedAccountGroupMembershipsRequest.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 ListRelatedAccountGroupMembershipsRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ListRelatedAccountGroupMembershipsRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ListRelatedAccountGroupMembershipsRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ListRelatedAccountGroupMembershipsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest";
+ };
+
+ return ListRelatedAccountGroupMembershipsRequest;
+ })();
+
+ v1.ListRelatedAccountGroupMembershipsResponse = (function() {
+
+ /**
+ * Properties of a ListRelatedAccountGroupMembershipsResponse.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IListRelatedAccountGroupMembershipsResponse
+ * @property {Array.|null} [relatedAccountGroupMemberships] ListRelatedAccountGroupMembershipsResponse relatedAccountGroupMemberships
+ * @property {string|null} [nextPageToken] ListRelatedAccountGroupMembershipsResponse nextPageToken
+ */
+
+ /**
+ * Constructs a new ListRelatedAccountGroupMembershipsResponse.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a ListRelatedAccountGroupMembershipsResponse.
+ * @implements IListRelatedAccountGroupMembershipsResponse
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsResponse=} [properties] Properties to set
+ */
+ function ListRelatedAccountGroupMembershipsResponse(properties) {
+ this.relatedAccountGroupMemberships = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ListRelatedAccountGroupMembershipsResponse relatedAccountGroupMemberships.
+ * @member {Array.} relatedAccountGroupMemberships
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse
+ * @instance
+ */
+ ListRelatedAccountGroupMembershipsResponse.prototype.relatedAccountGroupMemberships = $util.emptyArray;
+
+ /**
+ * ListRelatedAccountGroupMembershipsResponse nextPageToken.
+ * @member {string} nextPageToken
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse
+ * @instance
+ */
+ ListRelatedAccountGroupMembershipsResponse.prototype.nextPageToken = "";
+
+ /**
+ * Creates a new ListRelatedAccountGroupMembershipsResponse instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsResponse=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse} ListRelatedAccountGroupMembershipsResponse instance
+ */
+ ListRelatedAccountGroupMembershipsResponse.create = function create(properties) {
+ return new ListRelatedAccountGroupMembershipsResponse(properties);
+ };
+
+ /**
+ * Encodes the specified ListRelatedAccountGroupMembershipsResponse message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsResponse} message ListRelatedAccountGroupMembershipsResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListRelatedAccountGroupMembershipsResponse.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.relatedAccountGroupMemberships != null && message.relatedAccountGroupMemberships.length)
+ for (var i = 0; i < message.relatedAccountGroupMemberships.length; ++i)
+ $root.google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership.encode(message.relatedAccountGroupMemberships[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 ListRelatedAccountGroupMembershipsResponse message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsResponse} message ListRelatedAccountGroupMembershipsResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListRelatedAccountGroupMembershipsResponse.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ListRelatedAccountGroupMembershipsResponse message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse} ListRelatedAccountGroupMembershipsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListRelatedAccountGroupMembershipsResponse.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.relatedAccountGroupMemberships && message.relatedAccountGroupMemberships.length))
+ message.relatedAccountGroupMemberships = [];
+ message.relatedAccountGroupMemberships.push($root.google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership.decode(reader, reader.uint32()));
+ break;
+ }
+ case 2: {
+ message.nextPageToken = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ListRelatedAccountGroupMembershipsResponse message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse} ListRelatedAccountGroupMembershipsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListRelatedAccountGroupMembershipsResponse.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ListRelatedAccountGroupMembershipsResponse message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ListRelatedAccountGroupMembershipsResponse.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.relatedAccountGroupMemberships != null && message.hasOwnProperty("relatedAccountGroupMemberships")) {
+ if (!Array.isArray(message.relatedAccountGroupMemberships))
+ return "relatedAccountGroupMemberships: array expected";
+ for (var i = 0; i < message.relatedAccountGroupMemberships.length; ++i) {
+ var error = $root.google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership.verify(message.relatedAccountGroupMemberships[i]);
+ if (error)
+ return "relatedAccountGroupMemberships." + error;
+ }
+ }
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
+ if (!$util.isString(message.nextPageToken))
+ return "nextPageToken: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a ListRelatedAccountGroupMembershipsResponse message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse} ListRelatedAccountGroupMembershipsResponse
+ */
+ ListRelatedAccountGroupMembershipsResponse.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse();
+ if (object.relatedAccountGroupMemberships) {
+ if (!Array.isArray(object.relatedAccountGroupMemberships))
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse.relatedAccountGroupMemberships: array expected");
+ message.relatedAccountGroupMemberships = [];
+ for (var i = 0; i < object.relatedAccountGroupMemberships.length; ++i) {
+ if (typeof object.relatedAccountGroupMemberships[i] !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse.relatedAccountGroupMemberships: object expected");
+ message.relatedAccountGroupMemberships[i] = $root.google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership.fromObject(object.relatedAccountGroupMemberships[i]);
+ }
+ }
+ if (object.nextPageToken != null)
+ message.nextPageToken = String(object.nextPageToken);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ListRelatedAccountGroupMembershipsResponse message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse} message ListRelatedAccountGroupMembershipsResponse
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ListRelatedAccountGroupMembershipsResponse.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.relatedAccountGroupMemberships = [];
+ if (options.defaults)
+ object.nextPageToken = "";
+ if (message.relatedAccountGroupMemberships && message.relatedAccountGroupMemberships.length) {
+ object.relatedAccountGroupMemberships = [];
+ for (var j = 0; j < message.relatedAccountGroupMemberships.length; ++j)
+ object.relatedAccountGroupMemberships[j] = $root.google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership.toObject(message.relatedAccountGroupMemberships[j], options);
+ }
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
+ object.nextPageToken = message.nextPageToken;
+ return object;
+ };
+
+ /**
+ * Converts this ListRelatedAccountGroupMembershipsResponse to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ListRelatedAccountGroupMembershipsResponse.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ListRelatedAccountGroupMembershipsResponse
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ListRelatedAccountGroupMembershipsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse";
+ };
+
+ return ListRelatedAccountGroupMembershipsResponse;
+ })();
+
+ v1.ListRelatedAccountGroupsRequest = (function() {
+
+ /**
+ * Properties of a ListRelatedAccountGroupsRequest.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IListRelatedAccountGroupsRequest
+ * @property {string|null} [parent] ListRelatedAccountGroupsRequest parent
+ * @property {number|null} [pageSize] ListRelatedAccountGroupsRequest pageSize
+ * @property {string|null} [pageToken] ListRelatedAccountGroupsRequest pageToken
+ */
+
+ /**
+ * Constructs a new ListRelatedAccountGroupsRequest.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a ListRelatedAccountGroupsRequest.
+ * @implements IListRelatedAccountGroupsRequest
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest=} [properties] Properties to set
+ */
+ function ListRelatedAccountGroupsRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ListRelatedAccountGroupsRequest parent.
+ * @member {string} parent
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest
+ * @instance
+ */
+ ListRelatedAccountGroupsRequest.prototype.parent = "";
+
+ /**
+ * ListRelatedAccountGroupsRequest pageSize.
+ * @member {number} pageSize
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest
+ * @instance
+ */
+ ListRelatedAccountGroupsRequest.prototype.pageSize = 0;
+
+ /**
+ * ListRelatedAccountGroupsRequest pageToken.
+ * @member {string} pageToken
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest
+ * @instance
+ */
+ ListRelatedAccountGroupsRequest.prototype.pageToken = "";
+
+ /**
+ * Creates a new ListRelatedAccountGroupsRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest} ListRelatedAccountGroupsRequest instance
+ */
+ ListRelatedAccountGroupsRequest.create = function create(properties) {
+ return new ListRelatedAccountGroupsRequest(properties);
+ };
+
+ /**
+ * Encodes the specified ListRelatedAccountGroupsRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest} message ListRelatedAccountGroupsRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListRelatedAccountGroupsRequest.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 ListRelatedAccountGroupsRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest} message ListRelatedAccountGroupsRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListRelatedAccountGroupsRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ListRelatedAccountGroupsRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest} ListRelatedAccountGroupsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListRelatedAccountGroupsRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest();
+ 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 ListRelatedAccountGroupsRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest} ListRelatedAccountGroupsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListRelatedAccountGroupsRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ListRelatedAccountGroupsRequest message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ListRelatedAccountGroupsRequest.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 ListRelatedAccountGroupsRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest} ListRelatedAccountGroupsRequest
+ */
+ ListRelatedAccountGroupsRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest();
+ 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 ListRelatedAccountGroupsRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest} message ListRelatedAccountGroupsRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ListRelatedAccountGroupsRequest.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 ListRelatedAccountGroupsRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ListRelatedAccountGroupsRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ListRelatedAccountGroupsRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ListRelatedAccountGroupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest";
+ };
+
+ return ListRelatedAccountGroupsRequest;
+ })();
+
+ v1.ListRelatedAccountGroupsResponse = (function() {
+
+ /**
+ * Properties of a ListRelatedAccountGroupsResponse.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IListRelatedAccountGroupsResponse
+ * @property {Array.|null} [relatedAccountGroups] ListRelatedAccountGroupsResponse relatedAccountGroups
+ * @property {string|null} [nextPageToken] ListRelatedAccountGroupsResponse nextPageToken
+ */
+
+ /**
+ * Constructs a new ListRelatedAccountGroupsResponse.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a ListRelatedAccountGroupsResponse.
+ * @implements IListRelatedAccountGroupsResponse
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsResponse=} [properties] Properties to set
+ */
+ function ListRelatedAccountGroupsResponse(properties) {
+ this.relatedAccountGroups = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ListRelatedAccountGroupsResponse relatedAccountGroups.
+ * @member {Array.} relatedAccountGroups
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse
+ * @instance
+ */
+ ListRelatedAccountGroupsResponse.prototype.relatedAccountGroups = $util.emptyArray;
+
+ /**
+ * ListRelatedAccountGroupsResponse nextPageToken.
+ * @member {string} nextPageToken
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse
+ * @instance
+ */
+ ListRelatedAccountGroupsResponse.prototype.nextPageToken = "";
+
+ /**
+ * Creates a new ListRelatedAccountGroupsResponse instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsResponse=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse} ListRelatedAccountGroupsResponse instance
+ */
+ ListRelatedAccountGroupsResponse.create = function create(properties) {
+ return new ListRelatedAccountGroupsResponse(properties);
+ };
+
+ /**
+ * Encodes the specified ListRelatedAccountGroupsResponse message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsResponse} message ListRelatedAccountGroupsResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListRelatedAccountGroupsResponse.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.relatedAccountGroups != null && message.relatedAccountGroups.length)
+ for (var i = 0; i < message.relatedAccountGroups.length; ++i)
+ $root.google.cloud.recaptchaenterprise.v1.RelatedAccountGroup.encode(message.relatedAccountGroups[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 ListRelatedAccountGroupsResponse message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsResponse} message ListRelatedAccountGroupsResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListRelatedAccountGroupsResponse.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ListRelatedAccountGroupsResponse message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse} ListRelatedAccountGroupsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListRelatedAccountGroupsResponse.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.relatedAccountGroups && message.relatedAccountGroups.length))
+ message.relatedAccountGroups = [];
+ message.relatedAccountGroups.push($root.google.cloud.recaptchaenterprise.v1.RelatedAccountGroup.decode(reader, reader.uint32()));
+ break;
+ }
+ case 2: {
+ message.nextPageToken = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ListRelatedAccountGroupsResponse message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse} ListRelatedAccountGroupsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListRelatedAccountGroupsResponse.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ListRelatedAccountGroupsResponse message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ListRelatedAccountGroupsResponse.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.relatedAccountGroups != null && message.hasOwnProperty("relatedAccountGroups")) {
+ if (!Array.isArray(message.relatedAccountGroups))
+ return "relatedAccountGroups: array expected";
+ for (var i = 0; i < message.relatedAccountGroups.length; ++i) {
+ var error = $root.google.cloud.recaptchaenterprise.v1.RelatedAccountGroup.verify(message.relatedAccountGroups[i]);
+ if (error)
+ return "relatedAccountGroups." + error;
+ }
+ }
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
+ if (!$util.isString(message.nextPageToken))
+ return "nextPageToken: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a ListRelatedAccountGroupsResponse message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse} ListRelatedAccountGroupsResponse
+ */
+ ListRelatedAccountGroupsResponse.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse();
+ if (object.relatedAccountGroups) {
+ if (!Array.isArray(object.relatedAccountGroups))
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse.relatedAccountGroups: array expected");
+ message.relatedAccountGroups = [];
+ for (var i = 0; i < object.relatedAccountGroups.length; ++i) {
+ if (typeof object.relatedAccountGroups[i] !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse.relatedAccountGroups: object expected");
+ message.relatedAccountGroups[i] = $root.google.cloud.recaptchaenterprise.v1.RelatedAccountGroup.fromObject(object.relatedAccountGroups[i]);
+ }
+ }
+ if (object.nextPageToken != null)
+ message.nextPageToken = String(object.nextPageToken);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ListRelatedAccountGroupsResponse message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse} message ListRelatedAccountGroupsResponse
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ListRelatedAccountGroupsResponse.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.relatedAccountGroups = [];
+ if (options.defaults)
+ object.nextPageToken = "";
+ if (message.relatedAccountGroups && message.relatedAccountGroups.length) {
+ object.relatedAccountGroups = [];
+ for (var j = 0; j < message.relatedAccountGroups.length; ++j)
+ object.relatedAccountGroups[j] = $root.google.cloud.recaptchaenterprise.v1.RelatedAccountGroup.toObject(message.relatedAccountGroups[j], options);
+ }
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
+ object.nextPageToken = message.nextPageToken;
+ return object;
+ };
+
+ /**
+ * Converts this ListRelatedAccountGroupsResponse to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ListRelatedAccountGroupsResponse.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ListRelatedAccountGroupsResponse
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ListRelatedAccountGroupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse";
+ };
+
+ return ListRelatedAccountGroupsResponse;
+ })();
+
+ v1.SearchRelatedAccountGroupMembershipsRequest = (function() {
+
+ /**
+ * Properties of a SearchRelatedAccountGroupMembershipsRequest.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface ISearchRelatedAccountGroupMembershipsRequest
+ * @property {string|null} [project] SearchRelatedAccountGroupMembershipsRequest project
+ * @property {Uint8Array|null} [hashedAccountId] SearchRelatedAccountGroupMembershipsRequest hashedAccountId
+ * @property {number|null} [pageSize] SearchRelatedAccountGroupMembershipsRequest pageSize
+ * @property {string|null} [pageToken] SearchRelatedAccountGroupMembershipsRequest pageToken
+ */
+
+ /**
+ * Constructs a new SearchRelatedAccountGroupMembershipsRequest.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a SearchRelatedAccountGroupMembershipsRequest.
+ * @implements ISearchRelatedAccountGroupMembershipsRequest
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest=} [properties] Properties to set
+ */
+ function SearchRelatedAccountGroupMembershipsRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * SearchRelatedAccountGroupMembershipsRequest project.
+ * @member {string} project
+ * @memberof google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest
+ * @instance
+ */
+ SearchRelatedAccountGroupMembershipsRequest.prototype.project = "";
+
+ /**
+ * SearchRelatedAccountGroupMembershipsRequest hashedAccountId.
+ * @member {Uint8Array} hashedAccountId
+ * @memberof google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest
+ * @instance
+ */
+ SearchRelatedAccountGroupMembershipsRequest.prototype.hashedAccountId = $util.newBuffer([]);
+
+ /**
+ * SearchRelatedAccountGroupMembershipsRequest pageSize.
+ * @member {number} pageSize
+ * @memberof google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest
+ * @instance
+ */
+ SearchRelatedAccountGroupMembershipsRequest.prototype.pageSize = 0;
+
+ /**
+ * SearchRelatedAccountGroupMembershipsRequest pageToken.
+ * @member {string} pageToken
+ * @memberof google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest
+ * @instance
+ */
+ SearchRelatedAccountGroupMembershipsRequest.prototype.pageToken = "";
+
+ /**
+ * Creates a new SearchRelatedAccountGroupMembershipsRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest} SearchRelatedAccountGroupMembershipsRequest instance
+ */
+ SearchRelatedAccountGroupMembershipsRequest.create = function create(properties) {
+ return new SearchRelatedAccountGroupMembershipsRequest(properties);
+ };
+
+ /**
+ * Encodes the specified SearchRelatedAccountGroupMembershipsRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest} message SearchRelatedAccountGroupMembershipsRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ SearchRelatedAccountGroupMembershipsRequest.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.project != null && Object.hasOwnProperty.call(message, "project"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.project);
+ if (message.hashedAccountId != null && Object.hasOwnProperty.call(message, "hashedAccountId"))
+ writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.hashedAccountId);
+ if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize);
+ if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken"))
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified SearchRelatedAccountGroupMembershipsRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest} message SearchRelatedAccountGroupMembershipsRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ SearchRelatedAccountGroupMembershipsRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a SearchRelatedAccountGroupMembershipsRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest} SearchRelatedAccountGroupMembershipsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ SearchRelatedAccountGroupMembershipsRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.project = reader.string();
+ break;
+ }
+ case 2: {
+ message.hashedAccountId = reader.bytes();
+ break;
+ }
+ case 3: {
+ message.pageSize = reader.int32();
+ break;
+ }
+ case 4: {
+ message.pageToken = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a SearchRelatedAccountGroupMembershipsRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest} SearchRelatedAccountGroupMembershipsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ SearchRelatedAccountGroupMembershipsRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a SearchRelatedAccountGroupMembershipsRequest message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ SearchRelatedAccountGroupMembershipsRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.project != null && message.hasOwnProperty("project"))
+ if (!$util.isString(message.project))
+ return "project: string expected";
+ if (message.hashedAccountId != null && message.hasOwnProperty("hashedAccountId"))
+ if (!(message.hashedAccountId && typeof message.hashedAccountId.length === "number" || $util.isString(message.hashedAccountId)))
+ return "hashedAccountId: buffer 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 SearchRelatedAccountGroupMembershipsRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest} SearchRelatedAccountGroupMembershipsRequest
+ */
+ SearchRelatedAccountGroupMembershipsRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest();
+ if (object.project != null)
+ message.project = String(object.project);
+ if (object.hashedAccountId != null)
+ if (typeof object.hashedAccountId === "string")
+ $util.base64.decode(object.hashedAccountId, message.hashedAccountId = $util.newBuffer($util.base64.length(object.hashedAccountId)), 0);
+ else if (object.hashedAccountId.length >= 0)
+ message.hashedAccountId = object.hashedAccountId;
+ 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 SearchRelatedAccountGroupMembershipsRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest} message SearchRelatedAccountGroupMembershipsRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ SearchRelatedAccountGroupMembershipsRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.project = "";
+ if (options.bytes === String)
+ object.hashedAccountId = "";
+ else {
+ object.hashedAccountId = [];
+ if (options.bytes !== Array)
+ object.hashedAccountId = $util.newBuffer(object.hashedAccountId);
+ }
+ object.pageSize = 0;
+ object.pageToken = "";
+ }
+ if (message.project != null && message.hasOwnProperty("project"))
+ object.project = message.project;
+ if (message.hashedAccountId != null && message.hasOwnProperty("hashedAccountId"))
+ object.hashedAccountId = options.bytes === String ? $util.base64.encode(message.hashedAccountId, 0, message.hashedAccountId.length) : options.bytes === Array ? Array.prototype.slice.call(message.hashedAccountId) : message.hashedAccountId;
+ 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 SearchRelatedAccountGroupMembershipsRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ SearchRelatedAccountGroupMembershipsRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for SearchRelatedAccountGroupMembershipsRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ SearchRelatedAccountGroupMembershipsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest";
+ };
+
+ return SearchRelatedAccountGroupMembershipsRequest;
+ })();
+
+ v1.SearchRelatedAccountGroupMembershipsResponse = (function() {
+
+ /**
+ * Properties of a SearchRelatedAccountGroupMembershipsResponse.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface ISearchRelatedAccountGroupMembershipsResponse
+ * @property {Array.|null} [relatedAccountGroupMemberships] SearchRelatedAccountGroupMembershipsResponse relatedAccountGroupMemberships
+ * @property {string|null} [nextPageToken] SearchRelatedAccountGroupMembershipsResponse nextPageToken
+ */
+
+ /**
+ * Constructs a new SearchRelatedAccountGroupMembershipsResponse.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a SearchRelatedAccountGroupMembershipsResponse.
+ * @implements ISearchRelatedAccountGroupMembershipsResponse
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsResponse=} [properties] Properties to set
+ */
+ function SearchRelatedAccountGroupMembershipsResponse(properties) {
+ this.relatedAccountGroupMemberships = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * SearchRelatedAccountGroupMembershipsResponse relatedAccountGroupMemberships.
+ * @member {Array.} relatedAccountGroupMemberships
+ * @memberof google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse
+ * @instance
+ */
+ SearchRelatedAccountGroupMembershipsResponse.prototype.relatedAccountGroupMemberships = $util.emptyArray;
+
+ /**
+ * SearchRelatedAccountGroupMembershipsResponse nextPageToken.
+ * @member {string} nextPageToken
+ * @memberof google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse
+ * @instance
+ */
+ SearchRelatedAccountGroupMembershipsResponse.prototype.nextPageToken = "";
+
+ /**
+ * Creates a new SearchRelatedAccountGroupMembershipsResponse instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsResponse=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse} SearchRelatedAccountGroupMembershipsResponse instance
+ */
+ SearchRelatedAccountGroupMembershipsResponse.create = function create(properties) {
+ return new SearchRelatedAccountGroupMembershipsResponse(properties);
+ };
+
+ /**
+ * Encodes the specified SearchRelatedAccountGroupMembershipsResponse message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsResponse} message SearchRelatedAccountGroupMembershipsResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ SearchRelatedAccountGroupMembershipsResponse.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.relatedAccountGroupMemberships != null && message.relatedAccountGroupMemberships.length)
+ for (var i = 0; i < message.relatedAccountGroupMemberships.length; ++i)
+ $root.google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership.encode(message.relatedAccountGroupMemberships[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 SearchRelatedAccountGroupMembershipsResponse message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsResponse} message SearchRelatedAccountGroupMembershipsResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ SearchRelatedAccountGroupMembershipsResponse.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a SearchRelatedAccountGroupMembershipsResponse message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse} SearchRelatedAccountGroupMembershipsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ SearchRelatedAccountGroupMembershipsResponse.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.relatedAccountGroupMemberships && message.relatedAccountGroupMemberships.length))
+ message.relatedAccountGroupMemberships = [];
+ message.relatedAccountGroupMemberships.push($root.google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership.decode(reader, reader.uint32()));
+ break;
+ }
+ case 2: {
+ message.nextPageToken = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a SearchRelatedAccountGroupMembershipsResponse message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse} SearchRelatedAccountGroupMembershipsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ SearchRelatedAccountGroupMembershipsResponse.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a SearchRelatedAccountGroupMembershipsResponse message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ SearchRelatedAccountGroupMembershipsResponse.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.relatedAccountGroupMemberships != null && message.hasOwnProperty("relatedAccountGroupMemberships")) {
+ if (!Array.isArray(message.relatedAccountGroupMemberships))
+ return "relatedAccountGroupMemberships: array expected";
+ for (var i = 0; i < message.relatedAccountGroupMemberships.length; ++i) {
+ var error = $root.google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership.verify(message.relatedAccountGroupMemberships[i]);
+ if (error)
+ return "relatedAccountGroupMemberships." + error;
+ }
+ }
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
+ if (!$util.isString(message.nextPageToken))
+ return "nextPageToken: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a SearchRelatedAccountGroupMembershipsResponse message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse} SearchRelatedAccountGroupMembershipsResponse
+ */
+ SearchRelatedAccountGroupMembershipsResponse.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse();
+ if (object.relatedAccountGroupMemberships) {
+ if (!Array.isArray(object.relatedAccountGroupMemberships))
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse.relatedAccountGroupMemberships: array expected");
+ message.relatedAccountGroupMemberships = [];
+ for (var i = 0; i < object.relatedAccountGroupMemberships.length; ++i) {
+ if (typeof object.relatedAccountGroupMemberships[i] !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse.relatedAccountGroupMemberships: object expected");
+ message.relatedAccountGroupMemberships[i] = $root.google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership.fromObject(object.relatedAccountGroupMemberships[i]);
+ }
+ }
+ if (object.nextPageToken != null)
+ message.nextPageToken = String(object.nextPageToken);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a SearchRelatedAccountGroupMembershipsResponse message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse} message SearchRelatedAccountGroupMembershipsResponse
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ SearchRelatedAccountGroupMembershipsResponse.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.relatedAccountGroupMemberships = [];
+ if (options.defaults)
+ object.nextPageToken = "";
+ if (message.relatedAccountGroupMemberships && message.relatedAccountGroupMemberships.length) {
+ object.relatedAccountGroupMemberships = [];
+ for (var j = 0; j < message.relatedAccountGroupMemberships.length; ++j)
+ object.relatedAccountGroupMemberships[j] = $root.google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership.toObject(message.relatedAccountGroupMemberships[j], options);
+ }
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
+ object.nextPageToken = message.nextPageToken;
+ return object;
+ };
+
+ /**
+ * Converts this SearchRelatedAccountGroupMembershipsResponse to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ SearchRelatedAccountGroupMembershipsResponse.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for SearchRelatedAccountGroupMembershipsResponse
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ SearchRelatedAccountGroupMembershipsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse";
+ };
+
+ return SearchRelatedAccountGroupMembershipsResponse;
+ })();
+
+ v1.RelatedAccountGroupMembership = (function() {
+
+ /**
+ * Properties of a RelatedAccountGroupMembership.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IRelatedAccountGroupMembership
+ * @property {string|null} [name] RelatedAccountGroupMembership name
+ * @property {Uint8Array|null} [hashedAccountId] RelatedAccountGroupMembership hashedAccountId
+ */
+
+ /**
+ * Constructs a new RelatedAccountGroupMembership.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a RelatedAccountGroupMembership.
+ * @implements IRelatedAccountGroupMembership
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership=} [properties] Properties to set
+ */
+ function RelatedAccountGroupMembership(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * RelatedAccountGroupMembership name.
+ * @member {string} name
+ * @memberof google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership
+ * @instance
+ */
+ RelatedAccountGroupMembership.prototype.name = "";
+
+ /**
+ * RelatedAccountGroupMembership hashedAccountId.
+ * @member {Uint8Array} hashedAccountId
+ * @memberof google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership
+ * @instance
+ */
+ RelatedAccountGroupMembership.prototype.hashedAccountId = $util.newBuffer([]);
+
+ /**
+ * Creates a new RelatedAccountGroupMembership instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership} RelatedAccountGroupMembership instance
+ */
+ RelatedAccountGroupMembership.create = function create(properties) {
+ return new RelatedAccountGroupMembership(properties);
+ };
+
+ /**
+ * Encodes the specified RelatedAccountGroupMembership message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership} message RelatedAccountGroupMembership message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ RelatedAccountGroupMembership.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ if (message.hashedAccountId != null && Object.hasOwnProperty.call(message, "hashedAccountId"))
+ writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.hashedAccountId);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified RelatedAccountGroupMembership message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IRelatedAccountGroupMembership} message RelatedAccountGroupMembership message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ RelatedAccountGroupMembership.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a RelatedAccountGroupMembership message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership} RelatedAccountGroupMembership
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ RelatedAccountGroupMembership.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 2: {
+ message.hashedAccountId = reader.bytes();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a RelatedAccountGroupMembership message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership} RelatedAccountGroupMembership
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ RelatedAccountGroupMembership.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a RelatedAccountGroupMembership message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ RelatedAccountGroupMembership.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.hashedAccountId != null && message.hasOwnProperty("hashedAccountId"))
+ if (!(message.hashedAccountId && typeof message.hashedAccountId.length === "number" || $util.isString(message.hashedAccountId)))
+ return "hashedAccountId: buffer expected";
+ return null;
+ };
+
+ /**
+ * Creates a RelatedAccountGroupMembership message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership} RelatedAccountGroupMembership
+ */
+ RelatedAccountGroupMembership.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership();
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object.hashedAccountId != null)
+ if (typeof object.hashedAccountId === "string")
+ $util.base64.decode(object.hashedAccountId, message.hashedAccountId = $util.newBuffer($util.base64.length(object.hashedAccountId)), 0);
+ else if (object.hashedAccountId.length >= 0)
+ message.hashedAccountId = object.hashedAccountId;
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a RelatedAccountGroupMembership message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership} message RelatedAccountGroupMembership
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ RelatedAccountGroupMembership.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.name = "";
+ if (options.bytes === String)
+ object.hashedAccountId = "";
+ else {
+ object.hashedAccountId = [];
+ if (options.bytes !== Array)
+ object.hashedAccountId = $util.newBuffer(object.hashedAccountId);
+ }
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.hashedAccountId != null && message.hasOwnProperty("hashedAccountId"))
+ object.hashedAccountId = options.bytes === String ? $util.base64.encode(message.hashedAccountId, 0, message.hashedAccountId.length) : options.bytes === Array ? Array.prototype.slice.call(message.hashedAccountId) : message.hashedAccountId;
+ return object;
+ };
+
+ /**
+ * Converts this RelatedAccountGroupMembership to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ RelatedAccountGroupMembership.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for RelatedAccountGroupMembership
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ RelatedAccountGroupMembership.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership";
+ };
+
+ return RelatedAccountGroupMembership;
+ })();
+
+ v1.RelatedAccountGroup = (function() {
+
+ /**
+ * Properties of a RelatedAccountGroup.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IRelatedAccountGroup
+ * @property {string|null} [name] RelatedAccountGroup name
+ */
+
+ /**
+ * Constructs a new RelatedAccountGroup.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a RelatedAccountGroup.
+ * @implements IRelatedAccountGroup
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IRelatedAccountGroup=} [properties] Properties to set
+ */
+ function RelatedAccountGroup(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * RelatedAccountGroup name.
+ * @member {string} name
+ * @memberof google.cloud.recaptchaenterprise.v1.RelatedAccountGroup
+ * @instance
+ */
+ RelatedAccountGroup.prototype.name = "";
+
+ /**
+ * Creates a new RelatedAccountGroup instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.RelatedAccountGroup
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IRelatedAccountGroup=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.RelatedAccountGroup} RelatedAccountGroup instance
+ */
+ RelatedAccountGroup.create = function create(properties) {
+ return new RelatedAccountGroup(properties);
+ };
+
+ /**
+ * Encodes the specified RelatedAccountGroup message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.RelatedAccountGroup.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.RelatedAccountGroup
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IRelatedAccountGroup} message RelatedAccountGroup message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ RelatedAccountGroup.encode = function encode(message, writer) {
+ 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 RelatedAccountGroup message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.RelatedAccountGroup.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.RelatedAccountGroup
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IRelatedAccountGroup} message RelatedAccountGroup message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ RelatedAccountGroup.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a RelatedAccountGroup message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.RelatedAccountGroup
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.RelatedAccountGroup} RelatedAccountGroup
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ RelatedAccountGroup.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.RelatedAccountGroup();
+ 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 RelatedAccountGroup message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.RelatedAccountGroup
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.RelatedAccountGroup} RelatedAccountGroup
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ RelatedAccountGroup.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a RelatedAccountGroup message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.RelatedAccountGroup
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ RelatedAccountGroup.verify = function verify(message) {
+ if (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 RelatedAccountGroup message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.RelatedAccountGroup
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.RelatedAccountGroup} RelatedAccountGroup
+ */
+ RelatedAccountGroup.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.RelatedAccountGroup)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.RelatedAccountGroup();
+ if (object.name != null)
+ message.name = String(object.name);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a RelatedAccountGroup message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.RelatedAccountGroup
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.RelatedAccountGroup} message RelatedAccountGroup
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ RelatedAccountGroup.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 RelatedAccountGroup to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.RelatedAccountGroup
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ RelatedAccountGroup.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for RelatedAccountGroup
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.RelatedAccountGroup
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ RelatedAccountGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.RelatedAccountGroup";
+ };
+
+ return RelatedAccountGroup;
+ })();
+
+ v1.WafSettings = (function() {
+
+ /**
+ * Properties of a WafSettings.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @interface IWafSettings
+ * @property {google.cloud.recaptchaenterprise.v1.WafSettings.WafService|null} [wafService] WafSettings wafService
+ * @property {google.cloud.recaptchaenterprise.v1.WafSettings.WafFeature|null} [wafFeature] WafSettings wafFeature
+ */
+
+ /**
+ * Constructs a new WafSettings.
+ * @memberof google.cloud.recaptchaenterprise.v1
+ * @classdesc Represents a WafSettings.
+ * @implements IWafSettings
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1.IWafSettings=} [properties] Properties to set
+ */
+ function WafSettings(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * WafSettings wafService.
+ * @member {google.cloud.recaptchaenterprise.v1.WafSettings.WafService} wafService
+ * @memberof google.cloud.recaptchaenterprise.v1.WafSettings
+ * @instance
+ */
+ WafSettings.prototype.wafService = 0;
+
+ /**
+ * WafSettings wafFeature.
+ * @member {google.cloud.recaptchaenterprise.v1.WafSettings.WafFeature} wafFeature
+ * @memberof google.cloud.recaptchaenterprise.v1.WafSettings
+ * @instance
+ */
+ WafSettings.prototype.wafFeature = 0;
+
+ /**
+ * Creates a new WafSettings instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1.WafSettings
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IWafSettings=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1.WafSettings} WafSettings instance
+ */
+ WafSettings.create = function create(properties) {
+ return new WafSettings(properties);
+ };
+
+ /**
+ * Encodes the specified WafSettings message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.WafSettings.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1.WafSettings
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IWafSettings} message WafSettings message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ WafSettings.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.wafService != null && Object.hasOwnProperty.call(message, "wafService"))
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.wafService);
+ if (message.wafFeature != null && Object.hasOwnProperty.call(message, "wafFeature"))
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.wafFeature);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified WafSettings message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.WafSettings.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.WafSettings
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.IWafSettings} message WafSettings message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ WafSettings.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a WafSettings message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1.WafSettings
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1.WafSettings} WafSettings
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ WafSettings.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.WafSettings();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.wafService = reader.int32();
+ break;
+ }
+ case 2: {
+ message.wafFeature = reader.int32();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a WafSettings message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1.WafSettings
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1.WafSettings} WafSettings
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ WafSettings.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a WafSettings message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1.WafSettings
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ WafSettings.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.wafService != null && message.hasOwnProperty("wafService"))
+ switch (message.wafService) {
+ default:
+ return "wafService: enum value expected";
+ case 0:
+ case 1:
+ break;
+ }
+ if (message.wafFeature != null && message.hasOwnProperty("wafFeature"))
+ switch (message.wafFeature) {
+ default:
+ return "wafFeature: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ break;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a WafSettings message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1.WafSettings
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1.WafSettings} WafSettings
+ */
+ WafSettings.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1.WafSettings)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1.WafSettings();
+ switch (object.wafService) {
+ default:
+ if (typeof object.wafService === "number") {
+ message.wafService = object.wafService;
+ break;
+ }
+ break;
+ case "WAF_SERVICE_UNSPECIFIED":
+ case 0:
+ message.wafService = 0;
+ break;
+ case "CA":
+ case 1:
+ message.wafService = 1;
+ break;
+ }
+ switch (object.wafFeature) {
+ default:
+ if (typeof object.wafFeature === "number") {
+ message.wafFeature = object.wafFeature;
+ break;
+ }
+ break;
+ case "WAF_FEATURE_UNSPECIFIED":
+ case 0:
+ message.wafFeature = 0;
+ break;
+ case "CHALLENGE_PAGE":
+ case 1:
+ message.wafFeature = 1;
+ break;
+ case "SESSION_TOKEN":
+ case 2:
+ message.wafFeature = 2;
+ break;
+ case "ACTION_TOKEN":
+ case 3:
+ message.wafFeature = 3;
+ break;
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a WafSettings message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1.WafSettings
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1.WafSettings} message WafSettings
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ WafSettings.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.wafService = options.enums === String ? "WAF_SERVICE_UNSPECIFIED" : 0;
+ object.wafFeature = options.enums === String ? "WAF_FEATURE_UNSPECIFIED" : 0;
+ }
+ if (message.wafService != null && message.hasOwnProperty("wafService"))
+ object.wafService = options.enums === String ? $root.google.cloud.recaptchaenterprise.v1.WafSettings.WafService[message.wafService] === undefined ? message.wafService : $root.google.cloud.recaptchaenterprise.v1.WafSettings.WafService[message.wafService] : message.wafService;
+ if (message.wafFeature != null && message.hasOwnProperty("wafFeature"))
+ object.wafFeature = options.enums === String ? $root.google.cloud.recaptchaenterprise.v1.WafSettings.WafFeature[message.wafFeature] === undefined ? message.wafFeature : $root.google.cloud.recaptchaenterprise.v1.WafSettings.WafFeature[message.wafFeature] : message.wafFeature;
+ return object;
+ };
+
+ /**
+ * Converts this WafSettings to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1.WafSettings
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ WafSettings.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for WafSettings
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1.WafSettings
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ WafSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1.WafSettings";
+ };
+
+ /**
+ * WafFeature enum.
+ * @name google.cloud.recaptchaenterprise.v1.WafSettings.WafFeature
+ * @enum {number}
+ * @property {number} WAF_FEATURE_UNSPECIFIED=0 WAF_FEATURE_UNSPECIFIED value
+ * @property {number} CHALLENGE_PAGE=1 CHALLENGE_PAGE value
+ * @property {number} SESSION_TOKEN=2 SESSION_TOKEN value
+ * @property {number} ACTION_TOKEN=3 ACTION_TOKEN value
+ */
+ WafSettings.WafFeature = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "WAF_FEATURE_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "CHALLENGE_PAGE"] = 1;
+ values[valuesById[2] = "SESSION_TOKEN"] = 2;
+ values[valuesById[3] = "ACTION_TOKEN"] = 3;
+ return values;
+ })();
+
+ /**
+ * WafService enum.
+ * @name google.cloud.recaptchaenterprise.v1.WafSettings.WafService
+ * @enum {number}
+ * @property {number} WAF_SERVICE_UNSPECIFIED=0 WAF_SERVICE_UNSPECIFIED value
+ * @property {number} CA=1 CA value
+ */
+ WafSettings.WafService = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "WAF_SERVICE_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "CA"] = 1;
+ return values;
+ })();
+
+ return WafSettings;
+ })();
+
+ return v1;
+ })();
+
+ recaptchaenterprise.v1beta1 = (function() {
+
+ /**
+ * Namespace v1beta1.
+ * @memberof google.cloud.recaptchaenterprise
+ * @namespace
+ */
+ var v1beta1 = {};
+
+ v1beta1.RecaptchaEnterpriseServiceV1Beta1 = (function() {
+
+ /**
+ * Constructs a new RecaptchaEnterpriseServiceV1Beta1 service.
+ * @memberof google.cloud.recaptchaenterprise.v1beta1
+ * @classdesc Represents a RecaptchaEnterpriseServiceV1Beta1
+ * @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 RecaptchaEnterpriseServiceV1Beta1(rpcImpl, requestDelimited, responseDelimited) {
+ $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
+ }
+
+ (RecaptchaEnterpriseServiceV1Beta1.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = RecaptchaEnterpriseServiceV1Beta1;
+
+ /**
+ * Creates new RecaptchaEnterpriseServiceV1Beta1 service using the specified rpc implementation.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1
+ * @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 {RecaptchaEnterpriseServiceV1Beta1} RPC service. Useful where requests and/or responses are streamed.
+ */
+ RecaptchaEnterpriseServiceV1Beta1.create = function create(rpcImpl, requestDelimited, responseDelimited) {
+ return new this(rpcImpl, requestDelimited, responseDelimited);
+ };
+
+ /**
+ * Callback as used by {@link google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1|createAssessment}.
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1
+ * @typedef CreateAssessmentCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.recaptchaenterprise.v1beta1.Assessment} [response] Assessment
+ */
+
+ /**
+ * Calls CreateAssessment.
+ * @function createAssessment
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1
+ * @instance
+ * @param {google.cloud.recaptchaenterprise.v1beta1.ICreateAssessmentRequest} request CreateAssessmentRequest message or plain object
+ * @param {google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1.CreateAssessmentCallback} callback Node-style callback called with the error, if any, and Assessment
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(RecaptchaEnterpriseServiceV1Beta1.prototype.createAssessment = function createAssessment(request, callback) {
+ return this.rpcCall(createAssessment, $root.google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest, $root.google.cloud.recaptchaenterprise.v1beta1.Assessment, request, callback);
+ }, "name", { value: "CreateAssessment" });
+
+ /**
+ * Calls CreateAssessment.
+ * @function createAssessment
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1
+ * @instance
+ * @param {google.cloud.recaptchaenterprise.v1beta1.ICreateAssessmentRequest} request CreateAssessmentRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1|annotateAssessment}.
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1
+ * @typedef AnnotateAssessmentCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse} [response] AnnotateAssessmentResponse
+ */
+
+ /**
+ * Calls AnnotateAssessment.
+ * @function annotateAssessment
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1
+ * @instance
+ * @param {google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentRequest} request AnnotateAssessmentRequest message or plain object
+ * @param {google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1.AnnotateAssessmentCallback} callback Node-style callback called with the error, if any, and AnnotateAssessmentResponse
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(RecaptchaEnterpriseServiceV1Beta1.prototype.annotateAssessment = function annotateAssessment(request, callback) {
+ return this.rpcCall(annotateAssessment, $root.google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest, $root.google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse, request, callback);
+ }, "name", { value: "AnnotateAssessment" });
+
+ /**
+ * Calls AnnotateAssessment.
+ * @function annotateAssessment
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1
+ * @instance
+ * @param {google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentRequest} request AnnotateAssessmentRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ return RecaptchaEnterpriseServiceV1Beta1;
+ })();
+
+ v1beta1.CreateAssessmentRequest = (function() {
+
+ /**
+ * Properties of a CreateAssessmentRequest.
+ * @memberof google.cloud.recaptchaenterprise.v1beta1
+ * @interface ICreateAssessmentRequest
+ * @property {string|null} [parent] CreateAssessmentRequest parent
+ * @property {google.cloud.recaptchaenterprise.v1beta1.IAssessment|null} [assessment] CreateAssessmentRequest assessment
+ */
+
+ /**
+ * Constructs a new CreateAssessmentRequest.
+ * @memberof google.cloud.recaptchaenterprise.v1beta1
+ * @classdesc Represents a CreateAssessmentRequest.
+ * @implements ICreateAssessmentRequest
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1beta1.ICreateAssessmentRequest=} [properties] Properties to set
+ */
+ function CreateAssessmentRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * CreateAssessmentRequest parent.
+ * @member {string} parent
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest
+ * @instance
+ */
+ CreateAssessmentRequest.prototype.parent = "";
+
+ /**
+ * CreateAssessmentRequest assessment.
+ * @member {google.cloud.recaptchaenterprise.v1beta1.IAssessment|null|undefined} assessment
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest
+ * @instance
+ */
+ CreateAssessmentRequest.prototype.assessment = null;
+
+ /**
+ * Creates a new CreateAssessmentRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.ICreateAssessmentRequest=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest} CreateAssessmentRequest instance
+ */
+ CreateAssessmentRequest.create = function create(properties) {
+ return new CreateAssessmentRequest(properties);
+ };
+
+ /**
+ * Encodes the specified CreateAssessmentRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.ICreateAssessmentRequest} message CreateAssessmentRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CreateAssessmentRequest.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.assessment != null && Object.hasOwnProperty.call(message, "assessment"))
+ $root.google.cloud.recaptchaenterprise.v1beta1.Assessment.encode(message.assessment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified CreateAssessmentRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.ICreateAssessmentRequest} message CreateAssessmentRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CreateAssessmentRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a CreateAssessmentRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest} CreateAssessmentRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CreateAssessmentRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.parent = reader.string();
+ break;
+ }
+ case 2: {
+ message.assessment = $root.google.cloud.recaptchaenterprise.v1beta1.Assessment.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a CreateAssessmentRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest} CreateAssessmentRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CreateAssessmentRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a CreateAssessmentRequest message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ CreateAssessmentRequest.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.assessment != null && message.hasOwnProperty("assessment")) {
+ var error = $root.google.cloud.recaptchaenterprise.v1beta1.Assessment.verify(message.assessment);
+ if (error)
+ return "assessment." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a CreateAssessmentRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest} CreateAssessmentRequest
+ */
+ CreateAssessmentRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest();
+ if (object.parent != null)
+ message.parent = String(object.parent);
+ if (object.assessment != null) {
+ if (typeof object.assessment !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest.assessment: object expected");
+ message.assessment = $root.google.cloud.recaptchaenterprise.v1beta1.Assessment.fromObject(object.assessment);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a CreateAssessmentRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest} message CreateAssessmentRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ CreateAssessmentRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.parent = "";
+ object.assessment = null;
+ }
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ object.parent = message.parent;
+ if (message.assessment != null && message.hasOwnProperty("assessment"))
+ object.assessment = $root.google.cloud.recaptchaenterprise.v1beta1.Assessment.toObject(message.assessment, options);
+ return object;
+ };
+
+ /**
+ * Converts this CreateAssessmentRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ CreateAssessmentRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for CreateAssessmentRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ CreateAssessmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest";
+ };
+
+ return CreateAssessmentRequest;
+ })();
+
+ v1beta1.AnnotateAssessmentRequest = (function() {
+
+ /**
+ * Properties of an AnnotateAssessmentRequest.
+ * @memberof google.cloud.recaptchaenterprise.v1beta1
+ * @interface IAnnotateAssessmentRequest
+ * @property {string|null} [name] AnnotateAssessmentRequest name
+ * @property {google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation|null} [annotation] AnnotateAssessmentRequest annotation
+ * @property {Array.|null} [reasons] AnnotateAssessmentRequest reasons
+ * @property {Uint8Array|null} [hashedAccountId] AnnotateAssessmentRequest hashedAccountId
+ */
+
+ /**
+ * Constructs a new AnnotateAssessmentRequest.
+ * @memberof google.cloud.recaptchaenterprise.v1beta1
+ * @classdesc Represents an AnnotateAssessmentRequest.
+ * @implements IAnnotateAssessmentRequest
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentRequest=} [properties] Properties to set
+ */
+ function AnnotateAssessmentRequest(properties) {
+ this.reasons = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * AnnotateAssessmentRequest name.
+ * @member {string} name
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest
+ * @instance
+ */
+ AnnotateAssessmentRequest.prototype.name = "";
+
+ /**
+ * AnnotateAssessmentRequest annotation.
+ * @member {google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation} annotation
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest
+ * @instance
+ */
+ AnnotateAssessmentRequest.prototype.annotation = 0;
+
+ /**
+ * AnnotateAssessmentRequest reasons.
+ * @member {Array.} reasons
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest
+ * @instance
+ */
+ AnnotateAssessmentRequest.prototype.reasons = $util.emptyArray;
+
+ /**
+ * AnnotateAssessmentRequest hashedAccountId.
+ * @member {Uint8Array} hashedAccountId
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest
+ * @instance
+ */
+ AnnotateAssessmentRequest.prototype.hashedAccountId = $util.newBuffer([]);
+
+ /**
+ * Creates a new AnnotateAssessmentRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentRequest=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest} AnnotateAssessmentRequest instance
+ */
+ AnnotateAssessmentRequest.create = function create(properties) {
+ return new AnnotateAssessmentRequest(properties);
+ };
+
+ /**
+ * Encodes the specified AnnotateAssessmentRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentRequest} message AnnotateAssessmentRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ AnnotateAssessmentRequest.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ if (message.annotation != null && Object.hasOwnProperty.call(message, "annotation"))
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.annotation);
+ if (message.reasons != null && message.reasons.length) {
+ writer.uint32(/* id 3, wireType 2 =*/26).fork();
+ for (var i = 0; i < message.reasons.length; ++i)
+ writer.int32(message.reasons[i]);
+ writer.ldelim();
+ }
+ if (message.hashedAccountId != null && Object.hasOwnProperty.call(message, "hashedAccountId"))
+ writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.hashedAccountId);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified AnnotateAssessmentRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentRequest} message AnnotateAssessmentRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ AnnotateAssessmentRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an AnnotateAssessmentRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest} AnnotateAssessmentRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ AnnotateAssessmentRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 2: {
+ message.annotation = reader.int32();
+ break;
+ }
+ case 3: {
+ if (!(message.reasons && message.reasons.length))
+ message.reasons = [];
+ if ((tag & 7) === 2) {
+ var end2 = reader.uint32() + reader.pos;
+ while (reader.pos < end2)
+ message.reasons.push(reader.int32());
+ } else
+ message.reasons.push(reader.int32());
+ break;
+ }
+ case 4: {
+ message.hashedAccountId = reader.bytes();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an AnnotateAssessmentRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest} AnnotateAssessmentRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ AnnotateAssessmentRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an AnnotateAssessmentRequest message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ AnnotateAssessmentRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.annotation != null && message.hasOwnProperty("annotation"))
+ switch (message.annotation) {
+ default:
+ return "annotation: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ break;
+ }
+ if (message.reasons != null && message.hasOwnProperty("reasons")) {
+ if (!Array.isArray(message.reasons))
+ return "reasons: array expected";
+ for (var i = 0; i < message.reasons.length; ++i)
+ switch (message.reasons[i]) {
+ default:
+ return "reasons: enum value[] expected";
+ case 0:
+ case 1:
+ case 8:
+ case 9:
+ case 2:
+ case 7:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ break;
+ }
+ }
+ if (message.hashedAccountId != null && message.hasOwnProperty("hashedAccountId"))
+ if (!(message.hashedAccountId && typeof message.hashedAccountId.length === "number" || $util.isString(message.hashedAccountId)))
+ return "hashedAccountId: buffer expected";
+ return null;
+ };
+
+ /**
+ * Creates an AnnotateAssessmentRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest} AnnotateAssessmentRequest
+ */
+ AnnotateAssessmentRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest();
+ if (object.name != null)
+ message.name = String(object.name);
+ switch (object.annotation) {
+ default:
+ if (typeof object.annotation === "number") {
+ message.annotation = object.annotation;
+ break;
+ }
+ break;
+ case "ANNOTATION_UNSPECIFIED":
+ case 0:
+ message.annotation = 0;
+ break;
+ case "LEGITIMATE":
+ case 1:
+ message.annotation = 1;
+ break;
+ case "FRAUDULENT":
+ case 2:
+ message.annotation = 2;
+ break;
+ case "PASSWORD_CORRECT":
+ case 3:
+ message.annotation = 3;
+ break;
+ case "PASSWORD_INCORRECT":
+ case 4:
+ message.annotation = 4;
+ break;
+ }
+ if (object.reasons) {
+ if (!Array.isArray(object.reasons))
+ throw TypeError(".google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.reasons: array expected");
+ message.reasons = [];
+ for (var i = 0; i < object.reasons.length; ++i)
+ switch (object.reasons[i]) {
+ default:
+ if (typeof object.reasons[i] === "number") {
+ message.reasons[i] = object.reasons[i];
+ break;
+ }
+ case "REASON_UNSPECIFIED":
+ case 0:
+ message.reasons[i] = 0;
+ break;
+ case "CHARGEBACK":
+ case 1:
+ message.reasons[i] = 1;
+ break;
+ case "CHARGEBACK_FRAUD":
+ case 8:
+ message.reasons[i] = 8;
+ break;
+ case "CHARGEBACK_DISPUTE":
+ case 9:
+ message.reasons[i] = 9;
+ break;
+ case "PAYMENT_HEURISTICS":
+ case 2:
+ message.reasons[i] = 2;
+ break;
+ case "INITIATED_TWO_FACTOR":
+ case 7:
+ message.reasons[i] = 7;
+ break;
+ case "PASSED_TWO_FACTOR":
+ case 3:
+ message.reasons[i] = 3;
+ break;
+ case "FAILED_TWO_FACTOR":
+ case 4:
+ message.reasons[i] = 4;
+ break;
+ case "CORRECT_PASSWORD":
+ case 5:
+ message.reasons[i] = 5;
+ break;
+ case "INCORRECT_PASSWORD":
+ case 6:
+ message.reasons[i] = 6;
+ break;
+ }
+ }
+ if (object.hashedAccountId != null)
+ if (typeof object.hashedAccountId === "string")
+ $util.base64.decode(object.hashedAccountId, message.hashedAccountId = $util.newBuffer($util.base64.length(object.hashedAccountId)), 0);
+ else if (object.hashedAccountId.length >= 0)
+ message.hashedAccountId = object.hashedAccountId;
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an AnnotateAssessmentRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest} message AnnotateAssessmentRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ AnnotateAssessmentRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.reasons = [];
+ if (options.defaults) {
+ object.name = "";
+ object.annotation = options.enums === String ? "ANNOTATION_UNSPECIFIED" : 0;
+ if (options.bytes === String)
+ object.hashedAccountId = "";
+ else {
+ object.hashedAccountId = [];
+ if (options.bytes !== Array)
+ object.hashedAccountId = $util.newBuffer(object.hashedAccountId);
+ }
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.annotation != null && message.hasOwnProperty("annotation"))
+ object.annotation = options.enums === String ? $root.google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation[message.annotation] === undefined ? message.annotation : $root.google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation[message.annotation] : message.annotation;
+ if (message.reasons && message.reasons.length) {
+ object.reasons = [];
+ for (var j = 0; j < message.reasons.length; ++j)
+ object.reasons[j] = options.enums === String ? $root.google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Reason[message.reasons[j]] === undefined ? message.reasons[j] : $root.google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Reason[message.reasons[j]] : message.reasons[j];
+ }
+ if (message.hashedAccountId != null && message.hasOwnProperty("hashedAccountId"))
+ object.hashedAccountId = options.bytes === String ? $util.base64.encode(message.hashedAccountId, 0, message.hashedAccountId.length) : options.bytes === Array ? Array.prototype.slice.call(message.hashedAccountId) : message.hashedAccountId;
+ return object;
+ };
+
+ /**
+ * Converts this AnnotateAssessmentRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ AnnotateAssessmentRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for AnnotateAssessmentRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ AnnotateAssessmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest";
+ };
+
+ /**
+ * Annotation enum.
+ * @name google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation
+ * @enum {number}
+ * @property {number} ANNOTATION_UNSPECIFIED=0 ANNOTATION_UNSPECIFIED value
+ * @property {number} LEGITIMATE=1 LEGITIMATE value
+ * @property {number} FRAUDULENT=2 FRAUDULENT value
+ * @property {number} PASSWORD_CORRECT=3 PASSWORD_CORRECT value
+ * @property {number} PASSWORD_INCORRECT=4 PASSWORD_INCORRECT value
+ */
+ AnnotateAssessmentRequest.Annotation = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "ANNOTATION_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "LEGITIMATE"] = 1;
+ values[valuesById[2] = "FRAUDULENT"] = 2;
+ values[valuesById[3] = "PASSWORD_CORRECT"] = 3;
+ values[valuesById[4] = "PASSWORD_INCORRECT"] = 4;
+ return values;
+ })();
+
+ /**
+ * Reason enum.
+ * @name google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Reason
+ * @enum {number}
+ * @property {number} REASON_UNSPECIFIED=0 REASON_UNSPECIFIED value
+ * @property {number} CHARGEBACK=1 CHARGEBACK value
+ * @property {number} CHARGEBACK_FRAUD=8 CHARGEBACK_FRAUD value
+ * @property {number} CHARGEBACK_DISPUTE=9 CHARGEBACK_DISPUTE value
+ * @property {number} PAYMENT_HEURISTICS=2 PAYMENT_HEURISTICS value
+ * @property {number} INITIATED_TWO_FACTOR=7 INITIATED_TWO_FACTOR value
+ * @property {number} PASSED_TWO_FACTOR=3 PASSED_TWO_FACTOR value
+ * @property {number} FAILED_TWO_FACTOR=4 FAILED_TWO_FACTOR value
+ * @property {number} CORRECT_PASSWORD=5 CORRECT_PASSWORD value
+ * @property {number} INCORRECT_PASSWORD=6 INCORRECT_PASSWORD value
+ */
+ AnnotateAssessmentRequest.Reason = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "REASON_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "CHARGEBACK"] = 1;
+ values[valuesById[8] = "CHARGEBACK_FRAUD"] = 8;
+ values[valuesById[9] = "CHARGEBACK_DISPUTE"] = 9;
+ values[valuesById[2] = "PAYMENT_HEURISTICS"] = 2;
+ values[valuesById[7] = "INITIATED_TWO_FACTOR"] = 7;
+ values[valuesById[3] = "PASSED_TWO_FACTOR"] = 3;
+ values[valuesById[4] = "FAILED_TWO_FACTOR"] = 4;
+ values[valuesById[5] = "CORRECT_PASSWORD"] = 5;
+ values[valuesById[6] = "INCORRECT_PASSWORD"] = 6;
+ return values;
+ })();
+
+ return AnnotateAssessmentRequest;
+ })();
+
+ v1beta1.AnnotateAssessmentResponse = (function() {
+
+ /**
+ * Properties of an AnnotateAssessmentResponse.
+ * @memberof google.cloud.recaptchaenterprise.v1beta1
+ * @interface IAnnotateAssessmentResponse
+ */
+
+ /**
+ * Constructs a new AnnotateAssessmentResponse.
+ * @memberof google.cloud.recaptchaenterprise.v1beta1
+ * @classdesc Represents an AnnotateAssessmentResponse.
+ * @implements IAnnotateAssessmentResponse
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentResponse=} [properties] Properties to set
+ */
+ function AnnotateAssessmentResponse(properties) {
+ if (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 AnnotateAssessmentResponse instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentResponse=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse} AnnotateAssessmentResponse instance
+ */
+ AnnotateAssessmentResponse.create = function create(properties) {
+ return new AnnotateAssessmentResponse(properties);
+ };
+
+ /**
+ * Encodes the specified AnnotateAssessmentResponse message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentResponse} message AnnotateAssessmentResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ AnnotateAssessmentResponse.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified AnnotateAssessmentResponse message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentResponse} message AnnotateAssessmentResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ AnnotateAssessmentResponse.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an AnnotateAssessmentResponse message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse} AnnotateAssessmentResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ AnnotateAssessmentResponse.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an AnnotateAssessmentResponse message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse} AnnotateAssessmentResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ AnnotateAssessmentResponse.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an AnnotateAssessmentResponse message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ AnnotateAssessmentResponse.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ return null;
+ };
+
+ /**
+ * Creates an AnnotateAssessmentResponse message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse} AnnotateAssessmentResponse
+ */
+ AnnotateAssessmentResponse.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse)
+ return object;
+ return new $root.google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse();
+ };
+
+ /**
+ * Creates a plain object from an AnnotateAssessmentResponse message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse} message AnnotateAssessmentResponse
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ AnnotateAssessmentResponse.toObject = function toObject() {
+ return {};
+ };
+
+ /**
+ * Converts this AnnotateAssessmentResponse to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ AnnotateAssessmentResponse.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for AnnotateAssessmentResponse
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ AnnotateAssessmentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse";
+ };
+
+ return AnnotateAssessmentResponse;
+ })();
+
+ v1beta1.PasswordLeakVerification = (function() {
+
+ /**
+ * Properties of a PasswordLeakVerification.
+ * @memberof google.cloud.recaptchaenterprise.v1beta1
+ * @interface IPasswordLeakVerification
+ * @property {Uint8Array|null} [hashedUserCredentials] PasswordLeakVerification hashedUserCredentials
+ * @property {boolean|null} [credentialsLeaked] PasswordLeakVerification credentialsLeaked
+ * @property {string|null} [canonicalizedUsername] PasswordLeakVerification canonicalizedUsername
+ */
+
+ /**
+ * Constructs a new PasswordLeakVerification.
+ * @memberof google.cloud.recaptchaenterprise.v1beta1
+ * @classdesc Represents a PasswordLeakVerification.
+ * @implements IPasswordLeakVerification
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1beta1.IPasswordLeakVerification=} [properties] Properties to set
+ */
+ function PasswordLeakVerification(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * PasswordLeakVerification hashedUserCredentials.
+ * @member {Uint8Array} hashedUserCredentials
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification
+ * @instance
+ */
+ PasswordLeakVerification.prototype.hashedUserCredentials = $util.newBuffer([]);
+
+ /**
+ * PasswordLeakVerification credentialsLeaked.
+ * @member {boolean} credentialsLeaked
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification
+ * @instance
+ */
+ PasswordLeakVerification.prototype.credentialsLeaked = false;
+
+ /**
+ * PasswordLeakVerification canonicalizedUsername.
+ * @member {string} canonicalizedUsername
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification
+ * @instance
+ */
+ PasswordLeakVerification.prototype.canonicalizedUsername = "";
+
+ /**
+ * Creates a new PasswordLeakVerification instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.IPasswordLeakVerification=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification} PasswordLeakVerification instance
+ */
+ PasswordLeakVerification.create = function create(properties) {
+ return new PasswordLeakVerification(properties);
+ };
+
+ /**
+ * Encodes the specified PasswordLeakVerification message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.IPasswordLeakVerification} message PasswordLeakVerification message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ PasswordLeakVerification.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.hashedUserCredentials != null && Object.hasOwnProperty.call(message, "hashedUserCredentials"))
+ writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.hashedUserCredentials);
+ if (message.credentialsLeaked != null && Object.hasOwnProperty.call(message, "credentialsLeaked"))
+ writer.uint32(/* id 2, wireType 0 =*/16).bool(message.credentialsLeaked);
+ if (message.canonicalizedUsername != null && Object.hasOwnProperty.call(message, "canonicalizedUsername"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.canonicalizedUsername);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified PasswordLeakVerification message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.IPasswordLeakVerification} message PasswordLeakVerification message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ PasswordLeakVerification.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a PasswordLeakVerification message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification} PasswordLeakVerification
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ PasswordLeakVerification.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.hashedUserCredentials = reader.bytes();
+ break;
+ }
+ case 2: {
+ message.credentialsLeaked = reader.bool();
+ break;
+ }
+ case 3: {
+ message.canonicalizedUsername = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a PasswordLeakVerification message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification} PasswordLeakVerification
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ PasswordLeakVerification.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a PasswordLeakVerification message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ PasswordLeakVerification.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.hashedUserCredentials != null && message.hasOwnProperty("hashedUserCredentials"))
+ if (!(message.hashedUserCredentials && typeof message.hashedUserCredentials.length === "number" || $util.isString(message.hashedUserCredentials)))
+ return "hashedUserCredentials: buffer expected";
+ if (message.credentialsLeaked != null && message.hasOwnProperty("credentialsLeaked"))
+ if (typeof message.credentialsLeaked !== "boolean")
+ return "credentialsLeaked: boolean expected";
+ if (message.canonicalizedUsername != null && message.hasOwnProperty("canonicalizedUsername"))
+ if (!$util.isString(message.canonicalizedUsername))
+ return "canonicalizedUsername: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a PasswordLeakVerification message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification} PasswordLeakVerification
+ */
+ PasswordLeakVerification.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification();
+ if (object.hashedUserCredentials != null)
+ if (typeof object.hashedUserCredentials === "string")
+ $util.base64.decode(object.hashedUserCredentials, message.hashedUserCredentials = $util.newBuffer($util.base64.length(object.hashedUserCredentials)), 0);
+ else if (object.hashedUserCredentials.length >= 0)
+ message.hashedUserCredentials = object.hashedUserCredentials;
+ if (object.credentialsLeaked != null)
+ message.credentialsLeaked = Boolean(object.credentialsLeaked);
+ if (object.canonicalizedUsername != null)
+ message.canonicalizedUsername = String(object.canonicalizedUsername);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a PasswordLeakVerification message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification} message PasswordLeakVerification
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ PasswordLeakVerification.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ if (options.bytes === String)
+ object.hashedUserCredentials = "";
+ else {
+ object.hashedUserCredentials = [];
+ if (options.bytes !== Array)
+ object.hashedUserCredentials = $util.newBuffer(object.hashedUserCredentials);
+ }
+ object.credentialsLeaked = false;
+ object.canonicalizedUsername = "";
+ }
+ if (message.hashedUserCredentials != null && message.hasOwnProperty("hashedUserCredentials"))
+ object.hashedUserCredentials = options.bytes === String ? $util.base64.encode(message.hashedUserCredentials, 0, message.hashedUserCredentials.length) : options.bytes === Array ? Array.prototype.slice.call(message.hashedUserCredentials) : message.hashedUserCredentials;
+ if (message.credentialsLeaked != null && message.hasOwnProperty("credentialsLeaked"))
+ object.credentialsLeaked = message.credentialsLeaked;
+ if (message.canonicalizedUsername != null && message.hasOwnProperty("canonicalizedUsername"))
+ object.canonicalizedUsername = message.canonicalizedUsername;
+ return object;
+ };
+
+ /**
+ * Converts this PasswordLeakVerification to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ PasswordLeakVerification.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for PasswordLeakVerification
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ PasswordLeakVerification.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification";
+ };
+
+ return PasswordLeakVerification;
+ })();
+
+ v1beta1.Assessment = (function() {
+
+ /**
+ * Properties of an Assessment.
+ * @memberof google.cloud.recaptchaenterprise.v1beta1
+ * @interface IAssessment
+ * @property {string|null} [name] Assessment name
+ * @property {google.cloud.recaptchaenterprise.v1beta1.IEvent|null} [event] Assessment event
+ * @property {number|null} [score] Assessment score
+ * @property {google.cloud.recaptchaenterprise.v1beta1.ITokenProperties|null} [tokenProperties] Assessment tokenProperties
+ * @property {Array.|null} [reasons] Assessment reasons
+ * @property {google.cloud.recaptchaenterprise.v1beta1.IPasswordLeakVerification|null} [passwordLeakVerification] Assessment passwordLeakVerification
+ * @property {google.cloud.recaptchaenterprise.v1beta1.IAccountDefenderAssessment|null} [accountDefenderAssessment] Assessment accountDefenderAssessment
+ */
+
+ /**
+ * Constructs a new Assessment.
+ * @memberof google.cloud.recaptchaenterprise.v1beta1
+ * @classdesc Represents an Assessment.
+ * @implements IAssessment
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1beta1.IAssessment=} [properties] Properties to set
+ */
+ function Assessment(properties) {
+ this.reasons = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * Assessment name.
+ * @member {string} name
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Assessment
+ * @instance
+ */
+ Assessment.prototype.name = "";
+
+ /**
+ * Assessment event.
+ * @member {google.cloud.recaptchaenterprise.v1beta1.IEvent|null|undefined} event
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Assessment
+ * @instance
+ */
+ Assessment.prototype.event = null;
+
+ /**
+ * Assessment score.
+ * @member {number} score
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Assessment
+ * @instance
+ */
+ Assessment.prototype.score = 0;
+
+ /**
+ * Assessment tokenProperties.
+ * @member {google.cloud.recaptchaenterprise.v1beta1.ITokenProperties|null|undefined} tokenProperties
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Assessment
+ * @instance
+ */
+ Assessment.prototype.tokenProperties = null;
+
+ /**
+ * Assessment reasons.
+ * @member {Array.} reasons
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Assessment
+ * @instance
+ */
+ Assessment.prototype.reasons = $util.emptyArray;
+
+ /**
+ * Assessment passwordLeakVerification.
+ * @member {google.cloud.recaptchaenterprise.v1beta1.IPasswordLeakVerification|null|undefined} passwordLeakVerification
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Assessment
+ * @instance
+ */
+ Assessment.prototype.passwordLeakVerification = null;
+
+ /**
+ * Assessment accountDefenderAssessment.
+ * @member {google.cloud.recaptchaenterprise.v1beta1.IAccountDefenderAssessment|null|undefined} accountDefenderAssessment
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Assessment
+ * @instance
+ */
+ Assessment.prototype.accountDefenderAssessment = null;
+
+ /**
+ * Creates a new Assessment instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Assessment
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.IAssessment=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.Assessment} Assessment instance
+ */
+ Assessment.create = function create(properties) {
+ return new Assessment(properties);
+ };
+
+ /**
+ * Encodes the specified Assessment message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.Assessment.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Assessment
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.IAssessment} message Assessment message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Assessment.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ if (message.event != null && Object.hasOwnProperty.call(message, "event"))
+ $root.google.cloud.recaptchaenterprise.v1beta1.Event.encode(message.event, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ if (message.score != null && Object.hasOwnProperty.call(message, "score"))
+ writer.uint32(/* id 3, wireType 5 =*/29).float(message.score);
+ if (message.tokenProperties != null && Object.hasOwnProperty.call(message, "tokenProperties"))
+ $root.google.cloud.recaptchaenterprise.v1beta1.TokenProperties.encode(message.tokenProperties, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
+ if (message.reasons != null && message.reasons.length) {
+ writer.uint32(/* id 5, wireType 2 =*/42).fork();
+ for (var i = 0; i < message.reasons.length; ++i)
+ writer.int32(message.reasons[i]);
+ writer.ldelim();
+ }
+ if (message.passwordLeakVerification != null && Object.hasOwnProperty.call(message, "passwordLeakVerification"))
+ $root.google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification.encode(message.passwordLeakVerification, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
+ if (message.accountDefenderAssessment != null && Object.hasOwnProperty.call(message, "accountDefenderAssessment"))
+ $root.google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment.encode(message.accountDefenderAssessment, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified Assessment message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.Assessment.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Assessment
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.IAssessment} message Assessment message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Assessment.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an Assessment message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Assessment
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.Assessment} Assessment
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Assessment.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1beta1.Assessment();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 2: {
+ message.event = $root.google.cloud.recaptchaenterprise.v1beta1.Event.decode(reader, reader.uint32());
+ break;
+ }
+ case 3: {
+ message.score = reader.float();
+ break;
+ }
+ case 4: {
+ message.tokenProperties = $root.google.cloud.recaptchaenterprise.v1beta1.TokenProperties.decode(reader, reader.uint32());
+ break;
+ }
+ case 5: {
+ if (!(message.reasons && message.reasons.length))
+ message.reasons = [];
+ if ((tag & 7) === 2) {
+ var end2 = reader.uint32() + reader.pos;
+ while (reader.pos < end2)
+ message.reasons.push(reader.int32());
+ } else
+ message.reasons.push(reader.int32());
+ break;
+ }
+ case 7: {
+ message.passwordLeakVerification = $root.google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification.decode(reader, reader.uint32());
+ break;
+ }
+ case 8: {
+ message.accountDefenderAssessment = $root.google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an Assessment message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Assessment
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.Assessment} Assessment
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Assessment.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an Assessment message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Assessment
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ Assessment.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.event != null && message.hasOwnProperty("event")) {
+ var error = $root.google.cloud.recaptchaenterprise.v1beta1.Event.verify(message.event);
+ if (error)
+ return "event." + error;
+ }
+ if (message.score != null && message.hasOwnProperty("score"))
+ if (typeof message.score !== "number")
+ return "score: number expected";
+ if (message.tokenProperties != null && message.hasOwnProperty("tokenProperties")) {
+ var error = $root.google.cloud.recaptchaenterprise.v1beta1.TokenProperties.verify(message.tokenProperties);
+ if (error)
+ return "tokenProperties." + error;
+ }
+ if (message.reasons != null && message.hasOwnProperty("reasons")) {
+ if (!Array.isArray(message.reasons))
+ return "reasons: array expected";
+ for (var i = 0; i < message.reasons.length; ++i)
+ switch (message.reasons[i]) {
+ default:
+ return "reasons: enum value[] expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ break;
+ }
+ }
+ if (message.passwordLeakVerification != null && message.hasOwnProperty("passwordLeakVerification")) {
+ var error = $root.google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification.verify(message.passwordLeakVerification);
+ if (error)
+ return "passwordLeakVerification." + error;
+ }
+ if (message.accountDefenderAssessment != null && message.hasOwnProperty("accountDefenderAssessment")) {
+ var error = $root.google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment.verify(message.accountDefenderAssessment);
+ if (error)
+ return "accountDefenderAssessment." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates an Assessment message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Assessment
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.Assessment} Assessment
+ */
+ Assessment.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1beta1.Assessment)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1beta1.Assessment();
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object.event != null) {
+ if (typeof object.event !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1beta1.Assessment.event: object expected");
+ message.event = $root.google.cloud.recaptchaenterprise.v1beta1.Event.fromObject(object.event);
+ }
+ if (object.score != null)
+ message.score = Number(object.score);
+ if (object.tokenProperties != null) {
+ if (typeof object.tokenProperties !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1beta1.Assessment.tokenProperties: object expected");
+ message.tokenProperties = $root.google.cloud.recaptchaenterprise.v1beta1.TokenProperties.fromObject(object.tokenProperties);
+ }
+ if (object.reasons) {
+ if (!Array.isArray(object.reasons))
+ throw TypeError(".google.cloud.recaptchaenterprise.v1beta1.Assessment.reasons: array expected");
+ message.reasons = [];
+ for (var i = 0; i < object.reasons.length; ++i)
+ switch (object.reasons[i]) {
+ default:
+ if (typeof object.reasons[i] === "number") {
+ message.reasons[i] = object.reasons[i];
+ break;
+ }
+ case "CLASSIFICATION_REASON_UNSPECIFIED":
+ case 0:
+ message.reasons[i] = 0;
+ break;
+ case "AUTOMATION":
+ case 1:
+ message.reasons[i] = 1;
+ break;
+ case "UNEXPECTED_ENVIRONMENT":
+ case 2:
+ message.reasons[i] = 2;
+ break;
+ case "TOO_MUCH_TRAFFIC":
+ case 3:
+ message.reasons[i] = 3;
+ break;
+ case "UNEXPECTED_USAGE_PATTERNS":
+ case 4:
+ message.reasons[i] = 4;
+ break;
+ case "LOW_CONFIDENCE_SCORE":
+ case 5:
+ message.reasons[i] = 5;
+ break;
+ }
+ }
+ if (object.passwordLeakVerification != null) {
+ if (typeof object.passwordLeakVerification !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1beta1.Assessment.passwordLeakVerification: object expected");
+ message.passwordLeakVerification = $root.google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification.fromObject(object.passwordLeakVerification);
+ }
+ if (object.accountDefenderAssessment != null) {
+ if (typeof object.accountDefenderAssessment !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1beta1.Assessment.accountDefenderAssessment: object expected");
+ message.accountDefenderAssessment = $root.google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment.fromObject(object.accountDefenderAssessment);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an Assessment message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Assessment
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.Assessment} message Assessment
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ Assessment.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.reasons = [];
+ if (options.defaults) {
+ object.name = "";
+ object.event = null;
+ object.score = 0;
+ object.tokenProperties = null;
+ object.passwordLeakVerification = null;
+ object.accountDefenderAssessment = null;
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.event != null && message.hasOwnProperty("event"))
+ object.event = $root.google.cloud.recaptchaenterprise.v1beta1.Event.toObject(message.event, options);
+ if (message.score != null && message.hasOwnProperty("score"))
+ object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
+ if (message.tokenProperties != null && message.hasOwnProperty("tokenProperties"))
+ object.tokenProperties = $root.google.cloud.recaptchaenterprise.v1beta1.TokenProperties.toObject(message.tokenProperties, options);
+ if (message.reasons && message.reasons.length) {
+ object.reasons = [];
+ for (var j = 0; j < message.reasons.length; ++j)
+ object.reasons[j] = options.enums === String ? $root.google.cloud.recaptchaenterprise.v1beta1.Assessment.ClassificationReason[message.reasons[j]] === undefined ? message.reasons[j] : $root.google.cloud.recaptchaenterprise.v1beta1.Assessment.ClassificationReason[message.reasons[j]] : message.reasons[j];
+ }
+ if (message.passwordLeakVerification != null && message.hasOwnProperty("passwordLeakVerification"))
+ object.passwordLeakVerification = $root.google.cloud.recaptchaenterprise.v1beta1.PasswordLeakVerification.toObject(message.passwordLeakVerification, options);
+ if (message.accountDefenderAssessment != null && message.hasOwnProperty("accountDefenderAssessment"))
+ object.accountDefenderAssessment = $root.google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment.toObject(message.accountDefenderAssessment, options);
+ return object;
+ };
+
+ /**
+ * Converts this Assessment to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Assessment
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ Assessment.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for Assessment
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Assessment
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ Assessment.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1beta1.Assessment";
+ };
+
+ /**
+ * ClassificationReason enum.
+ * @name google.cloud.recaptchaenterprise.v1beta1.Assessment.ClassificationReason
+ * @enum {number}
+ * @property {number} CLASSIFICATION_REASON_UNSPECIFIED=0 CLASSIFICATION_REASON_UNSPECIFIED value
+ * @property {number} AUTOMATION=1 AUTOMATION value
+ * @property {number} UNEXPECTED_ENVIRONMENT=2 UNEXPECTED_ENVIRONMENT value
+ * @property {number} TOO_MUCH_TRAFFIC=3 TOO_MUCH_TRAFFIC value
+ * @property {number} UNEXPECTED_USAGE_PATTERNS=4 UNEXPECTED_USAGE_PATTERNS value
+ * @property {number} LOW_CONFIDENCE_SCORE=5 LOW_CONFIDENCE_SCORE value
+ */
+ Assessment.ClassificationReason = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "CLASSIFICATION_REASON_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "AUTOMATION"] = 1;
+ values[valuesById[2] = "UNEXPECTED_ENVIRONMENT"] = 2;
+ values[valuesById[3] = "TOO_MUCH_TRAFFIC"] = 3;
+ values[valuesById[4] = "UNEXPECTED_USAGE_PATTERNS"] = 4;
+ values[valuesById[5] = "LOW_CONFIDENCE_SCORE"] = 5;
+ return values;
+ })();
+
+ return Assessment;
+ })();
+
+ v1beta1.Event = (function() {
+
+ /**
+ * Properties of an Event.
+ * @memberof google.cloud.recaptchaenterprise.v1beta1
+ * @interface IEvent
+ * @property {string|null} [token] Event token
+ * @property {string|null} [siteKey] Event siteKey
+ * @property {string|null} [userAgent] Event userAgent
+ * @property {string|null} [userIpAddress] Event userIpAddress
+ * @property {string|null} [expectedAction] Event expectedAction
+ * @property {Uint8Array|null} [hashedAccountId] Event hashedAccountId
+ */
+
+ /**
+ * Constructs a new Event.
+ * @memberof google.cloud.recaptchaenterprise.v1beta1
+ * @classdesc Represents an Event.
+ * @implements IEvent
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1beta1.IEvent=} [properties] Properties to set
+ */
+ function Event(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * Event token.
+ * @member {string} token
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Event
+ * @instance
+ */
+ Event.prototype.token = "";
+
+ /**
+ * Event siteKey.
+ * @member {string} siteKey
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Event
+ * @instance
+ */
+ Event.prototype.siteKey = "";
+
+ /**
+ * Event userAgent.
+ * @member {string} userAgent
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Event
+ * @instance
+ */
+ Event.prototype.userAgent = "";
+
+ /**
+ * Event userIpAddress.
+ * @member {string} userIpAddress
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Event
+ * @instance
+ */
+ Event.prototype.userIpAddress = "";
+
+ /**
+ * Event expectedAction.
+ * @member {string} expectedAction
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Event
+ * @instance
+ */
+ Event.prototype.expectedAction = "";
+
+ /**
+ * Event hashedAccountId.
+ * @member {Uint8Array} hashedAccountId
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Event
+ * @instance
+ */
+ Event.prototype.hashedAccountId = $util.newBuffer([]);
+
+ /**
+ * Creates a new Event instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Event
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.IEvent=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.Event} Event instance
+ */
+ Event.create = function create(properties) {
+ return new Event(properties);
+ };
+
+ /**
+ * Encodes the specified Event message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.Event.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Event
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.IEvent} message Event message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Event.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.token != null && Object.hasOwnProperty.call(message, "token"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.token);
+ if (message.siteKey != null && Object.hasOwnProperty.call(message, "siteKey"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.siteKey);
+ if (message.userAgent != null && Object.hasOwnProperty.call(message, "userAgent"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.userAgent);
+ if (message.userIpAddress != null && Object.hasOwnProperty.call(message, "userIpAddress"))
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.userIpAddress);
+ if (message.expectedAction != null && Object.hasOwnProperty.call(message, "expectedAction"))
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.expectedAction);
+ if (message.hashedAccountId != null && Object.hasOwnProperty.call(message, "hashedAccountId"))
+ writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.hashedAccountId);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified Event message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.Event.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Event
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.IEvent} message Event message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Event.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an Event message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Event
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.Event} Event
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Event.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1beta1.Event();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.token = reader.string();
+ break;
+ }
+ case 2: {
+ message.siteKey = reader.string();
+ break;
+ }
+ case 3: {
+ message.userAgent = reader.string();
+ break;
+ }
+ case 4: {
+ message.userIpAddress = reader.string();
+ break;
+ }
+ case 5: {
+ message.expectedAction = reader.string();
+ break;
+ }
+ case 6: {
+ message.hashedAccountId = reader.bytes();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an Event message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Event
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.Event} Event
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Event.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an Event message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Event
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ Event.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.token != null && message.hasOwnProperty("token"))
+ if (!$util.isString(message.token))
+ return "token: string expected";
+ if (message.siteKey != null && message.hasOwnProperty("siteKey"))
+ if (!$util.isString(message.siteKey))
+ return "siteKey: string expected";
+ if (message.userAgent != null && message.hasOwnProperty("userAgent"))
+ if (!$util.isString(message.userAgent))
+ return "userAgent: string expected";
+ if (message.userIpAddress != null && message.hasOwnProperty("userIpAddress"))
+ if (!$util.isString(message.userIpAddress))
+ return "userIpAddress: string expected";
+ if (message.expectedAction != null && message.hasOwnProperty("expectedAction"))
+ if (!$util.isString(message.expectedAction))
+ return "expectedAction: string expected";
+ if (message.hashedAccountId != null && message.hasOwnProperty("hashedAccountId"))
+ if (!(message.hashedAccountId && typeof message.hashedAccountId.length === "number" || $util.isString(message.hashedAccountId)))
+ return "hashedAccountId: buffer expected";
+ return null;
+ };
+
+ /**
+ * Creates an Event message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Event
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.Event} Event
+ */
+ Event.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1beta1.Event)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1beta1.Event();
+ if (object.token != null)
+ message.token = String(object.token);
+ if (object.siteKey != null)
+ message.siteKey = String(object.siteKey);
+ if (object.userAgent != null)
+ message.userAgent = String(object.userAgent);
+ if (object.userIpAddress != null)
+ message.userIpAddress = String(object.userIpAddress);
+ if (object.expectedAction != null)
+ message.expectedAction = String(object.expectedAction);
+ if (object.hashedAccountId != null)
+ if (typeof object.hashedAccountId === "string")
+ $util.base64.decode(object.hashedAccountId, message.hashedAccountId = $util.newBuffer($util.base64.length(object.hashedAccountId)), 0);
+ else if (object.hashedAccountId.length >= 0)
+ message.hashedAccountId = object.hashedAccountId;
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an Event message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Event
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.Event} message Event
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ Event.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.token = "";
+ object.siteKey = "";
+ object.userAgent = "";
+ object.userIpAddress = "";
+ object.expectedAction = "";
+ if (options.bytes === String)
+ object.hashedAccountId = "";
+ else {
+ object.hashedAccountId = [];
+ if (options.bytes !== Array)
+ object.hashedAccountId = $util.newBuffer(object.hashedAccountId);
+ }
+ }
+ if (message.token != null && message.hasOwnProperty("token"))
+ object.token = message.token;
+ if (message.siteKey != null && message.hasOwnProperty("siteKey"))
+ object.siteKey = message.siteKey;
+ if (message.userAgent != null && message.hasOwnProperty("userAgent"))
+ object.userAgent = message.userAgent;
+ if (message.userIpAddress != null && message.hasOwnProperty("userIpAddress"))
+ object.userIpAddress = message.userIpAddress;
+ if (message.expectedAction != null && message.hasOwnProperty("expectedAction"))
+ object.expectedAction = message.expectedAction;
+ if (message.hashedAccountId != null && message.hasOwnProperty("hashedAccountId"))
+ object.hashedAccountId = options.bytes === String ? $util.base64.encode(message.hashedAccountId, 0, message.hashedAccountId.length) : options.bytes === Array ? Array.prototype.slice.call(message.hashedAccountId) : message.hashedAccountId;
+ return object;
+ };
+
+ /**
+ * Converts this Event to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Event
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ Event.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for Event
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.Event
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ Event.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1beta1.Event";
+ };
+
+ return Event;
+ })();
+
+ v1beta1.TokenProperties = (function() {
+
+ /**
+ * Properties of a TokenProperties.
+ * @memberof google.cloud.recaptchaenterprise.v1beta1
+ * @interface ITokenProperties
+ * @property {boolean|null} [valid] TokenProperties valid
+ * @property {google.cloud.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason|null} [invalidReason] TokenProperties invalidReason
+ * @property {google.protobuf.ITimestamp|null} [createTime] TokenProperties createTime
+ * @property {string|null} [hostname] TokenProperties hostname
+ * @property {string|null} [action] TokenProperties action
+ */
+
+ /**
+ * Constructs a new TokenProperties.
+ * @memberof google.cloud.recaptchaenterprise.v1beta1
+ * @classdesc Represents a TokenProperties.
+ * @implements ITokenProperties
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1beta1.ITokenProperties=} [properties] Properties to set
+ */
+ function TokenProperties(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * TokenProperties valid.
+ * @member {boolean} valid
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.TokenProperties
+ * @instance
+ */
+ TokenProperties.prototype.valid = false;
+
+ /**
+ * TokenProperties invalidReason.
+ * @member {google.cloud.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason} invalidReason
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.TokenProperties
+ * @instance
+ */
+ TokenProperties.prototype.invalidReason = 0;
+
+ /**
+ * TokenProperties createTime.
+ * @member {google.protobuf.ITimestamp|null|undefined} createTime
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.TokenProperties
+ * @instance
+ */
+ TokenProperties.prototype.createTime = null;
+
+ /**
+ * TokenProperties hostname.
+ * @member {string} hostname
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.TokenProperties
+ * @instance
+ */
+ TokenProperties.prototype.hostname = "";
+
+ /**
+ * TokenProperties action.
+ * @member {string} action
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.TokenProperties
+ * @instance
+ */
+ TokenProperties.prototype.action = "";
+
+ /**
+ * Creates a new TokenProperties instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.TokenProperties
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.ITokenProperties=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.TokenProperties} TokenProperties instance
+ */
+ TokenProperties.create = function create(properties) {
+ return new TokenProperties(properties);
+ };
+
+ /**
+ * Encodes the specified TokenProperties message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.TokenProperties.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.TokenProperties
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.ITokenProperties} message TokenProperties message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ TokenProperties.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.valid != null && Object.hasOwnProperty.call(message, "valid"))
+ writer.uint32(/* id 1, wireType 0 =*/8).bool(message.valid);
+ if (message.invalidReason != null && Object.hasOwnProperty.call(message, "invalidReason"))
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.invalidReason);
+ if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime"))
+ $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname"))
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.hostname);
+ if (message.action != null && Object.hasOwnProperty.call(message, "action"))
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.action);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified TokenProperties message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.TokenProperties.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.TokenProperties
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.ITokenProperties} message TokenProperties message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ TokenProperties.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a TokenProperties message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.TokenProperties
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.TokenProperties} TokenProperties
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ TokenProperties.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1beta1.TokenProperties();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.valid = reader.bool();
+ break;
+ }
+ case 2: {
+ message.invalidReason = reader.int32();
+ break;
+ }
+ case 3: {
+ message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
+ break;
+ }
+ case 4: {
+ message.hostname = reader.string();
+ break;
+ }
+ case 5: {
+ message.action = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a TokenProperties message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.TokenProperties
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.TokenProperties} TokenProperties
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ TokenProperties.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a TokenProperties message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.TokenProperties
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ TokenProperties.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.valid != null && message.hasOwnProperty("valid"))
+ if (typeof message.valid !== "boolean")
+ return "valid: boolean expected";
+ if (message.invalidReason != null && message.hasOwnProperty("invalidReason"))
+ switch (message.invalidReason) {
+ default:
+ return "invalidReason: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ break;
+ }
+ if (message.createTime != null && message.hasOwnProperty("createTime")) {
+ var error = $root.google.protobuf.Timestamp.verify(message.createTime);
+ if (error)
+ return "createTime." + error;
+ }
+ if (message.hostname != null && message.hasOwnProperty("hostname"))
+ if (!$util.isString(message.hostname))
+ return "hostname: string expected";
+ if (message.action != null && message.hasOwnProperty("action"))
+ if (!$util.isString(message.action))
+ return "action: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a TokenProperties message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.TokenProperties
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.TokenProperties} TokenProperties
+ */
+ TokenProperties.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1beta1.TokenProperties)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1beta1.TokenProperties();
+ if (object.valid != null)
+ message.valid = Boolean(object.valid);
+ switch (object.invalidReason) {
+ default:
+ if (typeof object.invalidReason === "number") {
+ message.invalidReason = object.invalidReason;
+ break;
+ }
+ break;
+ case "INVALID_REASON_UNSPECIFIED":
+ case 0:
+ message.invalidReason = 0;
+ break;
+ case "UNKNOWN_INVALID_REASON":
+ case 1:
+ message.invalidReason = 1;
+ break;
+ case "MALFORMED":
+ case 2:
+ message.invalidReason = 2;
+ break;
+ case "EXPIRED":
+ case 3:
+ message.invalidReason = 3;
+ break;
+ case "DUPE":
+ case 4:
+ message.invalidReason = 4;
+ break;
+ case "SITE_MISMATCH":
+ case 5:
+ message.invalidReason = 5;
+ break;
+ case "MISSING":
+ case 6:
+ message.invalidReason = 6;
+ break;
+ case "BROWSER_ERROR":
+ case 7:
+ message.invalidReason = 7;
+ break;
+ }
+ if (object.createTime != null) {
+ if (typeof object.createTime !== "object")
+ throw TypeError(".google.cloud.recaptchaenterprise.v1beta1.TokenProperties.createTime: object expected");
+ message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime);
+ }
+ if (object.hostname != null)
+ message.hostname = String(object.hostname);
+ if (object.action != null)
+ message.action = String(object.action);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a TokenProperties message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.TokenProperties
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.TokenProperties} message TokenProperties
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ TokenProperties.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.valid = false;
+ object.invalidReason = options.enums === String ? "INVALID_REASON_UNSPECIFIED" : 0;
+ object.createTime = null;
+ object.hostname = "";
+ object.action = "";
+ }
+ if (message.valid != null && message.hasOwnProperty("valid"))
+ object.valid = message.valid;
+ if (message.invalidReason != null && message.hasOwnProperty("invalidReason"))
+ object.invalidReason = options.enums === String ? $root.google.cloud.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason[message.invalidReason] === undefined ? message.invalidReason : $root.google.cloud.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason[message.invalidReason] : message.invalidReason;
+ if (message.createTime != null && message.hasOwnProperty("createTime"))
+ object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options);
+ if (message.hostname != null && message.hasOwnProperty("hostname"))
+ object.hostname = message.hostname;
+ if (message.action != null && message.hasOwnProperty("action"))
+ object.action = message.action;
+ return object;
+ };
+
+ /**
+ * Converts this TokenProperties to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.TokenProperties
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ TokenProperties.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for TokenProperties
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.TokenProperties
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ TokenProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1beta1.TokenProperties";
+ };
+
+ /**
+ * InvalidReason enum.
+ * @name google.cloud.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason
+ * @enum {number}
+ * @property {number} INVALID_REASON_UNSPECIFIED=0 INVALID_REASON_UNSPECIFIED value
+ * @property {number} UNKNOWN_INVALID_REASON=1 UNKNOWN_INVALID_REASON value
+ * @property {number} MALFORMED=2 MALFORMED value
+ * @property {number} EXPIRED=3 EXPIRED value
+ * @property {number} DUPE=4 DUPE value
+ * @property {number} SITE_MISMATCH=5 SITE_MISMATCH value
+ * @property {number} MISSING=6 MISSING value
+ * @property {number} BROWSER_ERROR=7 BROWSER_ERROR value
+ */
+ TokenProperties.InvalidReason = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "INVALID_REASON_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "UNKNOWN_INVALID_REASON"] = 1;
+ values[valuesById[2] = "MALFORMED"] = 2;
+ values[valuesById[3] = "EXPIRED"] = 3;
+ values[valuesById[4] = "DUPE"] = 4;
+ values[valuesById[5] = "SITE_MISMATCH"] = 5;
+ values[valuesById[6] = "MISSING"] = 6;
+ values[valuesById[7] = "BROWSER_ERROR"] = 7;
+ return values;
+ })();
+
+ return TokenProperties;
+ })();
+
+ v1beta1.AccountDefenderAssessment = (function() {
+
+ /**
+ * Properties of an AccountDefenderAssessment.
+ * @memberof google.cloud.recaptchaenterprise.v1beta1
+ * @interface IAccountDefenderAssessment
+ * @property {Array.|null} [labels] AccountDefenderAssessment labels
+ */
+
+ /**
+ * Constructs a new AccountDefenderAssessment.
+ * @memberof google.cloud.recaptchaenterprise.v1beta1
+ * @classdesc Represents an AccountDefenderAssessment.
+ * @implements IAccountDefenderAssessment
+ * @constructor
+ * @param {google.cloud.recaptchaenterprise.v1beta1.IAccountDefenderAssessment=} [properties] Properties to set
+ */
+ function AccountDefenderAssessment(properties) {
+ this.labels = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * AccountDefenderAssessment labels.
+ * @member {Array.} labels
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment
+ * @instance
+ */
+ AccountDefenderAssessment.prototype.labels = $util.emptyArray;
+
+ /**
+ * Creates a new AccountDefenderAssessment instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.IAccountDefenderAssessment=} [properties] Properties to set
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment} AccountDefenderAssessment instance
+ */
+ AccountDefenderAssessment.create = function create(properties) {
+ return new AccountDefenderAssessment(properties);
+ };
+
+ /**
+ * Encodes the specified AccountDefenderAssessment message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.IAccountDefenderAssessment} message AccountDefenderAssessment message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ AccountDefenderAssessment.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.labels != null && message.labels.length) {
+ writer.uint32(/* id 1, wireType 2 =*/10).fork();
+ for (var i = 0; i < message.labels.length; ++i)
+ writer.int32(message.labels[i]);
+ writer.ldelim();
+ }
+ return writer;
+ };
+
+ /**
+ * Encodes the specified AccountDefenderAssessment message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.IAccountDefenderAssessment} message AccountDefenderAssessment message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ AccountDefenderAssessment.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an AccountDefenderAssessment message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment} AccountDefenderAssessment
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ AccountDefenderAssessment.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.labels && message.labels.length))
+ message.labels = [];
+ if ((tag & 7) === 2) {
+ var end2 = reader.uint32() + reader.pos;
+ while (reader.pos < end2)
+ message.labels.push(reader.int32());
+ } else
+ message.labels.push(reader.int32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an AccountDefenderAssessment message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment} AccountDefenderAssessment
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ AccountDefenderAssessment.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an AccountDefenderAssessment message.
+ * @function verify
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ AccountDefenderAssessment.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.labels != null && message.hasOwnProperty("labels")) {
+ if (!Array.isArray(message.labels))
+ return "labels: array expected";
+ for (var i = 0; i < message.labels.length; ++i)
+ switch (message.labels[i]) {
+ default:
+ return "labels: enum value[] expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ break;
+ }
+ }
+ return null;
+ };
+
+ /**
+ * Creates an AccountDefenderAssessment message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment} AccountDefenderAssessment
+ */
+ AccountDefenderAssessment.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment)
+ return object;
+ var message = new $root.google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment();
+ if (object.labels) {
+ if (!Array.isArray(object.labels))
+ throw TypeError(".google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment.labels: array expected");
+ message.labels = [];
+ for (var i = 0; i < object.labels.length; ++i)
+ switch (object.labels[i]) {
+ default:
+ if (typeof object.labels[i] === "number") {
+ message.labels[i] = object.labels[i];
+ break;
+ }
+ case "ACCOUNT_DEFENDER_LABEL_UNSPECIFIED":
+ case 0:
+ message.labels[i] = 0;
+ break;
+ case "PROFILE_MATCH":
+ case 1:
+ message.labels[i] = 1;
+ break;
+ case "SUSPICIOUS_LOGIN_ACTIVITY":
+ case 2:
+ message.labels[i] = 2;
+ break;
+ case "SUSPICIOUS_ACCOUNT_CREATION":
+ case 3:
+ message.labels[i] = 3;
+ break;
+ case "RELATED_ACCOUNTS_NUMBER_HIGH":
+ case 4:
+ message.labels[i] = 4;
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an AccountDefenderAssessment message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment
+ * @static
+ * @param {google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment} message AccountDefenderAssessment
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ AccountDefenderAssessment.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.labels = [];
+ if (message.labels && message.labels.length) {
+ object.labels = [];
+ for (var j = 0; j < message.labels.length; ++j)
+ object.labels[j] = options.enums === String ? $root.google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment.AccountDefenderLabel[message.labels[j]] === undefined ? message.labels[j] : $root.google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment.AccountDefenderLabel[message.labels[j]] : message.labels[j];
+ }
+ return object;
+ };
+
+ /**
+ * Converts this AccountDefenderAssessment to JSON.
+ * @function toJSON
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ AccountDefenderAssessment.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for AccountDefenderAssessment
+ * @function getTypeUrl
+ * @memberof google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ AccountDefenderAssessment.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment";
+ };
+
+ /**
+ * AccountDefenderLabel enum.
+ * @name google.cloud.recaptchaenterprise.v1beta1.AccountDefenderAssessment.AccountDefenderLabel
+ * @enum {number}
+ * @property {number} ACCOUNT_DEFENDER_LABEL_UNSPECIFIED=0 ACCOUNT_DEFENDER_LABEL_UNSPECIFIED value
+ * @property {number} PROFILE_MATCH=1 PROFILE_MATCH value
+ * @property {number} SUSPICIOUS_LOGIN_ACTIVITY=2 SUSPICIOUS_LOGIN_ACTIVITY value
+ * @property {number} SUSPICIOUS_ACCOUNT_CREATION=3 SUSPICIOUS_ACCOUNT_CREATION value
+ * @property {number} RELATED_ACCOUNTS_NUMBER_HIGH=4 RELATED_ACCOUNTS_NUMBER_HIGH value
+ */
+ AccountDefenderAssessment.AccountDefenderLabel = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "ACCOUNT_DEFENDER_LABEL_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "PROFILE_MATCH"] = 1;
+ values[valuesById[2] = "SUSPICIOUS_LOGIN_ACTIVITY"] = 2;
+ values[valuesById[3] = "SUSPICIOUS_ACCOUNT_CREATION"] = 3;
+ values[valuesById[4] = "RELATED_ACCOUNTS_NUMBER_HIGH"] = 4;
+ return values;
+ })();
+
+ return AccountDefenderAssessment;
+ })();
+
+ return v1beta1;
+ })();
+
+ return recaptchaenterprise;
+ })();
+
+ 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.