From 60e126488558f1ecc017c8a1b959ae2f0a99ecbe Mon Sep 17 00:00:00 2001
From: sofisl <55454395+sofisl@users.noreply.github.com>
Date: Fri, 4 Nov 2022 16:27:45 -0700
Subject: [PATCH 01/15] build: fix readme generation, do not fail if product
documentation does not exist (#3474)
* build: readme generation, do not fail if product documentation does not exist
---
bin/generate-readme.mjs | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/bin/generate-readme.mjs b/bin/generate-readme.mjs
index bf980f33bb1..35ef7d95aeb 100755
--- a/bin/generate-readme.mjs
+++ b/bin/generate-readme.mjs
@@ -152,13 +152,25 @@ async function processMetadata (repoMetadata) {
supportDocsUrl = 'https://cloud.google.com/stackdriver/docs/getting-support';
}
+ if (!supportDocsUrl.match(/^https/)) {
+ supportDocsUrl = `https://${supportDocsUrl}`
+ }
+
+ let res;
+ let remoteUrlExists = true;
// if URL doesn't exist, fall back to the generic docs page
- const res = await request({
- url: supportDocsUrl,
- method: 'HEAD',
- validateStatus: () => true
- });
- const remoteUrlExists = res.status !== 404;
+ try {
+ res = await request({
+ url: supportDocsUrl,
+ method: 'HEAD',
+ validateStatus: () => true
+ });
+ } catch (err) {
+ if (err.status) === 404 {
+ remoteUrlExists = false;
+ }
+ }
+
if (!remoteUrlExists) {
supportDocsUrl = metadata.product_documentation;
}
From c063aef847a011762f16c04bd33d05a860b69cd4 Mon Sep 17 00:00:00 2001
From: "owlbot-bootstrapper[bot]"
<104649659+owlbot-bootstrapper[bot]@users.noreply.github.com>
Date: Fri, 4 Nov 2022 23:50:13 +0000
Subject: [PATCH 02/15] feat: add initial files for
google.maps.addressvalidation.v1 (#3444)
Source-Link: https://googleapis/googleapis-gen@f550f5e45d7b9d5cf92be96db2de5cc2a8088c39
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtYWRkcmVzc3ZhbGlkYXRpb24vLk93bEJvdC55YW1sIiwiaCI6ImY1NTBmNWU0NWQ3YjlkNWNmOTJiZTk2ZGIyZGU1Y2MyYTgwODhjMzkifQ==
---
.../.OwlBot.yaml | 17 +
.../.eslintignore | 7 +
.../.eslintrc.json | 3 +
.../.gitattributes | 4 +
.../google-maps-addressvalidation/.gitignore | 14 +
.../google-maps-addressvalidation/.jsdoc.js | 55 +
.../google-maps-addressvalidation/.mocharc.js | 29 +
packages/google-maps-addressvalidation/.nycrc | 24 +
.../.prettierignore | 6 +
.../.prettierrc.js | 17 +
.../.repo-metadata.json | 16 +
.../CODE_OF_CONDUCT.md | 94 +
.../CONTRIBUTING.md | 76 +
.../google-maps-addressvalidation/LICENSE | 202 +
.../google-maps-addressvalidation/README.md | 214 +
.../linkinator.config.json | 16 +
.../package.json | 66 +
.../protos/google/geo/type/viewport.proto | 69 +
.../maps/addressvalidation/v1/address.proto | 145 +
.../v1/address_validation_service.proto | 275 +
.../maps/addressvalidation/v1/geocode.proto | 81 +
.../maps/addressvalidation/v1/metadata.proto | 56 +
.../maps/addressvalidation/v1/usps_data.proto | 218 +
.../protos/protos.d.ts | 6016 ++++++
.../protos/protos.js | 16306 ++++++++++++++++
.../protos/protos.json | 1723 ++
.../samples/README.md | 104 +
..._validation.provide_validation_feedback.js | 70 +
.../v1/address_validation.validate_address.js | 98 +
...data.google.maps.addressvalidation.v1.json | 107 +
.../samples/package.json | 24 +
.../samples/quickstart.js | 100 +
.../samples/test/quickstart.js | 31 +
.../src/index.ts | 27 +
.../src/v1/address_validation_client.ts | 562 +
.../v1/address_validation_client_config.json | 48 +
.../src/v1/address_validation_proto_list.json | 8 +
.../src/v1/gapic_metadata.json | 43 +
.../src/v1/index.ts | 19 +
.../system-test/fixtures/sample/src/index.js | 27 +
.../system-test/fixtures/sample/src/index.ts | 32 +
.../system-test/install.ts | 51 +
.../test/gapic_address_validation_v1.ts | 339 +
.../tsconfig.json | 19 +
.../webpack.config.js | 64 +
release-please-config.json | 3 +-
46 files changed, 27524 insertions(+), 1 deletion(-)
create mode 100644 packages/google-maps-addressvalidation/.OwlBot.yaml
create mode 100644 packages/google-maps-addressvalidation/.eslintignore
create mode 100644 packages/google-maps-addressvalidation/.eslintrc.json
create mode 100644 packages/google-maps-addressvalidation/.gitattributes
create mode 100644 packages/google-maps-addressvalidation/.gitignore
create mode 100644 packages/google-maps-addressvalidation/.jsdoc.js
create mode 100644 packages/google-maps-addressvalidation/.mocharc.js
create mode 100644 packages/google-maps-addressvalidation/.nycrc
create mode 100644 packages/google-maps-addressvalidation/.prettierignore
create mode 100644 packages/google-maps-addressvalidation/.prettierrc.js
create mode 100644 packages/google-maps-addressvalidation/.repo-metadata.json
create mode 100644 packages/google-maps-addressvalidation/CODE_OF_CONDUCT.md
create mode 100644 packages/google-maps-addressvalidation/CONTRIBUTING.md
create mode 100644 packages/google-maps-addressvalidation/LICENSE
create mode 100644 packages/google-maps-addressvalidation/README.md
create mode 100644 packages/google-maps-addressvalidation/linkinator.config.json
create mode 100644 packages/google-maps-addressvalidation/package.json
create mode 100644 packages/google-maps-addressvalidation/protos/google/geo/type/viewport.proto
create mode 100644 packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/address.proto
create mode 100644 packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/address_validation_service.proto
create mode 100644 packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/geocode.proto
create mode 100644 packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/metadata.proto
create mode 100644 packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/usps_data.proto
create mode 100644 packages/google-maps-addressvalidation/protos/protos.d.ts
create mode 100644 packages/google-maps-addressvalidation/protos/protos.js
create mode 100644 packages/google-maps-addressvalidation/protos/protos.json
create mode 100644 packages/google-maps-addressvalidation/samples/README.md
create mode 100644 packages/google-maps-addressvalidation/samples/generated/v1/address_validation.provide_validation_feedback.js
create mode 100644 packages/google-maps-addressvalidation/samples/generated/v1/address_validation.validate_address.js
create mode 100644 packages/google-maps-addressvalidation/samples/generated/v1/snippet_metadata.google.maps.addressvalidation.v1.json
create mode 100644 packages/google-maps-addressvalidation/samples/package.json
create mode 100644 packages/google-maps-addressvalidation/samples/quickstart.js
create mode 100644 packages/google-maps-addressvalidation/samples/test/quickstart.js
create mode 100644 packages/google-maps-addressvalidation/src/index.ts
create mode 100644 packages/google-maps-addressvalidation/src/v1/address_validation_client.ts
create mode 100644 packages/google-maps-addressvalidation/src/v1/address_validation_client_config.json
create mode 100644 packages/google-maps-addressvalidation/src/v1/address_validation_proto_list.json
create mode 100644 packages/google-maps-addressvalidation/src/v1/gapic_metadata.json
create mode 100644 packages/google-maps-addressvalidation/src/v1/index.ts
create mode 100644 packages/google-maps-addressvalidation/system-test/fixtures/sample/src/index.js
create mode 100644 packages/google-maps-addressvalidation/system-test/fixtures/sample/src/index.ts
create mode 100644 packages/google-maps-addressvalidation/system-test/install.ts
create mode 100644 packages/google-maps-addressvalidation/test/gapic_address_validation_v1.ts
create mode 100644 packages/google-maps-addressvalidation/tsconfig.json
create mode 100644 packages/google-maps-addressvalidation/webpack.config.js
diff --git a/packages/google-maps-addressvalidation/.OwlBot.yaml b/packages/google-maps-addressvalidation/.OwlBot.yaml
new file mode 100644
index 00000000000..0c2d83691bc
--- /dev/null
+++ b/packages/google-maps-addressvalidation/.OwlBot.yaml
@@ -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
+#
+# 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-copy-regex:
+ - source: /google/maps/addressvalidation/(.*)/.*-nodejs
+ dest: /owl-bot-staging/google-maps-addressvalidation/$1
\ No newline at end of file
diff --git a/packages/google-maps-addressvalidation/.eslintignore b/packages/google-maps-addressvalidation/.eslintignore
new file mode 100644
index 00000000000..ea5b04aebe6
--- /dev/null
+++ b/packages/google-maps-addressvalidation/.eslintignore
@@ -0,0 +1,7 @@
+**/node_modules
+**/coverage
+test/fixtures
+build/
+docs/
+protos/
+samples/generated/
diff --git a/packages/google-maps-addressvalidation/.eslintrc.json b/packages/google-maps-addressvalidation/.eslintrc.json
new file mode 100644
index 00000000000..78215349546
--- /dev/null
+++ b/packages/google-maps-addressvalidation/.eslintrc.json
@@ -0,0 +1,3 @@
+{
+ "extends": "./node_modules/gts"
+}
diff --git a/packages/google-maps-addressvalidation/.gitattributes b/packages/google-maps-addressvalidation/.gitattributes
new file mode 100644
index 00000000000..33739cb74e4
--- /dev/null
+++ b/packages/google-maps-addressvalidation/.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-maps-addressvalidation/.gitignore b/packages/google-maps-addressvalidation/.gitignore
new file mode 100644
index 00000000000..5d32b23782f
--- /dev/null
+++ b/packages/google-maps-addressvalidation/.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-maps-addressvalidation/.jsdoc.js b/packages/google-maps-addressvalidation/.jsdoc.js
new file mode 100644
index 00000000000..fd566aba475
--- /dev/null
+++ b/packages/google-maps-addressvalidation/.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/addressvalidation',
+ theme: 'lumen',
+ default: {
+ outputSourceFiles: false
+ }
+ },
+ markdown: {
+ idInHeadings: true
+ }
+};
diff --git a/packages/google-maps-addressvalidation/.mocharc.js b/packages/google-maps-addressvalidation/.mocharc.js
new file mode 100644
index 00000000000..cdb7b752160
--- /dev/null
+++ b/packages/google-maps-addressvalidation/.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-maps-addressvalidation/.nycrc b/packages/google-maps-addressvalidation/.nycrc
new file mode 100644
index 00000000000..b18d5472b62
--- /dev/null
+++ b/packages/google-maps-addressvalidation/.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-maps-addressvalidation/.prettierignore b/packages/google-maps-addressvalidation/.prettierignore
new file mode 100644
index 00000000000..9340ad9b86d
--- /dev/null
+++ b/packages/google-maps-addressvalidation/.prettierignore
@@ -0,0 +1,6 @@
+**/node_modules
+**/coverage
+test/fixtures
+build/
+docs/
+protos/
diff --git a/packages/google-maps-addressvalidation/.prettierrc.js b/packages/google-maps-addressvalidation/.prettierrc.js
new file mode 100644
index 00000000000..d546a4ad546
--- /dev/null
+++ b/packages/google-maps-addressvalidation/.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-maps-addressvalidation/.repo-metadata.json b/packages/google-maps-addressvalidation/.repo-metadata.json
new file mode 100644
index 00000000000..fd0caf3a767
--- /dev/null
+++ b/packages/google-maps-addressvalidation/.repo-metadata.json
@@ -0,0 +1,16 @@
+{
+ "name": "addressvalidation",
+ "name_pretty": "Address Validation API",
+ "product_documentation": "https://mapsplatform.google.com/maps-products/address-validation/",
+ "client_documentation": "https://cloud.google.com/nodejs/docs/reference/addressvalidation/latest",
+ "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues",
+ "release_level": "beta",
+ "language": "nodejs",
+ "repo": "googleapis/google-cloud-node",
+ "distribution_name": "@google-cloud/addressvalidation",
+ "api_id": "addressvalidation.googleapis.com",
+ "default_version": "v1",
+ "requires_billing": true,
+ "library_type": "GAPIC_AUTO"
+}
+
diff --git a/packages/google-maps-addressvalidation/CODE_OF_CONDUCT.md b/packages/google-maps-addressvalidation/CODE_OF_CONDUCT.md
new file mode 100644
index 00000000000..2add2547a81
--- /dev/null
+++ b/packages/google-maps-addressvalidation/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-maps-addressvalidation/CONTRIBUTING.md b/packages/google-maps-addressvalidation/CONTRIBUTING.md
new file mode 100644
index 00000000000..833e2b2e5c7
--- /dev/null
+++ b/packages/google-maps-addressvalidation/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 Address Validation API 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=addressvalidation.googleapis.com
+[auth]: https://cloud.google.com/docs/authentication/getting-started
\ No newline at end of file
diff --git a/packages/google-maps-addressvalidation/LICENSE b/packages/google-maps-addressvalidation/LICENSE
new file mode 100644
index 00000000000..d6456956733
--- /dev/null
+++ b/packages/google-maps-addressvalidation/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-maps-addressvalidation/README.md b/packages/google-maps-addressvalidation/README.md
new file mode 100644
index 00000000000..f2f5796c3f2
--- /dev/null
+++ b/packages/google-maps-addressvalidation/README.md
@@ -0,0 +1,214 @@
+[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
+[//]: # "To regenerate it, use `python -m synthtool`."
+
+
+# [Address Validation API: Node.js Client](https://github.com/googleapis/google-cloud-node)
+
+[](https://cloud.google.com/terms/launch-stages)
+[](https://www.npmjs.org/package/@google-cloud/addressvalidation)
+
+
+
+
+ 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/blob/main/CHANGELOG.md).
+
+* [Address Validation API Node.js Client API Reference][client-docs]
+* [Address Validation API Documentation][product-docs]
+* [github.com/googleapis/google-cloud-node](https://github.com/googleapis/google-cloud-node)
+
+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)
+ * [Using the client library](#using-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 Address Validation API 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/addressvalidation
+```
+
+
+### Using the client library
+
+```javascript
+/**
+ * This snippet has been automatically generated and should be regarded as a code template only.
+ * It will require modifications to work.
+ * It may require correct/in-range values for request initialization.
+ * TODO(developer): Uncomment these variables before running the sample.
+ */
+/**
+ * Required. The address being validated. Unformatted addresses should be
+ * submitted via `address_lines` google.type.PostalAddress.address_lines.
+ * The total length of the fields in this input must not exceed 300
+ * characters.
+ * Supported regions can be found in the
+ * FAQ (https://developers.google.com/maps/documentation/address-validation/faq#which_regions_are_currently_supported).
+ * The language_code google.type.PostalAddress.language_code value in the
+ * input address is reserved for future uses and is ignored today. The
+ * validated address result will be populated based on the preferred language
+ * for the given address, as identified by the system.
+ * The Address Validation API ignores the values in
+ * recipients google.type.PostalAddress.recipients and
+ * organization google.type.PostalAddress.organization. Any values in those
+ * fields will be discarded and not returned. Please do not set them.
+ */
+// const address = {}
+/**
+ * This field must be empty for the first address validation request. If
+ * more requests are necessary to fully validate a single address (for
+ * example if the changes the user makes after the initial validation need to
+ * be re-validated), then each followup request must populate this field with
+ * the
+ * response_id google.maps.addressvalidation.v1.ValidateAddressResponse.response_id
+ * from the very first response in the validation sequence.
+ */
+// const previousResponseId = 'abc123'
+/**
+ * Enables USPS CASS compatible mode. This affects _only_ the
+ * google.maps.addressvalidation.v1.ValidationResult.usps_data field of
+ * google.maps.addressvalidation.v1.ValidationResult. Note: for USPS CASS
+ * enabled requests for addresses in Puerto Rico, a
+ * google.type.PostalAddress.region_code of the `address` must be provided
+ * as "PR", or an google.type.PostalAddress.administrative_area of the
+ * `address` must be provided as "Puerto Rico" (case-insensitive) or "PR".
+ * It's recommended to use a componentized `address`, or alternatively specify
+ * at least two google.type.PostalAddress.address_lines where the first line
+ * contains the street number and name and the second line contains the city,
+ * state, and zip code.
+ */
+// const enableUspsCass = true
+
+// Imports the Addressvalidation library
+const {AddressValidationClient} =
+ require('@google-cloud/addressvalidation').v1;
+
+// Instantiates a client
+const addressvalidationClient = new AddressValidationClient();
+
+async function callValidateAddress() {
+ // Construct request
+ const request = {
+ address: {
+ regionCode: 'US',
+ addressLines: ['1600 Amphitheatre Pkwy', 'Mountain View CA 94040'],
+ },
+ };
+
+ // Run request
+ const response = await addressvalidationClient.validateAddress(request);
+ console.log(response);
+}
+
+callValidateAddress();
+
+```
+
+
+
+## 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 |
+| --------------------------- | --------------------------------- | ------ |
+| Address_validation.provide_validation_feedback | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-addressvalidation/samples/generated/v1/address_validation.provide_validation_feedback.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-addressvalidation/samples/generated/v1/address_validation.provide_validation_feedback.js,samples/README.md) |
+| Address_validation.validate_address | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-addressvalidation/samples/generated/v1/address_validation.validate_address.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-addressvalidation/samples/generated/v1/address_validation.validate_address.js,samples/README.md) |
+| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-addressvalidation/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-addressvalidation/samples/quickstart.js,samples/README.md) |
+| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-addressvalidation/samples/test/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-addressvalidation/samples/test/quickstart.js,samples/README.md) |
+
+
+
+The [Address Validation API 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/addressvalidation@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 in **beta**. This means it is expected to be
+mostly stable while we work toward a general availability release; however,
+complete stability is not guaranteed. We will address issues and requests
+against beta libraries with a high 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/addressvalidation/latest
+[product-docs]: https://mapsplatform.google.com/maps-products/address-validation/
+[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=addressvalidation.googleapis.com
+[auth]: https://cloud.google.com/docs/authentication/getting-started
diff --git a/packages/google-maps-addressvalidation/linkinator.config.json b/packages/google-maps-addressvalidation/linkinator.config.json
new file mode 100644
index 00000000000..befd23c8633
--- /dev/null
+++ b/packages/google-maps-addressvalidation/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-maps-addressvalidation/package.json b/packages/google-maps-addressvalidation/package.json
new file mode 100644
index 00000000000..8ffdd6991c1
--- /dev/null
+++ b/packages/google-maps-addressvalidation/package.json
@@ -0,0 +1,66 @@
+{
+ "name": "@google-cloud/addressvalidation",
+ "version": "0.0.0",
+ "description": " client for Node.js",
+ "repository": "googleapis/google-cloud-node",
+ "license": "Apache-2.0",
+ "author": "Google LLC",
+ "main": "build/src/index.js",
+ "files": [
+ "build/src",
+ "build/protos"
+ ],
+ "keywords": [
+ "google apis client",
+ "google api client",
+ "google apis",
+ "google api",
+ "google",
+ "google cloud platform",
+ "google cloud",
+ "cloud",
+ "google addressvalidation",
+ "addressvalidation",
+ ""
+ ],
+ "scripts": {
+ "clean": "gts clean",
+ "compile": "tsc -p . && cp -r protos build/",
+ "compile-protos": "compileProtos src",
+ "docs": "jsdoc -c .jsdoc.js",
+ "predocs-test": "npm run docs",
+ "docs-test": "linkinator docs",
+ "fix": "gts fix",
+ "lint": "gts check",
+ "prepare": "npm run compile-protos && npm run compile",
+ "system-test": "npm run compile && c8 mocha build/system-test",
+ "test": "c8 mocha build/test",
+ "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test",
+ "prelint": "cd samples; npm link ../; npm i"
+ },
+ "dependencies": {
+ "google-gax": "^3.0.1"
+ },
+ "devDependencies": {
+ "@types/mocha": "^9.0.0",
+ "@types/node": "^16.0.0",
+ "@types/sinon": "^10.0.0",
+ "c8": "^7.3.5",
+ "gts": "^3.1.0",
+ "jsdoc": "^3.6.6",
+ "jsdoc-fresh": "^2.0.0",
+ "jsdoc-region-tag": "^2.0.0",
+ "linkinator": "^4.0.0",
+ "mocha": "^9.2.2",
+ "null-loader": "^4.0.1",
+ "pack-n-play": "^1.0.0-2",
+ "sinon": "^14.0.0",
+ "ts-loader": "^9.0.0",
+ "typescript": "^4.6.4",
+ "webpack": "^5.9.0",
+ "webpack-cli": "^4.2.0"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ }
+}
diff --git a/packages/google-maps-addressvalidation/protos/google/geo/type/viewport.proto b/packages/google-maps-addressvalidation/protos/google/geo/type/viewport.proto
new file mode 100644
index 00000000000..ad5029f8360
--- /dev/null
+++ b/packages/google-maps-addressvalidation/protos/google/geo/type/viewport.proto
@@ -0,0 +1,69 @@
+// 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.
+//
+
+syntax = "proto3";
+
+package google.geo.type;
+
+import "google/type/latlng.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/geo/type/viewport;viewport";
+option java_multiple_files = true;
+option java_outer_classname = "ViewportProto";
+option java_package = "com.google.geo.type";
+option objc_class_prefix = "GGTP";
+
+// A latitude-longitude viewport, represented as two diagonally opposite `low`
+// and `high` points. A viewport is considered a closed region, i.e. it includes
+// its boundary. The latitude bounds must range between -90 to 90 degrees
+// inclusive, and the longitude bounds must range between -180 to 180 degrees
+// inclusive. Various cases include:
+//
+// - If `low` = `high`, the viewport consists of that single point.
+//
+// - If `low.longitude` > `high.longitude`, the longitude range is inverted
+// (the viewport crosses the 180 degree longitude line).
+//
+// - If `low.longitude` = -180 degrees and `high.longitude` = 180 degrees,
+// the viewport includes all longitudes.
+//
+// - If `low.longitude` = 180 degrees and `high.longitude` = -180 degrees,
+// the longitude range is empty.
+//
+// - If `low.latitude` > `high.latitude`, the latitude range is empty.
+//
+// Both `low` and `high` must be populated, and the represented box cannot be
+// empty (as specified by the definitions above). An empty viewport will result
+// in an error.
+//
+// For example, this viewport fully encloses New York City:
+//
+// {
+// "low": {
+// "latitude": 40.477398,
+// "longitude": -74.259087
+// },
+// "high": {
+// "latitude": 40.91618,
+// "longitude": -73.70018
+// }
+// }
+message Viewport {
+ // Required. The low point of the viewport.
+ google.type.LatLng low = 1;
+
+ // Required. The high point of the viewport.
+ google.type.LatLng high = 2;
+}
diff --git a/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/address.proto b/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/address.proto
new file mode 100644
index 00000000000..eacff58e9ef
--- /dev/null
+++ b/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/address.proto
@@ -0,0 +1,145 @@
+// 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.maps.addressvalidation.v1;
+
+import "google/api/field_behavior.proto";
+import "google/type/postal_address.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Maps.AddressValidation.V1";
+option go_package = "google.golang.org/genproto/googleapis/maps/addressvalidation/v1;addressvalidation";
+option java_multiple_files = true;
+option java_outer_classname = "AddressProto";
+option java_package = "com.google.maps.addressvalidation.v1";
+option objc_class_prefix = "GMPAVV1";
+option php_namespace = "Google\\Maps\\AddressValidation\\V1";
+option ruby_package = "Google::Maps::AddressValidation::V1";
+
+// Details of the address parsed from the input.
+message Address {
+ // The corrected address, formatted as a single-line address following the
+ // address formatting rules of the region where the address is located.
+ string formatted_address = 2;
+
+ // The validated address represented as a postal address.
+ google.type.PostalAddress postal_address = 3;
+
+ // The individual address components of the formatted and corrected address,
+ // along with validation information. This provides information on the
+ // validation status of the individual components.
+ //
+ // Address components are not ordered in a particular way. DO NOT make any
+ // assumptions on the ordering of the address components in the list.
+ repeated AddressComponent address_components = 4
+ [(google.api.field_behavior) = UNORDERED_LIST];
+
+ // The types of components that were expected to be present in a correctly
+ // formatted mailing address but were not found in the input AND could
+ // not be inferred. Components of this type are not present in
+ // `formatted_address`, `postal_address`, or `address_components`. An
+ // example might be `['street_number', 'route']` for an input like
+ // "Boulder, Colorado, 80301, USA." The list of possible types can be found
+ // [here](https://developers.google.com/maps/documentation/geocoding/overview#Types).
+ repeated string missing_component_types = 5;
+
+ // The types of the components that are present in the `address_components`
+ // but could not be confirmed to be correct. This field is provided for the
+ // sake of convenience: its contents are equivalent to iterating through the
+ // `address_components` to find the types of all the components where the
+ // [confirmation_level][google.maps.addressvalidation.v1.AddressComponent.confirmation_level]
+ // is not
+ // [CONFIRMED][google.maps.addressvalidation.v1.AddressComponent.ConfirmationLevel.CONFIRMED]
+ // or the
+ // [inferred][google.maps.addressvalidation.v1.AddressComponent.inferred]
+ // flag is not set to `true`.The list of possible types can be found
+ // [here](https://developers.google.com/maps/documentation/geocoding/overview#Types).
+ repeated string unconfirmed_component_types = 6;
+
+ // Any tokens in the input that could not be resolved. This might be an
+ // input that was not recognized as a valid part of an address (for example
+ // in an input like "123235253253 Main St, San Francisco, CA, 94105", the
+ // unresolved tokens may look like `["123235253253"]` since that does not
+ // look like a valid street number.
+ repeated string unresolved_tokens = 7;
+}
+
+// Represents an address component, such as a street, city, or state.
+message AddressComponent {
+ // The different possible values for confirmation levels.
+ enum ConfirmationLevel {
+ // Default value. This value is unused.
+ CONFIRMATION_LEVEL_UNSPECIFIED = 0;
+
+ // We were able to verify that this component exists and makes sense in the
+ // context of the rest of the address.
+ CONFIRMED = 1;
+
+ // This component could not be confirmed, but it is plausible that it
+ // exists. For example, a street number within a known valid range of
+ // numbers on a street where specific house numbers are not known.
+ UNCONFIRMED_BUT_PLAUSIBLE = 2;
+
+ // This component was not confirmed and is likely to be wrong. For
+ // example, a neighborhood that does not fit the rest of the address.
+ UNCONFIRMED_AND_SUSPICIOUS = 3;
+ }
+
+ // The name for this component.
+ ComponentName component_name = 1;
+
+ // The type of the address component. See
+ // [Table 2: Additional types returned by the Places
+ // service](https://developers.google.com/places/web-service/supported_types#table2)
+ // for a list of possible types.
+ string component_type = 2;
+
+ // Indicates the level of certainty that we have that the component
+ // is correct.
+ ConfirmationLevel confirmation_level = 3;
+
+ // Indicates that the component was not part of the input, but we
+ // inferred it for the address location and believe it should be provided
+ // for a complete address.
+ bool inferred = 4;
+
+ // Indicates the spelling of the component name was corrected in a minor way,
+ // for example by switching two characters that appeared in the wrong order.
+ // This indicates a cosmetic change.
+ bool spell_corrected = 5;
+
+ // Indicates the name of the component was replaced with a completely
+ // different one, for example a wrong postal code being replaced with one that
+ // is correct for the address. This is not a cosmetic change, the input
+ // component has been changed to a different one.
+ bool replaced = 6;
+
+ // Indicates an address component that is not expected to be present in a
+ // postal address for the given region. We have retained it only because it
+ // was part of the input.
+ bool unexpected = 7;
+}
+
+// A wrapper for the name of the component.
+message ComponentName {
+ // The name text. For example, "5th Avenue" for a street name or "1253" for a
+ // street number.
+ string text = 1;
+
+ // The BCP-47 language code. This will not be present if the component name is
+ // not associated with a language, such as a street number.
+ string language_code = 2;
+}
diff --git a/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/address_validation_service.proto b/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/address_validation_service.proto
new file mode 100644
index 00000000000..4ccbc7eccd7
--- /dev/null
+++ b/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/address_validation_service.proto
@@ -0,0 +1,275 @@
+// 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.maps.addressvalidation.v1;
+
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/maps/addressvalidation/v1/address.proto";
+import "google/maps/addressvalidation/v1/geocode.proto";
+import "google/maps/addressvalidation/v1/metadata.proto";
+import "google/maps/addressvalidation/v1/usps_data.proto";
+import "google/type/postal_address.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Maps.AddressValidation.V1";
+option go_package = "google.golang.org/genproto/googleapis/maps/addressvalidation/v1;addressvalidation";
+option java_multiple_files = true;
+option java_outer_classname = "AddressValidationServiceProto";
+option java_package = "com.google.maps.addressvalidation.v1";
+option objc_class_prefix = "GMPAVV1";
+option php_namespace = "Google\\Maps\\AddressValidation\\V1";
+option ruby_package = "Google::Maps::AddressValidation::V1";
+
+// The service for validating addresses.
+service AddressValidation {
+ option (google.api.default_host) = "addressvalidation.googleapis.com";
+
+ // Validates an address.
+ rpc ValidateAddress(ValidateAddressRequest) returns (ValidateAddressResponse) {
+ option (google.api.http) = {
+ post: "/v1:validateAddress"
+ body: "*"
+ };
+ }
+
+ // Feedback about the outcome of the sequence of validation attempts. This
+ // should be the last call made after a sequence of validation calls for the
+ // same address, and should be called once the transaction is concluded. This
+ // should only be sent once for the sequence of `ValidateAddress` requests
+ // needed to validate an address fully.
+ rpc ProvideValidationFeedback(ProvideValidationFeedbackRequest) returns (ProvideValidationFeedbackResponse) {
+ option (google.api.http) = {
+ post: "/v1:provideValidationFeedback"
+ body: "*"
+ };
+ }
+}
+
+// The request for validating an address.
+message ValidateAddressRequest {
+ // Required. The address being validated. Unformatted addresses should be
+ // submitted via [`address_lines`][google.type.PostalAddress.address_lines].
+ //
+ // The total length of the fields in this input must not exceed 300
+ // characters.
+ //
+ // Supported regions can be found in the
+ // [FAQ](https://developers.google.com/maps/documentation/address-validation/faq#which_regions_are_currently_supported).
+ //
+ // The [language_code][google.type.PostalAddress.language_code] value in the
+ // input address is reserved for future uses and is ignored today. The
+ // validated address result will be populated based on the preferred language
+ // for the given address, as identified by the system.
+ //
+ // The Address Validation API ignores the values in
+ // [recipients][google.type.PostalAddress.recipients] and
+ // [organization][google.type.PostalAddress.organization]. Any values in those
+ // fields will be discarded and not returned. Please do not set them.
+ google.type.PostalAddress address = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // This field must be empty for the first address validation request. If
+ // more requests are necessary to fully validate a single address (for
+ // example if the changes the user makes after the initial validation need to
+ // be re-validated), then each followup request must populate this field with
+ // the
+ // [response_id][google.maps.addressvalidation.v1.ValidateAddressResponse.response_id]
+ // from the very first response in the validation sequence.
+ string previous_response_id = 2;
+
+ // Enables USPS CASS compatible mode. This affects _only_ the
+ // [google.maps.addressvalidation.v1.ValidationResult.usps_data] field of
+ // [google.maps.addressvalidation.v1.ValidationResult]. Note: for USPS CASS
+ // enabled requests for addresses in Puerto Rico, a
+ // [google.type.PostalAddress.region_code] of the `address` must be provided
+ // as "PR", or an [google.type.PostalAddress.administrative_area] of the
+ // `address` must be provided as "Puerto Rico" (case-insensitive) or "PR".
+ //
+ // It's recommended to use a componentized `address`, or alternatively specify
+ // at least two [google.type.PostalAddress.address_lines] where the first line
+ // contains the street number and name and the second line contains the city,
+ // state, and zip code.
+ bool enable_usps_cass = 3;
+}
+
+// The response to an address validation request.
+message ValidateAddressResponse {
+ // The result of the address validation.
+ ValidationResult result = 1;
+
+ // The UUID that identifies this response. If the address needs to be
+ // re-validated, this UUID *must* accompany the new request.
+ string response_id = 2;
+}
+
+// The request for sending validation feedback.
+message ProvideValidationFeedbackRequest {
+ // The possible final outcomes of the sequence of address validation requests
+ // needed to validate an address.
+ enum ValidationConclusion {
+ // This value is unused.
+ // If the `ProvideValidationFeedbackRequest.conclusion` field is set to
+ // `VALIDATION_CONCLUSION_UNSPECIFIED`, an `INVALID_ARGUMENT` error will be
+ // returned.
+ VALIDATION_CONCLUSION_UNSPECIFIED = 0;
+
+ // The version of the address returned by the Address Validation API was
+ // used for the transaction.
+ VALIDATED_VERSION_USED = 1;
+
+ // The version of the address provided by the user was used for the
+ // transaction
+ USER_VERSION_USED = 2;
+
+ // A version of the address that was entered after the last validation
+ // attempt but that was not re-validated was used for the transaction.
+ UNVALIDATED_VERSION_USED = 3;
+
+ // The transaction was abandoned and the address was not used.
+ UNUSED = 4;
+ }
+
+ // Required. The outcome of the sequence of validation attempts.
+ //
+ // If this field is set to `VALIDATION_CONCLUSION_UNSPECIFIED`, an
+ // `INVALID_ARGUMENT` error will be returned.
+ ValidationConclusion conclusion = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // Required. The ID of the response that this feedback is for. This should be the
+ // [response_id][google.maps.addressvalidation.v1.ValidateAddressRequest.response_id]
+ // from the first response in a series of address validation attempts.
+ string response_id = 2 [(google.api.field_behavior) = REQUIRED];
+}
+
+// The response for validation feedback.
+//
+// The response is empty if the feedback is sent successfully.
+message ProvideValidationFeedbackResponse {
+
+}
+
+// The result of validating an address.
+message ValidationResult {
+ // Overall verdict flags
+ Verdict verdict = 1;
+
+ // Information about the address itself as opposed to the geocode.
+ Address address = 2;
+
+ // Information about the location and place that the address geocoded to.
+ Geocode geocode = 3;
+
+ // Other information relevant to deliverability.
+ AddressMetadata metadata = 4;
+
+ // Extra deliverability flags provided by USPS. Only provided in region `US`
+ // and `PR`.
+ UspsData usps_data = 5;
+}
+
+// High level overview of the address validation result and geocode.
+message Verdict {
+ // The various granularities that an address or a geocode can have.
+ // When used to indicate granularity for an *address*, these values indicate
+ // with how fine a granularity the address identifies a mailing destination.
+ // For example, an address such as "123 Main Street, Redwood City, CA, 94061"
+ // identifies a `PREMISE` while something like "Redwood City, CA, 94061"
+ // identifies a `LOCALITY`. However, if we are unable to find a geocode for
+ // "123 Main Street" in Redwood City, the geocode returned might be of
+ // `LOCALITY` granularity even though the address is more granular.
+ enum Granularity {
+ // Default value. This value is unused.
+ GRANULARITY_UNSPECIFIED = 0;
+
+ // Below-building level result, such as an apartment.
+ SUB_PREMISE = 1;
+
+ // Building-level result.
+ PREMISE = 2;
+
+ // A geocode that should be very close to the building-level location of
+ // the address. Only used for geocodes and not for addresses.
+ PREMISE_PROXIMITY = 3;
+
+ // The address or geocode indicates a block. Only used in regions which
+ // have block-level addressing, such as Japan.
+ BLOCK = 4;
+
+ // The geocode or address is granular to route, such as a street, road, or
+ // highway.
+ ROUTE = 5;
+
+ // All other granularities, which are bucketed together since they are not
+ // deliverable.
+ OTHER = 6;
+ }
+
+ // The granularity of the **input** address. This is the result of parsing the
+ // input address and does not give any validation signals. For validation
+ // signals, refer to `validation_granularity` below.
+ //
+ // For example, if the input address includes a specific apartment number,
+ // then the `input_granularity` here will be `SUB_PREMISE`. If we cannot match
+ // the apartment number in the databases or the apartment number is invalid,
+ // the `validation_granularity` will likely be `PREMISE` or below.
+ Granularity input_granularity = 1;
+
+ // The granularity level that the API can fully **validate** the address to.
+ // For example, an `validation_granularity` of `PREMISE` indicates all address
+ // components at the level of `PREMISE` or more coarse can be validated.
+ //
+ // Per address component validation result can be found in
+ // [google.maps.addressvalidation.v1.Address.address_components].
+ Granularity validation_granularity = 2;
+
+ // Information about the granularity of the
+ // [`geocode`][google.maps.addressvalidation.v1.ValidationResult.geocode].
+ // This can be understood as the semantic meaning of how coarse or fine the
+ // geocoded location is.
+ //
+ // This can differ from the `validation_granularity` above occasionally. For
+ // example, our database might record the existence of an apartment number but
+ // do not have a precise location for the apartment within a big apartment
+ // complex. In that case, the `validation_granularity` will be `SUB_PREMISE`
+ // but the `geocode_granularity` will be `PREMISE`.
+ Granularity geocode_granularity = 3;
+
+ // The address is considered complete if there are no unresolved tokens, no
+ // unexpected or missing address components. See
+ // [`missing_component_types`][google.maps.addressvalidation.v1.Address.missing_component_types],
+ // [`unresolved_tokens`][google.maps.addressvalidation.v1.Address.unresolved_tokens]
+ // or
+ // [`unexpected`][google.maps.addressvalidation.v1.AddressComponent.unexpected]
+ // fields for more details.
+ bool address_complete = 4;
+
+ // At least one address component cannot be categorized or validated, see
+ // [google.maps.addressvalidation.v1.Address.address_components] for
+ // details.
+ bool has_unconfirmed_components = 5;
+
+ // At least one address component was inferred (added) that wasn't in the
+ // input, see
+ // [google.maps.addressvalidation.v1.Address.address_components] for
+ // details.
+ bool has_inferred_components = 6;
+
+ // At least one address component was replaced, see
+ // [google.maps.addressvalidation.v1.Address.address_components] for
+ // details.
+ bool has_replaced_components = 7;
+}
diff --git a/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/geocode.proto b/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/geocode.proto
new file mode 100644
index 00000000000..2a7f86c5fc3
--- /dev/null
+++ b/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/geocode.proto
@@ -0,0 +1,81 @@
+// 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.maps.addressvalidation.v1;
+
+import "google/geo/type/viewport.proto";
+import "google/type/latlng.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Maps.AddressValidation.V1";
+option go_package = "google.golang.org/genproto/googleapis/maps/addressvalidation/v1;addressvalidation";
+option java_multiple_files = true;
+option java_outer_classname = "GeocodeProto";
+option java_package = "com.google.maps.addressvalidation.v1";
+option objc_class_prefix = "GMPAVV1";
+option php_namespace = "Google\\Maps\\AddressValidation\\V1";
+option ruby_package = "Google::Maps::AddressValidation::V1";
+
+// Contains information about the place the input was geocoded to.
+message Geocode {
+ // The geocoded location of the input.
+ //
+ // Using place IDs is preferred over using addresses,
+ // latitude/longitude coordinates, or plus codes. Using coordinates when
+ // routing or calculating driving directions will always result in the point
+ // being snapped to the road nearest to those coordinates. This may not be a
+ // road that will quickly or safely lead to the destination and may not be
+ // near an access point to the property. Additionally, when a location is
+ // reverse geocoded, there is no guarantee that the returned address will
+ // match the original.
+ google.type.LatLng location = 1;
+
+ // The plus code corresponding to the `location`.
+ PlusCode plus_code = 2;
+
+ // The bounds of the geocoded place.
+ google.geo.type.Viewport bounds = 4;
+
+ // The size of the geocoded place, in meters. This is another measure of the
+ // coarseness of the geocoded location, but in physical size rather than in
+ // semantic meaning.
+ float feature_size_meters = 5;
+
+ // The PlaceID of the place this input geocodes to.
+ //
+ // For more information about Place IDs see
+ // [here](https://developers.google.com/maps/documentation/places/web-service/place-id).
+ string place_id = 6;
+
+ // The type(s) of place that the input geocoded to. For example,
+ // `['locality', 'political']`. The full list of types can be found
+ // [here](https://developers.google.com/maps/documentation/geocoding/overview#Types).
+ repeated string place_types = 7;
+}
+
+// Plus code (http://plus.codes) is a location reference with two formats:
+// global code defining a 14mx14m (1/8000th of a degree) or smaller rectangle,
+// and compound code, replacing the prefix with a reference location.
+message PlusCode {
+ // Place's global (full) code, such as "9FWM33GV+HQ", representing an
+ // 1/8000 by 1/8000 degree area (~14 by 14 meters).
+ string global_code = 1;
+
+ // Place's compound code, such as "33GV+HQ, Ramberg, Norway", containing
+ // the suffix of the global code and replacing the prefix with a formatted
+ // name of a reference entity.
+ string compound_code = 2;
+}
diff --git a/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/metadata.proto b/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/metadata.proto
new file mode 100644
index 00000000000..625b32446d4
--- /dev/null
+++ b/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/metadata.proto
@@ -0,0 +1,56 @@
+// 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.maps.addressvalidation.v1;
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Maps.AddressValidation.V1";
+option go_package = "google.golang.org/genproto/googleapis/maps/addressvalidation/v1;addressvalidation";
+option java_multiple_files = true;
+option java_outer_classname = "MetadataProto";
+option java_package = "com.google.maps.addressvalidation.v1";
+option objc_class_prefix = "GMPAVV1";
+option php_namespace = "Google\\Maps\\AddressValidation\\V1";
+option ruby_package = "Google::Maps::AddressValidation::V1";
+
+// The metadata for the address.
+message AddressMetadata {
+ // Indicates that this address is a high-rise building.
+ // If unset, indicates that the value is unknown.
+ //
+ // DEPRECATED: Please use
+ // [`address_record_type`](google.maps.addressvalidation.v1.ValidationResult.usps_data.address_record_type)
+ // instead. This field will be removed with the GA release.
+ optional bool highrise = 1 [deprecated = true];
+
+ // Indicates that this is the address of a business.
+ // If unset, indicates that the value is unknown.
+ optional bool business = 2;
+
+ // Indicates that the address of a PO box.
+ // If unset, indicates that the value is unknown.
+ optional bool po_box = 3;
+
+ // Indicates that the address is of a multi-family building.
+ // If unset, indicates that the value is unknown.
+ //
+ // DEPRECATED: this field will be removed with the GA release.
+ optional bool multi_family = 4 [deprecated = true];
+
+ // Indicates that this is the address of a residence.
+ // If unset, indicates that the value is unknown.
+ optional bool residential = 6;
+}
diff --git a/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/usps_data.proto b/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/usps_data.proto
new file mode 100644
index 00000000000..8bd0cd5bf26
--- /dev/null
+++ b/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/usps_data.proto
@@ -0,0 +1,218 @@
+// 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.maps.addressvalidation.v1;
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Maps.AddressValidation.V1";
+option go_package = "google.golang.org/genproto/googleapis/maps/addressvalidation/v1;addressvalidation";
+option java_multiple_files = true;
+option java_outer_classname = "UspsDataProto";
+option java_package = "com.google.maps.addressvalidation.v1";
+option objc_class_prefix = "GMPAVV1";
+option php_namespace = "Google\\Maps\\AddressValidation\\V1";
+option ruby_package = "Google::Maps::AddressValidation::V1";
+
+// USPS representation of a US address.
+message UspsAddress {
+ // First address line.
+ string first_address_line = 1;
+
+ // Firm name.
+ string firm = 2;
+
+ // Second address line.
+ string second_address_line = 3;
+
+ // Puerto Rican urbanization name.
+ string urbanization = 4;
+
+ // City + state + postal code.
+ string city_state_zip_address_line = 5;
+
+ // City name.
+ string city = 6;
+
+ // 2 letter state code.
+ string state = 7;
+
+ // Postal code e.g. 10009.
+ string zip_code = 8;
+
+ // 4-digit postal code extension e.g. 5023.
+ string zip_code_extension = 9;
+}
+
+// The USPS data for the address.
+message UspsData {
+ // USPS standardized address.
+ UspsAddress standardized_address = 1;
+
+ // 2 digit delivery point code
+ string delivery_point_code = 2;
+
+ // The delivery point check digit. This number is added to the end of the
+ // delivery_point_barcode for mechanically scanned mail. Adding all the
+ // digits of the delivery_point_barcode, delivery_point_check_digit, postal
+ // code, and ZIP+4 together should yield a number divisible by 10.
+ string delivery_point_check_digit = 3;
+
+ // The possible values for DPV confirmation. Returns a single character.
+ //
+ // * `Y`: Address was DPV confirmed for primary and any secondary numbers.
+ // * `N`: Primary and any secondary number information failed to
+ // DPV confirm.
+ // * `S`: Address was DPV confirmed for the primary number only, and the
+ // secondary number information was present by not confirmed.
+ // * `D`: Address was DPV confirmed for the primary number only, and the
+ // secondary number information was missing.
+ string dpv_confirmation = 4;
+
+ // The footnotes from delivery point validation.
+ // Multiple footnotes may be strung together in the same string.
+ //
+ // * `AA`: Input address matched to the ZIP+4 file
+ // * `A1`: Input address was not matched to the ZIP+4 file
+ // * `BB`: Matched to DPV (all components)
+ // * `CC`: Secondary number not matched (present but invalid)
+ // * `N1`: High-rise address missing secondary number
+ // * `M1`: Primary number missing
+ // * `M3`: Primary number invalid
+ // * `P1`: Input address RR or HC box number missing
+ // * `P3`: Input address PO, RR, or HC Box number invalid
+ // * `F1`: Input address matched to a military address
+ // * `G1`: Input address matched to a general delivery address
+ // * `U1`: Input address matched to a unique ZIP code
+ // * `PB`: Input address matched to PBSA record
+ // * `RR`: DPV confirmed address with PMB information
+ // * `R1`: DPV confirmed address without PMB information
+ // * `R7`: Carrier Route R777 or R779 record
+ string dpv_footnote = 5;
+
+ // Indicates if the address is a CMRA (Commercial Mail Receiving Agency)--a
+ // private business receiving mail for clients. Returns a single character.
+ //
+ // * `Y`: The address is a CMRA
+ // * `N`: The address is not a CMRA
+ string dpv_cmra = 6;
+
+ // Is this place vacant?
+ // Returns a single character.
+ //
+ // * `Y`: The address is vacant
+ // * `N`: The address is not vacant
+ string dpv_vacant = 7;
+
+ // Is this a no stat address or an active address?
+ // No stat addresses are ones which are not continuously occupied or addresses
+ // that the USPS does not service. Returns a single character.
+ //
+ // * `Y`: The address is not active
+ // * `N`: The address is active
+ string dpv_no_stat = 8;
+
+ // The carrier route code.
+ // A four character code--a one letter prefix and a three digit route
+ // designator.
+ //
+ // Prefixes:
+ //
+ // * `C`: Carrier route (or city route)
+ // * `R`: Rural route
+ // * `H`: Highway Contract Route
+ // * `B`: Post Office Box Section
+ // * `G`: General delivery unit
+ string carrier_route = 9;
+
+ // Carrier route rate sort indicator.
+ string carrier_route_indicator = 10;
+
+ // The delivery address is matchable, but the EWS file indicates that an exact
+ // match will be available soon.
+ bool ews_no_match = 11;
+
+ // Main post office city.
+ string post_office_city = 12;
+
+ // Main post office state.
+ string post_office_state = 13;
+
+ // Abbreviated city.
+ string abbreviated_city = 14;
+
+ // FIPS county code.
+ string fips_county_code = 15;
+
+ // County name.
+ string county = 16;
+
+ // Enhanced Line of Travel (eLOT) number.
+ string elot_number = 17;
+
+ // eLOT Ascending/Descending Flag (A/D).
+ string elot_flag = 18;
+
+ // LACSLink return code.
+ string lacs_link_return_code = 19;
+
+ // LACSLink indicator.
+ string lacs_link_indicator = 20;
+
+ // PO Box only postal code.
+ bool po_box_only_postal_code = 21;
+
+ // Footnotes from matching a street or highrise record to suite information.
+ // If business name match is found, the secondary number is returned.
+ //
+ // * `A`: SuiteLink record match, business address improved.
+ // * `00`: No match, business address is not improved.
+ string suitelink_footnote = 22;
+
+ // PMB (Private Mail Box) unit designator.
+ string pmb_designator = 23;
+
+ // PMB (Private Mail Box) number;
+ string pmb_number = 24;
+
+ // Type of the address record that matches the input address.
+ //
+ // * `F`: FIRM. This is a match to a Firm Record, which is the finest level of
+ // match available for an address.
+ // * `G`: GENERAL DELIVERY. This is a match to a General Delivery record.
+ // * `H`: BUILDING / APARTMENT. This is a match to a Building or Apartment
+ // record.
+ // * `P`: POST OFFICE BOX. This is a match to a Post Office Box.
+ // * `R`: RURAL ROUTE or HIGHWAY CONTRACT: This is a match to either a Rural
+ // Route or a Highway Contract record, both of which may have associated Box
+ // Number ranges.
+ // * `S`: STREET RECORD: This is a match to a Street record containing a valid
+ // primary number range.
+ string address_record_type = 25;
+
+ // Indicator that a default address was found, but more specific addresses
+ // exists.
+ bool default_address = 26;
+
+ // Error message for USPS data retrieval. This is populated when USPS
+ // processing is suspended because of the detection of artificially created
+ // addresses.
+ //
+ // The USPS data fields may not be populated when this error is present.
+ string error_message = 27;
+
+ // Indicator that the request has been CASS processed.
+ bool cass_processed = 28;
+}
diff --git a/packages/google-maps-addressvalidation/protos/protos.d.ts b/packages/google-maps-addressvalidation/protos/protos.d.ts
new file mode 100644
index 00000000000..bff46b10ac8
--- /dev/null
+++ b/packages/google-maps-addressvalidation/protos/protos.d.ts
@@ -0,0 +1,6016 @@
+// 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 Long = require("long");
+import type {protobuf as $protobuf} from "google-gax";
+/** Namespace google. */
+export namespace google {
+
+ /** Namespace geo. */
+ namespace geo {
+
+ /** Namespace type. */
+ namespace type {
+
+ /** Properties of a Viewport. */
+ interface IViewport {
+
+ /** Viewport low */
+ low?: (google.type.ILatLng|null);
+
+ /** Viewport high */
+ high?: (google.type.ILatLng|null);
+ }
+
+ /** Represents a Viewport. */
+ class Viewport implements IViewport {
+
+ /**
+ * Constructs a new Viewport.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.geo.type.IViewport);
+
+ /** Viewport low. */
+ public low?: (google.type.ILatLng|null);
+
+ /** Viewport high. */
+ public high?: (google.type.ILatLng|null);
+
+ /**
+ * Creates a new Viewport instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Viewport instance
+ */
+ public static create(properties?: google.geo.type.IViewport): google.geo.type.Viewport;
+
+ /**
+ * Encodes the specified Viewport message. Does not implicitly {@link google.geo.type.Viewport.verify|verify} messages.
+ * @param message Viewport message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.geo.type.IViewport, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Viewport message, length delimited. Does not implicitly {@link google.geo.type.Viewport.verify|verify} messages.
+ * @param message Viewport message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.geo.type.IViewport, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Viewport message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Viewport
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.geo.type.Viewport;
+
+ /**
+ * Decodes a Viewport message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Viewport
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.geo.type.Viewport;
+
+ /**
+ * Verifies a Viewport message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a Viewport message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Viewport
+ */
+ public static fromObject(object: { [k: string]: any }): google.geo.type.Viewport;
+
+ /**
+ * Creates a plain object from a Viewport message. Also converts values to other types if specified.
+ * @param message Viewport
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.geo.type.Viewport, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Viewport to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Viewport
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+ }
+
+ /** Namespace type. */
+ namespace type {
+
+ /** Properties of a LatLng. */
+ interface ILatLng {
+
+ /** LatLng latitude */
+ latitude?: (number|null);
+
+ /** LatLng longitude */
+ longitude?: (number|null);
+ }
+
+ /** Represents a LatLng. */
+ class LatLng implements ILatLng {
+
+ /**
+ * Constructs a new LatLng.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.type.ILatLng);
+
+ /** LatLng latitude. */
+ public latitude: number;
+
+ /** LatLng longitude. */
+ public longitude: number;
+
+ /**
+ * Creates a new LatLng instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns LatLng instance
+ */
+ public static create(properties?: google.type.ILatLng): google.type.LatLng;
+
+ /**
+ * Encodes the specified LatLng message. Does not implicitly {@link google.type.LatLng.verify|verify} messages.
+ * @param message LatLng message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.type.ILatLng, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified LatLng message, length delimited. Does not implicitly {@link google.type.LatLng.verify|verify} messages.
+ * @param message LatLng message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.type.ILatLng, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a LatLng message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns LatLng
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.LatLng;
+
+ /**
+ * Decodes a LatLng message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns LatLng
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.LatLng;
+
+ /**
+ * Verifies a LatLng message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a LatLng message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns LatLng
+ */
+ public static fromObject(object: { [k: string]: any }): google.type.LatLng;
+
+ /**
+ * Creates a plain object from a LatLng message. Also converts values to other types if specified.
+ * @param message LatLng
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.type.LatLng, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this LatLng to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for LatLng
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a PostalAddress. */
+ interface IPostalAddress {
+
+ /** PostalAddress revision */
+ revision?: (number|null);
+
+ /** PostalAddress regionCode */
+ regionCode?: (string|null);
+
+ /** PostalAddress languageCode */
+ languageCode?: (string|null);
+
+ /** PostalAddress postalCode */
+ postalCode?: (string|null);
+
+ /** PostalAddress sortingCode */
+ sortingCode?: (string|null);
+
+ /** PostalAddress administrativeArea */
+ administrativeArea?: (string|null);
+
+ /** PostalAddress locality */
+ locality?: (string|null);
+
+ /** PostalAddress sublocality */
+ sublocality?: (string|null);
+
+ /** PostalAddress addressLines */
+ addressLines?: (string[]|null);
+
+ /** PostalAddress recipients */
+ recipients?: (string[]|null);
+
+ /** PostalAddress organization */
+ organization?: (string|null);
+ }
+
+ /** Represents a PostalAddress. */
+ class PostalAddress implements IPostalAddress {
+
+ /**
+ * Constructs a new PostalAddress.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.type.IPostalAddress);
+
+ /** PostalAddress revision. */
+ public revision: number;
+
+ /** PostalAddress regionCode. */
+ public regionCode: string;
+
+ /** PostalAddress languageCode. */
+ public languageCode: string;
+
+ /** PostalAddress postalCode. */
+ public postalCode: string;
+
+ /** PostalAddress sortingCode. */
+ public sortingCode: string;
+
+ /** PostalAddress administrativeArea. */
+ public administrativeArea: string;
+
+ /** PostalAddress locality. */
+ public locality: string;
+
+ /** PostalAddress sublocality. */
+ public sublocality: string;
+
+ /** PostalAddress addressLines. */
+ public addressLines: string[];
+
+ /** PostalAddress recipients. */
+ public recipients: string[];
+
+ /** PostalAddress organization. */
+ public organization: string;
+
+ /**
+ * Creates a new PostalAddress instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns PostalAddress instance
+ */
+ public static create(properties?: google.type.IPostalAddress): google.type.PostalAddress;
+
+ /**
+ * Encodes the specified PostalAddress message. Does not implicitly {@link google.type.PostalAddress.verify|verify} messages.
+ * @param message PostalAddress message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.type.IPostalAddress, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified PostalAddress message, length delimited. Does not implicitly {@link google.type.PostalAddress.verify|verify} messages.
+ * @param message PostalAddress message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.type.IPostalAddress, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a PostalAddress message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns PostalAddress
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.PostalAddress;
+
+ /**
+ * Decodes a PostalAddress message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns PostalAddress
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.PostalAddress;
+
+ /**
+ * Verifies a PostalAddress message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a PostalAddress message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns PostalAddress
+ */
+ public static fromObject(object: { [k: string]: any }): google.type.PostalAddress;
+
+ /**
+ * Creates a plain object from a PostalAddress message. Also converts values to other types if specified.
+ * @param message PostalAddress
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.type.PostalAddress, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this PostalAddress to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for PostalAddress
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+
+ /** Namespace maps. */
+ namespace maps {
+
+ /** Namespace addressvalidation. */
+ namespace addressvalidation {
+
+ /** Namespace v1. */
+ namespace v1 {
+
+ /** Properties of an Address. */
+ interface IAddress {
+
+ /** Address formattedAddress */
+ formattedAddress?: (string|null);
+
+ /** Address postalAddress */
+ postalAddress?: (google.type.IPostalAddress|null);
+
+ /** Address addressComponents */
+ addressComponents?: (google.maps.addressvalidation.v1.IAddressComponent[]|null);
+
+ /** Address missingComponentTypes */
+ missingComponentTypes?: (string[]|null);
+
+ /** Address unconfirmedComponentTypes */
+ unconfirmedComponentTypes?: (string[]|null);
+
+ /** Address unresolvedTokens */
+ unresolvedTokens?: (string[]|null);
+ }
+
+ /** Represents an Address. */
+ class Address implements IAddress {
+
+ /**
+ * Constructs a new Address.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.maps.addressvalidation.v1.IAddress);
+
+ /** Address formattedAddress. */
+ public formattedAddress: string;
+
+ /** Address postalAddress. */
+ public postalAddress?: (google.type.IPostalAddress|null);
+
+ /** Address addressComponents. */
+ public addressComponents: google.maps.addressvalidation.v1.IAddressComponent[];
+
+ /** Address missingComponentTypes. */
+ public missingComponentTypes: string[];
+
+ /** Address unconfirmedComponentTypes. */
+ public unconfirmedComponentTypes: string[];
+
+ /** Address unresolvedTokens. */
+ public unresolvedTokens: string[];
+
+ /**
+ * Creates a new Address instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Address instance
+ */
+ public static create(properties?: google.maps.addressvalidation.v1.IAddress): google.maps.addressvalidation.v1.Address;
+
+ /**
+ * Encodes the specified Address message. Does not implicitly {@link google.maps.addressvalidation.v1.Address.verify|verify} messages.
+ * @param message Address message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.maps.addressvalidation.v1.IAddress, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Address message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.Address.verify|verify} messages.
+ * @param message Address message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.maps.addressvalidation.v1.IAddress, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an Address message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Address
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.addressvalidation.v1.Address;
+
+ /**
+ * Decodes an Address message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Address
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.addressvalidation.v1.Address;
+
+ /**
+ * Verifies an Address message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an Address message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Address
+ */
+ public static fromObject(object: { [k: string]: any }): google.maps.addressvalidation.v1.Address;
+
+ /**
+ * Creates a plain object from an Address message. Also converts values to other types if specified.
+ * @param message Address
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.maps.addressvalidation.v1.Address, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Address to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Address
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an AddressComponent. */
+ interface IAddressComponent {
+
+ /** AddressComponent componentName */
+ componentName?: (google.maps.addressvalidation.v1.IComponentName|null);
+
+ /** AddressComponent componentType */
+ componentType?: (string|null);
+
+ /** AddressComponent confirmationLevel */
+ confirmationLevel?: (google.maps.addressvalidation.v1.AddressComponent.ConfirmationLevel|keyof typeof google.maps.addressvalidation.v1.AddressComponent.ConfirmationLevel|null);
+
+ /** AddressComponent inferred */
+ inferred?: (boolean|null);
+
+ /** AddressComponent spellCorrected */
+ spellCorrected?: (boolean|null);
+
+ /** AddressComponent replaced */
+ replaced?: (boolean|null);
+
+ /** AddressComponent unexpected */
+ unexpected?: (boolean|null);
+ }
+
+ /** Represents an AddressComponent. */
+ class AddressComponent implements IAddressComponent {
+
+ /**
+ * Constructs a new AddressComponent.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.maps.addressvalidation.v1.IAddressComponent);
+
+ /** AddressComponent componentName. */
+ public componentName?: (google.maps.addressvalidation.v1.IComponentName|null);
+
+ /** AddressComponent componentType. */
+ public componentType: string;
+
+ /** AddressComponent confirmationLevel. */
+ public confirmationLevel: (google.maps.addressvalidation.v1.AddressComponent.ConfirmationLevel|keyof typeof google.maps.addressvalidation.v1.AddressComponent.ConfirmationLevel);
+
+ /** AddressComponent inferred. */
+ public inferred: boolean;
+
+ /** AddressComponent spellCorrected. */
+ public spellCorrected: boolean;
+
+ /** AddressComponent replaced. */
+ public replaced: boolean;
+
+ /** AddressComponent unexpected. */
+ public unexpected: boolean;
+
+ /**
+ * Creates a new AddressComponent instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns AddressComponent instance
+ */
+ public static create(properties?: google.maps.addressvalidation.v1.IAddressComponent): google.maps.addressvalidation.v1.AddressComponent;
+
+ /**
+ * Encodes the specified AddressComponent message. Does not implicitly {@link google.maps.addressvalidation.v1.AddressComponent.verify|verify} messages.
+ * @param message AddressComponent message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.maps.addressvalidation.v1.IAddressComponent, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified AddressComponent message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.AddressComponent.verify|verify} messages.
+ * @param message AddressComponent message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.maps.addressvalidation.v1.IAddressComponent, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an AddressComponent message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns AddressComponent
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.addressvalidation.v1.AddressComponent;
+
+ /**
+ * Decodes an AddressComponent message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns AddressComponent
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.addressvalidation.v1.AddressComponent;
+
+ /**
+ * Verifies an AddressComponent message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an AddressComponent message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns AddressComponent
+ */
+ public static fromObject(object: { [k: string]: any }): google.maps.addressvalidation.v1.AddressComponent;
+
+ /**
+ * Creates a plain object from an AddressComponent message. Also converts values to other types if specified.
+ * @param message AddressComponent
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.maps.addressvalidation.v1.AddressComponent, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this AddressComponent to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for AddressComponent
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace AddressComponent {
+
+ /** ConfirmationLevel enum. */
+ enum ConfirmationLevel {
+ CONFIRMATION_LEVEL_UNSPECIFIED = 0,
+ CONFIRMED = 1,
+ UNCONFIRMED_BUT_PLAUSIBLE = 2,
+ UNCONFIRMED_AND_SUSPICIOUS = 3
+ }
+ }
+
+ /** Properties of a ComponentName. */
+ interface IComponentName {
+
+ /** ComponentName text */
+ text?: (string|null);
+
+ /** ComponentName languageCode */
+ languageCode?: (string|null);
+ }
+
+ /** Represents a ComponentName. */
+ class ComponentName implements IComponentName {
+
+ /**
+ * Constructs a new ComponentName.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.maps.addressvalidation.v1.IComponentName);
+
+ /** ComponentName text. */
+ public text: string;
+
+ /** ComponentName languageCode. */
+ public languageCode: string;
+
+ /**
+ * Creates a new ComponentName instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ComponentName instance
+ */
+ public static create(properties?: google.maps.addressvalidation.v1.IComponentName): google.maps.addressvalidation.v1.ComponentName;
+
+ /**
+ * Encodes the specified ComponentName message. Does not implicitly {@link google.maps.addressvalidation.v1.ComponentName.verify|verify} messages.
+ * @param message ComponentName message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.maps.addressvalidation.v1.IComponentName, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ComponentName message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.ComponentName.verify|verify} messages.
+ * @param message ComponentName message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.maps.addressvalidation.v1.IComponentName, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ComponentName message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ComponentName
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.addressvalidation.v1.ComponentName;
+
+ /**
+ * Decodes a ComponentName message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ComponentName
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.addressvalidation.v1.ComponentName;
+
+ /**
+ * Verifies a ComponentName message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ComponentName message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ComponentName
+ */
+ public static fromObject(object: { [k: string]: any }): google.maps.addressvalidation.v1.ComponentName;
+
+ /**
+ * Creates a plain object from a ComponentName message. Also converts values to other types if specified.
+ * @param message ComponentName
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.maps.addressvalidation.v1.ComponentName, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ComponentName to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ComponentName
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Represents an AddressValidation */
+ class AddressValidation extends $protobuf.rpc.Service {
+
+ /**
+ * Constructs a new AddressValidation 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 AddressValidation 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): AddressValidation;
+
+ /**
+ * Calls ValidateAddress.
+ * @param request ValidateAddressRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and ValidateAddressResponse
+ */
+ public validateAddress(request: google.maps.addressvalidation.v1.IValidateAddressRequest, callback: google.maps.addressvalidation.v1.AddressValidation.ValidateAddressCallback): void;
+
+ /**
+ * Calls ValidateAddress.
+ * @param request ValidateAddressRequest message or plain object
+ * @returns Promise
+ */
+ public validateAddress(request: google.maps.addressvalidation.v1.IValidateAddressRequest): Promise;
+
+ /**
+ * Calls ProvideValidationFeedback.
+ * @param request ProvideValidationFeedbackRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and ProvideValidationFeedbackResponse
+ */
+ public provideValidationFeedback(request: google.maps.addressvalidation.v1.IProvideValidationFeedbackRequest, callback: google.maps.addressvalidation.v1.AddressValidation.ProvideValidationFeedbackCallback): void;
+
+ /**
+ * Calls ProvideValidationFeedback.
+ * @param request ProvideValidationFeedbackRequest message or plain object
+ * @returns Promise
+ */
+ public provideValidationFeedback(request: google.maps.addressvalidation.v1.IProvideValidationFeedbackRequest): Promise;
+ }
+
+ namespace AddressValidation {
+
+ /**
+ * Callback as used by {@link google.maps.addressvalidation.v1.AddressValidation|validateAddress}.
+ * @param error Error, if any
+ * @param [response] ValidateAddressResponse
+ */
+ type ValidateAddressCallback = (error: (Error|null), response?: google.maps.addressvalidation.v1.ValidateAddressResponse) => void;
+
+ /**
+ * Callback as used by {@link google.maps.addressvalidation.v1.AddressValidation|provideValidationFeedback}.
+ * @param error Error, if any
+ * @param [response] ProvideValidationFeedbackResponse
+ */
+ type ProvideValidationFeedbackCallback = (error: (Error|null), response?: google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse) => void;
+ }
+
+ /** Properties of a ValidateAddressRequest. */
+ interface IValidateAddressRequest {
+
+ /** ValidateAddressRequest address */
+ address?: (google.type.IPostalAddress|null);
+
+ /** ValidateAddressRequest previousResponseId */
+ previousResponseId?: (string|null);
+
+ /** ValidateAddressRequest enableUspsCass */
+ enableUspsCass?: (boolean|null);
+ }
+
+ /** Represents a ValidateAddressRequest. */
+ class ValidateAddressRequest implements IValidateAddressRequest {
+
+ /**
+ * Constructs a new ValidateAddressRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.maps.addressvalidation.v1.IValidateAddressRequest);
+
+ /** ValidateAddressRequest address. */
+ public address?: (google.type.IPostalAddress|null);
+
+ /** ValidateAddressRequest previousResponseId. */
+ public previousResponseId: string;
+
+ /** ValidateAddressRequest enableUspsCass. */
+ public enableUspsCass: boolean;
+
+ /**
+ * Creates a new ValidateAddressRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ValidateAddressRequest instance
+ */
+ public static create(properties?: google.maps.addressvalidation.v1.IValidateAddressRequest): google.maps.addressvalidation.v1.ValidateAddressRequest;
+
+ /**
+ * Encodes the specified ValidateAddressRequest message. Does not implicitly {@link google.maps.addressvalidation.v1.ValidateAddressRequest.verify|verify} messages.
+ * @param message ValidateAddressRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.maps.addressvalidation.v1.IValidateAddressRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ValidateAddressRequest message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.ValidateAddressRequest.verify|verify} messages.
+ * @param message ValidateAddressRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.maps.addressvalidation.v1.IValidateAddressRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ValidateAddressRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ValidateAddressRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.addressvalidation.v1.ValidateAddressRequest;
+
+ /**
+ * Decodes a ValidateAddressRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ValidateAddressRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.addressvalidation.v1.ValidateAddressRequest;
+
+ /**
+ * Verifies a ValidateAddressRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ValidateAddressRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ValidateAddressRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.maps.addressvalidation.v1.ValidateAddressRequest;
+
+ /**
+ * Creates a plain object from a ValidateAddressRequest message. Also converts values to other types if specified.
+ * @param message ValidateAddressRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.maps.addressvalidation.v1.ValidateAddressRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ValidateAddressRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ValidateAddressRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ValidateAddressResponse. */
+ interface IValidateAddressResponse {
+
+ /** ValidateAddressResponse result */
+ result?: (google.maps.addressvalidation.v1.IValidationResult|null);
+
+ /** ValidateAddressResponse responseId */
+ responseId?: (string|null);
+ }
+
+ /** Represents a ValidateAddressResponse. */
+ class ValidateAddressResponse implements IValidateAddressResponse {
+
+ /**
+ * Constructs a new ValidateAddressResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.maps.addressvalidation.v1.IValidateAddressResponse);
+
+ /** ValidateAddressResponse result. */
+ public result?: (google.maps.addressvalidation.v1.IValidationResult|null);
+
+ /** ValidateAddressResponse responseId. */
+ public responseId: string;
+
+ /**
+ * Creates a new ValidateAddressResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ValidateAddressResponse instance
+ */
+ public static create(properties?: google.maps.addressvalidation.v1.IValidateAddressResponse): google.maps.addressvalidation.v1.ValidateAddressResponse;
+
+ /**
+ * Encodes the specified ValidateAddressResponse message. Does not implicitly {@link google.maps.addressvalidation.v1.ValidateAddressResponse.verify|verify} messages.
+ * @param message ValidateAddressResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.maps.addressvalidation.v1.IValidateAddressResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ValidateAddressResponse message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.ValidateAddressResponse.verify|verify} messages.
+ * @param message ValidateAddressResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.maps.addressvalidation.v1.IValidateAddressResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ValidateAddressResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ValidateAddressResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.addressvalidation.v1.ValidateAddressResponse;
+
+ /**
+ * Decodes a ValidateAddressResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ValidateAddressResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.addressvalidation.v1.ValidateAddressResponse;
+
+ /**
+ * Verifies a ValidateAddressResponse message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ValidateAddressResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ValidateAddressResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.maps.addressvalidation.v1.ValidateAddressResponse;
+
+ /**
+ * Creates a plain object from a ValidateAddressResponse message. Also converts values to other types if specified.
+ * @param message ValidateAddressResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.maps.addressvalidation.v1.ValidateAddressResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ValidateAddressResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ValidateAddressResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ProvideValidationFeedbackRequest. */
+ interface IProvideValidationFeedbackRequest {
+
+ /** ProvideValidationFeedbackRequest conclusion */
+ conclusion?: (google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest.ValidationConclusion|keyof typeof google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest.ValidationConclusion|null);
+
+ /** ProvideValidationFeedbackRequest responseId */
+ responseId?: (string|null);
+ }
+
+ /** Represents a ProvideValidationFeedbackRequest. */
+ class ProvideValidationFeedbackRequest implements IProvideValidationFeedbackRequest {
+
+ /**
+ * Constructs a new ProvideValidationFeedbackRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.maps.addressvalidation.v1.IProvideValidationFeedbackRequest);
+
+ /** ProvideValidationFeedbackRequest conclusion. */
+ public conclusion: (google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest.ValidationConclusion|keyof typeof google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest.ValidationConclusion);
+
+ /** ProvideValidationFeedbackRequest responseId. */
+ public responseId: string;
+
+ /**
+ * Creates a new ProvideValidationFeedbackRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ProvideValidationFeedbackRequest instance
+ */
+ public static create(properties?: google.maps.addressvalidation.v1.IProvideValidationFeedbackRequest): google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest;
+
+ /**
+ * Encodes the specified ProvideValidationFeedbackRequest message. Does not implicitly {@link google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest.verify|verify} messages.
+ * @param message ProvideValidationFeedbackRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.maps.addressvalidation.v1.IProvideValidationFeedbackRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ProvideValidationFeedbackRequest message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest.verify|verify} messages.
+ * @param message ProvideValidationFeedbackRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.maps.addressvalidation.v1.IProvideValidationFeedbackRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ProvideValidationFeedbackRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ProvideValidationFeedbackRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest;
+
+ /**
+ * Decodes a ProvideValidationFeedbackRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ProvideValidationFeedbackRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest;
+
+ /**
+ * Verifies a ProvideValidationFeedbackRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ProvideValidationFeedbackRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ProvideValidationFeedbackRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest;
+
+ /**
+ * Creates a plain object from a ProvideValidationFeedbackRequest message. Also converts values to other types if specified.
+ * @param message ProvideValidationFeedbackRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ProvideValidationFeedbackRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ProvideValidationFeedbackRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace ProvideValidationFeedbackRequest {
+
+ /** ValidationConclusion enum. */
+ enum ValidationConclusion {
+ VALIDATION_CONCLUSION_UNSPECIFIED = 0,
+ VALIDATED_VERSION_USED = 1,
+ USER_VERSION_USED = 2,
+ UNVALIDATED_VERSION_USED = 3,
+ UNUSED = 4
+ }
+ }
+
+ /** Properties of a ProvideValidationFeedbackResponse. */
+ interface IProvideValidationFeedbackResponse {
+ }
+
+ /** Represents a ProvideValidationFeedbackResponse. */
+ class ProvideValidationFeedbackResponse implements IProvideValidationFeedbackResponse {
+
+ /**
+ * Constructs a new ProvideValidationFeedbackResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.maps.addressvalidation.v1.IProvideValidationFeedbackResponse);
+
+ /**
+ * Creates a new ProvideValidationFeedbackResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ProvideValidationFeedbackResponse instance
+ */
+ public static create(properties?: google.maps.addressvalidation.v1.IProvideValidationFeedbackResponse): google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse;
+
+ /**
+ * Encodes the specified ProvideValidationFeedbackResponse message. Does not implicitly {@link google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse.verify|verify} messages.
+ * @param message ProvideValidationFeedbackResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.maps.addressvalidation.v1.IProvideValidationFeedbackResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ProvideValidationFeedbackResponse message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse.verify|verify} messages.
+ * @param message ProvideValidationFeedbackResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.maps.addressvalidation.v1.IProvideValidationFeedbackResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ProvideValidationFeedbackResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ProvideValidationFeedbackResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse;
+
+ /**
+ * Decodes a ProvideValidationFeedbackResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ProvideValidationFeedbackResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse;
+
+ /**
+ * Verifies a ProvideValidationFeedbackResponse message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ProvideValidationFeedbackResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ProvideValidationFeedbackResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse;
+
+ /**
+ * Creates a plain object from a ProvideValidationFeedbackResponse message. Also converts values to other types if specified.
+ * @param message ProvideValidationFeedbackResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ProvideValidationFeedbackResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ProvideValidationFeedbackResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ValidationResult. */
+ interface IValidationResult {
+
+ /** ValidationResult verdict */
+ verdict?: (google.maps.addressvalidation.v1.IVerdict|null);
+
+ /** ValidationResult address */
+ address?: (google.maps.addressvalidation.v1.IAddress|null);
+
+ /** ValidationResult geocode */
+ geocode?: (google.maps.addressvalidation.v1.IGeocode|null);
+
+ /** ValidationResult metadata */
+ metadata?: (google.maps.addressvalidation.v1.IAddressMetadata|null);
+
+ /** ValidationResult uspsData */
+ uspsData?: (google.maps.addressvalidation.v1.IUspsData|null);
+ }
+
+ /** Represents a ValidationResult. */
+ class ValidationResult implements IValidationResult {
+
+ /**
+ * Constructs a new ValidationResult.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.maps.addressvalidation.v1.IValidationResult);
+
+ /** ValidationResult verdict. */
+ public verdict?: (google.maps.addressvalidation.v1.IVerdict|null);
+
+ /** ValidationResult address. */
+ public address?: (google.maps.addressvalidation.v1.IAddress|null);
+
+ /** ValidationResult geocode. */
+ public geocode?: (google.maps.addressvalidation.v1.IGeocode|null);
+
+ /** ValidationResult metadata. */
+ public metadata?: (google.maps.addressvalidation.v1.IAddressMetadata|null);
+
+ /** ValidationResult uspsData. */
+ public uspsData?: (google.maps.addressvalidation.v1.IUspsData|null);
+
+ /**
+ * Creates a new ValidationResult instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ValidationResult instance
+ */
+ public static create(properties?: google.maps.addressvalidation.v1.IValidationResult): google.maps.addressvalidation.v1.ValidationResult;
+
+ /**
+ * Encodes the specified ValidationResult message. Does not implicitly {@link google.maps.addressvalidation.v1.ValidationResult.verify|verify} messages.
+ * @param message ValidationResult message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.maps.addressvalidation.v1.IValidationResult, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ValidationResult message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.ValidationResult.verify|verify} messages.
+ * @param message ValidationResult message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.maps.addressvalidation.v1.IValidationResult, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ValidationResult message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ValidationResult
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.addressvalidation.v1.ValidationResult;
+
+ /**
+ * Decodes a ValidationResult message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ValidationResult
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.addressvalidation.v1.ValidationResult;
+
+ /**
+ * Verifies a ValidationResult message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ValidationResult message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ValidationResult
+ */
+ public static fromObject(object: { [k: string]: any }): google.maps.addressvalidation.v1.ValidationResult;
+
+ /**
+ * Creates a plain object from a ValidationResult message. Also converts values to other types if specified.
+ * @param message ValidationResult
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.maps.addressvalidation.v1.ValidationResult, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ValidationResult to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ValidationResult
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a Verdict. */
+ interface IVerdict {
+
+ /** Verdict inputGranularity */
+ inputGranularity?: (google.maps.addressvalidation.v1.Verdict.Granularity|keyof typeof google.maps.addressvalidation.v1.Verdict.Granularity|null);
+
+ /** Verdict validationGranularity */
+ validationGranularity?: (google.maps.addressvalidation.v1.Verdict.Granularity|keyof typeof google.maps.addressvalidation.v1.Verdict.Granularity|null);
+
+ /** Verdict geocodeGranularity */
+ geocodeGranularity?: (google.maps.addressvalidation.v1.Verdict.Granularity|keyof typeof google.maps.addressvalidation.v1.Verdict.Granularity|null);
+
+ /** Verdict addressComplete */
+ addressComplete?: (boolean|null);
+
+ /** Verdict hasUnconfirmedComponents */
+ hasUnconfirmedComponents?: (boolean|null);
+
+ /** Verdict hasInferredComponents */
+ hasInferredComponents?: (boolean|null);
+
+ /** Verdict hasReplacedComponents */
+ hasReplacedComponents?: (boolean|null);
+ }
+
+ /** Represents a Verdict. */
+ class Verdict implements IVerdict {
+
+ /**
+ * Constructs a new Verdict.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.maps.addressvalidation.v1.IVerdict);
+
+ /** Verdict inputGranularity. */
+ public inputGranularity: (google.maps.addressvalidation.v1.Verdict.Granularity|keyof typeof google.maps.addressvalidation.v1.Verdict.Granularity);
+
+ /** Verdict validationGranularity. */
+ public validationGranularity: (google.maps.addressvalidation.v1.Verdict.Granularity|keyof typeof google.maps.addressvalidation.v1.Verdict.Granularity);
+
+ /** Verdict geocodeGranularity. */
+ public geocodeGranularity: (google.maps.addressvalidation.v1.Verdict.Granularity|keyof typeof google.maps.addressvalidation.v1.Verdict.Granularity);
+
+ /** Verdict addressComplete. */
+ public addressComplete: boolean;
+
+ /** Verdict hasUnconfirmedComponents. */
+ public hasUnconfirmedComponents: boolean;
+
+ /** Verdict hasInferredComponents. */
+ public hasInferredComponents: boolean;
+
+ /** Verdict hasReplacedComponents. */
+ public hasReplacedComponents: boolean;
+
+ /**
+ * Creates a new Verdict instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Verdict instance
+ */
+ public static create(properties?: google.maps.addressvalidation.v1.IVerdict): google.maps.addressvalidation.v1.Verdict;
+
+ /**
+ * Encodes the specified Verdict message. Does not implicitly {@link google.maps.addressvalidation.v1.Verdict.verify|verify} messages.
+ * @param message Verdict message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.maps.addressvalidation.v1.IVerdict, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Verdict message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.Verdict.verify|verify} messages.
+ * @param message Verdict message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.maps.addressvalidation.v1.IVerdict, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Verdict message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Verdict
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.addressvalidation.v1.Verdict;
+
+ /**
+ * Decodes a Verdict message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Verdict
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.addressvalidation.v1.Verdict;
+
+ /**
+ * Verifies a Verdict message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a Verdict message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Verdict
+ */
+ public static fromObject(object: { [k: string]: any }): google.maps.addressvalidation.v1.Verdict;
+
+ /**
+ * Creates a plain object from a Verdict message. Also converts values to other types if specified.
+ * @param message Verdict
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.maps.addressvalidation.v1.Verdict, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Verdict to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Verdict
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace Verdict {
+
+ /** Granularity enum. */
+ enum Granularity {
+ GRANULARITY_UNSPECIFIED = 0,
+ SUB_PREMISE = 1,
+ PREMISE = 2,
+ PREMISE_PROXIMITY = 3,
+ BLOCK = 4,
+ ROUTE = 5,
+ OTHER = 6
+ }
+ }
+
+ /** Properties of a Geocode. */
+ interface IGeocode {
+
+ /** Geocode location */
+ location?: (google.type.ILatLng|null);
+
+ /** Geocode plusCode */
+ plusCode?: (google.maps.addressvalidation.v1.IPlusCode|null);
+
+ /** Geocode bounds */
+ bounds?: (google.geo.type.IViewport|null);
+
+ /** Geocode featureSizeMeters */
+ featureSizeMeters?: (number|null);
+
+ /** Geocode placeId */
+ placeId?: (string|null);
+
+ /** Geocode placeTypes */
+ placeTypes?: (string[]|null);
+ }
+
+ /** Represents a Geocode. */
+ class Geocode implements IGeocode {
+
+ /**
+ * Constructs a new Geocode.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.maps.addressvalidation.v1.IGeocode);
+
+ /** Geocode location. */
+ public location?: (google.type.ILatLng|null);
+
+ /** Geocode plusCode. */
+ public plusCode?: (google.maps.addressvalidation.v1.IPlusCode|null);
+
+ /** Geocode bounds. */
+ public bounds?: (google.geo.type.IViewport|null);
+
+ /** Geocode featureSizeMeters. */
+ public featureSizeMeters: number;
+
+ /** Geocode placeId. */
+ public placeId: string;
+
+ /** Geocode placeTypes. */
+ public placeTypes: string[];
+
+ /**
+ * Creates a new Geocode instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Geocode instance
+ */
+ public static create(properties?: google.maps.addressvalidation.v1.IGeocode): google.maps.addressvalidation.v1.Geocode;
+
+ /**
+ * Encodes the specified Geocode message. Does not implicitly {@link google.maps.addressvalidation.v1.Geocode.verify|verify} messages.
+ * @param message Geocode message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.maps.addressvalidation.v1.IGeocode, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Geocode message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.Geocode.verify|verify} messages.
+ * @param message Geocode message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.maps.addressvalidation.v1.IGeocode, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Geocode message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Geocode
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.addressvalidation.v1.Geocode;
+
+ /**
+ * Decodes a Geocode message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Geocode
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.addressvalidation.v1.Geocode;
+
+ /**
+ * Verifies a Geocode message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a Geocode message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Geocode
+ */
+ public static fromObject(object: { [k: string]: any }): google.maps.addressvalidation.v1.Geocode;
+
+ /**
+ * Creates a plain object from a Geocode message. Also converts values to other types if specified.
+ * @param message Geocode
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.maps.addressvalidation.v1.Geocode, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Geocode to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Geocode
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a PlusCode. */
+ interface IPlusCode {
+
+ /** PlusCode globalCode */
+ globalCode?: (string|null);
+
+ /** PlusCode compoundCode */
+ compoundCode?: (string|null);
+ }
+
+ /** Represents a PlusCode. */
+ class PlusCode implements IPlusCode {
+
+ /**
+ * Constructs a new PlusCode.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.maps.addressvalidation.v1.IPlusCode);
+
+ /** PlusCode globalCode. */
+ public globalCode: string;
+
+ /** PlusCode compoundCode. */
+ public compoundCode: string;
+
+ /**
+ * Creates a new PlusCode instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns PlusCode instance
+ */
+ public static create(properties?: google.maps.addressvalidation.v1.IPlusCode): google.maps.addressvalidation.v1.PlusCode;
+
+ /**
+ * Encodes the specified PlusCode message. Does not implicitly {@link google.maps.addressvalidation.v1.PlusCode.verify|verify} messages.
+ * @param message PlusCode message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.maps.addressvalidation.v1.IPlusCode, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified PlusCode message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.PlusCode.verify|verify} messages.
+ * @param message PlusCode message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.maps.addressvalidation.v1.IPlusCode, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a PlusCode message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns PlusCode
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.addressvalidation.v1.PlusCode;
+
+ /**
+ * Decodes a PlusCode message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns PlusCode
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.addressvalidation.v1.PlusCode;
+
+ /**
+ * Verifies a PlusCode message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a PlusCode message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns PlusCode
+ */
+ public static fromObject(object: { [k: string]: any }): google.maps.addressvalidation.v1.PlusCode;
+
+ /**
+ * Creates a plain object from a PlusCode message. Also converts values to other types if specified.
+ * @param message PlusCode
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.maps.addressvalidation.v1.PlusCode, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this PlusCode to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for PlusCode
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an AddressMetadata. */
+ interface IAddressMetadata {
+
+ /** AddressMetadata highrise */
+ highrise?: (boolean|null);
+
+ /** AddressMetadata business */
+ business?: (boolean|null);
+
+ /** AddressMetadata poBox */
+ poBox?: (boolean|null);
+
+ /** AddressMetadata multiFamily */
+ multiFamily?: (boolean|null);
+
+ /** AddressMetadata residential */
+ residential?: (boolean|null);
+ }
+
+ /** Represents an AddressMetadata. */
+ class AddressMetadata implements IAddressMetadata {
+
+ /**
+ * Constructs a new AddressMetadata.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.maps.addressvalidation.v1.IAddressMetadata);
+
+ /** AddressMetadata highrise. */
+ public highrise?: (boolean|null);
+
+ /** AddressMetadata business. */
+ public business?: (boolean|null);
+
+ /** AddressMetadata poBox. */
+ public poBox?: (boolean|null);
+
+ /** AddressMetadata multiFamily. */
+ public multiFamily?: (boolean|null);
+
+ /** AddressMetadata residential. */
+ public residential?: (boolean|null);
+
+ /** AddressMetadata _highrise. */
+ public _highrise?: "highrise";
+
+ /** AddressMetadata _business. */
+ public _business?: "business";
+
+ /** AddressMetadata _poBox. */
+ public _poBox?: "poBox";
+
+ /** AddressMetadata _multiFamily. */
+ public _multiFamily?: "multiFamily";
+
+ /** AddressMetadata _residential. */
+ public _residential?: "residential";
+
+ /**
+ * Creates a new AddressMetadata instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns AddressMetadata instance
+ */
+ public static create(properties?: google.maps.addressvalidation.v1.IAddressMetadata): google.maps.addressvalidation.v1.AddressMetadata;
+
+ /**
+ * Encodes the specified AddressMetadata message. Does not implicitly {@link google.maps.addressvalidation.v1.AddressMetadata.verify|verify} messages.
+ * @param message AddressMetadata message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.maps.addressvalidation.v1.IAddressMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified AddressMetadata message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.AddressMetadata.verify|verify} messages.
+ * @param message AddressMetadata message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.maps.addressvalidation.v1.IAddressMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an AddressMetadata message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns AddressMetadata
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.addressvalidation.v1.AddressMetadata;
+
+ /**
+ * Decodes an AddressMetadata message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns AddressMetadata
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.addressvalidation.v1.AddressMetadata;
+
+ /**
+ * Verifies an AddressMetadata message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an AddressMetadata message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns AddressMetadata
+ */
+ public static fromObject(object: { [k: string]: any }): google.maps.addressvalidation.v1.AddressMetadata;
+
+ /**
+ * Creates a plain object from an AddressMetadata message. Also converts values to other types if specified.
+ * @param message AddressMetadata
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.maps.addressvalidation.v1.AddressMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this AddressMetadata to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for AddressMetadata
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a UspsAddress. */
+ interface IUspsAddress {
+
+ /** UspsAddress firstAddressLine */
+ firstAddressLine?: (string|null);
+
+ /** UspsAddress firm */
+ firm?: (string|null);
+
+ /** UspsAddress secondAddressLine */
+ secondAddressLine?: (string|null);
+
+ /** UspsAddress urbanization */
+ urbanization?: (string|null);
+
+ /** UspsAddress cityStateZipAddressLine */
+ cityStateZipAddressLine?: (string|null);
+
+ /** UspsAddress city */
+ city?: (string|null);
+
+ /** UspsAddress state */
+ state?: (string|null);
+
+ /** UspsAddress zipCode */
+ zipCode?: (string|null);
+
+ /** UspsAddress zipCodeExtension */
+ zipCodeExtension?: (string|null);
+ }
+
+ /** Represents a UspsAddress. */
+ class UspsAddress implements IUspsAddress {
+
+ /**
+ * Constructs a new UspsAddress.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.maps.addressvalidation.v1.IUspsAddress);
+
+ /** UspsAddress firstAddressLine. */
+ public firstAddressLine: string;
+
+ /** UspsAddress firm. */
+ public firm: string;
+
+ /** UspsAddress secondAddressLine. */
+ public secondAddressLine: string;
+
+ /** UspsAddress urbanization. */
+ public urbanization: string;
+
+ /** UspsAddress cityStateZipAddressLine. */
+ public cityStateZipAddressLine: string;
+
+ /** UspsAddress city. */
+ public city: string;
+
+ /** UspsAddress state. */
+ public state: string;
+
+ /** UspsAddress zipCode. */
+ public zipCode: string;
+
+ /** UspsAddress zipCodeExtension. */
+ public zipCodeExtension: string;
+
+ /**
+ * Creates a new UspsAddress instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns UspsAddress instance
+ */
+ public static create(properties?: google.maps.addressvalidation.v1.IUspsAddress): google.maps.addressvalidation.v1.UspsAddress;
+
+ /**
+ * Encodes the specified UspsAddress message. Does not implicitly {@link google.maps.addressvalidation.v1.UspsAddress.verify|verify} messages.
+ * @param message UspsAddress message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.maps.addressvalidation.v1.IUspsAddress, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified UspsAddress message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.UspsAddress.verify|verify} messages.
+ * @param message UspsAddress message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.maps.addressvalidation.v1.IUspsAddress, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a UspsAddress message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns UspsAddress
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.addressvalidation.v1.UspsAddress;
+
+ /**
+ * Decodes a UspsAddress message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns UspsAddress
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.addressvalidation.v1.UspsAddress;
+
+ /**
+ * Verifies a UspsAddress message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a UspsAddress message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns UspsAddress
+ */
+ public static fromObject(object: { [k: string]: any }): google.maps.addressvalidation.v1.UspsAddress;
+
+ /**
+ * Creates a plain object from a UspsAddress message. Also converts values to other types if specified.
+ * @param message UspsAddress
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.maps.addressvalidation.v1.UspsAddress, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this UspsAddress to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for UspsAddress
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a UspsData. */
+ interface IUspsData {
+
+ /** UspsData standardizedAddress */
+ standardizedAddress?: (google.maps.addressvalidation.v1.IUspsAddress|null);
+
+ /** UspsData deliveryPointCode */
+ deliveryPointCode?: (string|null);
+
+ /** UspsData deliveryPointCheckDigit */
+ deliveryPointCheckDigit?: (string|null);
+
+ /** UspsData dpvConfirmation */
+ dpvConfirmation?: (string|null);
+
+ /** UspsData dpvFootnote */
+ dpvFootnote?: (string|null);
+
+ /** UspsData dpvCmra */
+ dpvCmra?: (string|null);
+
+ /** UspsData dpvVacant */
+ dpvVacant?: (string|null);
+
+ /** UspsData dpvNoStat */
+ dpvNoStat?: (string|null);
+
+ /** UspsData carrierRoute */
+ carrierRoute?: (string|null);
+
+ /** UspsData carrierRouteIndicator */
+ carrierRouteIndicator?: (string|null);
+
+ /** UspsData ewsNoMatch */
+ ewsNoMatch?: (boolean|null);
+
+ /** UspsData postOfficeCity */
+ postOfficeCity?: (string|null);
+
+ /** UspsData postOfficeState */
+ postOfficeState?: (string|null);
+
+ /** UspsData abbreviatedCity */
+ abbreviatedCity?: (string|null);
+
+ /** UspsData fipsCountyCode */
+ fipsCountyCode?: (string|null);
+
+ /** UspsData county */
+ county?: (string|null);
+
+ /** UspsData elotNumber */
+ elotNumber?: (string|null);
+
+ /** UspsData elotFlag */
+ elotFlag?: (string|null);
+
+ /** UspsData lacsLinkReturnCode */
+ lacsLinkReturnCode?: (string|null);
+
+ /** UspsData lacsLinkIndicator */
+ lacsLinkIndicator?: (string|null);
+
+ /** UspsData poBoxOnlyPostalCode */
+ poBoxOnlyPostalCode?: (boolean|null);
+
+ /** UspsData suitelinkFootnote */
+ suitelinkFootnote?: (string|null);
+
+ /** UspsData pmbDesignator */
+ pmbDesignator?: (string|null);
+
+ /** UspsData pmbNumber */
+ pmbNumber?: (string|null);
+
+ /** UspsData addressRecordType */
+ addressRecordType?: (string|null);
+
+ /** UspsData defaultAddress */
+ defaultAddress?: (boolean|null);
+
+ /** UspsData errorMessage */
+ errorMessage?: (string|null);
+
+ /** UspsData cassProcessed */
+ cassProcessed?: (boolean|null);
+ }
+
+ /** Represents a UspsData. */
+ class UspsData implements IUspsData {
+
+ /**
+ * Constructs a new UspsData.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.maps.addressvalidation.v1.IUspsData);
+
+ /** UspsData standardizedAddress. */
+ public standardizedAddress?: (google.maps.addressvalidation.v1.IUspsAddress|null);
+
+ /** UspsData deliveryPointCode. */
+ public deliveryPointCode: string;
+
+ /** UspsData deliveryPointCheckDigit. */
+ public deliveryPointCheckDigit: string;
+
+ /** UspsData dpvConfirmation. */
+ public dpvConfirmation: string;
+
+ /** UspsData dpvFootnote. */
+ public dpvFootnote: string;
+
+ /** UspsData dpvCmra. */
+ public dpvCmra: string;
+
+ /** UspsData dpvVacant. */
+ public dpvVacant: string;
+
+ /** UspsData dpvNoStat. */
+ public dpvNoStat: string;
+
+ /** UspsData carrierRoute. */
+ public carrierRoute: string;
+
+ /** UspsData carrierRouteIndicator. */
+ public carrierRouteIndicator: string;
+
+ /** UspsData ewsNoMatch. */
+ public ewsNoMatch: boolean;
+
+ /** UspsData postOfficeCity. */
+ public postOfficeCity: string;
+
+ /** UspsData postOfficeState. */
+ public postOfficeState: string;
+
+ /** UspsData abbreviatedCity. */
+ public abbreviatedCity: string;
+
+ /** UspsData fipsCountyCode. */
+ public fipsCountyCode: string;
+
+ /** UspsData county. */
+ public county: string;
+
+ /** UspsData elotNumber. */
+ public elotNumber: string;
+
+ /** UspsData elotFlag. */
+ public elotFlag: string;
+
+ /** UspsData lacsLinkReturnCode. */
+ public lacsLinkReturnCode: string;
+
+ /** UspsData lacsLinkIndicator. */
+ public lacsLinkIndicator: string;
+
+ /** UspsData poBoxOnlyPostalCode. */
+ public poBoxOnlyPostalCode: boolean;
+
+ /** UspsData suitelinkFootnote. */
+ public suitelinkFootnote: string;
+
+ /** UspsData pmbDesignator. */
+ public pmbDesignator: string;
+
+ /** UspsData pmbNumber. */
+ public pmbNumber: string;
+
+ /** UspsData addressRecordType. */
+ public addressRecordType: string;
+
+ /** UspsData defaultAddress. */
+ public defaultAddress: boolean;
+
+ /** UspsData errorMessage. */
+ public errorMessage: string;
+
+ /** UspsData cassProcessed. */
+ public cassProcessed: boolean;
+
+ /**
+ * Creates a new UspsData instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns UspsData instance
+ */
+ public static create(properties?: google.maps.addressvalidation.v1.IUspsData): google.maps.addressvalidation.v1.UspsData;
+
+ /**
+ * Encodes the specified UspsData message. Does not implicitly {@link google.maps.addressvalidation.v1.UspsData.verify|verify} messages.
+ * @param message UspsData message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.maps.addressvalidation.v1.IUspsData, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified UspsData message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.UspsData.verify|verify} messages.
+ * @param message UspsData message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.maps.addressvalidation.v1.IUspsData, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a UspsData message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns UspsData
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.addressvalidation.v1.UspsData;
+
+ /**
+ * Decodes a UspsData message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns UspsData
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.addressvalidation.v1.UspsData;
+
+ /**
+ * Verifies a UspsData message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a UspsData message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns UspsData
+ */
+ public static fromObject(object: { [k: string]: any }): google.maps.addressvalidation.v1.UspsData;
+
+ /**
+ * Creates a plain object from a UspsData message. Also converts values to other types if specified.
+ * @param message UspsData
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.maps.addressvalidation.v1.UspsData, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this UspsData to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for UspsData
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+ }
+ }
+
+ /** Namespace api. */
+ namespace api {
+
+ /** FieldBehavior enum. */
+ enum FieldBehavior {
+ FIELD_BEHAVIOR_UNSPECIFIED = 0,
+ OPTIONAL = 1,
+ REQUIRED = 2,
+ OUTPUT_ONLY = 3,
+ INPUT_ONLY = 4,
+ IMMUTABLE = 5,
+ UNORDERED_LIST = 6,
+ NON_EMPTY_DEFAULT = 7
+ }
+
+ /** 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;
+ }
+ }
+
+ /** 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);
+ }
+
+ /** 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);
+ }
+
+ /** 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);
+ }
+
+ /** 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
+ }
+ }
+ }
+ }
+}
diff --git a/packages/google-maps-addressvalidation/protos/protos.js b/packages/google-maps-addressvalidation/protos/protos.js
new file mode 100644
index 00000000000..0af7fd3e2e2
--- /dev/null
+++ b/packages/google-maps-addressvalidation/protos/protos.js
@@ -0,0 +1,16306 @@
+// 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_addressvalidation_protos || ($protobuf.roots._google_cloud_addressvalidation_protos = {});
+
+ $root.google = (function() {
+
+ /**
+ * Namespace google.
+ * @exports google
+ * @namespace
+ */
+ var google = {};
+
+ google.geo = (function() {
+
+ /**
+ * Namespace geo.
+ * @memberof google
+ * @namespace
+ */
+ var geo = {};
+
+ geo.type = (function() {
+
+ /**
+ * Namespace type.
+ * @memberof google.geo
+ * @namespace
+ */
+ var type = {};
+
+ type.Viewport = (function() {
+
+ /**
+ * Properties of a Viewport.
+ * @memberof google.geo.type
+ * @interface IViewport
+ * @property {google.type.ILatLng|null} [low] Viewport low
+ * @property {google.type.ILatLng|null} [high] Viewport high
+ */
+
+ /**
+ * Constructs a new Viewport.
+ * @memberof google.geo.type
+ * @classdesc Represents a Viewport.
+ * @implements IViewport
+ * @constructor
+ * @param {google.geo.type.IViewport=} [properties] Properties to set
+ */
+ function Viewport(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * Viewport low.
+ * @member {google.type.ILatLng|null|undefined} low
+ * @memberof google.geo.type.Viewport
+ * @instance
+ */
+ Viewport.prototype.low = null;
+
+ /**
+ * Viewport high.
+ * @member {google.type.ILatLng|null|undefined} high
+ * @memberof google.geo.type.Viewport
+ * @instance
+ */
+ Viewport.prototype.high = null;
+
+ /**
+ * Creates a new Viewport instance using the specified properties.
+ * @function create
+ * @memberof google.geo.type.Viewport
+ * @static
+ * @param {google.geo.type.IViewport=} [properties] Properties to set
+ * @returns {google.geo.type.Viewport} Viewport instance
+ */
+ Viewport.create = function create(properties) {
+ return new Viewport(properties);
+ };
+
+ /**
+ * Encodes the specified Viewport message. Does not implicitly {@link google.geo.type.Viewport.verify|verify} messages.
+ * @function encode
+ * @memberof google.geo.type.Viewport
+ * @static
+ * @param {google.geo.type.IViewport} message Viewport message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Viewport.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.low != null && Object.hasOwnProperty.call(message, "low"))
+ $root.google.type.LatLng.encode(message.low, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.high != null && Object.hasOwnProperty.call(message, "high"))
+ $root.google.type.LatLng.encode(message.high, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified Viewport message, length delimited. Does not implicitly {@link google.geo.type.Viewport.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.geo.type.Viewport
+ * @static
+ * @param {google.geo.type.IViewport} message Viewport message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Viewport.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a Viewport message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.geo.type.Viewport
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.geo.type.Viewport} Viewport
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Viewport.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.geo.type.Viewport();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.low = $root.google.type.LatLng.decode(reader, reader.uint32());
+ break;
+ }
+ case 2: {
+ message.high = $root.google.type.LatLng.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a Viewport message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.geo.type.Viewport
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.geo.type.Viewport} Viewport
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Viewport.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a Viewport message.
+ * @function verify
+ * @memberof google.geo.type.Viewport
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ Viewport.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.low != null && message.hasOwnProperty("low")) {
+ var error = $root.google.type.LatLng.verify(message.low);
+ if (error)
+ return "low." + error;
+ }
+ if (message.high != null && message.hasOwnProperty("high")) {
+ var error = $root.google.type.LatLng.verify(message.high);
+ if (error)
+ return "high." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a Viewport message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.geo.type.Viewport
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.geo.type.Viewport} Viewport
+ */
+ Viewport.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.geo.type.Viewport)
+ return object;
+ var message = new $root.google.geo.type.Viewport();
+ if (object.low != null) {
+ if (typeof object.low !== "object")
+ throw TypeError(".google.geo.type.Viewport.low: object expected");
+ message.low = $root.google.type.LatLng.fromObject(object.low);
+ }
+ if (object.high != null) {
+ if (typeof object.high !== "object")
+ throw TypeError(".google.geo.type.Viewport.high: object expected");
+ message.high = $root.google.type.LatLng.fromObject(object.high);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a Viewport message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.geo.type.Viewport
+ * @static
+ * @param {google.geo.type.Viewport} message Viewport
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ Viewport.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.low = null;
+ object.high = null;
+ }
+ if (message.low != null && message.hasOwnProperty("low"))
+ object.low = $root.google.type.LatLng.toObject(message.low, options);
+ if (message.high != null && message.hasOwnProperty("high"))
+ object.high = $root.google.type.LatLng.toObject(message.high, options);
+ return object;
+ };
+
+ /**
+ * Converts this Viewport to JSON.
+ * @function toJSON
+ * @memberof google.geo.type.Viewport
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ Viewport.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for Viewport
+ * @function getTypeUrl
+ * @memberof google.geo.type.Viewport
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ Viewport.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.geo.type.Viewport";
+ };
+
+ return Viewport;
+ })();
+
+ return type;
+ })();
+
+ return geo;
+ })();
+
+ google.type = (function() {
+
+ /**
+ * Namespace type.
+ * @memberof google
+ * @namespace
+ */
+ var type = {};
+
+ type.LatLng = (function() {
+
+ /**
+ * Properties of a LatLng.
+ * @memberof google.type
+ * @interface ILatLng
+ * @property {number|null} [latitude] LatLng latitude
+ * @property {number|null} [longitude] LatLng longitude
+ */
+
+ /**
+ * Constructs a new LatLng.
+ * @memberof google.type
+ * @classdesc Represents a LatLng.
+ * @implements ILatLng
+ * @constructor
+ * @param {google.type.ILatLng=} [properties] Properties to set
+ */
+ function LatLng(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * LatLng latitude.
+ * @member {number} latitude
+ * @memberof google.type.LatLng
+ * @instance
+ */
+ LatLng.prototype.latitude = 0;
+
+ /**
+ * LatLng longitude.
+ * @member {number} longitude
+ * @memberof google.type.LatLng
+ * @instance
+ */
+ LatLng.prototype.longitude = 0;
+
+ /**
+ * Creates a new LatLng instance using the specified properties.
+ * @function create
+ * @memberof google.type.LatLng
+ * @static
+ * @param {google.type.ILatLng=} [properties] Properties to set
+ * @returns {google.type.LatLng} LatLng instance
+ */
+ LatLng.create = function create(properties) {
+ return new LatLng(properties);
+ };
+
+ /**
+ * Encodes the specified LatLng message. Does not implicitly {@link google.type.LatLng.verify|verify} messages.
+ * @function encode
+ * @memberof google.type.LatLng
+ * @static
+ * @param {google.type.ILatLng} message LatLng message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ LatLng.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.latitude != null && Object.hasOwnProperty.call(message, "latitude"))
+ writer.uint32(/* id 1, wireType 1 =*/9).double(message.latitude);
+ if (message.longitude != null && Object.hasOwnProperty.call(message, "longitude"))
+ writer.uint32(/* id 2, wireType 1 =*/17).double(message.longitude);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified LatLng message, length delimited. Does not implicitly {@link google.type.LatLng.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.type.LatLng
+ * @static
+ * @param {google.type.ILatLng} message LatLng message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ LatLng.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a LatLng message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.type.LatLng
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.type.LatLng} LatLng
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ LatLng.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.LatLng();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.latitude = reader.double();
+ break;
+ }
+ case 2: {
+ message.longitude = reader.double();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a LatLng message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.type.LatLng
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.type.LatLng} LatLng
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ LatLng.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a LatLng message.
+ * @function verify
+ * @memberof google.type.LatLng
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ LatLng.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.latitude != null && message.hasOwnProperty("latitude"))
+ if (typeof message.latitude !== "number")
+ return "latitude: number expected";
+ if (message.longitude != null && message.hasOwnProperty("longitude"))
+ if (typeof message.longitude !== "number")
+ return "longitude: number expected";
+ return null;
+ };
+
+ /**
+ * Creates a LatLng message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.type.LatLng
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.type.LatLng} LatLng
+ */
+ LatLng.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.type.LatLng)
+ return object;
+ var message = new $root.google.type.LatLng();
+ if (object.latitude != null)
+ message.latitude = Number(object.latitude);
+ if (object.longitude != null)
+ message.longitude = Number(object.longitude);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a LatLng message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.type.LatLng
+ * @static
+ * @param {google.type.LatLng} message LatLng
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ LatLng.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.latitude = 0;
+ object.longitude = 0;
+ }
+ if (message.latitude != null && message.hasOwnProperty("latitude"))
+ object.latitude = options.json && !isFinite(message.latitude) ? String(message.latitude) : message.latitude;
+ if (message.longitude != null && message.hasOwnProperty("longitude"))
+ object.longitude = options.json && !isFinite(message.longitude) ? String(message.longitude) : message.longitude;
+ return object;
+ };
+
+ /**
+ * Converts this LatLng to JSON.
+ * @function toJSON
+ * @memberof google.type.LatLng
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ LatLng.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for LatLng
+ * @function getTypeUrl
+ * @memberof google.type.LatLng
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ LatLng.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.type.LatLng";
+ };
+
+ return LatLng;
+ })();
+
+ type.PostalAddress = (function() {
+
+ /**
+ * Properties of a PostalAddress.
+ * @memberof google.type
+ * @interface IPostalAddress
+ * @property {number|null} [revision] PostalAddress revision
+ * @property {string|null} [regionCode] PostalAddress regionCode
+ * @property {string|null} [languageCode] PostalAddress languageCode
+ * @property {string|null} [postalCode] PostalAddress postalCode
+ * @property {string|null} [sortingCode] PostalAddress sortingCode
+ * @property {string|null} [administrativeArea] PostalAddress administrativeArea
+ * @property {string|null} [locality] PostalAddress locality
+ * @property {string|null} [sublocality] PostalAddress sublocality
+ * @property {Array.|null} [addressLines] PostalAddress addressLines
+ * @property {Array.|null} [recipients] PostalAddress recipients
+ * @property {string|null} [organization] PostalAddress organization
+ */
+
+ /**
+ * Constructs a new PostalAddress.
+ * @memberof google.type
+ * @classdesc Represents a PostalAddress.
+ * @implements IPostalAddress
+ * @constructor
+ * @param {google.type.IPostalAddress=} [properties] Properties to set
+ */
+ function PostalAddress(properties) {
+ this.addressLines = [];
+ this.recipients = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * PostalAddress revision.
+ * @member {number} revision
+ * @memberof google.type.PostalAddress
+ * @instance
+ */
+ PostalAddress.prototype.revision = 0;
+
+ /**
+ * PostalAddress regionCode.
+ * @member {string} regionCode
+ * @memberof google.type.PostalAddress
+ * @instance
+ */
+ PostalAddress.prototype.regionCode = "";
+
+ /**
+ * PostalAddress languageCode.
+ * @member {string} languageCode
+ * @memberof google.type.PostalAddress
+ * @instance
+ */
+ PostalAddress.prototype.languageCode = "";
+
+ /**
+ * PostalAddress postalCode.
+ * @member {string} postalCode
+ * @memberof google.type.PostalAddress
+ * @instance
+ */
+ PostalAddress.prototype.postalCode = "";
+
+ /**
+ * PostalAddress sortingCode.
+ * @member {string} sortingCode
+ * @memberof google.type.PostalAddress
+ * @instance
+ */
+ PostalAddress.prototype.sortingCode = "";
+
+ /**
+ * PostalAddress administrativeArea.
+ * @member {string} administrativeArea
+ * @memberof google.type.PostalAddress
+ * @instance
+ */
+ PostalAddress.prototype.administrativeArea = "";
+
+ /**
+ * PostalAddress locality.
+ * @member {string} locality
+ * @memberof google.type.PostalAddress
+ * @instance
+ */
+ PostalAddress.prototype.locality = "";
+
+ /**
+ * PostalAddress sublocality.
+ * @member {string} sublocality
+ * @memberof google.type.PostalAddress
+ * @instance
+ */
+ PostalAddress.prototype.sublocality = "";
+
+ /**
+ * PostalAddress addressLines.
+ * @member {Array.} addressLines
+ * @memberof google.type.PostalAddress
+ * @instance
+ */
+ PostalAddress.prototype.addressLines = $util.emptyArray;
+
+ /**
+ * PostalAddress recipients.
+ * @member {Array.} recipients
+ * @memberof google.type.PostalAddress
+ * @instance
+ */
+ PostalAddress.prototype.recipients = $util.emptyArray;
+
+ /**
+ * PostalAddress organization.
+ * @member {string} organization
+ * @memberof google.type.PostalAddress
+ * @instance
+ */
+ PostalAddress.prototype.organization = "";
+
+ /**
+ * Creates a new PostalAddress instance using the specified properties.
+ * @function create
+ * @memberof google.type.PostalAddress
+ * @static
+ * @param {google.type.IPostalAddress=} [properties] Properties to set
+ * @returns {google.type.PostalAddress} PostalAddress instance
+ */
+ PostalAddress.create = function create(properties) {
+ return new PostalAddress(properties);
+ };
+
+ /**
+ * Encodes the specified PostalAddress message. Does not implicitly {@link google.type.PostalAddress.verify|verify} messages.
+ * @function encode
+ * @memberof google.type.PostalAddress
+ * @static
+ * @param {google.type.IPostalAddress} message PostalAddress message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ PostalAddress.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.revision != null && Object.hasOwnProperty.call(message, "revision"))
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.revision);
+ if (message.regionCode != null && Object.hasOwnProperty.call(message, "regionCode"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.regionCode);
+ if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode);
+ if (message.postalCode != null && Object.hasOwnProperty.call(message, "postalCode"))
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.postalCode);
+ if (message.sortingCode != null && Object.hasOwnProperty.call(message, "sortingCode"))
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.sortingCode);
+ if (message.administrativeArea != null && Object.hasOwnProperty.call(message, "administrativeArea"))
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.administrativeArea);
+ if (message.locality != null && Object.hasOwnProperty.call(message, "locality"))
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.locality);
+ if (message.sublocality != null && Object.hasOwnProperty.call(message, "sublocality"))
+ writer.uint32(/* id 8, wireType 2 =*/66).string(message.sublocality);
+ if (message.addressLines != null && message.addressLines.length)
+ for (var i = 0; i < message.addressLines.length; ++i)
+ writer.uint32(/* id 9, wireType 2 =*/74).string(message.addressLines[i]);
+ if (message.recipients != null && message.recipients.length)
+ for (var i = 0; i < message.recipients.length; ++i)
+ writer.uint32(/* id 10, wireType 2 =*/82).string(message.recipients[i]);
+ if (message.organization != null && Object.hasOwnProperty.call(message, "organization"))
+ writer.uint32(/* id 11, wireType 2 =*/90).string(message.organization);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified PostalAddress message, length delimited. Does not implicitly {@link google.type.PostalAddress.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.type.PostalAddress
+ * @static
+ * @param {google.type.IPostalAddress} message PostalAddress message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ PostalAddress.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a PostalAddress message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.type.PostalAddress
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.type.PostalAddress} PostalAddress
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ PostalAddress.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.PostalAddress();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.revision = reader.int32();
+ break;
+ }
+ case 2: {
+ message.regionCode = reader.string();
+ break;
+ }
+ case 3: {
+ message.languageCode = reader.string();
+ break;
+ }
+ case 4: {
+ message.postalCode = reader.string();
+ break;
+ }
+ case 5: {
+ message.sortingCode = reader.string();
+ break;
+ }
+ case 6: {
+ message.administrativeArea = reader.string();
+ break;
+ }
+ case 7: {
+ message.locality = reader.string();
+ break;
+ }
+ case 8: {
+ message.sublocality = reader.string();
+ break;
+ }
+ case 9: {
+ if (!(message.addressLines && message.addressLines.length))
+ message.addressLines = [];
+ message.addressLines.push(reader.string());
+ break;
+ }
+ case 10: {
+ if (!(message.recipients && message.recipients.length))
+ message.recipients = [];
+ message.recipients.push(reader.string());
+ break;
+ }
+ case 11: {
+ message.organization = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a PostalAddress message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.type.PostalAddress
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.type.PostalAddress} PostalAddress
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ PostalAddress.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a PostalAddress message.
+ * @function verify
+ * @memberof google.type.PostalAddress
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ PostalAddress.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.revision != null && message.hasOwnProperty("revision"))
+ if (!$util.isInteger(message.revision))
+ return "revision: integer expected";
+ if (message.regionCode != null && message.hasOwnProperty("regionCode"))
+ if (!$util.isString(message.regionCode))
+ return "regionCode: string expected";
+ if (message.languageCode != null && message.hasOwnProperty("languageCode"))
+ if (!$util.isString(message.languageCode))
+ return "languageCode: string expected";
+ if (message.postalCode != null && message.hasOwnProperty("postalCode"))
+ if (!$util.isString(message.postalCode))
+ return "postalCode: string expected";
+ if (message.sortingCode != null && message.hasOwnProperty("sortingCode"))
+ if (!$util.isString(message.sortingCode))
+ return "sortingCode: string expected";
+ if (message.administrativeArea != null && message.hasOwnProperty("administrativeArea"))
+ if (!$util.isString(message.administrativeArea))
+ return "administrativeArea: string expected";
+ if (message.locality != null && message.hasOwnProperty("locality"))
+ if (!$util.isString(message.locality))
+ return "locality: string expected";
+ if (message.sublocality != null && message.hasOwnProperty("sublocality"))
+ if (!$util.isString(message.sublocality))
+ return "sublocality: string expected";
+ if (message.addressLines != null && message.hasOwnProperty("addressLines")) {
+ if (!Array.isArray(message.addressLines))
+ return "addressLines: array expected";
+ for (var i = 0; i < message.addressLines.length; ++i)
+ if (!$util.isString(message.addressLines[i]))
+ return "addressLines: string[] expected";
+ }
+ if (message.recipients != null && message.hasOwnProperty("recipients")) {
+ if (!Array.isArray(message.recipients))
+ return "recipients: array expected";
+ for (var i = 0; i < message.recipients.length; ++i)
+ if (!$util.isString(message.recipients[i]))
+ return "recipients: string[] expected";
+ }
+ if (message.organization != null && message.hasOwnProperty("organization"))
+ if (!$util.isString(message.organization))
+ return "organization: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a PostalAddress message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.type.PostalAddress
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.type.PostalAddress} PostalAddress
+ */
+ PostalAddress.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.type.PostalAddress)
+ return object;
+ var message = new $root.google.type.PostalAddress();
+ if (object.revision != null)
+ message.revision = object.revision | 0;
+ if (object.regionCode != null)
+ message.regionCode = String(object.regionCode);
+ if (object.languageCode != null)
+ message.languageCode = String(object.languageCode);
+ if (object.postalCode != null)
+ message.postalCode = String(object.postalCode);
+ if (object.sortingCode != null)
+ message.sortingCode = String(object.sortingCode);
+ if (object.administrativeArea != null)
+ message.administrativeArea = String(object.administrativeArea);
+ if (object.locality != null)
+ message.locality = String(object.locality);
+ if (object.sublocality != null)
+ message.sublocality = String(object.sublocality);
+ if (object.addressLines) {
+ if (!Array.isArray(object.addressLines))
+ throw TypeError(".google.type.PostalAddress.addressLines: array expected");
+ message.addressLines = [];
+ for (var i = 0; i < object.addressLines.length; ++i)
+ message.addressLines[i] = String(object.addressLines[i]);
+ }
+ if (object.recipients) {
+ if (!Array.isArray(object.recipients))
+ throw TypeError(".google.type.PostalAddress.recipients: array expected");
+ message.recipients = [];
+ for (var i = 0; i < object.recipients.length; ++i)
+ message.recipients[i] = String(object.recipients[i]);
+ }
+ if (object.organization != null)
+ message.organization = String(object.organization);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a PostalAddress message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.type.PostalAddress
+ * @static
+ * @param {google.type.PostalAddress} message PostalAddress
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ PostalAddress.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults) {
+ object.addressLines = [];
+ object.recipients = [];
+ }
+ if (options.defaults) {
+ object.revision = 0;
+ object.regionCode = "";
+ object.languageCode = "";
+ object.postalCode = "";
+ object.sortingCode = "";
+ object.administrativeArea = "";
+ object.locality = "";
+ object.sublocality = "";
+ object.organization = "";
+ }
+ if (message.revision != null && message.hasOwnProperty("revision"))
+ object.revision = message.revision;
+ if (message.regionCode != null && message.hasOwnProperty("regionCode"))
+ object.regionCode = message.regionCode;
+ if (message.languageCode != null && message.hasOwnProperty("languageCode"))
+ object.languageCode = message.languageCode;
+ if (message.postalCode != null && message.hasOwnProperty("postalCode"))
+ object.postalCode = message.postalCode;
+ if (message.sortingCode != null && message.hasOwnProperty("sortingCode"))
+ object.sortingCode = message.sortingCode;
+ if (message.administrativeArea != null && message.hasOwnProperty("administrativeArea"))
+ object.administrativeArea = message.administrativeArea;
+ if (message.locality != null && message.hasOwnProperty("locality"))
+ object.locality = message.locality;
+ if (message.sublocality != null && message.hasOwnProperty("sublocality"))
+ object.sublocality = message.sublocality;
+ if (message.addressLines && message.addressLines.length) {
+ object.addressLines = [];
+ for (var j = 0; j < message.addressLines.length; ++j)
+ object.addressLines[j] = message.addressLines[j];
+ }
+ if (message.recipients && message.recipients.length) {
+ object.recipients = [];
+ for (var j = 0; j < message.recipients.length; ++j)
+ object.recipients[j] = message.recipients[j];
+ }
+ if (message.organization != null && message.hasOwnProperty("organization"))
+ object.organization = message.organization;
+ return object;
+ };
+
+ /**
+ * Converts this PostalAddress to JSON.
+ * @function toJSON
+ * @memberof google.type.PostalAddress
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ PostalAddress.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for PostalAddress
+ * @function getTypeUrl
+ * @memberof google.type.PostalAddress
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ PostalAddress.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.type.PostalAddress";
+ };
+
+ return PostalAddress;
+ })();
+
+ return type;
+ })();
+
+ google.maps = (function() {
+
+ /**
+ * Namespace maps.
+ * @memberof google
+ * @namespace
+ */
+ var maps = {};
+
+ maps.addressvalidation = (function() {
+
+ /**
+ * Namespace addressvalidation.
+ * @memberof google.maps
+ * @namespace
+ */
+ var addressvalidation = {};
+
+ addressvalidation.v1 = (function() {
+
+ /**
+ * Namespace v1.
+ * @memberof google.maps.addressvalidation
+ * @namespace
+ */
+ var v1 = {};
+
+ v1.Address = (function() {
+
+ /**
+ * Properties of an Address.
+ * @memberof google.maps.addressvalidation.v1
+ * @interface IAddress
+ * @property {string|null} [formattedAddress] Address formattedAddress
+ * @property {google.type.IPostalAddress|null} [postalAddress] Address postalAddress
+ * @property {Array.|null} [addressComponents] Address addressComponents
+ * @property {Array.|null} [missingComponentTypes] Address missingComponentTypes
+ * @property {Array.|null} [unconfirmedComponentTypes] Address unconfirmedComponentTypes
+ * @property {Array.|null} [unresolvedTokens] Address unresolvedTokens
+ */
+
+ /**
+ * Constructs a new Address.
+ * @memberof google.maps.addressvalidation.v1
+ * @classdesc Represents an Address.
+ * @implements IAddress
+ * @constructor
+ * @param {google.maps.addressvalidation.v1.IAddress=} [properties] Properties to set
+ */
+ function Address(properties) {
+ this.addressComponents = [];
+ this.missingComponentTypes = [];
+ this.unconfirmedComponentTypes = [];
+ this.unresolvedTokens = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * Address formattedAddress.
+ * @member {string} formattedAddress
+ * @memberof google.maps.addressvalidation.v1.Address
+ * @instance
+ */
+ Address.prototype.formattedAddress = "";
+
+ /**
+ * Address postalAddress.
+ * @member {google.type.IPostalAddress|null|undefined} postalAddress
+ * @memberof google.maps.addressvalidation.v1.Address
+ * @instance
+ */
+ Address.prototype.postalAddress = null;
+
+ /**
+ * Address addressComponents.
+ * @member {Array.} addressComponents
+ * @memberof google.maps.addressvalidation.v1.Address
+ * @instance
+ */
+ Address.prototype.addressComponents = $util.emptyArray;
+
+ /**
+ * Address missingComponentTypes.
+ * @member {Array.} missingComponentTypes
+ * @memberof google.maps.addressvalidation.v1.Address
+ * @instance
+ */
+ Address.prototype.missingComponentTypes = $util.emptyArray;
+
+ /**
+ * Address unconfirmedComponentTypes.
+ * @member {Array.} unconfirmedComponentTypes
+ * @memberof google.maps.addressvalidation.v1.Address
+ * @instance
+ */
+ Address.prototype.unconfirmedComponentTypes = $util.emptyArray;
+
+ /**
+ * Address unresolvedTokens.
+ * @member {Array.} unresolvedTokens
+ * @memberof google.maps.addressvalidation.v1.Address
+ * @instance
+ */
+ Address.prototype.unresolvedTokens = $util.emptyArray;
+
+ /**
+ * Creates a new Address instance using the specified properties.
+ * @function create
+ * @memberof google.maps.addressvalidation.v1.Address
+ * @static
+ * @param {google.maps.addressvalidation.v1.IAddress=} [properties] Properties to set
+ * @returns {google.maps.addressvalidation.v1.Address} Address instance
+ */
+ Address.create = function create(properties) {
+ return new Address(properties);
+ };
+
+ /**
+ * Encodes the specified Address message. Does not implicitly {@link google.maps.addressvalidation.v1.Address.verify|verify} messages.
+ * @function encode
+ * @memberof google.maps.addressvalidation.v1.Address
+ * @static
+ * @param {google.maps.addressvalidation.v1.IAddress} message Address message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Address.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.formattedAddress != null && Object.hasOwnProperty.call(message, "formattedAddress"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.formattedAddress);
+ if (message.postalAddress != null && Object.hasOwnProperty.call(message, "postalAddress"))
+ $root.google.type.PostalAddress.encode(message.postalAddress, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ if (message.addressComponents != null && message.addressComponents.length)
+ for (var i = 0; i < message.addressComponents.length; ++i)
+ $root.google.maps.addressvalidation.v1.AddressComponent.encode(message.addressComponents[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
+ if (message.missingComponentTypes != null && message.missingComponentTypes.length)
+ for (var i = 0; i < message.missingComponentTypes.length; ++i)
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.missingComponentTypes[i]);
+ if (message.unconfirmedComponentTypes != null && message.unconfirmedComponentTypes.length)
+ for (var i = 0; i < message.unconfirmedComponentTypes.length; ++i)
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.unconfirmedComponentTypes[i]);
+ if (message.unresolvedTokens != null && message.unresolvedTokens.length)
+ for (var i = 0; i < message.unresolvedTokens.length; ++i)
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.unresolvedTokens[i]);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified Address message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.Address.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.maps.addressvalidation.v1.Address
+ * @static
+ * @param {google.maps.addressvalidation.v1.IAddress} message Address message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Address.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an Address message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.maps.addressvalidation.v1.Address
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.maps.addressvalidation.v1.Address} Address
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Address.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.addressvalidation.v1.Address();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 2: {
+ message.formattedAddress = reader.string();
+ break;
+ }
+ case 3: {
+ message.postalAddress = $root.google.type.PostalAddress.decode(reader, reader.uint32());
+ break;
+ }
+ case 4: {
+ if (!(message.addressComponents && message.addressComponents.length))
+ message.addressComponents = [];
+ message.addressComponents.push($root.google.maps.addressvalidation.v1.AddressComponent.decode(reader, reader.uint32()));
+ break;
+ }
+ case 5: {
+ if (!(message.missingComponentTypes && message.missingComponentTypes.length))
+ message.missingComponentTypes = [];
+ message.missingComponentTypes.push(reader.string());
+ break;
+ }
+ case 6: {
+ if (!(message.unconfirmedComponentTypes && message.unconfirmedComponentTypes.length))
+ message.unconfirmedComponentTypes = [];
+ message.unconfirmedComponentTypes.push(reader.string());
+ break;
+ }
+ case 7: {
+ if (!(message.unresolvedTokens && message.unresolvedTokens.length))
+ message.unresolvedTokens = [];
+ message.unresolvedTokens.push(reader.string());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an Address message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.maps.addressvalidation.v1.Address
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.maps.addressvalidation.v1.Address} Address
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Address.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an Address message.
+ * @function verify
+ * @memberof google.maps.addressvalidation.v1.Address
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ Address.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.formattedAddress != null && message.hasOwnProperty("formattedAddress"))
+ if (!$util.isString(message.formattedAddress))
+ return "formattedAddress: string expected";
+ if (message.postalAddress != null && message.hasOwnProperty("postalAddress")) {
+ var error = $root.google.type.PostalAddress.verify(message.postalAddress);
+ if (error)
+ return "postalAddress." + error;
+ }
+ if (message.addressComponents != null && message.hasOwnProperty("addressComponents")) {
+ if (!Array.isArray(message.addressComponents))
+ return "addressComponents: array expected";
+ for (var i = 0; i < message.addressComponents.length; ++i) {
+ var error = $root.google.maps.addressvalidation.v1.AddressComponent.verify(message.addressComponents[i]);
+ if (error)
+ return "addressComponents." + error;
+ }
+ }
+ if (message.missingComponentTypes != null && message.hasOwnProperty("missingComponentTypes")) {
+ if (!Array.isArray(message.missingComponentTypes))
+ return "missingComponentTypes: array expected";
+ for (var i = 0; i < message.missingComponentTypes.length; ++i)
+ if (!$util.isString(message.missingComponentTypes[i]))
+ return "missingComponentTypes: string[] expected";
+ }
+ if (message.unconfirmedComponentTypes != null && message.hasOwnProperty("unconfirmedComponentTypes")) {
+ if (!Array.isArray(message.unconfirmedComponentTypes))
+ return "unconfirmedComponentTypes: array expected";
+ for (var i = 0; i < message.unconfirmedComponentTypes.length; ++i)
+ if (!$util.isString(message.unconfirmedComponentTypes[i]))
+ return "unconfirmedComponentTypes: string[] expected";
+ }
+ if (message.unresolvedTokens != null && message.hasOwnProperty("unresolvedTokens")) {
+ if (!Array.isArray(message.unresolvedTokens))
+ return "unresolvedTokens: array expected";
+ for (var i = 0; i < message.unresolvedTokens.length; ++i)
+ if (!$util.isString(message.unresolvedTokens[i]))
+ return "unresolvedTokens: string[] expected";
+ }
+ return null;
+ };
+
+ /**
+ * Creates an Address message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.maps.addressvalidation.v1.Address
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.maps.addressvalidation.v1.Address} Address
+ */
+ Address.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.maps.addressvalidation.v1.Address)
+ return object;
+ var message = new $root.google.maps.addressvalidation.v1.Address();
+ if (object.formattedAddress != null)
+ message.formattedAddress = String(object.formattedAddress);
+ if (object.postalAddress != null) {
+ if (typeof object.postalAddress !== "object")
+ throw TypeError(".google.maps.addressvalidation.v1.Address.postalAddress: object expected");
+ message.postalAddress = $root.google.type.PostalAddress.fromObject(object.postalAddress);
+ }
+ if (object.addressComponents) {
+ if (!Array.isArray(object.addressComponents))
+ throw TypeError(".google.maps.addressvalidation.v1.Address.addressComponents: array expected");
+ message.addressComponents = [];
+ for (var i = 0; i < object.addressComponents.length; ++i) {
+ if (typeof object.addressComponents[i] !== "object")
+ throw TypeError(".google.maps.addressvalidation.v1.Address.addressComponents: object expected");
+ message.addressComponents[i] = $root.google.maps.addressvalidation.v1.AddressComponent.fromObject(object.addressComponents[i]);
+ }
+ }
+ if (object.missingComponentTypes) {
+ if (!Array.isArray(object.missingComponentTypes))
+ throw TypeError(".google.maps.addressvalidation.v1.Address.missingComponentTypes: array expected");
+ message.missingComponentTypes = [];
+ for (var i = 0; i < object.missingComponentTypes.length; ++i)
+ message.missingComponentTypes[i] = String(object.missingComponentTypes[i]);
+ }
+ if (object.unconfirmedComponentTypes) {
+ if (!Array.isArray(object.unconfirmedComponentTypes))
+ throw TypeError(".google.maps.addressvalidation.v1.Address.unconfirmedComponentTypes: array expected");
+ message.unconfirmedComponentTypes = [];
+ for (var i = 0; i < object.unconfirmedComponentTypes.length; ++i)
+ message.unconfirmedComponentTypes[i] = String(object.unconfirmedComponentTypes[i]);
+ }
+ if (object.unresolvedTokens) {
+ if (!Array.isArray(object.unresolvedTokens))
+ throw TypeError(".google.maps.addressvalidation.v1.Address.unresolvedTokens: array expected");
+ message.unresolvedTokens = [];
+ for (var i = 0; i < object.unresolvedTokens.length; ++i)
+ message.unresolvedTokens[i] = String(object.unresolvedTokens[i]);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an Address message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.maps.addressvalidation.v1.Address
+ * @static
+ * @param {google.maps.addressvalidation.v1.Address} message Address
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ Address.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults) {
+ object.addressComponents = [];
+ object.missingComponentTypes = [];
+ object.unconfirmedComponentTypes = [];
+ object.unresolvedTokens = [];
+ }
+ if (options.defaults) {
+ object.formattedAddress = "";
+ object.postalAddress = null;
+ }
+ if (message.formattedAddress != null && message.hasOwnProperty("formattedAddress"))
+ object.formattedAddress = message.formattedAddress;
+ if (message.postalAddress != null && message.hasOwnProperty("postalAddress"))
+ object.postalAddress = $root.google.type.PostalAddress.toObject(message.postalAddress, options);
+ if (message.addressComponents && message.addressComponents.length) {
+ object.addressComponents = [];
+ for (var j = 0; j < message.addressComponents.length; ++j)
+ object.addressComponents[j] = $root.google.maps.addressvalidation.v1.AddressComponent.toObject(message.addressComponents[j], options);
+ }
+ if (message.missingComponentTypes && message.missingComponentTypes.length) {
+ object.missingComponentTypes = [];
+ for (var j = 0; j < message.missingComponentTypes.length; ++j)
+ object.missingComponentTypes[j] = message.missingComponentTypes[j];
+ }
+ if (message.unconfirmedComponentTypes && message.unconfirmedComponentTypes.length) {
+ object.unconfirmedComponentTypes = [];
+ for (var j = 0; j < message.unconfirmedComponentTypes.length; ++j)
+ object.unconfirmedComponentTypes[j] = message.unconfirmedComponentTypes[j];
+ }
+ if (message.unresolvedTokens && message.unresolvedTokens.length) {
+ object.unresolvedTokens = [];
+ for (var j = 0; j < message.unresolvedTokens.length; ++j)
+ object.unresolvedTokens[j] = message.unresolvedTokens[j];
+ }
+ return object;
+ };
+
+ /**
+ * Converts this Address to JSON.
+ * @function toJSON
+ * @memberof google.maps.addressvalidation.v1.Address
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ Address.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for Address
+ * @function getTypeUrl
+ * @memberof google.maps.addressvalidation.v1.Address
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ Address.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.maps.addressvalidation.v1.Address";
+ };
+
+ return Address;
+ })();
+
+ v1.AddressComponent = (function() {
+
+ /**
+ * Properties of an AddressComponent.
+ * @memberof google.maps.addressvalidation.v1
+ * @interface IAddressComponent
+ * @property {google.maps.addressvalidation.v1.IComponentName|null} [componentName] AddressComponent componentName
+ * @property {string|null} [componentType] AddressComponent componentType
+ * @property {google.maps.addressvalidation.v1.AddressComponent.ConfirmationLevel|null} [confirmationLevel] AddressComponent confirmationLevel
+ * @property {boolean|null} [inferred] AddressComponent inferred
+ * @property {boolean|null} [spellCorrected] AddressComponent spellCorrected
+ * @property {boolean|null} [replaced] AddressComponent replaced
+ * @property {boolean|null} [unexpected] AddressComponent unexpected
+ */
+
+ /**
+ * Constructs a new AddressComponent.
+ * @memberof google.maps.addressvalidation.v1
+ * @classdesc Represents an AddressComponent.
+ * @implements IAddressComponent
+ * @constructor
+ * @param {google.maps.addressvalidation.v1.IAddressComponent=} [properties] Properties to set
+ */
+ function AddressComponent(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * AddressComponent componentName.
+ * @member {google.maps.addressvalidation.v1.IComponentName|null|undefined} componentName
+ * @memberof google.maps.addressvalidation.v1.AddressComponent
+ * @instance
+ */
+ AddressComponent.prototype.componentName = null;
+
+ /**
+ * AddressComponent componentType.
+ * @member {string} componentType
+ * @memberof google.maps.addressvalidation.v1.AddressComponent
+ * @instance
+ */
+ AddressComponent.prototype.componentType = "";
+
+ /**
+ * AddressComponent confirmationLevel.
+ * @member {google.maps.addressvalidation.v1.AddressComponent.ConfirmationLevel} confirmationLevel
+ * @memberof google.maps.addressvalidation.v1.AddressComponent
+ * @instance
+ */
+ AddressComponent.prototype.confirmationLevel = 0;
+
+ /**
+ * AddressComponent inferred.
+ * @member {boolean} inferred
+ * @memberof google.maps.addressvalidation.v1.AddressComponent
+ * @instance
+ */
+ AddressComponent.prototype.inferred = false;
+
+ /**
+ * AddressComponent spellCorrected.
+ * @member {boolean} spellCorrected
+ * @memberof google.maps.addressvalidation.v1.AddressComponent
+ * @instance
+ */
+ AddressComponent.prototype.spellCorrected = false;
+
+ /**
+ * AddressComponent replaced.
+ * @member {boolean} replaced
+ * @memberof google.maps.addressvalidation.v1.AddressComponent
+ * @instance
+ */
+ AddressComponent.prototype.replaced = false;
+
+ /**
+ * AddressComponent unexpected.
+ * @member {boolean} unexpected
+ * @memberof google.maps.addressvalidation.v1.AddressComponent
+ * @instance
+ */
+ AddressComponent.prototype.unexpected = false;
+
+ /**
+ * Creates a new AddressComponent instance using the specified properties.
+ * @function create
+ * @memberof google.maps.addressvalidation.v1.AddressComponent
+ * @static
+ * @param {google.maps.addressvalidation.v1.IAddressComponent=} [properties] Properties to set
+ * @returns {google.maps.addressvalidation.v1.AddressComponent} AddressComponent instance
+ */
+ AddressComponent.create = function create(properties) {
+ return new AddressComponent(properties);
+ };
+
+ /**
+ * Encodes the specified AddressComponent message. Does not implicitly {@link google.maps.addressvalidation.v1.AddressComponent.verify|verify} messages.
+ * @function encode
+ * @memberof google.maps.addressvalidation.v1.AddressComponent
+ * @static
+ * @param {google.maps.addressvalidation.v1.IAddressComponent} message AddressComponent message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ AddressComponent.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.componentName != null && Object.hasOwnProperty.call(message, "componentName"))
+ $root.google.maps.addressvalidation.v1.ComponentName.encode(message.componentName, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.componentType != null && Object.hasOwnProperty.call(message, "componentType"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.componentType);
+ if (message.confirmationLevel != null && Object.hasOwnProperty.call(message, "confirmationLevel"))
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.confirmationLevel);
+ if (message.inferred != null && Object.hasOwnProperty.call(message, "inferred"))
+ writer.uint32(/* id 4, wireType 0 =*/32).bool(message.inferred);
+ if (message.spellCorrected != null && Object.hasOwnProperty.call(message, "spellCorrected"))
+ writer.uint32(/* id 5, wireType 0 =*/40).bool(message.spellCorrected);
+ if (message.replaced != null && Object.hasOwnProperty.call(message, "replaced"))
+ writer.uint32(/* id 6, wireType 0 =*/48).bool(message.replaced);
+ if (message.unexpected != null && Object.hasOwnProperty.call(message, "unexpected"))
+ writer.uint32(/* id 7, wireType 0 =*/56).bool(message.unexpected);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified AddressComponent message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.AddressComponent.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.maps.addressvalidation.v1.AddressComponent
+ * @static
+ * @param {google.maps.addressvalidation.v1.IAddressComponent} message AddressComponent message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ AddressComponent.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an AddressComponent message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.maps.addressvalidation.v1.AddressComponent
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.maps.addressvalidation.v1.AddressComponent} AddressComponent
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ AddressComponent.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.addressvalidation.v1.AddressComponent();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.componentName = $root.google.maps.addressvalidation.v1.ComponentName.decode(reader, reader.uint32());
+ break;
+ }
+ case 2: {
+ message.componentType = reader.string();
+ break;
+ }
+ case 3: {
+ message.confirmationLevel = reader.int32();
+ break;
+ }
+ case 4: {
+ message.inferred = reader.bool();
+ break;
+ }
+ case 5: {
+ message.spellCorrected = reader.bool();
+ break;
+ }
+ case 6: {
+ message.replaced = reader.bool();
+ break;
+ }
+ case 7: {
+ message.unexpected = reader.bool();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an AddressComponent message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.maps.addressvalidation.v1.AddressComponent
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.maps.addressvalidation.v1.AddressComponent} AddressComponent
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ AddressComponent.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an AddressComponent message.
+ * @function verify
+ * @memberof google.maps.addressvalidation.v1.AddressComponent
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ AddressComponent.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.componentName != null && message.hasOwnProperty("componentName")) {
+ var error = $root.google.maps.addressvalidation.v1.ComponentName.verify(message.componentName);
+ if (error)
+ return "componentName." + error;
+ }
+ if (message.componentType != null && message.hasOwnProperty("componentType"))
+ if (!$util.isString(message.componentType))
+ return "componentType: string expected";
+ if (message.confirmationLevel != null && message.hasOwnProperty("confirmationLevel"))
+ switch (message.confirmationLevel) {
+ default:
+ return "confirmationLevel: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ break;
+ }
+ if (message.inferred != null && message.hasOwnProperty("inferred"))
+ if (typeof message.inferred !== "boolean")
+ return "inferred: boolean expected";
+ if (message.spellCorrected != null && message.hasOwnProperty("spellCorrected"))
+ if (typeof message.spellCorrected !== "boolean")
+ return "spellCorrected: boolean expected";
+ if (message.replaced != null && message.hasOwnProperty("replaced"))
+ if (typeof message.replaced !== "boolean")
+ return "replaced: boolean expected";
+ if (message.unexpected != null && message.hasOwnProperty("unexpected"))
+ if (typeof message.unexpected !== "boolean")
+ return "unexpected: boolean expected";
+ return null;
+ };
+
+ /**
+ * Creates an AddressComponent message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.maps.addressvalidation.v1.AddressComponent
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.maps.addressvalidation.v1.AddressComponent} AddressComponent
+ */
+ AddressComponent.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.maps.addressvalidation.v1.AddressComponent)
+ return object;
+ var message = new $root.google.maps.addressvalidation.v1.AddressComponent();
+ if (object.componentName != null) {
+ if (typeof object.componentName !== "object")
+ throw TypeError(".google.maps.addressvalidation.v1.AddressComponent.componentName: object expected");
+ message.componentName = $root.google.maps.addressvalidation.v1.ComponentName.fromObject(object.componentName);
+ }
+ if (object.componentType != null)
+ message.componentType = String(object.componentType);
+ switch (object.confirmationLevel) {
+ case "CONFIRMATION_LEVEL_UNSPECIFIED":
+ case 0:
+ message.confirmationLevel = 0;
+ break;
+ case "CONFIRMED":
+ case 1:
+ message.confirmationLevel = 1;
+ break;
+ case "UNCONFIRMED_BUT_PLAUSIBLE":
+ case 2:
+ message.confirmationLevel = 2;
+ break;
+ case "UNCONFIRMED_AND_SUSPICIOUS":
+ case 3:
+ message.confirmationLevel = 3;
+ break;
+ }
+ if (object.inferred != null)
+ message.inferred = Boolean(object.inferred);
+ if (object.spellCorrected != null)
+ message.spellCorrected = Boolean(object.spellCorrected);
+ if (object.replaced != null)
+ message.replaced = Boolean(object.replaced);
+ if (object.unexpected != null)
+ message.unexpected = Boolean(object.unexpected);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an AddressComponent message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.maps.addressvalidation.v1.AddressComponent
+ * @static
+ * @param {google.maps.addressvalidation.v1.AddressComponent} message AddressComponent
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ AddressComponent.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.componentName = null;
+ object.componentType = "";
+ object.confirmationLevel = options.enums === String ? "CONFIRMATION_LEVEL_UNSPECIFIED" : 0;
+ object.inferred = false;
+ object.spellCorrected = false;
+ object.replaced = false;
+ object.unexpected = false;
+ }
+ if (message.componentName != null && message.hasOwnProperty("componentName"))
+ object.componentName = $root.google.maps.addressvalidation.v1.ComponentName.toObject(message.componentName, options);
+ if (message.componentType != null && message.hasOwnProperty("componentType"))
+ object.componentType = message.componentType;
+ if (message.confirmationLevel != null && message.hasOwnProperty("confirmationLevel"))
+ object.confirmationLevel = options.enums === String ? $root.google.maps.addressvalidation.v1.AddressComponent.ConfirmationLevel[message.confirmationLevel] : message.confirmationLevel;
+ if (message.inferred != null && message.hasOwnProperty("inferred"))
+ object.inferred = message.inferred;
+ if (message.spellCorrected != null && message.hasOwnProperty("spellCorrected"))
+ object.spellCorrected = message.spellCorrected;
+ if (message.replaced != null && message.hasOwnProperty("replaced"))
+ object.replaced = message.replaced;
+ if (message.unexpected != null && message.hasOwnProperty("unexpected"))
+ object.unexpected = message.unexpected;
+ return object;
+ };
+
+ /**
+ * Converts this AddressComponent to JSON.
+ * @function toJSON
+ * @memberof google.maps.addressvalidation.v1.AddressComponent
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ AddressComponent.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for AddressComponent
+ * @function getTypeUrl
+ * @memberof google.maps.addressvalidation.v1.AddressComponent
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ AddressComponent.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.maps.addressvalidation.v1.AddressComponent";
+ };
+
+ /**
+ * ConfirmationLevel enum.
+ * @name google.maps.addressvalidation.v1.AddressComponent.ConfirmationLevel
+ * @enum {number}
+ * @property {number} CONFIRMATION_LEVEL_UNSPECIFIED=0 CONFIRMATION_LEVEL_UNSPECIFIED value
+ * @property {number} CONFIRMED=1 CONFIRMED value
+ * @property {number} UNCONFIRMED_BUT_PLAUSIBLE=2 UNCONFIRMED_BUT_PLAUSIBLE value
+ * @property {number} UNCONFIRMED_AND_SUSPICIOUS=3 UNCONFIRMED_AND_SUSPICIOUS value
+ */
+ AddressComponent.ConfirmationLevel = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "CONFIRMATION_LEVEL_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "CONFIRMED"] = 1;
+ values[valuesById[2] = "UNCONFIRMED_BUT_PLAUSIBLE"] = 2;
+ values[valuesById[3] = "UNCONFIRMED_AND_SUSPICIOUS"] = 3;
+ return values;
+ })();
+
+ return AddressComponent;
+ })();
+
+ v1.ComponentName = (function() {
+
+ /**
+ * Properties of a ComponentName.
+ * @memberof google.maps.addressvalidation.v1
+ * @interface IComponentName
+ * @property {string|null} [text] ComponentName text
+ * @property {string|null} [languageCode] ComponentName languageCode
+ */
+
+ /**
+ * Constructs a new ComponentName.
+ * @memberof google.maps.addressvalidation.v1
+ * @classdesc Represents a ComponentName.
+ * @implements IComponentName
+ * @constructor
+ * @param {google.maps.addressvalidation.v1.IComponentName=} [properties] Properties to set
+ */
+ function ComponentName(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ComponentName text.
+ * @member {string} text
+ * @memberof google.maps.addressvalidation.v1.ComponentName
+ * @instance
+ */
+ ComponentName.prototype.text = "";
+
+ /**
+ * ComponentName languageCode.
+ * @member {string} languageCode
+ * @memberof google.maps.addressvalidation.v1.ComponentName
+ * @instance
+ */
+ ComponentName.prototype.languageCode = "";
+
+ /**
+ * Creates a new ComponentName instance using the specified properties.
+ * @function create
+ * @memberof google.maps.addressvalidation.v1.ComponentName
+ * @static
+ * @param {google.maps.addressvalidation.v1.IComponentName=} [properties] Properties to set
+ * @returns {google.maps.addressvalidation.v1.ComponentName} ComponentName instance
+ */
+ ComponentName.create = function create(properties) {
+ return new ComponentName(properties);
+ };
+
+ /**
+ * Encodes the specified ComponentName message. Does not implicitly {@link google.maps.addressvalidation.v1.ComponentName.verify|verify} messages.
+ * @function encode
+ * @memberof google.maps.addressvalidation.v1.ComponentName
+ * @static
+ * @param {google.maps.addressvalidation.v1.IComponentName} message ComponentName message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ComponentName.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.text != null && Object.hasOwnProperty.call(message, "text"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.text);
+ if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ComponentName message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.ComponentName.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.maps.addressvalidation.v1.ComponentName
+ * @static
+ * @param {google.maps.addressvalidation.v1.IComponentName} message ComponentName message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ComponentName.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ComponentName message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.maps.addressvalidation.v1.ComponentName
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.maps.addressvalidation.v1.ComponentName} ComponentName
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ComponentName.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.addressvalidation.v1.ComponentName();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.text = reader.string();
+ break;
+ }
+ case 2: {
+ message.languageCode = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ComponentName message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.maps.addressvalidation.v1.ComponentName
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.maps.addressvalidation.v1.ComponentName} ComponentName
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ComponentName.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ComponentName message.
+ * @function verify
+ * @memberof google.maps.addressvalidation.v1.ComponentName
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ComponentName.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.text != null && message.hasOwnProperty("text"))
+ if (!$util.isString(message.text))
+ return "text: string expected";
+ if (message.languageCode != null && message.hasOwnProperty("languageCode"))
+ if (!$util.isString(message.languageCode))
+ return "languageCode: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a ComponentName message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.maps.addressvalidation.v1.ComponentName
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.maps.addressvalidation.v1.ComponentName} ComponentName
+ */
+ ComponentName.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.maps.addressvalidation.v1.ComponentName)
+ return object;
+ var message = new $root.google.maps.addressvalidation.v1.ComponentName();
+ if (object.text != null)
+ message.text = String(object.text);
+ if (object.languageCode != null)
+ message.languageCode = String(object.languageCode);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ComponentName message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.maps.addressvalidation.v1.ComponentName
+ * @static
+ * @param {google.maps.addressvalidation.v1.ComponentName} message ComponentName
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ComponentName.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.text = "";
+ object.languageCode = "";
+ }
+ if (message.text != null && message.hasOwnProperty("text"))
+ object.text = message.text;
+ if (message.languageCode != null && message.hasOwnProperty("languageCode"))
+ object.languageCode = message.languageCode;
+ return object;
+ };
+
+ /**
+ * Converts this ComponentName to JSON.
+ * @function toJSON
+ * @memberof google.maps.addressvalidation.v1.ComponentName
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ComponentName.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ComponentName
+ * @function getTypeUrl
+ * @memberof google.maps.addressvalidation.v1.ComponentName
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ComponentName.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.maps.addressvalidation.v1.ComponentName";
+ };
+
+ return ComponentName;
+ })();
+
+ v1.AddressValidation = (function() {
+
+ /**
+ * Constructs a new AddressValidation service.
+ * @memberof google.maps.addressvalidation.v1
+ * @classdesc Represents an AddressValidation
+ * @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 AddressValidation(rpcImpl, requestDelimited, responseDelimited) {
+ $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
+ }
+
+ (AddressValidation.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AddressValidation;
+
+ /**
+ * Creates new AddressValidation service using the specified rpc implementation.
+ * @function create
+ * @memberof google.maps.addressvalidation.v1.AddressValidation
+ * @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 {AddressValidation} RPC service. Useful where requests and/or responses are streamed.
+ */
+ AddressValidation.create = function create(rpcImpl, requestDelimited, responseDelimited) {
+ return new this(rpcImpl, requestDelimited, responseDelimited);
+ };
+
+ /**
+ * Callback as used by {@link google.maps.addressvalidation.v1.AddressValidation|validateAddress}.
+ * @memberof google.maps.addressvalidation.v1.AddressValidation
+ * @typedef ValidateAddressCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.maps.addressvalidation.v1.ValidateAddressResponse} [response] ValidateAddressResponse
+ */
+
+ /**
+ * Calls ValidateAddress.
+ * @function validateAddress
+ * @memberof google.maps.addressvalidation.v1.AddressValidation
+ * @instance
+ * @param {google.maps.addressvalidation.v1.IValidateAddressRequest} request ValidateAddressRequest message or plain object
+ * @param {google.maps.addressvalidation.v1.AddressValidation.ValidateAddressCallback} callback Node-style callback called with the error, if any, and ValidateAddressResponse
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(AddressValidation.prototype.validateAddress = function validateAddress(request, callback) {
+ return this.rpcCall(validateAddress, $root.google.maps.addressvalidation.v1.ValidateAddressRequest, $root.google.maps.addressvalidation.v1.ValidateAddressResponse, request, callback);
+ }, "name", { value: "ValidateAddress" });
+
+ /**
+ * Calls ValidateAddress.
+ * @function validateAddress
+ * @memberof google.maps.addressvalidation.v1.AddressValidation
+ * @instance
+ * @param {google.maps.addressvalidation.v1.IValidateAddressRequest} request ValidateAddressRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.maps.addressvalidation.v1.AddressValidation|provideValidationFeedback}.
+ * @memberof google.maps.addressvalidation.v1.AddressValidation
+ * @typedef ProvideValidationFeedbackCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse} [response] ProvideValidationFeedbackResponse
+ */
+
+ /**
+ * Calls ProvideValidationFeedback.
+ * @function provideValidationFeedback
+ * @memberof google.maps.addressvalidation.v1.AddressValidation
+ * @instance
+ * @param {google.maps.addressvalidation.v1.IProvideValidationFeedbackRequest} request ProvideValidationFeedbackRequest message or plain object
+ * @param {google.maps.addressvalidation.v1.AddressValidation.ProvideValidationFeedbackCallback} callback Node-style callback called with the error, if any, and ProvideValidationFeedbackResponse
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(AddressValidation.prototype.provideValidationFeedback = function provideValidationFeedback(request, callback) {
+ return this.rpcCall(provideValidationFeedback, $root.google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest, $root.google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse, request, callback);
+ }, "name", { value: "ProvideValidationFeedback" });
+
+ /**
+ * Calls ProvideValidationFeedback.
+ * @function provideValidationFeedback
+ * @memberof google.maps.addressvalidation.v1.AddressValidation
+ * @instance
+ * @param {google.maps.addressvalidation.v1.IProvideValidationFeedbackRequest} request ProvideValidationFeedbackRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ return AddressValidation;
+ })();
+
+ v1.ValidateAddressRequest = (function() {
+
+ /**
+ * Properties of a ValidateAddressRequest.
+ * @memberof google.maps.addressvalidation.v1
+ * @interface IValidateAddressRequest
+ * @property {google.type.IPostalAddress|null} [address] ValidateAddressRequest address
+ * @property {string|null} [previousResponseId] ValidateAddressRequest previousResponseId
+ * @property {boolean|null} [enableUspsCass] ValidateAddressRequest enableUspsCass
+ */
+
+ /**
+ * Constructs a new ValidateAddressRequest.
+ * @memberof google.maps.addressvalidation.v1
+ * @classdesc Represents a ValidateAddressRequest.
+ * @implements IValidateAddressRequest
+ * @constructor
+ * @param {google.maps.addressvalidation.v1.IValidateAddressRequest=} [properties] Properties to set
+ */
+ function ValidateAddressRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ValidateAddressRequest address.
+ * @member {google.type.IPostalAddress|null|undefined} address
+ * @memberof google.maps.addressvalidation.v1.ValidateAddressRequest
+ * @instance
+ */
+ ValidateAddressRequest.prototype.address = null;
+
+ /**
+ * ValidateAddressRequest previousResponseId.
+ * @member {string} previousResponseId
+ * @memberof google.maps.addressvalidation.v1.ValidateAddressRequest
+ * @instance
+ */
+ ValidateAddressRequest.prototype.previousResponseId = "";
+
+ /**
+ * ValidateAddressRequest enableUspsCass.
+ * @member {boolean} enableUspsCass
+ * @memberof google.maps.addressvalidation.v1.ValidateAddressRequest
+ * @instance
+ */
+ ValidateAddressRequest.prototype.enableUspsCass = false;
+
+ /**
+ * Creates a new ValidateAddressRequest instance using the specified properties.
+ * @function create
+ * @memberof google.maps.addressvalidation.v1.ValidateAddressRequest
+ * @static
+ * @param {google.maps.addressvalidation.v1.IValidateAddressRequest=} [properties] Properties to set
+ * @returns {google.maps.addressvalidation.v1.ValidateAddressRequest} ValidateAddressRequest instance
+ */
+ ValidateAddressRequest.create = function create(properties) {
+ return new ValidateAddressRequest(properties);
+ };
+
+ /**
+ * Encodes the specified ValidateAddressRequest message. Does not implicitly {@link google.maps.addressvalidation.v1.ValidateAddressRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.maps.addressvalidation.v1.ValidateAddressRequest
+ * @static
+ * @param {google.maps.addressvalidation.v1.IValidateAddressRequest} message ValidateAddressRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ValidateAddressRequest.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.address != null && Object.hasOwnProperty.call(message, "address"))
+ $root.google.type.PostalAddress.encode(message.address, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.previousResponseId != null && Object.hasOwnProperty.call(message, "previousResponseId"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.previousResponseId);
+ if (message.enableUspsCass != null && Object.hasOwnProperty.call(message, "enableUspsCass"))
+ writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enableUspsCass);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ValidateAddressRequest message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.ValidateAddressRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.maps.addressvalidation.v1.ValidateAddressRequest
+ * @static
+ * @param {google.maps.addressvalidation.v1.IValidateAddressRequest} message ValidateAddressRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ValidateAddressRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ValidateAddressRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.maps.addressvalidation.v1.ValidateAddressRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.maps.addressvalidation.v1.ValidateAddressRequest} ValidateAddressRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ValidateAddressRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.addressvalidation.v1.ValidateAddressRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.address = $root.google.type.PostalAddress.decode(reader, reader.uint32());
+ break;
+ }
+ case 2: {
+ message.previousResponseId = reader.string();
+ break;
+ }
+ case 3: {
+ message.enableUspsCass = reader.bool();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ValidateAddressRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.maps.addressvalidation.v1.ValidateAddressRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.maps.addressvalidation.v1.ValidateAddressRequest} ValidateAddressRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ValidateAddressRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ValidateAddressRequest message.
+ * @function verify
+ * @memberof google.maps.addressvalidation.v1.ValidateAddressRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ValidateAddressRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.address != null && message.hasOwnProperty("address")) {
+ var error = $root.google.type.PostalAddress.verify(message.address);
+ if (error)
+ return "address." + error;
+ }
+ if (message.previousResponseId != null && message.hasOwnProperty("previousResponseId"))
+ if (!$util.isString(message.previousResponseId))
+ return "previousResponseId: string expected";
+ if (message.enableUspsCass != null && message.hasOwnProperty("enableUspsCass"))
+ if (typeof message.enableUspsCass !== "boolean")
+ return "enableUspsCass: boolean expected";
+ return null;
+ };
+
+ /**
+ * Creates a ValidateAddressRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.maps.addressvalidation.v1.ValidateAddressRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.maps.addressvalidation.v1.ValidateAddressRequest} ValidateAddressRequest
+ */
+ ValidateAddressRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.maps.addressvalidation.v1.ValidateAddressRequest)
+ return object;
+ var message = new $root.google.maps.addressvalidation.v1.ValidateAddressRequest();
+ if (object.address != null) {
+ if (typeof object.address !== "object")
+ throw TypeError(".google.maps.addressvalidation.v1.ValidateAddressRequest.address: object expected");
+ message.address = $root.google.type.PostalAddress.fromObject(object.address);
+ }
+ if (object.previousResponseId != null)
+ message.previousResponseId = String(object.previousResponseId);
+ if (object.enableUspsCass != null)
+ message.enableUspsCass = Boolean(object.enableUspsCass);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ValidateAddressRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.maps.addressvalidation.v1.ValidateAddressRequest
+ * @static
+ * @param {google.maps.addressvalidation.v1.ValidateAddressRequest} message ValidateAddressRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ValidateAddressRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.address = null;
+ object.previousResponseId = "";
+ object.enableUspsCass = false;
+ }
+ if (message.address != null && message.hasOwnProperty("address"))
+ object.address = $root.google.type.PostalAddress.toObject(message.address, options);
+ if (message.previousResponseId != null && message.hasOwnProperty("previousResponseId"))
+ object.previousResponseId = message.previousResponseId;
+ if (message.enableUspsCass != null && message.hasOwnProperty("enableUspsCass"))
+ object.enableUspsCass = message.enableUspsCass;
+ return object;
+ };
+
+ /**
+ * Converts this ValidateAddressRequest to JSON.
+ * @function toJSON
+ * @memberof google.maps.addressvalidation.v1.ValidateAddressRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ValidateAddressRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ValidateAddressRequest
+ * @function getTypeUrl
+ * @memberof google.maps.addressvalidation.v1.ValidateAddressRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ValidateAddressRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.maps.addressvalidation.v1.ValidateAddressRequest";
+ };
+
+ return ValidateAddressRequest;
+ })();
+
+ v1.ValidateAddressResponse = (function() {
+
+ /**
+ * Properties of a ValidateAddressResponse.
+ * @memberof google.maps.addressvalidation.v1
+ * @interface IValidateAddressResponse
+ * @property {google.maps.addressvalidation.v1.IValidationResult|null} [result] ValidateAddressResponse result
+ * @property {string|null} [responseId] ValidateAddressResponse responseId
+ */
+
+ /**
+ * Constructs a new ValidateAddressResponse.
+ * @memberof google.maps.addressvalidation.v1
+ * @classdesc Represents a ValidateAddressResponse.
+ * @implements IValidateAddressResponse
+ * @constructor
+ * @param {google.maps.addressvalidation.v1.IValidateAddressResponse=} [properties] Properties to set
+ */
+ function ValidateAddressResponse(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ValidateAddressResponse result.
+ * @member {google.maps.addressvalidation.v1.IValidationResult|null|undefined} result
+ * @memberof google.maps.addressvalidation.v1.ValidateAddressResponse
+ * @instance
+ */
+ ValidateAddressResponse.prototype.result = null;
+
+ /**
+ * ValidateAddressResponse responseId.
+ * @member {string} responseId
+ * @memberof google.maps.addressvalidation.v1.ValidateAddressResponse
+ * @instance
+ */
+ ValidateAddressResponse.prototype.responseId = "";
+
+ /**
+ * Creates a new ValidateAddressResponse instance using the specified properties.
+ * @function create
+ * @memberof google.maps.addressvalidation.v1.ValidateAddressResponse
+ * @static
+ * @param {google.maps.addressvalidation.v1.IValidateAddressResponse=} [properties] Properties to set
+ * @returns {google.maps.addressvalidation.v1.ValidateAddressResponse} ValidateAddressResponse instance
+ */
+ ValidateAddressResponse.create = function create(properties) {
+ return new ValidateAddressResponse(properties);
+ };
+
+ /**
+ * Encodes the specified ValidateAddressResponse message. Does not implicitly {@link google.maps.addressvalidation.v1.ValidateAddressResponse.verify|verify} messages.
+ * @function encode
+ * @memberof google.maps.addressvalidation.v1.ValidateAddressResponse
+ * @static
+ * @param {google.maps.addressvalidation.v1.IValidateAddressResponse} message ValidateAddressResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ValidateAddressResponse.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.result != null && Object.hasOwnProperty.call(message, "result"))
+ $root.google.maps.addressvalidation.v1.ValidationResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.responseId != null && Object.hasOwnProperty.call(message, "responseId"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.responseId);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ValidateAddressResponse message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.ValidateAddressResponse.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.maps.addressvalidation.v1.ValidateAddressResponse
+ * @static
+ * @param {google.maps.addressvalidation.v1.IValidateAddressResponse} message ValidateAddressResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ValidateAddressResponse.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ValidateAddressResponse message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.maps.addressvalidation.v1.ValidateAddressResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.maps.addressvalidation.v1.ValidateAddressResponse} ValidateAddressResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ValidateAddressResponse.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.addressvalidation.v1.ValidateAddressResponse();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.result = $root.google.maps.addressvalidation.v1.ValidationResult.decode(reader, reader.uint32());
+ break;
+ }
+ case 2: {
+ message.responseId = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ValidateAddressResponse message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.maps.addressvalidation.v1.ValidateAddressResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.maps.addressvalidation.v1.ValidateAddressResponse} ValidateAddressResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ValidateAddressResponse.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ValidateAddressResponse message.
+ * @function verify
+ * @memberof google.maps.addressvalidation.v1.ValidateAddressResponse
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ValidateAddressResponse.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.result != null && message.hasOwnProperty("result")) {
+ var error = $root.google.maps.addressvalidation.v1.ValidationResult.verify(message.result);
+ if (error)
+ return "result." + error;
+ }
+ if (message.responseId != null && message.hasOwnProperty("responseId"))
+ if (!$util.isString(message.responseId))
+ return "responseId: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a ValidateAddressResponse message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.maps.addressvalidation.v1.ValidateAddressResponse
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.maps.addressvalidation.v1.ValidateAddressResponse} ValidateAddressResponse
+ */
+ ValidateAddressResponse.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.maps.addressvalidation.v1.ValidateAddressResponse)
+ return object;
+ var message = new $root.google.maps.addressvalidation.v1.ValidateAddressResponse();
+ if (object.result != null) {
+ if (typeof object.result !== "object")
+ throw TypeError(".google.maps.addressvalidation.v1.ValidateAddressResponse.result: object expected");
+ message.result = $root.google.maps.addressvalidation.v1.ValidationResult.fromObject(object.result);
+ }
+ if (object.responseId != null)
+ message.responseId = String(object.responseId);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ValidateAddressResponse message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.maps.addressvalidation.v1.ValidateAddressResponse
+ * @static
+ * @param {google.maps.addressvalidation.v1.ValidateAddressResponse} message ValidateAddressResponse
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ValidateAddressResponse.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.result = null;
+ object.responseId = "";
+ }
+ if (message.result != null && message.hasOwnProperty("result"))
+ object.result = $root.google.maps.addressvalidation.v1.ValidationResult.toObject(message.result, options);
+ if (message.responseId != null && message.hasOwnProperty("responseId"))
+ object.responseId = message.responseId;
+ return object;
+ };
+
+ /**
+ * Converts this ValidateAddressResponse to JSON.
+ * @function toJSON
+ * @memberof google.maps.addressvalidation.v1.ValidateAddressResponse
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ValidateAddressResponse.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ValidateAddressResponse
+ * @function getTypeUrl
+ * @memberof google.maps.addressvalidation.v1.ValidateAddressResponse
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ValidateAddressResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.maps.addressvalidation.v1.ValidateAddressResponse";
+ };
+
+ return ValidateAddressResponse;
+ })();
+
+ v1.ProvideValidationFeedbackRequest = (function() {
+
+ /**
+ * Properties of a ProvideValidationFeedbackRequest.
+ * @memberof google.maps.addressvalidation.v1
+ * @interface IProvideValidationFeedbackRequest
+ * @property {google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest.ValidationConclusion|null} [conclusion] ProvideValidationFeedbackRequest conclusion
+ * @property {string|null} [responseId] ProvideValidationFeedbackRequest responseId
+ */
+
+ /**
+ * Constructs a new ProvideValidationFeedbackRequest.
+ * @memberof google.maps.addressvalidation.v1
+ * @classdesc Represents a ProvideValidationFeedbackRequest.
+ * @implements IProvideValidationFeedbackRequest
+ * @constructor
+ * @param {google.maps.addressvalidation.v1.IProvideValidationFeedbackRequest=} [properties] Properties to set
+ */
+ function ProvideValidationFeedbackRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ProvideValidationFeedbackRequest conclusion.
+ * @member {google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest.ValidationConclusion} conclusion
+ * @memberof google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest
+ * @instance
+ */
+ ProvideValidationFeedbackRequest.prototype.conclusion = 0;
+
+ /**
+ * ProvideValidationFeedbackRequest responseId.
+ * @member {string} responseId
+ * @memberof google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest
+ * @instance
+ */
+ ProvideValidationFeedbackRequest.prototype.responseId = "";
+
+ /**
+ * Creates a new ProvideValidationFeedbackRequest instance using the specified properties.
+ * @function create
+ * @memberof google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest
+ * @static
+ * @param {google.maps.addressvalidation.v1.IProvideValidationFeedbackRequest=} [properties] Properties to set
+ * @returns {google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest} ProvideValidationFeedbackRequest instance
+ */
+ ProvideValidationFeedbackRequest.create = function create(properties) {
+ return new ProvideValidationFeedbackRequest(properties);
+ };
+
+ /**
+ * Encodes the specified ProvideValidationFeedbackRequest message. Does not implicitly {@link google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest
+ * @static
+ * @param {google.maps.addressvalidation.v1.IProvideValidationFeedbackRequest} message ProvideValidationFeedbackRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ProvideValidationFeedbackRequest.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.conclusion != null && Object.hasOwnProperty.call(message, "conclusion"))
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.conclusion);
+ if (message.responseId != null && Object.hasOwnProperty.call(message, "responseId"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.responseId);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ProvideValidationFeedbackRequest message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest
+ * @static
+ * @param {google.maps.addressvalidation.v1.IProvideValidationFeedbackRequest} message ProvideValidationFeedbackRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ProvideValidationFeedbackRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ProvideValidationFeedbackRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest} ProvideValidationFeedbackRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ProvideValidationFeedbackRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.conclusion = reader.int32();
+ break;
+ }
+ case 2: {
+ message.responseId = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ProvideValidationFeedbackRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest} ProvideValidationFeedbackRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ProvideValidationFeedbackRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ProvideValidationFeedbackRequest message.
+ * @function verify
+ * @memberof google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ProvideValidationFeedbackRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.conclusion != null && message.hasOwnProperty("conclusion"))
+ switch (message.conclusion) {
+ default:
+ return "conclusion: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ break;
+ }
+ if (message.responseId != null && message.hasOwnProperty("responseId"))
+ if (!$util.isString(message.responseId))
+ return "responseId: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a ProvideValidationFeedbackRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest} ProvideValidationFeedbackRequest
+ */
+ ProvideValidationFeedbackRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest)
+ return object;
+ var message = new $root.google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest();
+ switch (object.conclusion) {
+ case "VALIDATION_CONCLUSION_UNSPECIFIED":
+ case 0:
+ message.conclusion = 0;
+ break;
+ case "VALIDATED_VERSION_USED":
+ case 1:
+ message.conclusion = 1;
+ break;
+ case "USER_VERSION_USED":
+ case 2:
+ message.conclusion = 2;
+ break;
+ case "UNVALIDATED_VERSION_USED":
+ case 3:
+ message.conclusion = 3;
+ break;
+ case "UNUSED":
+ case 4:
+ message.conclusion = 4;
+ break;
+ }
+ if (object.responseId != null)
+ message.responseId = String(object.responseId);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ProvideValidationFeedbackRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest
+ * @static
+ * @param {google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest} message ProvideValidationFeedbackRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ProvideValidationFeedbackRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.conclusion = options.enums === String ? "VALIDATION_CONCLUSION_UNSPECIFIED" : 0;
+ object.responseId = "";
+ }
+ if (message.conclusion != null && message.hasOwnProperty("conclusion"))
+ object.conclusion = options.enums === String ? $root.google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest.ValidationConclusion[message.conclusion] : message.conclusion;
+ if (message.responseId != null && message.hasOwnProperty("responseId"))
+ object.responseId = message.responseId;
+ return object;
+ };
+
+ /**
+ * Converts this ProvideValidationFeedbackRequest to JSON.
+ * @function toJSON
+ * @memberof google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ProvideValidationFeedbackRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ProvideValidationFeedbackRequest
+ * @function getTypeUrl
+ * @memberof google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ProvideValidationFeedbackRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest";
+ };
+
+ /**
+ * ValidationConclusion enum.
+ * @name google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest.ValidationConclusion
+ * @enum {number}
+ * @property {number} VALIDATION_CONCLUSION_UNSPECIFIED=0 VALIDATION_CONCLUSION_UNSPECIFIED value
+ * @property {number} VALIDATED_VERSION_USED=1 VALIDATED_VERSION_USED value
+ * @property {number} USER_VERSION_USED=2 USER_VERSION_USED value
+ * @property {number} UNVALIDATED_VERSION_USED=3 UNVALIDATED_VERSION_USED value
+ * @property {number} UNUSED=4 UNUSED value
+ */
+ ProvideValidationFeedbackRequest.ValidationConclusion = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "VALIDATION_CONCLUSION_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "VALIDATED_VERSION_USED"] = 1;
+ values[valuesById[2] = "USER_VERSION_USED"] = 2;
+ values[valuesById[3] = "UNVALIDATED_VERSION_USED"] = 3;
+ values[valuesById[4] = "UNUSED"] = 4;
+ return values;
+ })();
+
+ return ProvideValidationFeedbackRequest;
+ })();
+
+ v1.ProvideValidationFeedbackResponse = (function() {
+
+ /**
+ * Properties of a ProvideValidationFeedbackResponse.
+ * @memberof google.maps.addressvalidation.v1
+ * @interface IProvideValidationFeedbackResponse
+ */
+
+ /**
+ * Constructs a new ProvideValidationFeedbackResponse.
+ * @memberof google.maps.addressvalidation.v1
+ * @classdesc Represents a ProvideValidationFeedbackResponse.
+ * @implements IProvideValidationFeedbackResponse
+ * @constructor
+ * @param {google.maps.addressvalidation.v1.IProvideValidationFeedbackResponse=} [properties] Properties to set
+ */
+ function ProvideValidationFeedbackResponse(properties) {
+ if (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 ProvideValidationFeedbackResponse instance using the specified properties.
+ * @function create
+ * @memberof google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse
+ * @static
+ * @param {google.maps.addressvalidation.v1.IProvideValidationFeedbackResponse=} [properties] Properties to set
+ * @returns {google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse} ProvideValidationFeedbackResponse instance
+ */
+ ProvideValidationFeedbackResponse.create = function create(properties) {
+ return new ProvideValidationFeedbackResponse(properties);
+ };
+
+ /**
+ * Encodes the specified ProvideValidationFeedbackResponse message. Does not implicitly {@link google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse.verify|verify} messages.
+ * @function encode
+ * @memberof google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse
+ * @static
+ * @param {google.maps.addressvalidation.v1.IProvideValidationFeedbackResponse} message ProvideValidationFeedbackResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ProvideValidationFeedbackResponse.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ProvideValidationFeedbackResponse message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse
+ * @static
+ * @param {google.maps.addressvalidation.v1.IProvideValidationFeedbackResponse} message ProvideValidationFeedbackResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ProvideValidationFeedbackResponse.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ProvideValidationFeedbackResponse message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse} ProvideValidationFeedbackResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ProvideValidationFeedbackResponse.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ProvideValidationFeedbackResponse message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse} ProvideValidationFeedbackResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ProvideValidationFeedbackResponse.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ProvideValidationFeedbackResponse message.
+ * @function verify
+ * @memberof google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ProvideValidationFeedbackResponse.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ return null;
+ };
+
+ /**
+ * Creates a ProvideValidationFeedbackResponse message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse} ProvideValidationFeedbackResponse
+ */
+ ProvideValidationFeedbackResponse.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse)
+ return object;
+ return new $root.google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse();
+ };
+
+ /**
+ * Creates a plain object from a ProvideValidationFeedbackResponse message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse
+ * @static
+ * @param {google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse} message ProvideValidationFeedbackResponse
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ProvideValidationFeedbackResponse.toObject = function toObject() {
+ return {};
+ };
+
+ /**
+ * Converts this ProvideValidationFeedbackResponse to JSON.
+ * @function toJSON
+ * @memberof google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ProvideValidationFeedbackResponse.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ProvideValidationFeedbackResponse
+ * @function getTypeUrl
+ * @memberof google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ProvideValidationFeedbackResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse";
+ };
+
+ return ProvideValidationFeedbackResponse;
+ })();
+
+ v1.ValidationResult = (function() {
+
+ /**
+ * Properties of a ValidationResult.
+ * @memberof google.maps.addressvalidation.v1
+ * @interface IValidationResult
+ * @property {google.maps.addressvalidation.v1.IVerdict|null} [verdict] ValidationResult verdict
+ * @property {google.maps.addressvalidation.v1.IAddress|null} [address] ValidationResult address
+ * @property {google.maps.addressvalidation.v1.IGeocode|null} [geocode] ValidationResult geocode
+ * @property {google.maps.addressvalidation.v1.IAddressMetadata|null} [metadata] ValidationResult metadata
+ * @property {google.maps.addressvalidation.v1.IUspsData|null} [uspsData] ValidationResult uspsData
+ */
+
+ /**
+ * Constructs a new ValidationResult.
+ * @memberof google.maps.addressvalidation.v1
+ * @classdesc Represents a ValidationResult.
+ * @implements IValidationResult
+ * @constructor
+ * @param {google.maps.addressvalidation.v1.IValidationResult=} [properties] Properties to set
+ */
+ function ValidationResult(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ValidationResult verdict.
+ * @member {google.maps.addressvalidation.v1.IVerdict|null|undefined} verdict
+ * @memberof google.maps.addressvalidation.v1.ValidationResult
+ * @instance
+ */
+ ValidationResult.prototype.verdict = null;
+
+ /**
+ * ValidationResult address.
+ * @member {google.maps.addressvalidation.v1.IAddress|null|undefined} address
+ * @memberof google.maps.addressvalidation.v1.ValidationResult
+ * @instance
+ */
+ ValidationResult.prototype.address = null;
+
+ /**
+ * ValidationResult geocode.
+ * @member {google.maps.addressvalidation.v1.IGeocode|null|undefined} geocode
+ * @memberof google.maps.addressvalidation.v1.ValidationResult
+ * @instance
+ */
+ ValidationResult.prototype.geocode = null;
+
+ /**
+ * ValidationResult metadata.
+ * @member {google.maps.addressvalidation.v1.IAddressMetadata|null|undefined} metadata
+ * @memberof google.maps.addressvalidation.v1.ValidationResult
+ * @instance
+ */
+ ValidationResult.prototype.metadata = null;
+
+ /**
+ * ValidationResult uspsData.
+ * @member {google.maps.addressvalidation.v1.IUspsData|null|undefined} uspsData
+ * @memberof google.maps.addressvalidation.v1.ValidationResult
+ * @instance
+ */
+ ValidationResult.prototype.uspsData = null;
+
+ /**
+ * Creates a new ValidationResult instance using the specified properties.
+ * @function create
+ * @memberof google.maps.addressvalidation.v1.ValidationResult
+ * @static
+ * @param {google.maps.addressvalidation.v1.IValidationResult=} [properties] Properties to set
+ * @returns {google.maps.addressvalidation.v1.ValidationResult} ValidationResult instance
+ */
+ ValidationResult.create = function create(properties) {
+ return new ValidationResult(properties);
+ };
+
+ /**
+ * Encodes the specified ValidationResult message. Does not implicitly {@link google.maps.addressvalidation.v1.ValidationResult.verify|verify} messages.
+ * @function encode
+ * @memberof google.maps.addressvalidation.v1.ValidationResult
+ * @static
+ * @param {google.maps.addressvalidation.v1.IValidationResult} message ValidationResult message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ValidationResult.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.verdict != null && Object.hasOwnProperty.call(message, "verdict"))
+ $root.google.maps.addressvalidation.v1.Verdict.encode(message.verdict, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.address != null && Object.hasOwnProperty.call(message, "address"))
+ $root.google.maps.addressvalidation.v1.Address.encode(message.address, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ if (message.geocode != null && Object.hasOwnProperty.call(message, "geocode"))
+ $root.google.maps.addressvalidation.v1.Geocode.encode(message.geocode, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
+ $root.google.maps.addressvalidation.v1.AddressMetadata.encode(message.metadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
+ if (message.uspsData != null && Object.hasOwnProperty.call(message, "uspsData"))
+ $root.google.maps.addressvalidation.v1.UspsData.encode(message.uspsData, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ValidationResult message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.ValidationResult.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.maps.addressvalidation.v1.ValidationResult
+ * @static
+ * @param {google.maps.addressvalidation.v1.IValidationResult} message ValidationResult message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ValidationResult.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ValidationResult message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.maps.addressvalidation.v1.ValidationResult
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.maps.addressvalidation.v1.ValidationResult} ValidationResult
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ValidationResult.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.addressvalidation.v1.ValidationResult();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.verdict = $root.google.maps.addressvalidation.v1.Verdict.decode(reader, reader.uint32());
+ break;
+ }
+ case 2: {
+ message.address = $root.google.maps.addressvalidation.v1.Address.decode(reader, reader.uint32());
+ break;
+ }
+ case 3: {
+ message.geocode = $root.google.maps.addressvalidation.v1.Geocode.decode(reader, reader.uint32());
+ break;
+ }
+ case 4: {
+ message.metadata = $root.google.maps.addressvalidation.v1.AddressMetadata.decode(reader, reader.uint32());
+ break;
+ }
+ case 5: {
+ message.uspsData = $root.google.maps.addressvalidation.v1.UspsData.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ValidationResult message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.maps.addressvalidation.v1.ValidationResult
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.maps.addressvalidation.v1.ValidationResult} ValidationResult
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ValidationResult.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ValidationResult message.
+ * @function verify
+ * @memberof google.maps.addressvalidation.v1.ValidationResult
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ValidationResult.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.verdict != null && message.hasOwnProperty("verdict")) {
+ var error = $root.google.maps.addressvalidation.v1.Verdict.verify(message.verdict);
+ if (error)
+ return "verdict." + error;
+ }
+ if (message.address != null && message.hasOwnProperty("address")) {
+ var error = $root.google.maps.addressvalidation.v1.Address.verify(message.address);
+ if (error)
+ return "address." + error;
+ }
+ if (message.geocode != null && message.hasOwnProperty("geocode")) {
+ var error = $root.google.maps.addressvalidation.v1.Geocode.verify(message.geocode);
+ if (error)
+ return "geocode." + error;
+ }
+ if (message.metadata != null && message.hasOwnProperty("metadata")) {
+ var error = $root.google.maps.addressvalidation.v1.AddressMetadata.verify(message.metadata);
+ if (error)
+ return "metadata." + error;
+ }
+ if (message.uspsData != null && message.hasOwnProperty("uspsData")) {
+ var error = $root.google.maps.addressvalidation.v1.UspsData.verify(message.uspsData);
+ if (error)
+ return "uspsData." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a ValidationResult message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.maps.addressvalidation.v1.ValidationResult
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.maps.addressvalidation.v1.ValidationResult} ValidationResult
+ */
+ ValidationResult.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.maps.addressvalidation.v1.ValidationResult)
+ return object;
+ var message = new $root.google.maps.addressvalidation.v1.ValidationResult();
+ if (object.verdict != null) {
+ if (typeof object.verdict !== "object")
+ throw TypeError(".google.maps.addressvalidation.v1.ValidationResult.verdict: object expected");
+ message.verdict = $root.google.maps.addressvalidation.v1.Verdict.fromObject(object.verdict);
+ }
+ if (object.address != null) {
+ if (typeof object.address !== "object")
+ throw TypeError(".google.maps.addressvalidation.v1.ValidationResult.address: object expected");
+ message.address = $root.google.maps.addressvalidation.v1.Address.fromObject(object.address);
+ }
+ if (object.geocode != null) {
+ if (typeof object.geocode !== "object")
+ throw TypeError(".google.maps.addressvalidation.v1.ValidationResult.geocode: object expected");
+ message.geocode = $root.google.maps.addressvalidation.v1.Geocode.fromObject(object.geocode);
+ }
+ if (object.metadata != null) {
+ if (typeof object.metadata !== "object")
+ throw TypeError(".google.maps.addressvalidation.v1.ValidationResult.metadata: object expected");
+ message.metadata = $root.google.maps.addressvalidation.v1.AddressMetadata.fromObject(object.metadata);
+ }
+ if (object.uspsData != null) {
+ if (typeof object.uspsData !== "object")
+ throw TypeError(".google.maps.addressvalidation.v1.ValidationResult.uspsData: object expected");
+ message.uspsData = $root.google.maps.addressvalidation.v1.UspsData.fromObject(object.uspsData);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ValidationResult message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.maps.addressvalidation.v1.ValidationResult
+ * @static
+ * @param {google.maps.addressvalidation.v1.ValidationResult} message ValidationResult
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ValidationResult.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.verdict = null;
+ object.address = null;
+ object.geocode = null;
+ object.metadata = null;
+ object.uspsData = null;
+ }
+ if (message.verdict != null && message.hasOwnProperty("verdict"))
+ object.verdict = $root.google.maps.addressvalidation.v1.Verdict.toObject(message.verdict, options);
+ if (message.address != null && message.hasOwnProperty("address"))
+ object.address = $root.google.maps.addressvalidation.v1.Address.toObject(message.address, options);
+ if (message.geocode != null && message.hasOwnProperty("geocode"))
+ object.geocode = $root.google.maps.addressvalidation.v1.Geocode.toObject(message.geocode, options);
+ if (message.metadata != null && message.hasOwnProperty("metadata"))
+ object.metadata = $root.google.maps.addressvalidation.v1.AddressMetadata.toObject(message.metadata, options);
+ if (message.uspsData != null && message.hasOwnProperty("uspsData"))
+ object.uspsData = $root.google.maps.addressvalidation.v1.UspsData.toObject(message.uspsData, options);
+ return object;
+ };
+
+ /**
+ * Converts this ValidationResult to JSON.
+ * @function toJSON
+ * @memberof google.maps.addressvalidation.v1.ValidationResult
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ValidationResult.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ValidationResult
+ * @function getTypeUrl
+ * @memberof google.maps.addressvalidation.v1.ValidationResult
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ValidationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.maps.addressvalidation.v1.ValidationResult";
+ };
+
+ return ValidationResult;
+ })();
+
+ v1.Verdict = (function() {
+
+ /**
+ * Properties of a Verdict.
+ * @memberof google.maps.addressvalidation.v1
+ * @interface IVerdict
+ * @property {google.maps.addressvalidation.v1.Verdict.Granularity|null} [inputGranularity] Verdict inputGranularity
+ * @property {google.maps.addressvalidation.v1.Verdict.Granularity|null} [validationGranularity] Verdict validationGranularity
+ * @property {google.maps.addressvalidation.v1.Verdict.Granularity|null} [geocodeGranularity] Verdict geocodeGranularity
+ * @property {boolean|null} [addressComplete] Verdict addressComplete
+ * @property {boolean|null} [hasUnconfirmedComponents] Verdict hasUnconfirmedComponents
+ * @property {boolean|null} [hasInferredComponents] Verdict hasInferredComponents
+ * @property {boolean|null} [hasReplacedComponents] Verdict hasReplacedComponents
+ */
+
+ /**
+ * Constructs a new Verdict.
+ * @memberof google.maps.addressvalidation.v1
+ * @classdesc Represents a Verdict.
+ * @implements IVerdict
+ * @constructor
+ * @param {google.maps.addressvalidation.v1.IVerdict=} [properties] Properties to set
+ */
+ function Verdict(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * Verdict inputGranularity.
+ * @member {google.maps.addressvalidation.v1.Verdict.Granularity} inputGranularity
+ * @memberof google.maps.addressvalidation.v1.Verdict
+ * @instance
+ */
+ Verdict.prototype.inputGranularity = 0;
+
+ /**
+ * Verdict validationGranularity.
+ * @member {google.maps.addressvalidation.v1.Verdict.Granularity} validationGranularity
+ * @memberof google.maps.addressvalidation.v1.Verdict
+ * @instance
+ */
+ Verdict.prototype.validationGranularity = 0;
+
+ /**
+ * Verdict geocodeGranularity.
+ * @member {google.maps.addressvalidation.v1.Verdict.Granularity} geocodeGranularity
+ * @memberof google.maps.addressvalidation.v1.Verdict
+ * @instance
+ */
+ Verdict.prototype.geocodeGranularity = 0;
+
+ /**
+ * Verdict addressComplete.
+ * @member {boolean} addressComplete
+ * @memberof google.maps.addressvalidation.v1.Verdict
+ * @instance
+ */
+ Verdict.prototype.addressComplete = false;
+
+ /**
+ * Verdict hasUnconfirmedComponents.
+ * @member {boolean} hasUnconfirmedComponents
+ * @memberof google.maps.addressvalidation.v1.Verdict
+ * @instance
+ */
+ Verdict.prototype.hasUnconfirmedComponents = false;
+
+ /**
+ * Verdict hasInferredComponents.
+ * @member {boolean} hasInferredComponents
+ * @memberof google.maps.addressvalidation.v1.Verdict
+ * @instance
+ */
+ Verdict.prototype.hasInferredComponents = false;
+
+ /**
+ * Verdict hasReplacedComponents.
+ * @member {boolean} hasReplacedComponents
+ * @memberof google.maps.addressvalidation.v1.Verdict
+ * @instance
+ */
+ Verdict.prototype.hasReplacedComponents = false;
+
+ /**
+ * Creates a new Verdict instance using the specified properties.
+ * @function create
+ * @memberof google.maps.addressvalidation.v1.Verdict
+ * @static
+ * @param {google.maps.addressvalidation.v1.IVerdict=} [properties] Properties to set
+ * @returns {google.maps.addressvalidation.v1.Verdict} Verdict instance
+ */
+ Verdict.create = function create(properties) {
+ return new Verdict(properties);
+ };
+
+ /**
+ * Encodes the specified Verdict message. Does not implicitly {@link google.maps.addressvalidation.v1.Verdict.verify|verify} messages.
+ * @function encode
+ * @memberof google.maps.addressvalidation.v1.Verdict
+ * @static
+ * @param {google.maps.addressvalidation.v1.IVerdict} message Verdict message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Verdict.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.inputGranularity != null && Object.hasOwnProperty.call(message, "inputGranularity"))
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.inputGranularity);
+ if (message.validationGranularity != null && Object.hasOwnProperty.call(message, "validationGranularity"))
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.validationGranularity);
+ if (message.geocodeGranularity != null && Object.hasOwnProperty.call(message, "geocodeGranularity"))
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.geocodeGranularity);
+ if (message.addressComplete != null && Object.hasOwnProperty.call(message, "addressComplete"))
+ writer.uint32(/* id 4, wireType 0 =*/32).bool(message.addressComplete);
+ if (message.hasUnconfirmedComponents != null && Object.hasOwnProperty.call(message, "hasUnconfirmedComponents"))
+ writer.uint32(/* id 5, wireType 0 =*/40).bool(message.hasUnconfirmedComponents);
+ if (message.hasInferredComponents != null && Object.hasOwnProperty.call(message, "hasInferredComponents"))
+ writer.uint32(/* id 6, wireType 0 =*/48).bool(message.hasInferredComponents);
+ if (message.hasReplacedComponents != null && Object.hasOwnProperty.call(message, "hasReplacedComponents"))
+ writer.uint32(/* id 7, wireType 0 =*/56).bool(message.hasReplacedComponents);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified Verdict message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.Verdict.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.maps.addressvalidation.v1.Verdict
+ * @static
+ * @param {google.maps.addressvalidation.v1.IVerdict} message Verdict message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Verdict.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a Verdict message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.maps.addressvalidation.v1.Verdict
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.maps.addressvalidation.v1.Verdict} Verdict
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Verdict.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.addressvalidation.v1.Verdict();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.inputGranularity = reader.int32();
+ break;
+ }
+ case 2: {
+ message.validationGranularity = reader.int32();
+ break;
+ }
+ case 3: {
+ message.geocodeGranularity = reader.int32();
+ break;
+ }
+ case 4: {
+ message.addressComplete = reader.bool();
+ break;
+ }
+ case 5: {
+ message.hasUnconfirmedComponents = reader.bool();
+ break;
+ }
+ case 6: {
+ message.hasInferredComponents = reader.bool();
+ break;
+ }
+ case 7: {
+ message.hasReplacedComponents = reader.bool();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a Verdict message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.maps.addressvalidation.v1.Verdict
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.maps.addressvalidation.v1.Verdict} Verdict
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Verdict.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a Verdict message.
+ * @function verify
+ * @memberof google.maps.addressvalidation.v1.Verdict
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ Verdict.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.inputGranularity != null && message.hasOwnProperty("inputGranularity"))
+ switch (message.inputGranularity) {
+ default:
+ return "inputGranularity: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ break;
+ }
+ if (message.validationGranularity != null && message.hasOwnProperty("validationGranularity"))
+ switch (message.validationGranularity) {
+ default:
+ return "validationGranularity: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ break;
+ }
+ if (message.geocodeGranularity != null && message.hasOwnProperty("geocodeGranularity"))
+ switch (message.geocodeGranularity) {
+ default:
+ return "geocodeGranularity: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ break;
+ }
+ if (message.addressComplete != null && message.hasOwnProperty("addressComplete"))
+ if (typeof message.addressComplete !== "boolean")
+ return "addressComplete: boolean expected";
+ if (message.hasUnconfirmedComponents != null && message.hasOwnProperty("hasUnconfirmedComponents"))
+ if (typeof message.hasUnconfirmedComponents !== "boolean")
+ return "hasUnconfirmedComponents: boolean expected";
+ if (message.hasInferredComponents != null && message.hasOwnProperty("hasInferredComponents"))
+ if (typeof message.hasInferredComponents !== "boolean")
+ return "hasInferredComponents: boolean expected";
+ if (message.hasReplacedComponents != null && message.hasOwnProperty("hasReplacedComponents"))
+ if (typeof message.hasReplacedComponents !== "boolean")
+ return "hasReplacedComponents: boolean expected";
+ return null;
+ };
+
+ /**
+ * Creates a Verdict message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.maps.addressvalidation.v1.Verdict
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.maps.addressvalidation.v1.Verdict} Verdict
+ */
+ Verdict.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.maps.addressvalidation.v1.Verdict)
+ return object;
+ var message = new $root.google.maps.addressvalidation.v1.Verdict();
+ switch (object.inputGranularity) {
+ case "GRANULARITY_UNSPECIFIED":
+ case 0:
+ message.inputGranularity = 0;
+ break;
+ case "SUB_PREMISE":
+ case 1:
+ message.inputGranularity = 1;
+ break;
+ case "PREMISE":
+ case 2:
+ message.inputGranularity = 2;
+ break;
+ case "PREMISE_PROXIMITY":
+ case 3:
+ message.inputGranularity = 3;
+ break;
+ case "BLOCK":
+ case 4:
+ message.inputGranularity = 4;
+ break;
+ case "ROUTE":
+ case 5:
+ message.inputGranularity = 5;
+ break;
+ case "OTHER":
+ case 6:
+ message.inputGranularity = 6;
+ break;
+ }
+ switch (object.validationGranularity) {
+ case "GRANULARITY_UNSPECIFIED":
+ case 0:
+ message.validationGranularity = 0;
+ break;
+ case "SUB_PREMISE":
+ case 1:
+ message.validationGranularity = 1;
+ break;
+ case "PREMISE":
+ case 2:
+ message.validationGranularity = 2;
+ break;
+ case "PREMISE_PROXIMITY":
+ case 3:
+ message.validationGranularity = 3;
+ break;
+ case "BLOCK":
+ case 4:
+ message.validationGranularity = 4;
+ break;
+ case "ROUTE":
+ case 5:
+ message.validationGranularity = 5;
+ break;
+ case "OTHER":
+ case 6:
+ message.validationGranularity = 6;
+ break;
+ }
+ switch (object.geocodeGranularity) {
+ case "GRANULARITY_UNSPECIFIED":
+ case 0:
+ message.geocodeGranularity = 0;
+ break;
+ case "SUB_PREMISE":
+ case 1:
+ message.geocodeGranularity = 1;
+ break;
+ case "PREMISE":
+ case 2:
+ message.geocodeGranularity = 2;
+ break;
+ case "PREMISE_PROXIMITY":
+ case 3:
+ message.geocodeGranularity = 3;
+ break;
+ case "BLOCK":
+ case 4:
+ message.geocodeGranularity = 4;
+ break;
+ case "ROUTE":
+ case 5:
+ message.geocodeGranularity = 5;
+ break;
+ case "OTHER":
+ case 6:
+ message.geocodeGranularity = 6;
+ break;
+ }
+ if (object.addressComplete != null)
+ message.addressComplete = Boolean(object.addressComplete);
+ if (object.hasUnconfirmedComponents != null)
+ message.hasUnconfirmedComponents = Boolean(object.hasUnconfirmedComponents);
+ if (object.hasInferredComponents != null)
+ message.hasInferredComponents = Boolean(object.hasInferredComponents);
+ if (object.hasReplacedComponents != null)
+ message.hasReplacedComponents = Boolean(object.hasReplacedComponents);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a Verdict message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.maps.addressvalidation.v1.Verdict
+ * @static
+ * @param {google.maps.addressvalidation.v1.Verdict} message Verdict
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ Verdict.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.inputGranularity = options.enums === String ? "GRANULARITY_UNSPECIFIED" : 0;
+ object.validationGranularity = options.enums === String ? "GRANULARITY_UNSPECIFIED" : 0;
+ object.geocodeGranularity = options.enums === String ? "GRANULARITY_UNSPECIFIED" : 0;
+ object.addressComplete = false;
+ object.hasUnconfirmedComponents = false;
+ object.hasInferredComponents = false;
+ object.hasReplacedComponents = false;
+ }
+ if (message.inputGranularity != null && message.hasOwnProperty("inputGranularity"))
+ object.inputGranularity = options.enums === String ? $root.google.maps.addressvalidation.v1.Verdict.Granularity[message.inputGranularity] : message.inputGranularity;
+ if (message.validationGranularity != null && message.hasOwnProperty("validationGranularity"))
+ object.validationGranularity = options.enums === String ? $root.google.maps.addressvalidation.v1.Verdict.Granularity[message.validationGranularity] : message.validationGranularity;
+ if (message.geocodeGranularity != null && message.hasOwnProperty("geocodeGranularity"))
+ object.geocodeGranularity = options.enums === String ? $root.google.maps.addressvalidation.v1.Verdict.Granularity[message.geocodeGranularity] : message.geocodeGranularity;
+ if (message.addressComplete != null && message.hasOwnProperty("addressComplete"))
+ object.addressComplete = message.addressComplete;
+ if (message.hasUnconfirmedComponents != null && message.hasOwnProperty("hasUnconfirmedComponents"))
+ object.hasUnconfirmedComponents = message.hasUnconfirmedComponents;
+ if (message.hasInferredComponents != null && message.hasOwnProperty("hasInferredComponents"))
+ object.hasInferredComponents = message.hasInferredComponents;
+ if (message.hasReplacedComponents != null && message.hasOwnProperty("hasReplacedComponents"))
+ object.hasReplacedComponents = message.hasReplacedComponents;
+ return object;
+ };
+
+ /**
+ * Converts this Verdict to JSON.
+ * @function toJSON
+ * @memberof google.maps.addressvalidation.v1.Verdict
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ Verdict.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for Verdict
+ * @function getTypeUrl
+ * @memberof google.maps.addressvalidation.v1.Verdict
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ Verdict.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.maps.addressvalidation.v1.Verdict";
+ };
+
+ /**
+ * Granularity enum.
+ * @name google.maps.addressvalidation.v1.Verdict.Granularity
+ * @enum {number}
+ * @property {number} GRANULARITY_UNSPECIFIED=0 GRANULARITY_UNSPECIFIED value
+ * @property {number} SUB_PREMISE=1 SUB_PREMISE value
+ * @property {number} PREMISE=2 PREMISE value
+ * @property {number} PREMISE_PROXIMITY=3 PREMISE_PROXIMITY value
+ * @property {number} BLOCK=4 BLOCK value
+ * @property {number} ROUTE=5 ROUTE value
+ * @property {number} OTHER=6 OTHER value
+ */
+ Verdict.Granularity = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "GRANULARITY_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "SUB_PREMISE"] = 1;
+ values[valuesById[2] = "PREMISE"] = 2;
+ values[valuesById[3] = "PREMISE_PROXIMITY"] = 3;
+ values[valuesById[4] = "BLOCK"] = 4;
+ values[valuesById[5] = "ROUTE"] = 5;
+ values[valuesById[6] = "OTHER"] = 6;
+ return values;
+ })();
+
+ return Verdict;
+ })();
+
+ v1.Geocode = (function() {
+
+ /**
+ * Properties of a Geocode.
+ * @memberof google.maps.addressvalidation.v1
+ * @interface IGeocode
+ * @property {google.type.ILatLng|null} [location] Geocode location
+ * @property {google.maps.addressvalidation.v1.IPlusCode|null} [plusCode] Geocode plusCode
+ * @property {google.geo.type.IViewport|null} [bounds] Geocode bounds
+ * @property {number|null} [featureSizeMeters] Geocode featureSizeMeters
+ * @property {string|null} [placeId] Geocode placeId
+ * @property {Array.|null} [placeTypes] Geocode placeTypes
+ */
+
+ /**
+ * Constructs a new Geocode.
+ * @memberof google.maps.addressvalidation.v1
+ * @classdesc Represents a Geocode.
+ * @implements IGeocode
+ * @constructor
+ * @param {google.maps.addressvalidation.v1.IGeocode=} [properties] Properties to set
+ */
+ function Geocode(properties) {
+ this.placeTypes = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * Geocode location.
+ * @member {google.type.ILatLng|null|undefined} location
+ * @memberof google.maps.addressvalidation.v1.Geocode
+ * @instance
+ */
+ Geocode.prototype.location = null;
+
+ /**
+ * Geocode plusCode.
+ * @member {google.maps.addressvalidation.v1.IPlusCode|null|undefined} plusCode
+ * @memberof google.maps.addressvalidation.v1.Geocode
+ * @instance
+ */
+ Geocode.prototype.plusCode = null;
+
+ /**
+ * Geocode bounds.
+ * @member {google.geo.type.IViewport|null|undefined} bounds
+ * @memberof google.maps.addressvalidation.v1.Geocode
+ * @instance
+ */
+ Geocode.prototype.bounds = null;
+
+ /**
+ * Geocode featureSizeMeters.
+ * @member {number} featureSizeMeters
+ * @memberof google.maps.addressvalidation.v1.Geocode
+ * @instance
+ */
+ Geocode.prototype.featureSizeMeters = 0;
+
+ /**
+ * Geocode placeId.
+ * @member {string} placeId
+ * @memberof google.maps.addressvalidation.v1.Geocode
+ * @instance
+ */
+ Geocode.prototype.placeId = "";
+
+ /**
+ * Geocode placeTypes.
+ * @member {Array.} placeTypes
+ * @memberof google.maps.addressvalidation.v1.Geocode
+ * @instance
+ */
+ Geocode.prototype.placeTypes = $util.emptyArray;
+
+ /**
+ * Creates a new Geocode instance using the specified properties.
+ * @function create
+ * @memberof google.maps.addressvalidation.v1.Geocode
+ * @static
+ * @param {google.maps.addressvalidation.v1.IGeocode=} [properties] Properties to set
+ * @returns {google.maps.addressvalidation.v1.Geocode} Geocode instance
+ */
+ Geocode.create = function create(properties) {
+ return new Geocode(properties);
+ };
+
+ /**
+ * Encodes the specified Geocode message. Does not implicitly {@link google.maps.addressvalidation.v1.Geocode.verify|verify} messages.
+ * @function encode
+ * @memberof google.maps.addressvalidation.v1.Geocode
+ * @static
+ * @param {google.maps.addressvalidation.v1.IGeocode} message Geocode message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Geocode.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.location != null && Object.hasOwnProperty.call(message, "location"))
+ $root.google.type.LatLng.encode(message.location, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.plusCode != null && Object.hasOwnProperty.call(message, "plusCode"))
+ $root.google.maps.addressvalidation.v1.PlusCode.encode(message.plusCode, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ if (message.bounds != null && Object.hasOwnProperty.call(message, "bounds"))
+ $root.google.geo.type.Viewport.encode(message.bounds, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
+ if (message.featureSizeMeters != null && Object.hasOwnProperty.call(message, "featureSizeMeters"))
+ writer.uint32(/* id 5, wireType 5 =*/45).float(message.featureSizeMeters);
+ if (message.placeId != null && Object.hasOwnProperty.call(message, "placeId"))
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.placeId);
+ if (message.placeTypes != null && message.placeTypes.length)
+ for (var i = 0; i < message.placeTypes.length; ++i)
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.placeTypes[i]);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified Geocode message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.Geocode.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.maps.addressvalidation.v1.Geocode
+ * @static
+ * @param {google.maps.addressvalidation.v1.IGeocode} message Geocode message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Geocode.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a Geocode message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.maps.addressvalidation.v1.Geocode
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.maps.addressvalidation.v1.Geocode} Geocode
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Geocode.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.addressvalidation.v1.Geocode();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.location = $root.google.type.LatLng.decode(reader, reader.uint32());
+ break;
+ }
+ case 2: {
+ message.plusCode = $root.google.maps.addressvalidation.v1.PlusCode.decode(reader, reader.uint32());
+ break;
+ }
+ case 4: {
+ message.bounds = $root.google.geo.type.Viewport.decode(reader, reader.uint32());
+ break;
+ }
+ case 5: {
+ message.featureSizeMeters = reader.float();
+ break;
+ }
+ case 6: {
+ message.placeId = reader.string();
+ break;
+ }
+ case 7: {
+ if (!(message.placeTypes && message.placeTypes.length))
+ message.placeTypes = [];
+ message.placeTypes.push(reader.string());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a Geocode message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.maps.addressvalidation.v1.Geocode
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.maps.addressvalidation.v1.Geocode} Geocode
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Geocode.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a Geocode message.
+ * @function verify
+ * @memberof google.maps.addressvalidation.v1.Geocode
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ Geocode.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.location != null && message.hasOwnProperty("location")) {
+ var error = $root.google.type.LatLng.verify(message.location);
+ if (error)
+ return "location." + error;
+ }
+ if (message.plusCode != null && message.hasOwnProperty("plusCode")) {
+ var error = $root.google.maps.addressvalidation.v1.PlusCode.verify(message.plusCode);
+ if (error)
+ return "plusCode." + error;
+ }
+ if (message.bounds != null && message.hasOwnProperty("bounds")) {
+ var error = $root.google.geo.type.Viewport.verify(message.bounds);
+ if (error)
+ return "bounds." + error;
+ }
+ if (message.featureSizeMeters != null && message.hasOwnProperty("featureSizeMeters"))
+ if (typeof message.featureSizeMeters !== "number")
+ return "featureSizeMeters: number expected";
+ if (message.placeId != null && message.hasOwnProperty("placeId"))
+ if (!$util.isString(message.placeId))
+ return "placeId: string expected";
+ if (message.placeTypes != null && message.hasOwnProperty("placeTypes")) {
+ if (!Array.isArray(message.placeTypes))
+ return "placeTypes: array expected";
+ for (var i = 0; i < message.placeTypes.length; ++i)
+ if (!$util.isString(message.placeTypes[i]))
+ return "placeTypes: string[] expected";
+ }
+ return null;
+ };
+
+ /**
+ * Creates a Geocode message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.maps.addressvalidation.v1.Geocode
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.maps.addressvalidation.v1.Geocode} Geocode
+ */
+ Geocode.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.maps.addressvalidation.v1.Geocode)
+ return object;
+ var message = new $root.google.maps.addressvalidation.v1.Geocode();
+ if (object.location != null) {
+ if (typeof object.location !== "object")
+ throw TypeError(".google.maps.addressvalidation.v1.Geocode.location: object expected");
+ message.location = $root.google.type.LatLng.fromObject(object.location);
+ }
+ if (object.plusCode != null) {
+ if (typeof object.plusCode !== "object")
+ throw TypeError(".google.maps.addressvalidation.v1.Geocode.plusCode: object expected");
+ message.plusCode = $root.google.maps.addressvalidation.v1.PlusCode.fromObject(object.plusCode);
+ }
+ if (object.bounds != null) {
+ if (typeof object.bounds !== "object")
+ throw TypeError(".google.maps.addressvalidation.v1.Geocode.bounds: object expected");
+ message.bounds = $root.google.geo.type.Viewport.fromObject(object.bounds);
+ }
+ if (object.featureSizeMeters != null)
+ message.featureSizeMeters = Number(object.featureSizeMeters);
+ if (object.placeId != null)
+ message.placeId = String(object.placeId);
+ if (object.placeTypes) {
+ if (!Array.isArray(object.placeTypes))
+ throw TypeError(".google.maps.addressvalidation.v1.Geocode.placeTypes: array expected");
+ message.placeTypes = [];
+ for (var i = 0; i < object.placeTypes.length; ++i)
+ message.placeTypes[i] = String(object.placeTypes[i]);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a Geocode message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.maps.addressvalidation.v1.Geocode
+ * @static
+ * @param {google.maps.addressvalidation.v1.Geocode} message Geocode
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ Geocode.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.placeTypes = [];
+ if (options.defaults) {
+ object.location = null;
+ object.plusCode = null;
+ object.bounds = null;
+ object.featureSizeMeters = 0;
+ object.placeId = "";
+ }
+ if (message.location != null && message.hasOwnProperty("location"))
+ object.location = $root.google.type.LatLng.toObject(message.location, options);
+ if (message.plusCode != null && message.hasOwnProperty("plusCode"))
+ object.plusCode = $root.google.maps.addressvalidation.v1.PlusCode.toObject(message.plusCode, options);
+ if (message.bounds != null && message.hasOwnProperty("bounds"))
+ object.bounds = $root.google.geo.type.Viewport.toObject(message.bounds, options);
+ if (message.featureSizeMeters != null && message.hasOwnProperty("featureSizeMeters"))
+ object.featureSizeMeters = options.json && !isFinite(message.featureSizeMeters) ? String(message.featureSizeMeters) : message.featureSizeMeters;
+ if (message.placeId != null && message.hasOwnProperty("placeId"))
+ object.placeId = message.placeId;
+ if (message.placeTypes && message.placeTypes.length) {
+ object.placeTypes = [];
+ for (var j = 0; j < message.placeTypes.length; ++j)
+ object.placeTypes[j] = message.placeTypes[j];
+ }
+ return object;
+ };
+
+ /**
+ * Converts this Geocode to JSON.
+ * @function toJSON
+ * @memberof google.maps.addressvalidation.v1.Geocode
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ Geocode.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for Geocode
+ * @function getTypeUrl
+ * @memberof google.maps.addressvalidation.v1.Geocode
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ Geocode.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.maps.addressvalidation.v1.Geocode";
+ };
+
+ return Geocode;
+ })();
+
+ v1.PlusCode = (function() {
+
+ /**
+ * Properties of a PlusCode.
+ * @memberof google.maps.addressvalidation.v1
+ * @interface IPlusCode
+ * @property {string|null} [globalCode] PlusCode globalCode
+ * @property {string|null} [compoundCode] PlusCode compoundCode
+ */
+
+ /**
+ * Constructs a new PlusCode.
+ * @memberof google.maps.addressvalidation.v1
+ * @classdesc Represents a PlusCode.
+ * @implements IPlusCode
+ * @constructor
+ * @param {google.maps.addressvalidation.v1.IPlusCode=} [properties] Properties to set
+ */
+ function PlusCode(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * PlusCode globalCode.
+ * @member {string} globalCode
+ * @memberof google.maps.addressvalidation.v1.PlusCode
+ * @instance
+ */
+ PlusCode.prototype.globalCode = "";
+
+ /**
+ * PlusCode compoundCode.
+ * @member {string} compoundCode
+ * @memberof google.maps.addressvalidation.v1.PlusCode
+ * @instance
+ */
+ PlusCode.prototype.compoundCode = "";
+
+ /**
+ * Creates a new PlusCode instance using the specified properties.
+ * @function create
+ * @memberof google.maps.addressvalidation.v1.PlusCode
+ * @static
+ * @param {google.maps.addressvalidation.v1.IPlusCode=} [properties] Properties to set
+ * @returns {google.maps.addressvalidation.v1.PlusCode} PlusCode instance
+ */
+ PlusCode.create = function create(properties) {
+ return new PlusCode(properties);
+ };
+
+ /**
+ * Encodes the specified PlusCode message. Does not implicitly {@link google.maps.addressvalidation.v1.PlusCode.verify|verify} messages.
+ * @function encode
+ * @memberof google.maps.addressvalidation.v1.PlusCode
+ * @static
+ * @param {google.maps.addressvalidation.v1.IPlusCode} message PlusCode message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ PlusCode.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.globalCode != null && Object.hasOwnProperty.call(message, "globalCode"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.globalCode);
+ if (message.compoundCode != null && Object.hasOwnProperty.call(message, "compoundCode"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.compoundCode);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified PlusCode message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.PlusCode.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.maps.addressvalidation.v1.PlusCode
+ * @static
+ * @param {google.maps.addressvalidation.v1.IPlusCode} message PlusCode message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ PlusCode.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a PlusCode message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.maps.addressvalidation.v1.PlusCode
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.maps.addressvalidation.v1.PlusCode} PlusCode
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ PlusCode.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.addressvalidation.v1.PlusCode();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.globalCode = reader.string();
+ break;
+ }
+ case 2: {
+ message.compoundCode = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a PlusCode message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.maps.addressvalidation.v1.PlusCode
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.maps.addressvalidation.v1.PlusCode} PlusCode
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ PlusCode.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a PlusCode message.
+ * @function verify
+ * @memberof google.maps.addressvalidation.v1.PlusCode
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ PlusCode.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.globalCode != null && message.hasOwnProperty("globalCode"))
+ if (!$util.isString(message.globalCode))
+ return "globalCode: string expected";
+ if (message.compoundCode != null && message.hasOwnProperty("compoundCode"))
+ if (!$util.isString(message.compoundCode))
+ return "compoundCode: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a PlusCode message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.maps.addressvalidation.v1.PlusCode
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.maps.addressvalidation.v1.PlusCode} PlusCode
+ */
+ PlusCode.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.maps.addressvalidation.v1.PlusCode)
+ return object;
+ var message = new $root.google.maps.addressvalidation.v1.PlusCode();
+ if (object.globalCode != null)
+ message.globalCode = String(object.globalCode);
+ if (object.compoundCode != null)
+ message.compoundCode = String(object.compoundCode);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a PlusCode message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.maps.addressvalidation.v1.PlusCode
+ * @static
+ * @param {google.maps.addressvalidation.v1.PlusCode} message PlusCode
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ PlusCode.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.globalCode = "";
+ object.compoundCode = "";
+ }
+ if (message.globalCode != null && message.hasOwnProperty("globalCode"))
+ object.globalCode = message.globalCode;
+ if (message.compoundCode != null && message.hasOwnProperty("compoundCode"))
+ object.compoundCode = message.compoundCode;
+ return object;
+ };
+
+ /**
+ * Converts this PlusCode to JSON.
+ * @function toJSON
+ * @memberof google.maps.addressvalidation.v1.PlusCode
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ PlusCode.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for PlusCode
+ * @function getTypeUrl
+ * @memberof google.maps.addressvalidation.v1.PlusCode
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ PlusCode.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.maps.addressvalidation.v1.PlusCode";
+ };
+
+ return PlusCode;
+ })();
+
+ v1.AddressMetadata = (function() {
+
+ /**
+ * Properties of an AddressMetadata.
+ * @memberof google.maps.addressvalidation.v1
+ * @interface IAddressMetadata
+ * @property {boolean|null} [highrise] AddressMetadata highrise
+ * @property {boolean|null} [business] AddressMetadata business
+ * @property {boolean|null} [poBox] AddressMetadata poBox
+ * @property {boolean|null} [multiFamily] AddressMetadata multiFamily
+ * @property {boolean|null} [residential] AddressMetadata residential
+ */
+
+ /**
+ * Constructs a new AddressMetadata.
+ * @memberof google.maps.addressvalidation.v1
+ * @classdesc Represents an AddressMetadata.
+ * @implements IAddressMetadata
+ * @constructor
+ * @param {google.maps.addressvalidation.v1.IAddressMetadata=} [properties] Properties to set
+ */
+ function AddressMetadata(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * AddressMetadata highrise.
+ * @member {boolean|null|undefined} highrise
+ * @memberof google.maps.addressvalidation.v1.AddressMetadata
+ * @instance
+ */
+ AddressMetadata.prototype.highrise = null;
+
+ /**
+ * AddressMetadata business.
+ * @member {boolean|null|undefined} business
+ * @memberof google.maps.addressvalidation.v1.AddressMetadata
+ * @instance
+ */
+ AddressMetadata.prototype.business = null;
+
+ /**
+ * AddressMetadata poBox.
+ * @member {boolean|null|undefined} poBox
+ * @memberof google.maps.addressvalidation.v1.AddressMetadata
+ * @instance
+ */
+ AddressMetadata.prototype.poBox = null;
+
+ /**
+ * AddressMetadata multiFamily.
+ * @member {boolean|null|undefined} multiFamily
+ * @memberof google.maps.addressvalidation.v1.AddressMetadata
+ * @instance
+ */
+ AddressMetadata.prototype.multiFamily = null;
+
+ /**
+ * AddressMetadata residential.
+ * @member {boolean|null|undefined} residential
+ * @memberof google.maps.addressvalidation.v1.AddressMetadata
+ * @instance
+ */
+ AddressMetadata.prototype.residential = null;
+
+ // OneOf field names bound to virtual getters and setters
+ var $oneOfFields;
+
+ /**
+ * AddressMetadata _highrise.
+ * @member {"highrise"|undefined} _highrise
+ * @memberof google.maps.addressvalidation.v1.AddressMetadata
+ * @instance
+ */
+ Object.defineProperty(AddressMetadata.prototype, "_highrise", {
+ get: $util.oneOfGetter($oneOfFields = ["highrise"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * AddressMetadata _business.
+ * @member {"business"|undefined} _business
+ * @memberof google.maps.addressvalidation.v1.AddressMetadata
+ * @instance
+ */
+ Object.defineProperty(AddressMetadata.prototype, "_business", {
+ get: $util.oneOfGetter($oneOfFields = ["business"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * AddressMetadata _poBox.
+ * @member {"poBox"|undefined} _poBox
+ * @memberof google.maps.addressvalidation.v1.AddressMetadata
+ * @instance
+ */
+ Object.defineProperty(AddressMetadata.prototype, "_poBox", {
+ get: $util.oneOfGetter($oneOfFields = ["poBox"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * AddressMetadata _multiFamily.
+ * @member {"multiFamily"|undefined} _multiFamily
+ * @memberof google.maps.addressvalidation.v1.AddressMetadata
+ * @instance
+ */
+ Object.defineProperty(AddressMetadata.prototype, "_multiFamily", {
+ get: $util.oneOfGetter($oneOfFields = ["multiFamily"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * AddressMetadata _residential.
+ * @member {"residential"|undefined} _residential
+ * @memberof google.maps.addressvalidation.v1.AddressMetadata
+ * @instance
+ */
+ Object.defineProperty(AddressMetadata.prototype, "_residential", {
+ get: $util.oneOfGetter($oneOfFields = ["residential"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * Creates a new AddressMetadata instance using the specified properties.
+ * @function create
+ * @memberof google.maps.addressvalidation.v1.AddressMetadata
+ * @static
+ * @param {google.maps.addressvalidation.v1.IAddressMetadata=} [properties] Properties to set
+ * @returns {google.maps.addressvalidation.v1.AddressMetadata} AddressMetadata instance
+ */
+ AddressMetadata.create = function create(properties) {
+ return new AddressMetadata(properties);
+ };
+
+ /**
+ * Encodes the specified AddressMetadata message. Does not implicitly {@link google.maps.addressvalidation.v1.AddressMetadata.verify|verify} messages.
+ * @function encode
+ * @memberof google.maps.addressvalidation.v1.AddressMetadata
+ * @static
+ * @param {google.maps.addressvalidation.v1.IAddressMetadata} message AddressMetadata message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ AddressMetadata.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.highrise != null && Object.hasOwnProperty.call(message, "highrise"))
+ writer.uint32(/* id 1, wireType 0 =*/8).bool(message.highrise);
+ if (message.business != null && Object.hasOwnProperty.call(message, "business"))
+ writer.uint32(/* id 2, wireType 0 =*/16).bool(message.business);
+ if (message.poBox != null && Object.hasOwnProperty.call(message, "poBox"))
+ writer.uint32(/* id 3, wireType 0 =*/24).bool(message.poBox);
+ if (message.multiFamily != null && Object.hasOwnProperty.call(message, "multiFamily"))
+ writer.uint32(/* id 4, wireType 0 =*/32).bool(message.multiFamily);
+ if (message.residential != null && Object.hasOwnProperty.call(message, "residential"))
+ writer.uint32(/* id 6, wireType 0 =*/48).bool(message.residential);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified AddressMetadata message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.AddressMetadata.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.maps.addressvalidation.v1.AddressMetadata
+ * @static
+ * @param {google.maps.addressvalidation.v1.IAddressMetadata} message AddressMetadata message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ AddressMetadata.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an AddressMetadata message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.maps.addressvalidation.v1.AddressMetadata
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.maps.addressvalidation.v1.AddressMetadata} AddressMetadata
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ AddressMetadata.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.addressvalidation.v1.AddressMetadata();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.highrise = reader.bool();
+ break;
+ }
+ case 2: {
+ message.business = reader.bool();
+ break;
+ }
+ case 3: {
+ message.poBox = reader.bool();
+ break;
+ }
+ case 4: {
+ message.multiFamily = reader.bool();
+ break;
+ }
+ case 6: {
+ message.residential = reader.bool();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an AddressMetadata message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.maps.addressvalidation.v1.AddressMetadata
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.maps.addressvalidation.v1.AddressMetadata} AddressMetadata
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ AddressMetadata.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an AddressMetadata message.
+ * @function verify
+ * @memberof google.maps.addressvalidation.v1.AddressMetadata
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ AddressMetadata.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ var properties = {};
+ if (message.highrise != null && message.hasOwnProperty("highrise")) {
+ properties._highrise = 1;
+ if (typeof message.highrise !== "boolean")
+ return "highrise: boolean expected";
+ }
+ if (message.business != null && message.hasOwnProperty("business")) {
+ properties._business = 1;
+ if (typeof message.business !== "boolean")
+ return "business: boolean expected";
+ }
+ if (message.poBox != null && message.hasOwnProperty("poBox")) {
+ properties._poBox = 1;
+ if (typeof message.poBox !== "boolean")
+ return "poBox: boolean expected";
+ }
+ if (message.multiFamily != null && message.hasOwnProperty("multiFamily")) {
+ properties._multiFamily = 1;
+ if (typeof message.multiFamily !== "boolean")
+ return "multiFamily: boolean expected";
+ }
+ if (message.residential != null && message.hasOwnProperty("residential")) {
+ properties._residential = 1;
+ if (typeof message.residential !== "boolean")
+ return "residential: boolean expected";
+ }
+ return null;
+ };
+
+ /**
+ * Creates an AddressMetadata message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.maps.addressvalidation.v1.AddressMetadata
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.maps.addressvalidation.v1.AddressMetadata} AddressMetadata
+ */
+ AddressMetadata.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.maps.addressvalidation.v1.AddressMetadata)
+ return object;
+ var message = new $root.google.maps.addressvalidation.v1.AddressMetadata();
+ if (object.highrise != null)
+ message.highrise = Boolean(object.highrise);
+ if (object.business != null)
+ message.business = Boolean(object.business);
+ if (object.poBox != null)
+ message.poBox = Boolean(object.poBox);
+ if (object.multiFamily != null)
+ message.multiFamily = Boolean(object.multiFamily);
+ if (object.residential != null)
+ message.residential = Boolean(object.residential);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an AddressMetadata message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.maps.addressvalidation.v1.AddressMetadata
+ * @static
+ * @param {google.maps.addressvalidation.v1.AddressMetadata} message AddressMetadata
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ AddressMetadata.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (message.highrise != null && message.hasOwnProperty("highrise")) {
+ object.highrise = message.highrise;
+ if (options.oneofs)
+ object._highrise = "highrise";
+ }
+ if (message.business != null && message.hasOwnProperty("business")) {
+ object.business = message.business;
+ if (options.oneofs)
+ object._business = "business";
+ }
+ if (message.poBox != null && message.hasOwnProperty("poBox")) {
+ object.poBox = message.poBox;
+ if (options.oneofs)
+ object._poBox = "poBox";
+ }
+ if (message.multiFamily != null && message.hasOwnProperty("multiFamily")) {
+ object.multiFamily = message.multiFamily;
+ if (options.oneofs)
+ object._multiFamily = "multiFamily";
+ }
+ if (message.residential != null && message.hasOwnProperty("residential")) {
+ object.residential = message.residential;
+ if (options.oneofs)
+ object._residential = "residential";
+ }
+ return object;
+ };
+
+ /**
+ * Converts this AddressMetadata to JSON.
+ * @function toJSON
+ * @memberof google.maps.addressvalidation.v1.AddressMetadata
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ AddressMetadata.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for AddressMetadata
+ * @function getTypeUrl
+ * @memberof google.maps.addressvalidation.v1.AddressMetadata
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ AddressMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.maps.addressvalidation.v1.AddressMetadata";
+ };
+
+ return AddressMetadata;
+ })();
+
+ v1.UspsAddress = (function() {
+
+ /**
+ * Properties of a UspsAddress.
+ * @memberof google.maps.addressvalidation.v1
+ * @interface IUspsAddress
+ * @property {string|null} [firstAddressLine] UspsAddress firstAddressLine
+ * @property {string|null} [firm] UspsAddress firm
+ * @property {string|null} [secondAddressLine] UspsAddress secondAddressLine
+ * @property {string|null} [urbanization] UspsAddress urbanization
+ * @property {string|null} [cityStateZipAddressLine] UspsAddress cityStateZipAddressLine
+ * @property {string|null} [city] UspsAddress city
+ * @property {string|null} [state] UspsAddress state
+ * @property {string|null} [zipCode] UspsAddress zipCode
+ * @property {string|null} [zipCodeExtension] UspsAddress zipCodeExtension
+ */
+
+ /**
+ * Constructs a new UspsAddress.
+ * @memberof google.maps.addressvalidation.v1
+ * @classdesc Represents a UspsAddress.
+ * @implements IUspsAddress
+ * @constructor
+ * @param {google.maps.addressvalidation.v1.IUspsAddress=} [properties] Properties to set
+ */
+ function UspsAddress(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * UspsAddress firstAddressLine.
+ * @member {string} firstAddressLine
+ * @memberof google.maps.addressvalidation.v1.UspsAddress
+ * @instance
+ */
+ UspsAddress.prototype.firstAddressLine = "";
+
+ /**
+ * UspsAddress firm.
+ * @member {string} firm
+ * @memberof google.maps.addressvalidation.v1.UspsAddress
+ * @instance
+ */
+ UspsAddress.prototype.firm = "";
+
+ /**
+ * UspsAddress secondAddressLine.
+ * @member {string} secondAddressLine
+ * @memberof google.maps.addressvalidation.v1.UspsAddress
+ * @instance
+ */
+ UspsAddress.prototype.secondAddressLine = "";
+
+ /**
+ * UspsAddress urbanization.
+ * @member {string} urbanization
+ * @memberof google.maps.addressvalidation.v1.UspsAddress
+ * @instance
+ */
+ UspsAddress.prototype.urbanization = "";
+
+ /**
+ * UspsAddress cityStateZipAddressLine.
+ * @member {string} cityStateZipAddressLine
+ * @memberof google.maps.addressvalidation.v1.UspsAddress
+ * @instance
+ */
+ UspsAddress.prototype.cityStateZipAddressLine = "";
+
+ /**
+ * UspsAddress city.
+ * @member {string} city
+ * @memberof google.maps.addressvalidation.v1.UspsAddress
+ * @instance
+ */
+ UspsAddress.prototype.city = "";
+
+ /**
+ * UspsAddress state.
+ * @member {string} state
+ * @memberof google.maps.addressvalidation.v1.UspsAddress
+ * @instance
+ */
+ UspsAddress.prototype.state = "";
+
+ /**
+ * UspsAddress zipCode.
+ * @member {string} zipCode
+ * @memberof google.maps.addressvalidation.v1.UspsAddress
+ * @instance
+ */
+ UspsAddress.prototype.zipCode = "";
+
+ /**
+ * UspsAddress zipCodeExtension.
+ * @member {string} zipCodeExtension
+ * @memberof google.maps.addressvalidation.v1.UspsAddress
+ * @instance
+ */
+ UspsAddress.prototype.zipCodeExtension = "";
+
+ /**
+ * Creates a new UspsAddress instance using the specified properties.
+ * @function create
+ * @memberof google.maps.addressvalidation.v1.UspsAddress
+ * @static
+ * @param {google.maps.addressvalidation.v1.IUspsAddress=} [properties] Properties to set
+ * @returns {google.maps.addressvalidation.v1.UspsAddress} UspsAddress instance
+ */
+ UspsAddress.create = function create(properties) {
+ return new UspsAddress(properties);
+ };
+
+ /**
+ * Encodes the specified UspsAddress message. Does not implicitly {@link google.maps.addressvalidation.v1.UspsAddress.verify|verify} messages.
+ * @function encode
+ * @memberof google.maps.addressvalidation.v1.UspsAddress
+ * @static
+ * @param {google.maps.addressvalidation.v1.IUspsAddress} message UspsAddress message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ UspsAddress.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.firstAddressLine != null && Object.hasOwnProperty.call(message, "firstAddressLine"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.firstAddressLine);
+ if (message.firm != null && Object.hasOwnProperty.call(message, "firm"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.firm);
+ if (message.secondAddressLine != null && Object.hasOwnProperty.call(message, "secondAddressLine"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.secondAddressLine);
+ if (message.urbanization != null && Object.hasOwnProperty.call(message, "urbanization"))
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.urbanization);
+ if (message.cityStateZipAddressLine != null && Object.hasOwnProperty.call(message, "cityStateZipAddressLine"))
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.cityStateZipAddressLine);
+ if (message.city != null && Object.hasOwnProperty.call(message, "city"))
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.city);
+ if (message.state != null && Object.hasOwnProperty.call(message, "state"))
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.state);
+ if (message.zipCode != null && Object.hasOwnProperty.call(message, "zipCode"))
+ writer.uint32(/* id 8, wireType 2 =*/66).string(message.zipCode);
+ if (message.zipCodeExtension != null && Object.hasOwnProperty.call(message, "zipCodeExtension"))
+ writer.uint32(/* id 9, wireType 2 =*/74).string(message.zipCodeExtension);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified UspsAddress message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.UspsAddress.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.maps.addressvalidation.v1.UspsAddress
+ * @static
+ * @param {google.maps.addressvalidation.v1.IUspsAddress} message UspsAddress message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ UspsAddress.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a UspsAddress message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.maps.addressvalidation.v1.UspsAddress
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.maps.addressvalidation.v1.UspsAddress} UspsAddress
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ UspsAddress.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.addressvalidation.v1.UspsAddress();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.firstAddressLine = reader.string();
+ break;
+ }
+ case 2: {
+ message.firm = reader.string();
+ break;
+ }
+ case 3: {
+ message.secondAddressLine = reader.string();
+ break;
+ }
+ case 4: {
+ message.urbanization = reader.string();
+ break;
+ }
+ case 5: {
+ message.cityStateZipAddressLine = reader.string();
+ break;
+ }
+ case 6: {
+ message.city = reader.string();
+ break;
+ }
+ case 7: {
+ message.state = reader.string();
+ break;
+ }
+ case 8: {
+ message.zipCode = reader.string();
+ break;
+ }
+ case 9: {
+ message.zipCodeExtension = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a UspsAddress message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.maps.addressvalidation.v1.UspsAddress
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.maps.addressvalidation.v1.UspsAddress} UspsAddress
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ UspsAddress.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a UspsAddress message.
+ * @function verify
+ * @memberof google.maps.addressvalidation.v1.UspsAddress
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ UspsAddress.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.firstAddressLine != null && message.hasOwnProperty("firstAddressLine"))
+ if (!$util.isString(message.firstAddressLine))
+ return "firstAddressLine: string expected";
+ if (message.firm != null && message.hasOwnProperty("firm"))
+ if (!$util.isString(message.firm))
+ return "firm: string expected";
+ if (message.secondAddressLine != null && message.hasOwnProperty("secondAddressLine"))
+ if (!$util.isString(message.secondAddressLine))
+ return "secondAddressLine: string expected";
+ if (message.urbanization != null && message.hasOwnProperty("urbanization"))
+ if (!$util.isString(message.urbanization))
+ return "urbanization: string expected";
+ if (message.cityStateZipAddressLine != null && message.hasOwnProperty("cityStateZipAddressLine"))
+ if (!$util.isString(message.cityStateZipAddressLine))
+ return "cityStateZipAddressLine: string expected";
+ if (message.city != null && message.hasOwnProperty("city"))
+ if (!$util.isString(message.city))
+ return "city: string expected";
+ if (message.state != null && message.hasOwnProperty("state"))
+ if (!$util.isString(message.state))
+ return "state: string expected";
+ if (message.zipCode != null && message.hasOwnProperty("zipCode"))
+ if (!$util.isString(message.zipCode))
+ return "zipCode: string expected";
+ if (message.zipCodeExtension != null && message.hasOwnProperty("zipCodeExtension"))
+ if (!$util.isString(message.zipCodeExtension))
+ return "zipCodeExtension: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a UspsAddress message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.maps.addressvalidation.v1.UspsAddress
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.maps.addressvalidation.v1.UspsAddress} UspsAddress
+ */
+ UspsAddress.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.maps.addressvalidation.v1.UspsAddress)
+ return object;
+ var message = new $root.google.maps.addressvalidation.v1.UspsAddress();
+ if (object.firstAddressLine != null)
+ message.firstAddressLine = String(object.firstAddressLine);
+ if (object.firm != null)
+ message.firm = String(object.firm);
+ if (object.secondAddressLine != null)
+ message.secondAddressLine = String(object.secondAddressLine);
+ if (object.urbanization != null)
+ message.urbanization = String(object.urbanization);
+ if (object.cityStateZipAddressLine != null)
+ message.cityStateZipAddressLine = String(object.cityStateZipAddressLine);
+ if (object.city != null)
+ message.city = String(object.city);
+ if (object.state != null)
+ message.state = String(object.state);
+ if (object.zipCode != null)
+ message.zipCode = String(object.zipCode);
+ if (object.zipCodeExtension != null)
+ message.zipCodeExtension = String(object.zipCodeExtension);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a UspsAddress message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.maps.addressvalidation.v1.UspsAddress
+ * @static
+ * @param {google.maps.addressvalidation.v1.UspsAddress} message UspsAddress
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ UspsAddress.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.firstAddressLine = "";
+ object.firm = "";
+ object.secondAddressLine = "";
+ object.urbanization = "";
+ object.cityStateZipAddressLine = "";
+ object.city = "";
+ object.state = "";
+ object.zipCode = "";
+ object.zipCodeExtension = "";
+ }
+ if (message.firstAddressLine != null && message.hasOwnProperty("firstAddressLine"))
+ object.firstAddressLine = message.firstAddressLine;
+ if (message.firm != null && message.hasOwnProperty("firm"))
+ object.firm = message.firm;
+ if (message.secondAddressLine != null && message.hasOwnProperty("secondAddressLine"))
+ object.secondAddressLine = message.secondAddressLine;
+ if (message.urbanization != null && message.hasOwnProperty("urbanization"))
+ object.urbanization = message.urbanization;
+ if (message.cityStateZipAddressLine != null && message.hasOwnProperty("cityStateZipAddressLine"))
+ object.cityStateZipAddressLine = message.cityStateZipAddressLine;
+ if (message.city != null && message.hasOwnProperty("city"))
+ object.city = message.city;
+ if (message.state != null && message.hasOwnProperty("state"))
+ object.state = message.state;
+ if (message.zipCode != null && message.hasOwnProperty("zipCode"))
+ object.zipCode = message.zipCode;
+ if (message.zipCodeExtension != null && message.hasOwnProperty("zipCodeExtension"))
+ object.zipCodeExtension = message.zipCodeExtension;
+ return object;
+ };
+
+ /**
+ * Converts this UspsAddress to JSON.
+ * @function toJSON
+ * @memberof google.maps.addressvalidation.v1.UspsAddress
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ UspsAddress.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for UspsAddress
+ * @function getTypeUrl
+ * @memberof google.maps.addressvalidation.v1.UspsAddress
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ UspsAddress.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.maps.addressvalidation.v1.UspsAddress";
+ };
+
+ return UspsAddress;
+ })();
+
+ v1.UspsData = (function() {
+
+ /**
+ * Properties of a UspsData.
+ * @memberof google.maps.addressvalidation.v1
+ * @interface IUspsData
+ * @property {google.maps.addressvalidation.v1.IUspsAddress|null} [standardizedAddress] UspsData standardizedAddress
+ * @property {string|null} [deliveryPointCode] UspsData deliveryPointCode
+ * @property {string|null} [deliveryPointCheckDigit] UspsData deliveryPointCheckDigit
+ * @property {string|null} [dpvConfirmation] UspsData dpvConfirmation
+ * @property {string|null} [dpvFootnote] UspsData dpvFootnote
+ * @property {string|null} [dpvCmra] UspsData dpvCmra
+ * @property {string|null} [dpvVacant] UspsData dpvVacant
+ * @property {string|null} [dpvNoStat] UspsData dpvNoStat
+ * @property {string|null} [carrierRoute] UspsData carrierRoute
+ * @property {string|null} [carrierRouteIndicator] UspsData carrierRouteIndicator
+ * @property {boolean|null} [ewsNoMatch] UspsData ewsNoMatch
+ * @property {string|null} [postOfficeCity] UspsData postOfficeCity
+ * @property {string|null} [postOfficeState] UspsData postOfficeState
+ * @property {string|null} [abbreviatedCity] UspsData abbreviatedCity
+ * @property {string|null} [fipsCountyCode] UspsData fipsCountyCode
+ * @property {string|null} [county] UspsData county
+ * @property {string|null} [elotNumber] UspsData elotNumber
+ * @property {string|null} [elotFlag] UspsData elotFlag
+ * @property {string|null} [lacsLinkReturnCode] UspsData lacsLinkReturnCode
+ * @property {string|null} [lacsLinkIndicator] UspsData lacsLinkIndicator
+ * @property {boolean|null} [poBoxOnlyPostalCode] UspsData poBoxOnlyPostalCode
+ * @property {string|null} [suitelinkFootnote] UspsData suitelinkFootnote
+ * @property {string|null} [pmbDesignator] UspsData pmbDesignator
+ * @property {string|null} [pmbNumber] UspsData pmbNumber
+ * @property {string|null} [addressRecordType] UspsData addressRecordType
+ * @property {boolean|null} [defaultAddress] UspsData defaultAddress
+ * @property {string|null} [errorMessage] UspsData errorMessage
+ * @property {boolean|null} [cassProcessed] UspsData cassProcessed
+ */
+
+ /**
+ * Constructs a new UspsData.
+ * @memberof google.maps.addressvalidation.v1
+ * @classdesc Represents a UspsData.
+ * @implements IUspsData
+ * @constructor
+ * @param {google.maps.addressvalidation.v1.IUspsData=} [properties] Properties to set
+ */
+ function UspsData(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * UspsData standardizedAddress.
+ * @member {google.maps.addressvalidation.v1.IUspsAddress|null|undefined} standardizedAddress
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @instance
+ */
+ UspsData.prototype.standardizedAddress = null;
+
+ /**
+ * UspsData deliveryPointCode.
+ * @member {string} deliveryPointCode
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @instance
+ */
+ UspsData.prototype.deliveryPointCode = "";
+
+ /**
+ * UspsData deliveryPointCheckDigit.
+ * @member {string} deliveryPointCheckDigit
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @instance
+ */
+ UspsData.prototype.deliveryPointCheckDigit = "";
+
+ /**
+ * UspsData dpvConfirmation.
+ * @member {string} dpvConfirmation
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @instance
+ */
+ UspsData.prototype.dpvConfirmation = "";
+
+ /**
+ * UspsData dpvFootnote.
+ * @member {string} dpvFootnote
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @instance
+ */
+ UspsData.prototype.dpvFootnote = "";
+
+ /**
+ * UspsData dpvCmra.
+ * @member {string} dpvCmra
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @instance
+ */
+ UspsData.prototype.dpvCmra = "";
+
+ /**
+ * UspsData dpvVacant.
+ * @member {string} dpvVacant
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @instance
+ */
+ UspsData.prototype.dpvVacant = "";
+
+ /**
+ * UspsData dpvNoStat.
+ * @member {string} dpvNoStat
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @instance
+ */
+ UspsData.prototype.dpvNoStat = "";
+
+ /**
+ * UspsData carrierRoute.
+ * @member {string} carrierRoute
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @instance
+ */
+ UspsData.prototype.carrierRoute = "";
+
+ /**
+ * UspsData carrierRouteIndicator.
+ * @member {string} carrierRouteIndicator
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @instance
+ */
+ UspsData.prototype.carrierRouteIndicator = "";
+
+ /**
+ * UspsData ewsNoMatch.
+ * @member {boolean} ewsNoMatch
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @instance
+ */
+ UspsData.prototype.ewsNoMatch = false;
+
+ /**
+ * UspsData postOfficeCity.
+ * @member {string} postOfficeCity
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @instance
+ */
+ UspsData.prototype.postOfficeCity = "";
+
+ /**
+ * UspsData postOfficeState.
+ * @member {string} postOfficeState
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @instance
+ */
+ UspsData.prototype.postOfficeState = "";
+
+ /**
+ * UspsData abbreviatedCity.
+ * @member {string} abbreviatedCity
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @instance
+ */
+ UspsData.prototype.abbreviatedCity = "";
+
+ /**
+ * UspsData fipsCountyCode.
+ * @member {string} fipsCountyCode
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @instance
+ */
+ UspsData.prototype.fipsCountyCode = "";
+
+ /**
+ * UspsData county.
+ * @member {string} county
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @instance
+ */
+ UspsData.prototype.county = "";
+
+ /**
+ * UspsData elotNumber.
+ * @member {string} elotNumber
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @instance
+ */
+ UspsData.prototype.elotNumber = "";
+
+ /**
+ * UspsData elotFlag.
+ * @member {string} elotFlag
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @instance
+ */
+ UspsData.prototype.elotFlag = "";
+
+ /**
+ * UspsData lacsLinkReturnCode.
+ * @member {string} lacsLinkReturnCode
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @instance
+ */
+ UspsData.prototype.lacsLinkReturnCode = "";
+
+ /**
+ * UspsData lacsLinkIndicator.
+ * @member {string} lacsLinkIndicator
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @instance
+ */
+ UspsData.prototype.lacsLinkIndicator = "";
+
+ /**
+ * UspsData poBoxOnlyPostalCode.
+ * @member {boolean} poBoxOnlyPostalCode
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @instance
+ */
+ UspsData.prototype.poBoxOnlyPostalCode = false;
+
+ /**
+ * UspsData suitelinkFootnote.
+ * @member {string} suitelinkFootnote
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @instance
+ */
+ UspsData.prototype.suitelinkFootnote = "";
+
+ /**
+ * UspsData pmbDesignator.
+ * @member {string} pmbDesignator
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @instance
+ */
+ UspsData.prototype.pmbDesignator = "";
+
+ /**
+ * UspsData pmbNumber.
+ * @member {string} pmbNumber
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @instance
+ */
+ UspsData.prototype.pmbNumber = "";
+
+ /**
+ * UspsData addressRecordType.
+ * @member {string} addressRecordType
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @instance
+ */
+ UspsData.prototype.addressRecordType = "";
+
+ /**
+ * UspsData defaultAddress.
+ * @member {boolean} defaultAddress
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @instance
+ */
+ UspsData.prototype.defaultAddress = false;
+
+ /**
+ * UspsData errorMessage.
+ * @member {string} errorMessage
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @instance
+ */
+ UspsData.prototype.errorMessage = "";
+
+ /**
+ * UspsData cassProcessed.
+ * @member {boolean} cassProcessed
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @instance
+ */
+ UspsData.prototype.cassProcessed = false;
+
+ /**
+ * Creates a new UspsData instance using the specified properties.
+ * @function create
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @static
+ * @param {google.maps.addressvalidation.v1.IUspsData=} [properties] Properties to set
+ * @returns {google.maps.addressvalidation.v1.UspsData} UspsData instance
+ */
+ UspsData.create = function create(properties) {
+ return new UspsData(properties);
+ };
+
+ /**
+ * Encodes the specified UspsData message. Does not implicitly {@link google.maps.addressvalidation.v1.UspsData.verify|verify} messages.
+ * @function encode
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @static
+ * @param {google.maps.addressvalidation.v1.IUspsData} message UspsData message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ UspsData.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.standardizedAddress != null && Object.hasOwnProperty.call(message, "standardizedAddress"))
+ $root.google.maps.addressvalidation.v1.UspsAddress.encode(message.standardizedAddress, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.deliveryPointCode != null && Object.hasOwnProperty.call(message, "deliveryPointCode"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.deliveryPointCode);
+ if (message.deliveryPointCheckDigit != null && Object.hasOwnProperty.call(message, "deliveryPointCheckDigit"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.deliveryPointCheckDigit);
+ if (message.dpvConfirmation != null && Object.hasOwnProperty.call(message, "dpvConfirmation"))
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.dpvConfirmation);
+ if (message.dpvFootnote != null && Object.hasOwnProperty.call(message, "dpvFootnote"))
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.dpvFootnote);
+ if (message.dpvCmra != null && Object.hasOwnProperty.call(message, "dpvCmra"))
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.dpvCmra);
+ if (message.dpvVacant != null && Object.hasOwnProperty.call(message, "dpvVacant"))
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.dpvVacant);
+ if (message.dpvNoStat != null && Object.hasOwnProperty.call(message, "dpvNoStat"))
+ writer.uint32(/* id 8, wireType 2 =*/66).string(message.dpvNoStat);
+ if (message.carrierRoute != null && Object.hasOwnProperty.call(message, "carrierRoute"))
+ writer.uint32(/* id 9, wireType 2 =*/74).string(message.carrierRoute);
+ if (message.carrierRouteIndicator != null && Object.hasOwnProperty.call(message, "carrierRouteIndicator"))
+ writer.uint32(/* id 10, wireType 2 =*/82).string(message.carrierRouteIndicator);
+ if (message.ewsNoMatch != null && Object.hasOwnProperty.call(message, "ewsNoMatch"))
+ writer.uint32(/* id 11, wireType 0 =*/88).bool(message.ewsNoMatch);
+ if (message.postOfficeCity != null && Object.hasOwnProperty.call(message, "postOfficeCity"))
+ writer.uint32(/* id 12, wireType 2 =*/98).string(message.postOfficeCity);
+ if (message.postOfficeState != null && Object.hasOwnProperty.call(message, "postOfficeState"))
+ writer.uint32(/* id 13, wireType 2 =*/106).string(message.postOfficeState);
+ if (message.abbreviatedCity != null && Object.hasOwnProperty.call(message, "abbreviatedCity"))
+ writer.uint32(/* id 14, wireType 2 =*/114).string(message.abbreviatedCity);
+ if (message.fipsCountyCode != null && Object.hasOwnProperty.call(message, "fipsCountyCode"))
+ writer.uint32(/* id 15, wireType 2 =*/122).string(message.fipsCountyCode);
+ if (message.county != null && Object.hasOwnProperty.call(message, "county"))
+ writer.uint32(/* id 16, wireType 2 =*/130).string(message.county);
+ if (message.elotNumber != null && Object.hasOwnProperty.call(message, "elotNumber"))
+ writer.uint32(/* id 17, wireType 2 =*/138).string(message.elotNumber);
+ if (message.elotFlag != null && Object.hasOwnProperty.call(message, "elotFlag"))
+ writer.uint32(/* id 18, wireType 2 =*/146).string(message.elotFlag);
+ if (message.lacsLinkReturnCode != null && Object.hasOwnProperty.call(message, "lacsLinkReturnCode"))
+ writer.uint32(/* id 19, wireType 2 =*/154).string(message.lacsLinkReturnCode);
+ if (message.lacsLinkIndicator != null && Object.hasOwnProperty.call(message, "lacsLinkIndicator"))
+ writer.uint32(/* id 20, wireType 2 =*/162).string(message.lacsLinkIndicator);
+ if (message.poBoxOnlyPostalCode != null && Object.hasOwnProperty.call(message, "poBoxOnlyPostalCode"))
+ writer.uint32(/* id 21, wireType 0 =*/168).bool(message.poBoxOnlyPostalCode);
+ if (message.suitelinkFootnote != null && Object.hasOwnProperty.call(message, "suitelinkFootnote"))
+ writer.uint32(/* id 22, wireType 2 =*/178).string(message.suitelinkFootnote);
+ if (message.pmbDesignator != null && Object.hasOwnProperty.call(message, "pmbDesignator"))
+ writer.uint32(/* id 23, wireType 2 =*/186).string(message.pmbDesignator);
+ if (message.pmbNumber != null && Object.hasOwnProperty.call(message, "pmbNumber"))
+ writer.uint32(/* id 24, wireType 2 =*/194).string(message.pmbNumber);
+ if (message.addressRecordType != null && Object.hasOwnProperty.call(message, "addressRecordType"))
+ writer.uint32(/* id 25, wireType 2 =*/202).string(message.addressRecordType);
+ if (message.defaultAddress != null && Object.hasOwnProperty.call(message, "defaultAddress"))
+ writer.uint32(/* id 26, wireType 0 =*/208).bool(message.defaultAddress);
+ if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage"))
+ writer.uint32(/* id 27, wireType 2 =*/218).string(message.errorMessage);
+ if (message.cassProcessed != null && Object.hasOwnProperty.call(message, "cassProcessed"))
+ writer.uint32(/* id 28, wireType 0 =*/224).bool(message.cassProcessed);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified UspsData message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.UspsData.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @static
+ * @param {google.maps.addressvalidation.v1.IUspsData} message UspsData message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ UspsData.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a UspsData message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.maps.addressvalidation.v1.UspsData} UspsData
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ UspsData.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.addressvalidation.v1.UspsData();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.standardizedAddress = $root.google.maps.addressvalidation.v1.UspsAddress.decode(reader, reader.uint32());
+ break;
+ }
+ case 2: {
+ message.deliveryPointCode = reader.string();
+ break;
+ }
+ case 3: {
+ message.deliveryPointCheckDigit = reader.string();
+ break;
+ }
+ case 4: {
+ message.dpvConfirmation = reader.string();
+ break;
+ }
+ case 5: {
+ message.dpvFootnote = reader.string();
+ break;
+ }
+ case 6: {
+ message.dpvCmra = reader.string();
+ break;
+ }
+ case 7: {
+ message.dpvVacant = reader.string();
+ break;
+ }
+ case 8: {
+ message.dpvNoStat = reader.string();
+ break;
+ }
+ case 9: {
+ message.carrierRoute = reader.string();
+ break;
+ }
+ case 10: {
+ message.carrierRouteIndicator = reader.string();
+ break;
+ }
+ case 11: {
+ message.ewsNoMatch = reader.bool();
+ break;
+ }
+ case 12: {
+ message.postOfficeCity = reader.string();
+ break;
+ }
+ case 13: {
+ message.postOfficeState = reader.string();
+ break;
+ }
+ case 14: {
+ message.abbreviatedCity = reader.string();
+ break;
+ }
+ case 15: {
+ message.fipsCountyCode = reader.string();
+ break;
+ }
+ case 16: {
+ message.county = reader.string();
+ break;
+ }
+ case 17: {
+ message.elotNumber = reader.string();
+ break;
+ }
+ case 18: {
+ message.elotFlag = reader.string();
+ break;
+ }
+ case 19: {
+ message.lacsLinkReturnCode = reader.string();
+ break;
+ }
+ case 20: {
+ message.lacsLinkIndicator = reader.string();
+ break;
+ }
+ case 21: {
+ message.poBoxOnlyPostalCode = reader.bool();
+ break;
+ }
+ case 22: {
+ message.suitelinkFootnote = reader.string();
+ break;
+ }
+ case 23: {
+ message.pmbDesignator = reader.string();
+ break;
+ }
+ case 24: {
+ message.pmbNumber = reader.string();
+ break;
+ }
+ case 25: {
+ message.addressRecordType = reader.string();
+ break;
+ }
+ case 26: {
+ message.defaultAddress = reader.bool();
+ break;
+ }
+ case 27: {
+ message.errorMessage = reader.string();
+ break;
+ }
+ case 28: {
+ message.cassProcessed = reader.bool();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a UspsData message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.maps.addressvalidation.v1.UspsData} UspsData
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ UspsData.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a UspsData message.
+ * @function verify
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ UspsData.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.standardizedAddress != null && message.hasOwnProperty("standardizedAddress")) {
+ var error = $root.google.maps.addressvalidation.v1.UspsAddress.verify(message.standardizedAddress);
+ if (error)
+ return "standardizedAddress." + error;
+ }
+ if (message.deliveryPointCode != null && message.hasOwnProperty("deliveryPointCode"))
+ if (!$util.isString(message.deliveryPointCode))
+ return "deliveryPointCode: string expected";
+ if (message.deliveryPointCheckDigit != null && message.hasOwnProperty("deliveryPointCheckDigit"))
+ if (!$util.isString(message.deliveryPointCheckDigit))
+ return "deliveryPointCheckDigit: string expected";
+ if (message.dpvConfirmation != null && message.hasOwnProperty("dpvConfirmation"))
+ if (!$util.isString(message.dpvConfirmation))
+ return "dpvConfirmation: string expected";
+ if (message.dpvFootnote != null && message.hasOwnProperty("dpvFootnote"))
+ if (!$util.isString(message.dpvFootnote))
+ return "dpvFootnote: string expected";
+ if (message.dpvCmra != null && message.hasOwnProperty("dpvCmra"))
+ if (!$util.isString(message.dpvCmra))
+ return "dpvCmra: string expected";
+ if (message.dpvVacant != null && message.hasOwnProperty("dpvVacant"))
+ if (!$util.isString(message.dpvVacant))
+ return "dpvVacant: string expected";
+ if (message.dpvNoStat != null && message.hasOwnProperty("dpvNoStat"))
+ if (!$util.isString(message.dpvNoStat))
+ return "dpvNoStat: string expected";
+ if (message.carrierRoute != null && message.hasOwnProperty("carrierRoute"))
+ if (!$util.isString(message.carrierRoute))
+ return "carrierRoute: string expected";
+ if (message.carrierRouteIndicator != null && message.hasOwnProperty("carrierRouteIndicator"))
+ if (!$util.isString(message.carrierRouteIndicator))
+ return "carrierRouteIndicator: string expected";
+ if (message.ewsNoMatch != null && message.hasOwnProperty("ewsNoMatch"))
+ if (typeof message.ewsNoMatch !== "boolean")
+ return "ewsNoMatch: boolean expected";
+ if (message.postOfficeCity != null && message.hasOwnProperty("postOfficeCity"))
+ if (!$util.isString(message.postOfficeCity))
+ return "postOfficeCity: string expected";
+ if (message.postOfficeState != null && message.hasOwnProperty("postOfficeState"))
+ if (!$util.isString(message.postOfficeState))
+ return "postOfficeState: string expected";
+ if (message.abbreviatedCity != null && message.hasOwnProperty("abbreviatedCity"))
+ if (!$util.isString(message.abbreviatedCity))
+ return "abbreviatedCity: string expected";
+ if (message.fipsCountyCode != null && message.hasOwnProperty("fipsCountyCode"))
+ if (!$util.isString(message.fipsCountyCode))
+ return "fipsCountyCode: string expected";
+ if (message.county != null && message.hasOwnProperty("county"))
+ if (!$util.isString(message.county))
+ return "county: string expected";
+ if (message.elotNumber != null && message.hasOwnProperty("elotNumber"))
+ if (!$util.isString(message.elotNumber))
+ return "elotNumber: string expected";
+ if (message.elotFlag != null && message.hasOwnProperty("elotFlag"))
+ if (!$util.isString(message.elotFlag))
+ return "elotFlag: string expected";
+ if (message.lacsLinkReturnCode != null && message.hasOwnProperty("lacsLinkReturnCode"))
+ if (!$util.isString(message.lacsLinkReturnCode))
+ return "lacsLinkReturnCode: string expected";
+ if (message.lacsLinkIndicator != null && message.hasOwnProperty("lacsLinkIndicator"))
+ if (!$util.isString(message.lacsLinkIndicator))
+ return "lacsLinkIndicator: string expected";
+ if (message.poBoxOnlyPostalCode != null && message.hasOwnProperty("poBoxOnlyPostalCode"))
+ if (typeof message.poBoxOnlyPostalCode !== "boolean")
+ return "poBoxOnlyPostalCode: boolean expected";
+ if (message.suitelinkFootnote != null && message.hasOwnProperty("suitelinkFootnote"))
+ if (!$util.isString(message.suitelinkFootnote))
+ return "suitelinkFootnote: string expected";
+ if (message.pmbDesignator != null && message.hasOwnProperty("pmbDesignator"))
+ if (!$util.isString(message.pmbDesignator))
+ return "pmbDesignator: string expected";
+ if (message.pmbNumber != null && message.hasOwnProperty("pmbNumber"))
+ if (!$util.isString(message.pmbNumber))
+ return "pmbNumber: string expected";
+ if (message.addressRecordType != null && message.hasOwnProperty("addressRecordType"))
+ if (!$util.isString(message.addressRecordType))
+ return "addressRecordType: string expected";
+ if (message.defaultAddress != null && message.hasOwnProperty("defaultAddress"))
+ if (typeof message.defaultAddress !== "boolean")
+ return "defaultAddress: boolean expected";
+ if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
+ if (!$util.isString(message.errorMessage))
+ return "errorMessage: string expected";
+ if (message.cassProcessed != null && message.hasOwnProperty("cassProcessed"))
+ if (typeof message.cassProcessed !== "boolean")
+ return "cassProcessed: boolean expected";
+ return null;
+ };
+
+ /**
+ * Creates a UspsData message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.maps.addressvalidation.v1.UspsData} UspsData
+ */
+ UspsData.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.maps.addressvalidation.v1.UspsData)
+ return object;
+ var message = new $root.google.maps.addressvalidation.v1.UspsData();
+ if (object.standardizedAddress != null) {
+ if (typeof object.standardizedAddress !== "object")
+ throw TypeError(".google.maps.addressvalidation.v1.UspsData.standardizedAddress: object expected");
+ message.standardizedAddress = $root.google.maps.addressvalidation.v1.UspsAddress.fromObject(object.standardizedAddress);
+ }
+ if (object.deliveryPointCode != null)
+ message.deliveryPointCode = String(object.deliveryPointCode);
+ if (object.deliveryPointCheckDigit != null)
+ message.deliveryPointCheckDigit = String(object.deliveryPointCheckDigit);
+ if (object.dpvConfirmation != null)
+ message.dpvConfirmation = String(object.dpvConfirmation);
+ if (object.dpvFootnote != null)
+ message.dpvFootnote = String(object.dpvFootnote);
+ if (object.dpvCmra != null)
+ message.dpvCmra = String(object.dpvCmra);
+ if (object.dpvVacant != null)
+ message.dpvVacant = String(object.dpvVacant);
+ if (object.dpvNoStat != null)
+ message.dpvNoStat = String(object.dpvNoStat);
+ if (object.carrierRoute != null)
+ message.carrierRoute = String(object.carrierRoute);
+ if (object.carrierRouteIndicator != null)
+ message.carrierRouteIndicator = String(object.carrierRouteIndicator);
+ if (object.ewsNoMatch != null)
+ message.ewsNoMatch = Boolean(object.ewsNoMatch);
+ if (object.postOfficeCity != null)
+ message.postOfficeCity = String(object.postOfficeCity);
+ if (object.postOfficeState != null)
+ message.postOfficeState = String(object.postOfficeState);
+ if (object.abbreviatedCity != null)
+ message.abbreviatedCity = String(object.abbreviatedCity);
+ if (object.fipsCountyCode != null)
+ message.fipsCountyCode = String(object.fipsCountyCode);
+ if (object.county != null)
+ message.county = String(object.county);
+ if (object.elotNumber != null)
+ message.elotNumber = String(object.elotNumber);
+ if (object.elotFlag != null)
+ message.elotFlag = String(object.elotFlag);
+ if (object.lacsLinkReturnCode != null)
+ message.lacsLinkReturnCode = String(object.lacsLinkReturnCode);
+ if (object.lacsLinkIndicator != null)
+ message.lacsLinkIndicator = String(object.lacsLinkIndicator);
+ if (object.poBoxOnlyPostalCode != null)
+ message.poBoxOnlyPostalCode = Boolean(object.poBoxOnlyPostalCode);
+ if (object.suitelinkFootnote != null)
+ message.suitelinkFootnote = String(object.suitelinkFootnote);
+ if (object.pmbDesignator != null)
+ message.pmbDesignator = String(object.pmbDesignator);
+ if (object.pmbNumber != null)
+ message.pmbNumber = String(object.pmbNumber);
+ if (object.addressRecordType != null)
+ message.addressRecordType = String(object.addressRecordType);
+ if (object.defaultAddress != null)
+ message.defaultAddress = Boolean(object.defaultAddress);
+ if (object.errorMessage != null)
+ message.errorMessage = String(object.errorMessage);
+ if (object.cassProcessed != null)
+ message.cassProcessed = Boolean(object.cassProcessed);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a UspsData message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @static
+ * @param {google.maps.addressvalidation.v1.UspsData} message UspsData
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ UspsData.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.standardizedAddress = null;
+ object.deliveryPointCode = "";
+ object.deliveryPointCheckDigit = "";
+ object.dpvConfirmation = "";
+ object.dpvFootnote = "";
+ object.dpvCmra = "";
+ object.dpvVacant = "";
+ object.dpvNoStat = "";
+ object.carrierRoute = "";
+ object.carrierRouteIndicator = "";
+ object.ewsNoMatch = false;
+ object.postOfficeCity = "";
+ object.postOfficeState = "";
+ object.abbreviatedCity = "";
+ object.fipsCountyCode = "";
+ object.county = "";
+ object.elotNumber = "";
+ object.elotFlag = "";
+ object.lacsLinkReturnCode = "";
+ object.lacsLinkIndicator = "";
+ object.poBoxOnlyPostalCode = false;
+ object.suitelinkFootnote = "";
+ object.pmbDesignator = "";
+ object.pmbNumber = "";
+ object.addressRecordType = "";
+ object.defaultAddress = false;
+ object.errorMessage = "";
+ object.cassProcessed = false;
+ }
+ if (message.standardizedAddress != null && message.hasOwnProperty("standardizedAddress"))
+ object.standardizedAddress = $root.google.maps.addressvalidation.v1.UspsAddress.toObject(message.standardizedAddress, options);
+ if (message.deliveryPointCode != null && message.hasOwnProperty("deliveryPointCode"))
+ object.deliveryPointCode = message.deliveryPointCode;
+ if (message.deliveryPointCheckDigit != null && message.hasOwnProperty("deliveryPointCheckDigit"))
+ object.deliveryPointCheckDigit = message.deliveryPointCheckDigit;
+ if (message.dpvConfirmation != null && message.hasOwnProperty("dpvConfirmation"))
+ object.dpvConfirmation = message.dpvConfirmation;
+ if (message.dpvFootnote != null && message.hasOwnProperty("dpvFootnote"))
+ object.dpvFootnote = message.dpvFootnote;
+ if (message.dpvCmra != null && message.hasOwnProperty("dpvCmra"))
+ object.dpvCmra = message.dpvCmra;
+ if (message.dpvVacant != null && message.hasOwnProperty("dpvVacant"))
+ object.dpvVacant = message.dpvVacant;
+ if (message.dpvNoStat != null && message.hasOwnProperty("dpvNoStat"))
+ object.dpvNoStat = message.dpvNoStat;
+ if (message.carrierRoute != null && message.hasOwnProperty("carrierRoute"))
+ object.carrierRoute = message.carrierRoute;
+ if (message.carrierRouteIndicator != null && message.hasOwnProperty("carrierRouteIndicator"))
+ object.carrierRouteIndicator = message.carrierRouteIndicator;
+ if (message.ewsNoMatch != null && message.hasOwnProperty("ewsNoMatch"))
+ object.ewsNoMatch = message.ewsNoMatch;
+ if (message.postOfficeCity != null && message.hasOwnProperty("postOfficeCity"))
+ object.postOfficeCity = message.postOfficeCity;
+ if (message.postOfficeState != null && message.hasOwnProperty("postOfficeState"))
+ object.postOfficeState = message.postOfficeState;
+ if (message.abbreviatedCity != null && message.hasOwnProperty("abbreviatedCity"))
+ object.abbreviatedCity = message.abbreviatedCity;
+ if (message.fipsCountyCode != null && message.hasOwnProperty("fipsCountyCode"))
+ object.fipsCountyCode = message.fipsCountyCode;
+ if (message.county != null && message.hasOwnProperty("county"))
+ object.county = message.county;
+ if (message.elotNumber != null && message.hasOwnProperty("elotNumber"))
+ object.elotNumber = message.elotNumber;
+ if (message.elotFlag != null && message.hasOwnProperty("elotFlag"))
+ object.elotFlag = message.elotFlag;
+ if (message.lacsLinkReturnCode != null && message.hasOwnProperty("lacsLinkReturnCode"))
+ object.lacsLinkReturnCode = message.lacsLinkReturnCode;
+ if (message.lacsLinkIndicator != null && message.hasOwnProperty("lacsLinkIndicator"))
+ object.lacsLinkIndicator = message.lacsLinkIndicator;
+ if (message.poBoxOnlyPostalCode != null && message.hasOwnProperty("poBoxOnlyPostalCode"))
+ object.poBoxOnlyPostalCode = message.poBoxOnlyPostalCode;
+ if (message.suitelinkFootnote != null && message.hasOwnProperty("suitelinkFootnote"))
+ object.suitelinkFootnote = message.suitelinkFootnote;
+ if (message.pmbDesignator != null && message.hasOwnProperty("pmbDesignator"))
+ object.pmbDesignator = message.pmbDesignator;
+ if (message.pmbNumber != null && message.hasOwnProperty("pmbNumber"))
+ object.pmbNumber = message.pmbNumber;
+ if (message.addressRecordType != null && message.hasOwnProperty("addressRecordType"))
+ object.addressRecordType = message.addressRecordType;
+ if (message.defaultAddress != null && message.hasOwnProperty("defaultAddress"))
+ object.defaultAddress = message.defaultAddress;
+ if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
+ object.errorMessage = message.errorMessage;
+ if (message.cassProcessed != null && message.hasOwnProperty("cassProcessed"))
+ object.cassProcessed = message.cassProcessed;
+ return object;
+ };
+
+ /**
+ * Converts this UspsData to JSON.
+ * @function toJSON
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ UspsData.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for UspsData
+ * @function getTypeUrl
+ * @memberof google.maps.addressvalidation.v1.UspsData
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ UspsData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.maps.addressvalidation.v1.UspsData";
+ };
+
+ return UspsData;
+ })();
+
+ return v1;
+ })();
+
+ return addressvalidation;
+ })();
+
+ return maps;
+ })();
+
+ google.api = (function() {
+
+ /**
+ * Namespace api.
+ * @memberof google
+ * @namespace
+ */
+ var api = {};
+
+ /**
+ * FieldBehavior enum.
+ * @name google.api.FieldBehavior
+ * @enum {number}
+ * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value
+ * @property {number} OPTIONAL=1 OPTIONAL value
+ * @property {number} REQUIRED=2 REQUIRED value
+ * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value
+ * @property {number} INPUT_ONLY=4 INPUT_ONLY value
+ * @property {number} IMMUTABLE=5 IMMUTABLE value
+ * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value
+ * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value
+ */
+ api.FieldBehavior = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "OPTIONAL"] = 1;
+ values[valuesById[2] = "REQUIRED"] = 2;
+ values[valuesById[3] = "OUTPUT_ONLY"] = 3;
+ values[valuesById[4] = "INPUT_ONLY"] = 4;
+ values[valuesById[5] = "IMMUTABLE"] = 5;
+ values[valuesById[6] = "UNORDERED_LIST"] = 6;
+ values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7;
+ return values;
+ })();
+
+ api.Http = (function() {
+
+ /**
+ * Properties of a Http.
+ * @memberof google.api
+ * @interface IHttp
+ * @property {Array.|null} [rules] Http rules
+ * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion
+ */
+
+ /**
+ * Constructs a new Http.
+ * @memberof google.api
+ * @classdesc Represents a Http.
+ * @implements IHttp
+ * @constructor
+ * @param {google.api.IHttp=} [properties] Properties to set
+ */
+ function Http(properties) {
+ this.rules = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * Http rules.
+ * @member {Array.} rules
+ * @memberof google.api.Http
+ * @instance
+ */
+ Http.prototype.rules = $util.emptyArray;
+
+ /**
+ * Http fullyDecodeReservedExpansion.
+ * @member {boolean} fullyDecodeReservedExpansion
+ * @memberof google.api.Http
+ * @instance
+ */
+ Http.prototype.fullyDecodeReservedExpansion = false;
+
+ /**
+ * Creates a new Http instance using the specified properties.
+ * @function create
+ * @memberof google.api.Http
+ * @static
+ * @param {google.api.IHttp=} [properties] Properties to set
+ * @returns {google.api.Http} Http instance
+ */
+ Http.create = function create(properties) {
+ return new Http(properties);
+ };
+
+ /**
+ * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages.
+ * @function encode
+ * @memberof google.api.Http
+ * @static
+ * @param {google.api.IHttp} message Http message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Http.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.rules != null && message.rules.length)
+ for (var i = 0; i < message.rules.length; ++i)
+ $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion"))
+ writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.api.Http
+ * @static
+ * @param {google.api.IHttp} message Http message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Http.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a Http message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.api.Http
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.api.Http} Http
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Http.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.rules && message.rules.length))
+ message.rules = [];
+ message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32()));
+ break;
+ }
+ case 2: {
+ message.fullyDecodeReservedExpansion = reader.bool();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a Http message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.api.Http
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.api.Http} Http
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Http.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a Http message.
+ * @function verify
+ * @memberof google.api.Http
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ Http.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.rules != null && message.hasOwnProperty("rules")) {
+ if (!Array.isArray(message.rules))
+ return "rules: array expected";
+ for (var i = 0; i < message.rules.length; ++i) {
+ var error = $root.google.api.HttpRule.verify(message.rules[i]);
+ if (error)
+ return "rules." + error;
+ }
+ }
+ if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion"))
+ if (typeof message.fullyDecodeReservedExpansion !== "boolean")
+ return "fullyDecodeReservedExpansion: boolean expected";
+ return null;
+ };
+
+ /**
+ * Creates a Http message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.api.Http
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.api.Http} Http
+ */
+ Http.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.api.Http)
+ return object;
+ var message = new $root.google.api.Http();
+ if (object.rules) {
+ if (!Array.isArray(object.rules))
+ throw TypeError(".google.api.Http.rules: array expected");
+ message.rules = [];
+ for (var i = 0; i < object.rules.length; ++i) {
+ if (typeof object.rules[i] !== "object")
+ throw TypeError(".google.api.Http.rules: object expected");
+ message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]);
+ }
+ }
+ if (object.fullyDecodeReservedExpansion != null)
+ message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a Http message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.api.Http
+ * @static
+ * @param {google.api.Http} message Http
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ Http.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.rules = [];
+ if (options.defaults)
+ object.fullyDecodeReservedExpansion = false;
+ if (message.rules && message.rules.length) {
+ object.rules = [];
+ for (var j = 0; j < message.rules.length; ++j)
+ object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options);
+ }
+ if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion"))
+ object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion;
+ return object;
+ };
+
+ /**
+ * Converts this Http to JSON.
+ * @function toJSON
+ * @memberof google.api.Http
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ Http.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for Http
+ * @function getTypeUrl
+ * @memberof google.api.Http
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.api.Http";
+ };
+
+ return Http;
+ })();
+
+ api.HttpRule = (function() {
+
+ /**
+ * Properties of a HttpRule.
+ * @memberof google.api
+ * @interface IHttpRule
+ * @property {string|null} [selector] HttpRule selector
+ * @property {string|null} [get] HttpRule get
+ * @property {string|null} [put] HttpRule put
+ * @property {string|null} [post] HttpRule post
+ * @property {string|null} ["delete"] HttpRule delete
+ * @property {string|null} [patch] HttpRule patch
+ * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom
+ * @property {string|null} [body] HttpRule body
+ * @property {string|null} [responseBody] HttpRule responseBody
+ * @property {Array.|null} [additionalBindings] HttpRule additionalBindings
+ */
+
+ /**
+ * Constructs a new HttpRule.
+ * @memberof google.api
+ * @classdesc Represents a HttpRule.
+ * @implements IHttpRule
+ * @constructor
+ * @param {google.api.IHttpRule=} [properties] Properties to set
+ */
+ function HttpRule(properties) {
+ this.additionalBindings = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * HttpRule selector.
+ * @member {string} selector
+ * @memberof google.api.HttpRule
+ * @instance
+ */
+ HttpRule.prototype.selector = "";
+
+ /**
+ * HttpRule get.
+ * @member {string|null|undefined} get
+ * @memberof google.api.HttpRule
+ * @instance
+ */
+ HttpRule.prototype.get = null;
+
+ /**
+ * HttpRule put.
+ * @member {string|null|undefined} put
+ * @memberof google.api.HttpRule
+ * @instance
+ */
+ HttpRule.prototype.put = null;
+
+ /**
+ * HttpRule post.
+ * @member {string|null|undefined} post
+ * @memberof google.api.HttpRule
+ * @instance
+ */
+ HttpRule.prototype.post = null;
+
+ /**
+ * HttpRule delete.
+ * @member {string|null|undefined} delete
+ * @memberof google.api.HttpRule
+ * @instance
+ */
+ HttpRule.prototype["delete"] = null;
+
+ /**
+ * HttpRule patch.
+ * @member {string|null|undefined} patch
+ * @memberof google.api.HttpRule
+ * @instance
+ */
+ HttpRule.prototype.patch = null;
+
+ /**
+ * HttpRule custom.
+ * @member {google.api.ICustomHttpPattern|null|undefined} custom
+ * @memberof google.api.HttpRule
+ * @instance
+ */
+ HttpRule.prototype.custom = null;
+
+ /**
+ * HttpRule body.
+ * @member {string} body
+ * @memberof google.api.HttpRule
+ * @instance
+ */
+ HttpRule.prototype.body = "";
+
+ /**
+ * HttpRule responseBody.
+ * @member {string} responseBody
+ * @memberof google.api.HttpRule
+ * @instance
+ */
+ HttpRule.prototype.responseBody = "";
+
+ /**
+ * HttpRule additionalBindings.
+ * @member {Array.} additionalBindings
+ * @memberof google.api.HttpRule
+ * @instance
+ */
+ HttpRule.prototype.additionalBindings = $util.emptyArray;
+
+ // OneOf field names bound to virtual getters and setters
+ var $oneOfFields;
+
+ /**
+ * HttpRule pattern.
+ * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern
+ * @memberof google.api.HttpRule
+ * @instance
+ */
+ Object.defineProperty(HttpRule.prototype, "pattern", {
+ get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * Creates a new HttpRule instance using the specified properties.
+ * @function create
+ * @memberof google.api.HttpRule
+ * @static
+ * @param {google.api.IHttpRule=} [properties] Properties to set
+ * @returns {google.api.HttpRule} HttpRule instance
+ */
+ HttpRule.create = function create(properties) {
+ return new HttpRule(properties);
+ };
+
+ /**
+ * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages.
+ * @function encode
+ * @memberof google.api.HttpRule
+ * @static
+ * @param {google.api.IHttpRule} message HttpRule message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ HttpRule.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.selector != null && Object.hasOwnProperty.call(message, "selector"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector);
+ if (message.get != null && Object.hasOwnProperty.call(message, "get"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.get);
+ if (message.put != null && Object.hasOwnProperty.call(message, "put"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.put);
+ if (message.post != null && Object.hasOwnProperty.call(message, "post"))
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.post);
+ if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete"))
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]);
+ if (message.patch != null && Object.hasOwnProperty.call(message, "patch"))
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch);
+ if (message.body != null && Object.hasOwnProperty.call(message, "body"))
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.body);
+ if (message.custom != null && Object.hasOwnProperty.call(message, "custom"))
+ $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
+ if (message.additionalBindings != null && message.additionalBindings.length)
+ for (var i = 0; i < message.additionalBindings.length; ++i)
+ $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
+ if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody"))
+ writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.api.HttpRule
+ * @static
+ * @param {google.api.IHttpRule} message HttpRule message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ HttpRule.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a HttpRule message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.api.HttpRule
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.api.HttpRule} HttpRule
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ HttpRule.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.selector = reader.string();
+ break;
+ }
+ case 2: {
+ message.get = reader.string();
+ break;
+ }
+ case 3: {
+ message.put = reader.string();
+ break;
+ }
+ case 4: {
+ message.post = reader.string();
+ break;
+ }
+ case 5: {
+ message["delete"] = reader.string();
+ break;
+ }
+ case 6: {
+ message.patch = reader.string();
+ break;
+ }
+ case 8: {
+ message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32());
+ break;
+ }
+ case 7: {
+ message.body = reader.string();
+ break;
+ }
+ case 12: {
+ message.responseBody = reader.string();
+ break;
+ }
+ case 11: {
+ if (!(message.additionalBindings && message.additionalBindings.length))
+ message.additionalBindings = [];
+ message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32()));
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a HttpRule message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.api.HttpRule
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.api.HttpRule} HttpRule
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ HttpRule.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a HttpRule message.
+ * @function verify
+ * @memberof google.api.HttpRule
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ HttpRule.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ var properties = {};
+ if (message.selector != null && message.hasOwnProperty("selector"))
+ if (!$util.isString(message.selector))
+ return "selector: string expected";
+ if (message.get != null && message.hasOwnProperty("get")) {
+ properties.pattern = 1;
+ if (!$util.isString(message.get))
+ return "get: string expected";
+ }
+ if (message.put != null && message.hasOwnProperty("put")) {
+ if (properties.pattern === 1)
+ return "pattern: multiple values";
+ properties.pattern = 1;
+ if (!$util.isString(message.put))
+ return "put: string expected";
+ }
+ if (message.post != null && message.hasOwnProperty("post")) {
+ if (properties.pattern === 1)
+ return "pattern: multiple values";
+ properties.pattern = 1;
+ if (!$util.isString(message.post))
+ return "post: string expected";
+ }
+ if (message["delete"] != null && message.hasOwnProperty("delete")) {
+ if (properties.pattern === 1)
+ return "pattern: multiple values";
+ properties.pattern = 1;
+ if (!$util.isString(message["delete"]))
+ return "delete: string expected";
+ }
+ if (message.patch != null && message.hasOwnProperty("patch")) {
+ if (properties.pattern === 1)
+ return "pattern: multiple values";
+ properties.pattern = 1;
+ if (!$util.isString(message.patch))
+ return "patch: string expected";
+ }
+ if (message.custom != null && message.hasOwnProperty("custom")) {
+ if (properties.pattern === 1)
+ return "pattern: multiple values";
+ properties.pattern = 1;
+ {
+ var error = $root.google.api.CustomHttpPattern.verify(message.custom);
+ if (error)
+ return "custom." + error;
+ }
+ }
+ if (message.body != null && message.hasOwnProperty("body"))
+ if (!$util.isString(message.body))
+ return "body: string expected";
+ if (message.responseBody != null && message.hasOwnProperty("responseBody"))
+ if (!$util.isString(message.responseBody))
+ return "responseBody: string expected";
+ if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) {
+ if (!Array.isArray(message.additionalBindings))
+ return "additionalBindings: array expected";
+ for (var i = 0; i < message.additionalBindings.length; ++i) {
+ var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]);
+ if (error)
+ return "additionalBindings." + error;
+ }
+ }
+ return null;
+ };
+
+ /**
+ * Creates a HttpRule message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.api.HttpRule
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.api.HttpRule} HttpRule
+ */
+ HttpRule.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.api.HttpRule)
+ return object;
+ var message = new $root.google.api.HttpRule();
+ if (object.selector != null)
+ message.selector = String(object.selector);
+ if (object.get != null)
+ message.get = String(object.get);
+ if (object.put != null)
+ message.put = String(object.put);
+ if (object.post != null)
+ message.post = String(object.post);
+ if (object["delete"] != null)
+ message["delete"] = String(object["delete"]);
+ if (object.patch != null)
+ message.patch = String(object.patch);
+ if (object.custom != null) {
+ if (typeof object.custom !== "object")
+ throw TypeError(".google.api.HttpRule.custom: object expected");
+ message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom);
+ }
+ if (object.body != null)
+ message.body = String(object.body);
+ if (object.responseBody != null)
+ message.responseBody = String(object.responseBody);
+ if (object.additionalBindings) {
+ if (!Array.isArray(object.additionalBindings))
+ throw TypeError(".google.api.HttpRule.additionalBindings: array expected");
+ message.additionalBindings = [];
+ for (var i = 0; i < object.additionalBindings.length; ++i) {
+ if (typeof object.additionalBindings[i] !== "object")
+ throw TypeError(".google.api.HttpRule.additionalBindings: object expected");
+ message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]);
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a HttpRule message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.api.HttpRule
+ * @static
+ * @param {google.api.HttpRule} message HttpRule
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ HttpRule.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.additionalBindings = [];
+ if (options.defaults) {
+ object.selector = "";
+ object.body = "";
+ object.responseBody = "";
+ }
+ if (message.selector != null && message.hasOwnProperty("selector"))
+ object.selector = message.selector;
+ if (message.get != null && message.hasOwnProperty("get")) {
+ object.get = message.get;
+ if (options.oneofs)
+ object.pattern = "get";
+ }
+ if (message.put != null && message.hasOwnProperty("put")) {
+ object.put = message.put;
+ if (options.oneofs)
+ object.pattern = "put";
+ }
+ if (message.post != null && message.hasOwnProperty("post")) {
+ object.post = message.post;
+ if (options.oneofs)
+ object.pattern = "post";
+ }
+ if (message["delete"] != null && message.hasOwnProperty("delete")) {
+ object["delete"] = message["delete"];
+ if (options.oneofs)
+ object.pattern = "delete";
+ }
+ if (message.patch != null && message.hasOwnProperty("patch")) {
+ object.patch = message.patch;
+ if (options.oneofs)
+ object.pattern = "patch";
+ }
+ if (message.body != null && message.hasOwnProperty("body"))
+ object.body = message.body;
+ if (message.custom != null && message.hasOwnProperty("custom")) {
+ object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options);
+ if (options.oneofs)
+ object.pattern = "custom";
+ }
+ if (message.additionalBindings && message.additionalBindings.length) {
+ object.additionalBindings = [];
+ for (var j = 0; j < message.additionalBindings.length; ++j)
+ object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options);
+ }
+ if (message.responseBody != null && message.hasOwnProperty("responseBody"))
+ object.responseBody = message.responseBody;
+ return object;
+ };
+
+ /**
+ * Converts this HttpRule to JSON.
+ * @function toJSON
+ * @memberof google.api.HttpRule
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ HttpRule.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for HttpRule
+ * @function getTypeUrl
+ * @memberof google.api.HttpRule
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.api.HttpRule";
+ };
+
+ return HttpRule;
+ })();
+
+ api.CustomHttpPattern = (function() {
+
+ /**
+ * Properties of a CustomHttpPattern.
+ * @memberof google.api
+ * @interface ICustomHttpPattern
+ * @property {string|null} [kind] CustomHttpPattern kind
+ * @property {string|null} [path] CustomHttpPattern path
+ */
+
+ /**
+ * Constructs a new CustomHttpPattern.
+ * @memberof google.api
+ * @classdesc Represents a CustomHttpPattern.
+ * @implements ICustomHttpPattern
+ * @constructor
+ * @param {google.api.ICustomHttpPattern=} [properties] Properties to set
+ */
+ function CustomHttpPattern(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * CustomHttpPattern kind.
+ * @member {string} kind
+ * @memberof google.api.CustomHttpPattern
+ * @instance
+ */
+ CustomHttpPattern.prototype.kind = "";
+
+ /**
+ * CustomHttpPattern path.
+ * @member {string} path
+ * @memberof google.api.CustomHttpPattern
+ * @instance
+ */
+ CustomHttpPattern.prototype.path = "";
+
+ /**
+ * Creates a new CustomHttpPattern instance using the specified properties.
+ * @function create
+ * @memberof google.api.CustomHttpPattern
+ * @static
+ * @param {google.api.ICustomHttpPattern=} [properties] Properties to set
+ * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance
+ */
+ CustomHttpPattern.create = function create(properties) {
+ return new CustomHttpPattern(properties);
+ };
+
+ /**
+ * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages.
+ * @function encode
+ * @memberof google.api.CustomHttpPattern
+ * @static
+ * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CustomHttpPattern.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.kind != null && Object.hasOwnProperty.call(message, "kind"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind);
+ if (message.path != null && Object.hasOwnProperty.call(message, "path"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.path);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.api.CustomHttpPattern
+ * @static
+ * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a CustomHttpPattern message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.api.CustomHttpPattern
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.api.CustomHttpPattern} CustomHttpPattern
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CustomHttpPattern.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.kind = reader.string();
+ break;
+ }
+ case 2: {
+ message.path = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.api.CustomHttpPattern
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.api.CustomHttpPattern} CustomHttpPattern
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a CustomHttpPattern message.
+ * @function verify
+ * @memberof google.api.CustomHttpPattern
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ CustomHttpPattern.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.kind != null && message.hasOwnProperty("kind"))
+ if (!$util.isString(message.kind))
+ return "kind: string expected";
+ if (message.path != null && message.hasOwnProperty("path"))
+ if (!$util.isString(message.path))
+ return "path: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.api.CustomHttpPattern
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.api.CustomHttpPattern} CustomHttpPattern
+ */
+ CustomHttpPattern.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.api.CustomHttpPattern)
+ return object;
+ var message = new $root.google.api.CustomHttpPattern();
+ if (object.kind != null)
+ message.kind = String(object.kind);
+ if (object.path != null)
+ message.path = String(object.path);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.api.CustomHttpPattern
+ * @static
+ * @param {google.api.CustomHttpPattern} message CustomHttpPattern
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ CustomHttpPattern.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.kind = "";
+ object.path = "";
+ }
+ if (message.kind != null && message.hasOwnProperty("kind"))
+ object.kind = message.kind;
+ if (message.path != null && message.hasOwnProperty("path"))
+ object.path = message.path;
+ return object;
+ };
+
+ /**
+ * Converts this CustomHttpPattern to JSON.
+ * @function toJSON
+ * @memberof google.api.CustomHttpPattern
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ CustomHttpPattern.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for CustomHttpPattern
+ * @function getTypeUrl
+ * @memberof google.api.CustomHttpPattern
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.api.CustomHttpPattern";
+ };
+
+ return CustomHttpPattern;
+ })();
+
+ return api;
+ })();
+
+ google.protobuf = (function() {
+
+ /**
+ * Namespace protobuf.
+ * @memberof google
+ * @namespace
+ */
+ var protobuf = {};
+
+ protobuf.FileDescriptorSet = (function() {
+
+ /**
+ * Properties of a FileDescriptorSet.
+ * @memberof google.protobuf
+ * @interface IFileDescriptorSet
+ * @property {Array.|null} [file] FileDescriptorSet file
+ */
+
+ /**
+ * Constructs a new FileDescriptorSet.
+ * @memberof google.protobuf
+ * @classdesc Represents a FileDescriptorSet.
+ * @implements IFileDescriptorSet
+ * @constructor
+ * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set
+ */
+ function FileDescriptorSet(properties) {
+ this.file = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * FileDescriptorSet file.
+ * @member {Array.} file
+ * @memberof google.protobuf.FileDescriptorSet
+ * @instance
+ */
+ FileDescriptorSet.prototype.file = $util.emptyArray;
+
+ /**
+ * Creates a new FileDescriptorSet instance using the specified properties.
+ * @function create
+ * @memberof google.protobuf.FileDescriptorSet
+ * @static
+ * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set
+ * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance
+ */
+ FileDescriptorSet.create = function create(properties) {
+ return new FileDescriptorSet(properties);
+ };
+
+ /**
+ * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages.
+ * @function encode
+ * @memberof google.protobuf.FileDescriptorSet
+ * @static
+ * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ FileDescriptorSet.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.file != null && message.file.length)
+ for (var i = 0; i < message.file.length; ++i)
+ $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.protobuf.FileDescriptorSet
+ * @static
+ * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a FileDescriptorSet message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.protobuf.FileDescriptorSet
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ FileDescriptorSet.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.file && message.file.length))
+ message.file = [];
+ message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32()));
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.protobuf.FileDescriptorSet
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a FileDescriptorSet message.
+ * @function verify
+ * @memberof google.protobuf.FileDescriptorSet
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ FileDescriptorSet.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.file != null && message.hasOwnProperty("file")) {
+ if (!Array.isArray(message.file))
+ return "file: array expected";
+ for (var i = 0; i < message.file.length; ++i) {
+ var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]);
+ if (error)
+ return "file." + error;
+ }
+ }
+ return null;
+ };
+
+ /**
+ * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.protobuf.FileDescriptorSet
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet
+ */
+ FileDescriptorSet.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.protobuf.FileDescriptorSet)
+ return object;
+ var message = new $root.google.protobuf.FileDescriptorSet();
+ if (object.file) {
+ if (!Array.isArray(object.file))
+ throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected");
+ message.file = [];
+ for (var i = 0; i < object.file.length; ++i) {
+ if (typeof object.file[i] !== "object")
+ throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected");
+ message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]);
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.protobuf.FileDescriptorSet
+ * @static
+ * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ FileDescriptorSet.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.file = [];
+ if (message.file && message.file.length) {
+ object.file = [];
+ for (var j = 0; j < message.file.length; ++j)
+ object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options);
+ }
+ return object;
+ };
+
+ /**
+ * Converts this FileDescriptorSet to JSON.
+ * @function toJSON
+ * @memberof google.protobuf.FileDescriptorSet
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ FileDescriptorSet.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for FileDescriptorSet
+ * @function getTypeUrl
+ * @memberof google.protobuf.FileDescriptorSet
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.protobuf.FileDescriptorSet";
+ };
+
+ return FileDescriptorSet;
+ })();
+
+ protobuf.FileDescriptorProto = (function() {
+
+ /**
+ * Properties of a FileDescriptorProto.
+ * @memberof google.protobuf
+ * @interface IFileDescriptorProto
+ * @property {string|null} [name] FileDescriptorProto name
+ * @property {string|null} ["package"] FileDescriptorProto package
+ * @property {Array.|null} [dependency] FileDescriptorProto dependency
+ * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency
+ * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency
+ * @property {Array.|null} [messageType] FileDescriptorProto messageType
+ * @property {Array.|null} [enumType] FileDescriptorProto enumType
+ * @property {Array.|null} [service] FileDescriptorProto service
+ * @property {Array.|null} [extension] FileDescriptorProto extension
+ * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options
+ * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo
+ * @property {string|null} [syntax] FileDescriptorProto syntax
+ * @property {string|null} [edition] FileDescriptorProto edition
+ */
+
+ /**
+ * Constructs a new FileDescriptorProto.
+ * @memberof google.protobuf
+ * @classdesc Represents a FileDescriptorProto.
+ * @implements IFileDescriptorProto
+ * @constructor
+ * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set
+ */
+ function FileDescriptorProto(properties) {
+ this.dependency = [];
+ this.publicDependency = [];
+ this.weakDependency = [];
+ this.messageType = [];
+ this.enumType = [];
+ this.service = [];
+ this.extension = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * FileDescriptorProto name.
+ * @member {string} name
+ * @memberof google.protobuf.FileDescriptorProto
+ * @instance
+ */
+ FileDescriptorProto.prototype.name = "";
+
+ /**
+ * FileDescriptorProto package.
+ * @member {string} package
+ * @memberof google.protobuf.FileDescriptorProto
+ * @instance
+ */
+ FileDescriptorProto.prototype["package"] = "";
+
+ /**
+ * FileDescriptorProto dependency.
+ * @member {Array.} dependency
+ * @memberof google.protobuf.FileDescriptorProto
+ * @instance
+ */
+ FileDescriptorProto.prototype.dependency = $util.emptyArray;
+
+ /**
+ * FileDescriptorProto publicDependency.
+ * @member {Array.} publicDependency
+ * @memberof google.protobuf.FileDescriptorProto
+ * @instance
+ */
+ FileDescriptorProto.prototype.publicDependency = $util.emptyArray;
+
+ /**
+ * FileDescriptorProto weakDependency.
+ * @member {Array.} weakDependency
+ * @memberof google.protobuf.FileDescriptorProto
+ * @instance
+ */
+ FileDescriptorProto.prototype.weakDependency = $util.emptyArray;
+
+ /**
+ * FileDescriptorProto messageType.
+ * @member {Array.} messageType
+ * @memberof google.protobuf.FileDescriptorProto
+ * @instance
+ */
+ FileDescriptorProto.prototype.messageType = $util.emptyArray;
+
+ /**
+ * FileDescriptorProto enumType.
+ * @member {Array.} enumType
+ * @memberof google.protobuf.FileDescriptorProto
+ * @instance
+ */
+ FileDescriptorProto.prototype.enumType = $util.emptyArray;
+
+ /**
+ * FileDescriptorProto service.
+ * @member {Array.} service
+ * @memberof google.protobuf.FileDescriptorProto
+ * @instance
+ */
+ FileDescriptorProto.prototype.service = $util.emptyArray;
+
+ /**
+ * FileDescriptorProto extension.
+ * @member {Array.} extension
+ * @memberof google.protobuf.FileDescriptorProto
+ * @instance
+ */
+ FileDescriptorProto.prototype.extension = $util.emptyArray;
+
+ /**
+ * FileDescriptorProto options.
+ * @member {google.protobuf.IFileOptions|null|undefined} options
+ * @memberof google.protobuf.FileDescriptorProto
+ * @instance
+ */
+ FileDescriptorProto.prototype.options = null;
+
+ /**
+ * FileDescriptorProto sourceCodeInfo.
+ * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo
+ * @memberof google.protobuf.FileDescriptorProto
+ * @instance
+ */
+ FileDescriptorProto.prototype.sourceCodeInfo = null;
+
+ /**
+ * FileDescriptorProto syntax.
+ * @member {string} syntax
+ * @memberof google.protobuf.FileDescriptorProto
+ * @instance
+ */
+ FileDescriptorProto.prototype.syntax = "";
+
+ /**
+ * FileDescriptorProto edition.
+ * @member {string} edition
+ * @memberof google.protobuf.FileDescriptorProto
+ * @instance
+ */
+ FileDescriptorProto.prototype.edition = "";
+
+ /**
+ * Creates a new FileDescriptorProto instance using the specified properties.
+ * @function create
+ * @memberof google.protobuf.FileDescriptorProto
+ * @static
+ * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set
+ * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance
+ */
+ FileDescriptorProto.create = function create(properties) {
+ return new FileDescriptorProto(properties);
+ };
+
+ /**
+ * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages.
+ * @function encode
+ * @memberof google.protobuf.FileDescriptorProto
+ * @static
+ * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ FileDescriptorProto.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ if (message["package"] != null && Object.hasOwnProperty.call(message, "package"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]);
+ if (message.dependency != null && message.dependency.length)
+ for (var i = 0; i < message.dependency.length; ++i)
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]);
+ if (message.messageType != null && message.messageType.length)
+ for (var i = 0; i < message.messageType.length; ++i)
+ $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
+ if (message.enumType != null && message.enumType.length)
+ for (var i = 0; i < message.enumType.length; ++i)
+ $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
+ if (message.service != null && message.service.length)
+ for (var i = 0; i < message.service.length; ++i)
+ $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
+ if (message.extension != null && message.extension.length)
+ for (var i = 0; i < message.extension.length; ++i)
+ $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
+ if (message.options != null && Object.hasOwnProperty.call(message, "options"))
+ $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
+ if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo"))
+ $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
+ if (message.publicDependency != null && message.publicDependency.length)
+ for (var i = 0; i < message.publicDependency.length; ++i)
+ writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]);
+ if (message.weakDependency != null && message.weakDependency.length)
+ for (var i = 0; i < message.weakDependency.length; ++i)
+ writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]);
+ if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax"))
+ writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax);
+ if (message.edition != null && Object.hasOwnProperty.call(message, "edition"))
+ writer.uint32(/* id 13, wireType 2 =*/106).string(message.edition);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.protobuf.FileDescriptorProto
+ * @static
+ * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a FileDescriptorProto message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.protobuf.FileDescriptorProto
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ FileDescriptorProto.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 2: {
+ message["package"] = reader.string();
+ break;
+ }
+ case 3: {
+ if (!(message.dependency && message.dependency.length))
+ message.dependency = [];
+ message.dependency.push(reader.string());
+ break;
+ }
+ case 10: {
+ if (!(message.publicDependency && message.publicDependency.length))
+ message.publicDependency = [];
+ if ((tag & 7) === 2) {
+ var end2 = reader.uint32() + reader.pos;
+ while (reader.pos < end2)
+ message.publicDependency.push(reader.int32());
+ } else
+ message.publicDependency.push(reader.int32());
+ break;
+ }
+ case 11: {
+ if (!(message.weakDependency && message.weakDependency.length))
+ message.weakDependency = [];
+ if ((tag & 7) === 2) {
+ var end2 = reader.uint32() + reader.pos;
+ while (reader.pos < end2)
+ message.weakDependency.push(reader.int32());
+ } else
+ message.weakDependency.push(reader.int32());
+ break;
+ }
+ case 4: {
+ if (!(message.messageType && message.messageType.length))
+ message.messageType = [];
+ message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32()));
+ break;
+ }
+ case 5: {
+ if (!(message.enumType && message.enumType.length))
+ message.enumType = [];
+ message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32()));
+ break;
+ }
+ case 6: {
+ if (!(message.service && message.service.length))
+ message.service = [];
+ message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32()));
+ break;
+ }
+ case 7: {
+ if (!(message.extension && message.extension.length))
+ message.extension = [];
+ message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32()));
+ break;
+ }
+ case 8: {
+ message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32());
+ break;
+ }
+ case 9: {
+ message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32());
+ break;
+ }
+ case 12: {
+ message.syntax = reader.string();
+ break;
+ }
+ case 13: {
+ message.edition = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.protobuf.FileDescriptorProto
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a FileDescriptorProto message.
+ * @function verify
+ * @memberof google.protobuf.FileDescriptorProto
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ FileDescriptorProto.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message["package"] != null && message.hasOwnProperty("package"))
+ if (!$util.isString(message["package"]))
+ return "package: string expected";
+ if (message.dependency != null && message.hasOwnProperty("dependency")) {
+ if (!Array.isArray(message.dependency))
+ return "dependency: array expected";
+ for (var i = 0; i < message.dependency.length; ++i)
+ if (!$util.isString(message.dependency[i]))
+ return "dependency: string[] expected";
+ }
+ if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) {
+ if (!Array.isArray(message.publicDependency))
+ return "publicDependency: array expected";
+ for (var i = 0; i < message.publicDependency.length; ++i)
+ if (!$util.isInteger(message.publicDependency[i]))
+ return "publicDependency: integer[] expected";
+ }
+ if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) {
+ if (!Array.isArray(message.weakDependency))
+ return "weakDependency: array expected";
+ for (var i = 0; i < message.weakDependency.length; ++i)
+ if (!$util.isInteger(message.weakDependency[i]))
+ return "weakDependency: integer[] expected";
+ }
+ if (message.messageType != null && message.hasOwnProperty("messageType")) {
+ if (!Array.isArray(message.messageType))
+ return "messageType: array expected";
+ for (var i = 0; i < message.messageType.length; ++i) {
+ var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]);
+ if (error)
+ return "messageType." + error;
+ }
+ }
+ if (message.enumType != null && message.hasOwnProperty("enumType")) {
+ if (!Array.isArray(message.enumType))
+ return "enumType: array expected";
+ for (var i = 0; i < message.enumType.length; ++i) {
+ var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]);
+ if (error)
+ return "enumType." + error;
+ }
+ }
+ if (message.service != null && message.hasOwnProperty("service")) {
+ if (!Array.isArray(message.service))
+ return "service: array expected";
+ for (var i = 0; i < message.service.length; ++i) {
+ var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]);
+ if (error)
+ return "service." + error;
+ }
+ }
+ if (message.extension != null && message.hasOwnProperty("extension")) {
+ if (!Array.isArray(message.extension))
+ return "extension: array expected";
+ for (var i = 0; i < message.extension.length; ++i) {
+ var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]);
+ if (error)
+ return "extension." + error;
+ }
+ }
+ if (message.options != null && message.hasOwnProperty("options")) {
+ var error = $root.google.protobuf.FileOptions.verify(message.options);
+ if (error)
+ return "options." + error;
+ }
+ if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) {
+ var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo);
+ if (error)
+ return "sourceCodeInfo." + error;
+ }
+ if (message.syntax != null && message.hasOwnProperty("syntax"))
+ if (!$util.isString(message.syntax))
+ return "syntax: string expected";
+ if (message.edition != null && message.hasOwnProperty("edition"))
+ if (!$util.isString(message.edition))
+ return "edition: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.protobuf.FileDescriptorProto
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto
+ */
+ FileDescriptorProto.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.protobuf.FileDescriptorProto)
+ return object;
+ var message = new $root.google.protobuf.FileDescriptorProto();
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object["package"] != null)
+ message["package"] = String(object["package"]);
+ if (object.dependency) {
+ if (!Array.isArray(object.dependency))
+ throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected");
+ message.dependency = [];
+ for (var i = 0; i < object.dependency.length; ++i)
+ message.dependency[i] = String(object.dependency[i]);
+ }
+ if (object.publicDependency) {
+ if (!Array.isArray(object.publicDependency))
+ throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected");
+ message.publicDependency = [];
+ for (var i = 0; i < object.publicDependency.length; ++i)
+ message.publicDependency[i] = object.publicDependency[i] | 0;
+ }
+ if (object.weakDependency) {
+ if (!Array.isArray(object.weakDependency))
+ throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected");
+ message.weakDependency = [];
+ for (var i = 0; i < object.weakDependency.length; ++i)
+ message.weakDependency[i] = object.weakDependency[i] | 0;
+ }
+ if (object.messageType) {
+ if (!Array.isArray(object.messageType))
+ throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected");
+ message.messageType = [];
+ for (var i = 0; i < object.messageType.length; ++i) {
+ if (typeof object.messageType[i] !== "object")
+ throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected");
+ message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]);
+ }
+ }
+ if (object.enumType) {
+ if (!Array.isArray(object.enumType))
+ throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected");
+ message.enumType = [];
+ for (var i = 0; i < object.enumType.length; ++i) {
+ if (typeof object.enumType[i] !== "object")
+ throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected");
+ message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]);
+ }
+ }
+ if (object.service) {
+ if (!Array.isArray(object.service))
+ throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected");
+ message.service = [];
+ for (var i = 0; i < object.service.length; ++i) {
+ if (typeof object.service[i] !== "object")
+ throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected");
+ message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]);
+ }
+ }
+ if (object.extension) {
+ if (!Array.isArray(object.extension))
+ throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected");
+ message.extension = [];
+ for (var i = 0; i < object.extension.length; ++i) {
+ if (typeof object.extension[i] !== "object")
+ throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected");
+ message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]);
+ }
+ }
+ if (object.options != null) {
+ if (typeof object.options !== "object")
+ throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected");
+ message.options = $root.google.protobuf.FileOptions.fromObject(object.options);
+ }
+ if (object.sourceCodeInfo != null) {
+ if (typeof object.sourceCodeInfo !== "object")
+ throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected");
+ message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo);
+ }
+ if (object.syntax != null)
+ message.syntax = String(object.syntax);
+ if (object.edition != null)
+ message.edition = String(object.edition);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.protobuf.FileDescriptorProto
+ * @static
+ * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ FileDescriptorProto.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults) {
+ object.dependency = [];
+ object.messageType = [];
+ object.enumType = [];
+ object.service = [];
+ object.extension = [];
+ object.publicDependency = [];
+ object.weakDependency = [];
+ }
+ if (options.defaults) {
+ object.name = "";
+ object["package"] = "";
+ object.options = null;
+ object.sourceCodeInfo = null;
+ object.syntax = "";
+ object.edition = "";
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message["package"] != null && message.hasOwnProperty("package"))
+ object["package"] = message["package"];
+ if (message.dependency && message.dependency.length) {
+ object.dependency = [];
+ for (var j = 0; j < message.dependency.length; ++j)
+ object.dependency[j] = message.dependency[j];
+ }
+ if (message.messageType && message.messageType.length) {
+ object.messageType = [];
+ for (var j = 0; j < message.messageType.length; ++j)
+ object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options);
+ }
+ if (message.enumType && message.enumType.length) {
+ object.enumType = [];
+ for (var j = 0; j < message.enumType.length; ++j)
+ object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options);
+ }
+ if (message.service && message.service.length) {
+ object.service = [];
+ for (var j = 0; j < message.service.length; ++j)
+ object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options);
+ }
+ if (message.extension && message.extension.length) {
+ object.extension = [];
+ for (var j = 0; j < message.extension.length; ++j)
+ object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options);
+ }
+ if (message.options != null && message.hasOwnProperty("options"))
+ object.options = $root.google.protobuf.FileOptions.toObject(message.options, options);
+ if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo"))
+ object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options);
+ if (message.publicDependency && message.publicDependency.length) {
+ object.publicDependency = [];
+ for (var j = 0; j < message.publicDependency.length; ++j)
+ object.publicDependency[j] = message.publicDependency[j];
+ }
+ if (message.weakDependency && message.weakDependency.length) {
+ object.weakDependency = [];
+ for (var j = 0; j < message.weakDependency.length; ++j)
+ object.weakDependency[j] = message.weakDependency[j];
+ }
+ if (message.syntax != null && message.hasOwnProperty("syntax"))
+ object.syntax = message.syntax;
+ if (message.edition != null && message.hasOwnProperty("edition"))
+ object.edition = message.edition;
+ return object;
+ };
+
+ /**
+ * Converts this FileDescriptorProto to JSON.
+ * @function toJSON
+ * @memberof google.protobuf.FileDescriptorProto
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ FileDescriptorProto.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for FileDescriptorProto
+ * @function getTypeUrl
+ * @memberof google.protobuf.FileDescriptorProto
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.protobuf.FileDescriptorProto";
+ };
+
+ return FileDescriptorProto;
+ })();
+
+ protobuf.DescriptorProto = (function() {
+
+ /**
+ * Properties of a DescriptorProto.
+ * @memberof google.protobuf
+ * @interface IDescriptorProto
+ * @property {string|null} [name] DescriptorProto name
+ * @property {Array.|null} [field] DescriptorProto field
+ * @property {Array.|null} [extension] DescriptorProto extension
+ * @property {Array.|null} [nestedType] DescriptorProto nestedType
+ * @property {Array.|null} [enumType] DescriptorProto enumType
+ * @property {Array.|null} [extensionRange] DescriptorProto extensionRange
+ * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl
+ * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options
+ * @property {Array.|null} [reservedRange] DescriptorProto reservedRange
+ * @property {Array.|null} [reservedName] DescriptorProto reservedName
+ */
+
+ /**
+ * Constructs a new DescriptorProto.
+ * @memberof google.protobuf
+ * @classdesc Represents a DescriptorProto.
+ * @implements IDescriptorProto
+ * @constructor
+ * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set
+ */
+ function DescriptorProto(properties) {
+ this.field = [];
+ this.extension = [];
+ this.nestedType = [];
+ this.enumType = [];
+ this.extensionRange = [];
+ this.oneofDecl = [];
+ this.reservedRange = [];
+ this.reservedName = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * DescriptorProto name.
+ * @member {string} name
+ * @memberof google.protobuf.DescriptorProto
+ * @instance
+ */
+ DescriptorProto.prototype.name = "";
+
+ /**
+ * DescriptorProto field.
+ * @member {Array.} field
+ * @memberof google.protobuf.DescriptorProto
+ * @instance
+ */
+ DescriptorProto.prototype.field = $util.emptyArray;
+
+ /**
+ * DescriptorProto extension.
+ * @member {Array.} extension
+ * @memberof google.protobuf.DescriptorProto
+ * @instance
+ */
+ DescriptorProto.prototype.extension = $util.emptyArray;
+
+ /**
+ * DescriptorProto nestedType.
+ * @member {Array.} nestedType
+ * @memberof google.protobuf.DescriptorProto
+ * @instance
+ */
+ DescriptorProto.prototype.nestedType = $util.emptyArray;
+
+ /**
+ * DescriptorProto enumType.
+ * @member {Array.} enumType
+ * @memberof google.protobuf.DescriptorProto
+ * @instance
+ */
+ DescriptorProto.prototype.enumType = $util.emptyArray;
+
+ /**
+ * DescriptorProto extensionRange.
+ * @member {Array.} extensionRange
+ * @memberof google.protobuf.DescriptorProto
+ * @instance
+ */
+ DescriptorProto.prototype.extensionRange = $util.emptyArray;
+
+ /**
+ * DescriptorProto oneofDecl.
+ * @member {Array.} oneofDecl
+ * @memberof google.protobuf.DescriptorProto
+ * @instance
+ */
+ DescriptorProto.prototype.oneofDecl = $util.emptyArray;
+
+ /**
+ * DescriptorProto options.
+ * @member {google.protobuf.IMessageOptions|null|undefined} options
+ * @memberof google.protobuf.DescriptorProto
+ * @instance
+ */
+ DescriptorProto.prototype.options = null;
+
+ /**
+ * DescriptorProto reservedRange.
+ * @member {Array.} reservedRange
+ * @memberof google.protobuf.DescriptorProto
+ * @instance
+ */
+ DescriptorProto.prototype.reservedRange = $util.emptyArray;
+
+ /**
+ * DescriptorProto reservedName.
+ * @member {Array.} reservedName
+ * @memberof google.protobuf.DescriptorProto
+ * @instance
+ */
+ DescriptorProto.prototype.reservedName = $util.emptyArray;
+
+ /**
+ * Creates a new DescriptorProto instance using the specified properties.
+ * @function create
+ * @memberof google.protobuf.DescriptorProto
+ * @static
+ * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set
+ * @returns {google.protobuf.DescriptorProto} DescriptorProto instance
+ */
+ DescriptorProto.create = function create(properties) {
+ return new DescriptorProto(properties);
+ };
+
+ /**
+ * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages.
+ * @function encode
+ * @memberof google.protobuf.DescriptorProto
+ * @static
+ * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ DescriptorProto.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ if (message.field != null && message.field.length)
+ for (var i = 0; i < message.field.length; ++i)
+ $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ if (message.nestedType != null && message.nestedType.length)
+ for (var i = 0; i < message.nestedType.length; ++i)
+ $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ if (message.enumType != null && message.enumType.length)
+ for (var i = 0; i < message.enumType.length; ++i)
+ $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
+ if (message.extensionRange != null && message.extensionRange.length)
+ for (var i = 0; i < message.extensionRange.length; ++i)
+ $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
+ if (message.extension != null && message.extension.length)
+ for (var i = 0; i < message.extension.length; ++i)
+ $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
+ if (message.options != null && Object.hasOwnProperty.call(message, "options"))
+ $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
+ if (message.oneofDecl != null && message.oneofDecl.length)
+ for (var i = 0; i < message.oneofDecl.length; ++i)
+ $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
+ if (message.reservedRange != null && message.reservedRange.length)
+ for (var i = 0; i < message.reservedRange.length; ++i)
+ $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
+ if (message.reservedName != null && message.reservedName.length)
+ for (var i = 0; i < message.reservedName.length; ++i)
+ writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.protobuf.DescriptorProto
+ * @static
+ * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a DescriptorProto message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.protobuf.DescriptorProto
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.protobuf.DescriptorProto} DescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ DescriptorProto.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 2: {
+ if (!(message.field && message.field.length))
+ message.field = [];
+ message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32()));
+ break;
+ }
+ case 6: {
+ if (!(message.extension && message.extension.length))
+ message.extension = [];
+ message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32()));
+ break;
+ }
+ case 3: {
+ if (!(message.nestedType && message.nestedType.length))
+ message.nestedType = [];
+ message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32()));
+ break;
+ }
+ case 4: {
+ if (!(message.enumType && message.enumType.length))
+ message.enumType = [];
+ message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32()));
+ break;
+ }
+ case 5: {
+ if (!(message.extensionRange && message.extensionRange.length))
+ message.extensionRange = [];
+ message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32()));
+ break;
+ }
+ case 8: {
+ if (!(message.oneofDecl && message.oneofDecl.length))
+ message.oneofDecl = [];
+ message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32()));
+ break;
+ }
+ case 7: {
+ message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32());
+ break;
+ }
+ case 9: {
+ if (!(message.reservedRange && message.reservedRange.length))
+ message.reservedRange = [];
+ message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32()));
+ break;
+ }
+ case 10: {
+ if (!(message.reservedName && message.reservedName.length))
+ message.reservedName = [];
+ message.reservedName.push(reader.string());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a DescriptorProto message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.protobuf.DescriptorProto
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.protobuf.DescriptorProto} DescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ DescriptorProto.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a DescriptorProto message.
+ * @function verify
+ * @memberof google.protobuf.DescriptorProto
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ DescriptorProto.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.field != null && message.hasOwnProperty("field")) {
+ if (!Array.isArray(message.field))
+ return "field: array expected";
+ for (var i = 0; i < message.field.length; ++i) {
+ var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]);
+ if (error)
+ return "field." + error;
+ }
+ }
+ if (message.extension != null && message.hasOwnProperty("extension")) {
+ if (!Array.isArray(message.extension))
+ return "extension: array expected";
+ for (var i = 0; i < message.extension.length; ++i) {
+ var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]);
+ if (error)
+ return "extension." + error;
+ }
+ }
+ if (message.nestedType != null && message.hasOwnProperty("nestedType")) {
+ if (!Array.isArray(message.nestedType))
+ return "nestedType: array expected";
+ for (var i = 0; i < message.nestedType.length; ++i) {
+ var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]);
+ if (error)
+ return "nestedType." + error;
+ }
+ }
+ if (message.enumType != null && message.hasOwnProperty("enumType")) {
+ if (!Array.isArray(message.enumType))
+ return "enumType: array expected";
+ for (var i = 0; i < message.enumType.length; ++i) {
+ var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]);
+ if (error)
+ return "enumType." + error;
+ }
+ }
+ if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) {
+ if (!Array.isArray(message.extensionRange))
+ return "extensionRange: array expected";
+ for (var i = 0; i < message.extensionRange.length; ++i) {
+ var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]);
+ if (error)
+ return "extensionRange." + error;
+ }
+ }
+ if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) {
+ if (!Array.isArray(message.oneofDecl))
+ return "oneofDecl: array expected";
+ for (var i = 0; i < message.oneofDecl.length; ++i) {
+ var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]);
+ if (error)
+ return "oneofDecl." + error;
+ }
+ }
+ if (message.options != null && message.hasOwnProperty("options")) {
+ var error = $root.google.protobuf.MessageOptions.verify(message.options);
+ if (error)
+ return "options." + error;
+ }
+ if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) {
+ if (!Array.isArray(message.reservedRange))
+ return "reservedRange: array expected";
+ for (var i = 0; i < message.reservedRange.length; ++i) {
+ var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]);
+ if (error)
+ return "reservedRange." + error;
+ }
+ }
+ if (message.reservedName != null && message.hasOwnProperty("reservedName")) {
+ if (!Array.isArray(message.reservedName))
+ return "reservedName: array expected";
+ for (var i = 0; i < message.reservedName.length; ++i)
+ if (!$util.isString(message.reservedName[i]))
+ return "reservedName: string[] expected";
+ }
+ return null;
+ };
+
+ /**
+ * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.protobuf.DescriptorProto
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.protobuf.DescriptorProto} DescriptorProto
+ */
+ DescriptorProto.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.protobuf.DescriptorProto)
+ return object;
+ var message = new $root.google.protobuf.DescriptorProto();
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object.field) {
+ if (!Array.isArray(object.field))
+ throw TypeError(".google.protobuf.DescriptorProto.field: array expected");
+ message.field = [];
+ for (var i = 0; i < object.field.length; ++i) {
+ if (typeof object.field[i] !== "object")
+ throw TypeError(".google.protobuf.DescriptorProto.field: object expected");
+ message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]);
+ }
+ }
+ if (object.extension) {
+ if (!Array.isArray(object.extension))
+ throw TypeError(".google.protobuf.DescriptorProto.extension: array expected");
+ message.extension = [];
+ for (var i = 0; i < object.extension.length; ++i) {
+ if (typeof object.extension[i] !== "object")
+ throw TypeError(".google.protobuf.DescriptorProto.extension: object expected");
+ message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]);
+ }
+ }
+ if (object.nestedType) {
+ if (!Array.isArray(object.nestedType))
+ throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected");
+ message.nestedType = [];
+ for (var i = 0; i < object.nestedType.length; ++i) {
+ if (typeof object.nestedType[i] !== "object")
+ throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected");
+ message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]);
+ }
+ }
+ if (object.enumType) {
+ if (!Array.isArray(object.enumType))
+ throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected");
+ message.enumType = [];
+ for (var i = 0; i < object.enumType.length; ++i) {
+ if (typeof object.enumType[i] !== "object")
+ throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected");
+ message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]);
+ }
+ }
+ if (object.extensionRange) {
+ if (!Array.isArray(object.extensionRange))
+ throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected");
+ message.extensionRange = [];
+ for (var i = 0; i < object.extensionRange.length; ++i) {
+ if (typeof object.extensionRange[i] !== "object")
+ throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected");
+ message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]);
+ }
+ }
+ if (object.oneofDecl) {
+ if (!Array.isArray(object.oneofDecl))
+ throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected");
+ message.oneofDecl = [];
+ for (var i = 0; i < object.oneofDecl.length; ++i) {
+ if (typeof object.oneofDecl[i] !== "object")
+ throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected");
+ message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]);
+ }
+ }
+ if (object.options != null) {
+ if (typeof object.options !== "object")
+ throw TypeError(".google.protobuf.DescriptorProto.options: object expected");
+ message.options = $root.google.protobuf.MessageOptions.fromObject(object.options);
+ }
+ if (object.reservedRange) {
+ if (!Array.isArray(object.reservedRange))
+ throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected");
+ message.reservedRange = [];
+ for (var i = 0; i < object.reservedRange.length; ++i) {
+ if (typeof object.reservedRange[i] !== "object")
+ throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected");
+ message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]);
+ }
+ }
+ if (object.reservedName) {
+ if (!Array.isArray(object.reservedName))
+ throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected");
+ message.reservedName = [];
+ for (var i = 0; i < object.reservedName.length; ++i)
+ message.reservedName[i] = String(object.reservedName[i]);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.protobuf.DescriptorProto
+ * @static
+ * @param {google.protobuf.DescriptorProto} message DescriptorProto
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ DescriptorProto.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults) {
+ object.field = [];
+ object.nestedType = [];
+ object.enumType = [];
+ object.extensionRange = [];
+ object.extension = [];
+ object.oneofDecl = [];
+ object.reservedRange = [];
+ object.reservedName = [];
+ }
+ if (options.defaults) {
+ object.name = "";
+ object.options = null;
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.field && message.field.length) {
+ object.field = [];
+ for (var j = 0; j < message.field.length; ++j)
+ object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options);
+ }
+ if (message.nestedType && message.nestedType.length) {
+ object.nestedType = [];
+ for (var j = 0; j < message.nestedType.length; ++j)
+ object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options);
+ }
+ if (message.enumType && message.enumType.length) {
+ object.enumType = [];
+ for (var j = 0; j < message.enumType.length; ++j)
+ object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options);
+ }
+ if (message.extensionRange && message.extensionRange.length) {
+ object.extensionRange = [];
+ for (var j = 0; j < message.extensionRange.length; ++j)
+ object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options);
+ }
+ if (message.extension && message.extension.length) {
+ object.extension = [];
+ for (var j = 0; j < message.extension.length; ++j)
+ object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options);
+ }
+ if (message.options != null && message.hasOwnProperty("options"))
+ object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options);
+ if (message.oneofDecl && message.oneofDecl.length) {
+ object.oneofDecl = [];
+ for (var j = 0; j < message.oneofDecl.length; ++j)
+ object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options);
+ }
+ if (message.reservedRange && message.reservedRange.length) {
+ object.reservedRange = [];
+ for (var j = 0; j < message.reservedRange.length; ++j)
+ object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options);
+ }
+ if (message.reservedName && message.reservedName.length) {
+ object.reservedName = [];
+ for (var j = 0; j < message.reservedName.length; ++j)
+ object.reservedName[j] = message.reservedName[j];
+ }
+ return object;
+ };
+
+ /**
+ * Converts this DescriptorProto to JSON.
+ * @function toJSON
+ * @memberof google.protobuf.DescriptorProto
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ DescriptorProto.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for DescriptorProto
+ * @function getTypeUrl
+ * @memberof google.protobuf.DescriptorProto
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.protobuf.DescriptorProto";
+ };
+
+ DescriptorProto.ExtensionRange = (function() {
+
+ /**
+ * Properties of an ExtensionRange.
+ * @memberof google.protobuf.DescriptorProto
+ * @interface IExtensionRange
+ * @property {number|null} [start] ExtensionRange start
+ * @property {number|null} [end] ExtensionRange end
+ * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options
+ */
+
+ /**
+ * Constructs a new ExtensionRange.
+ * @memberof google.protobuf.DescriptorProto
+ * @classdesc Represents an ExtensionRange.
+ * @implements IExtensionRange
+ * @constructor
+ * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set
+ */
+ function ExtensionRange(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ExtensionRange start.
+ * @member {number} start
+ * @memberof google.protobuf.DescriptorProto.ExtensionRange
+ * @instance
+ */
+ ExtensionRange.prototype.start = 0;
+
+ /**
+ * ExtensionRange end.
+ * @member {number} end
+ * @memberof google.protobuf.DescriptorProto.ExtensionRange
+ * @instance
+ */
+ ExtensionRange.prototype.end = 0;
+
+ /**
+ * ExtensionRange options.
+ * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options
+ * @memberof google.protobuf.DescriptorProto.ExtensionRange
+ * @instance
+ */
+ ExtensionRange.prototype.options = null;
+
+ /**
+ * Creates a new ExtensionRange instance using the specified properties.
+ * @function create
+ * @memberof google.protobuf.DescriptorProto.ExtensionRange
+ * @static
+ * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set
+ * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance
+ */
+ ExtensionRange.create = function create(properties) {
+ return new ExtensionRange(properties);
+ };
+
+ /**
+ * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages.
+ * @function encode
+ * @memberof google.protobuf.DescriptorProto.ExtensionRange
+ * @static
+ * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ExtensionRange.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.start != null && Object.hasOwnProperty.call(message, "start"))
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start);
+ if (message.end != null && Object.hasOwnProperty.call(message, "end"))
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end);
+ if (message.options != null && Object.hasOwnProperty.call(message, "options"))
+ $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.protobuf.DescriptorProto.ExtensionRange
+ * @static
+ * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an ExtensionRange message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.protobuf.DescriptorProto.ExtensionRange
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ExtensionRange.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.start = reader.int32();
+ break;
+ }
+ case 2: {
+ message.end = reader.int32();
+ break;
+ }
+ case 3: {
+ message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an ExtensionRange message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.protobuf.DescriptorProto.ExtensionRange
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ExtensionRange.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an ExtensionRange message.
+ * @function verify
+ * @memberof google.protobuf.DescriptorProto.ExtensionRange
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ExtensionRange.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.start != null && message.hasOwnProperty("start"))
+ if (!$util.isInteger(message.start))
+ return "start: integer expected";
+ if (message.end != null && message.hasOwnProperty("end"))
+ if (!$util.isInteger(message.end))
+ return "end: integer expected";
+ if (message.options != null && message.hasOwnProperty("options")) {
+ var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options);
+ if (error)
+ return "options." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.protobuf.DescriptorProto.ExtensionRange
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange
+ */
+ ExtensionRange.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange)
+ return object;
+ var message = new $root.google.protobuf.DescriptorProto.ExtensionRange();
+ if (object.start != null)
+ message.start = object.start | 0;
+ if (object.end != null)
+ message.end = object.end | 0;
+ if (object.options != null) {
+ if (typeof object.options !== "object")
+ throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected");
+ message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.protobuf.DescriptorProto.ExtensionRange
+ * @static
+ * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ExtensionRange.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.start = 0;
+ object.end = 0;
+ object.options = null;
+ }
+ if (message.start != null && message.hasOwnProperty("start"))
+ object.start = message.start;
+ if (message.end != null && message.hasOwnProperty("end"))
+ object.end = message.end;
+ if (message.options != null && message.hasOwnProperty("options"))
+ object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options);
+ return object;
+ };
+
+ /**
+ * Converts this ExtensionRange to JSON.
+ * @function toJSON
+ * @memberof google.protobuf.DescriptorProto.ExtensionRange
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ExtensionRange.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ExtensionRange
+ * @function getTypeUrl
+ * @memberof google.protobuf.DescriptorProto.ExtensionRange
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange";
+ };
+
+ return ExtensionRange;
+ })();
+
+ DescriptorProto.ReservedRange = (function() {
+
+ /**
+ * Properties of a ReservedRange.
+ * @memberof google.protobuf.DescriptorProto
+ * @interface IReservedRange
+ * @property {number|null} [start] ReservedRange start
+ * @property {number|null} [end] ReservedRange end
+ */
+
+ /**
+ * Constructs a new ReservedRange.
+ * @memberof google.protobuf.DescriptorProto
+ * @classdesc Represents a ReservedRange.
+ * @implements IReservedRange
+ * @constructor
+ * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set
+ */
+ function ReservedRange(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ReservedRange start.
+ * @member {number} start
+ * @memberof google.protobuf.DescriptorProto.ReservedRange
+ * @instance
+ */
+ ReservedRange.prototype.start = 0;
+
+ /**
+ * ReservedRange end.
+ * @member {number} end
+ * @memberof google.protobuf.DescriptorProto.ReservedRange
+ * @instance
+ */
+ ReservedRange.prototype.end = 0;
+
+ /**
+ * Creates a new ReservedRange instance using the specified properties.
+ * @function create
+ * @memberof google.protobuf.DescriptorProto.ReservedRange
+ * @static
+ * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set
+ * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance
+ */
+ ReservedRange.create = function create(properties) {
+ return new ReservedRange(properties);
+ };
+
+ /**
+ * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages.
+ * @function encode
+ * @memberof google.protobuf.DescriptorProto.ReservedRange
+ * @static
+ * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ReservedRange.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.start != null && Object.hasOwnProperty.call(message, "start"))
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start);
+ if (message.end != null && Object.hasOwnProperty.call(message, "end"))
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.protobuf.DescriptorProto.ReservedRange
+ * @static
+ * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ReservedRange.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ReservedRange message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.protobuf.DescriptorProto.ReservedRange
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ReservedRange.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.start = reader.int32();
+ break;
+ }
+ case 2: {
+ message.end = reader.int32();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ReservedRange message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.protobuf.DescriptorProto.ReservedRange
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ReservedRange.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ReservedRange message.
+ * @function verify
+ * @memberof google.protobuf.DescriptorProto.ReservedRange
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ReservedRange.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.start != null && message.hasOwnProperty("start"))
+ if (!$util.isInteger(message.start))
+ return "start: integer expected";
+ if (message.end != null && message.hasOwnProperty("end"))
+ if (!$util.isInteger(message.end))
+ return "end: integer expected";
+ return null;
+ };
+
+ /**
+ * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.protobuf.DescriptorProto.ReservedRange
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange
+ */
+ ReservedRange.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange)
+ return object;
+ var message = new $root.google.protobuf.DescriptorProto.ReservedRange();
+ if (object.start != null)
+ message.start = object.start | 0;
+ if (object.end != null)
+ message.end = object.end | 0;
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ReservedRange message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.protobuf.DescriptorProto.ReservedRange
+ * @static
+ * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ReservedRange.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.start = 0;
+ object.end = 0;
+ }
+ if (message.start != null && message.hasOwnProperty("start"))
+ object.start = message.start;
+ if (message.end != null && message.hasOwnProperty("end"))
+ object.end = message.end;
+ return object;
+ };
+
+ /**
+ * Converts this ReservedRange to JSON.
+ * @function toJSON
+ * @memberof google.protobuf.DescriptorProto.ReservedRange
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ReservedRange.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ReservedRange
+ * @function getTypeUrl
+ * @memberof google.protobuf.DescriptorProto.ReservedRange
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange";
+ };
+
+ return ReservedRange;
+ })();
+
+ return DescriptorProto;
+ })();
+
+ protobuf.ExtensionRangeOptions = (function() {
+
+ /**
+ * Properties of an ExtensionRangeOptions.
+ * @memberof google.protobuf
+ * @interface IExtensionRangeOptions
+ * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption
+ */
+
+ /**
+ * Constructs a new ExtensionRangeOptions.
+ * @memberof google.protobuf
+ * @classdesc Represents an ExtensionRangeOptions.
+ * @implements IExtensionRangeOptions
+ * @constructor
+ * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set
+ */
+ function ExtensionRangeOptions(properties) {
+ this.uninterpretedOption = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ExtensionRangeOptions uninterpretedOption.
+ * @member {Array.} uninterpretedOption
+ * @memberof google.protobuf.ExtensionRangeOptions
+ * @instance
+ */
+ ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray;
+
+ /**
+ * Creates a new ExtensionRangeOptions instance using the specified properties.
+ * @function create
+ * @memberof google.protobuf.ExtensionRangeOptions
+ * @static
+ * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set
+ * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance
+ */
+ ExtensionRangeOptions.create = function create(properties) {
+ return new ExtensionRangeOptions(properties);
+ };
+
+ /**
+ * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages.
+ * @function encode
+ * @memberof google.protobuf.ExtensionRangeOptions
+ * @static
+ * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ExtensionRangeOptions.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.uninterpretedOption != null && message.uninterpretedOption.length)
+ for (var i = 0; i < message.uninterpretedOption.length; ++i)
+ $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.protobuf.ExtensionRangeOptions
+ * @static
+ * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an ExtensionRangeOptions message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.protobuf.ExtensionRangeOptions
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ExtensionRangeOptions.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 999: {
+ if (!(message.uninterpretedOption && message.uninterpretedOption.length))
+ message.uninterpretedOption = [];
+ message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.protobuf.ExtensionRangeOptions
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an ExtensionRangeOptions message.
+ * @function verify
+ * @memberof google.protobuf.ExtensionRangeOptions
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ExtensionRangeOptions.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
+ if (!Array.isArray(message.uninterpretedOption))
+ return "uninterpretedOption: array expected";
+ for (var i = 0; i < message.uninterpretedOption.length; ++i) {
+ var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
+ if (error)
+ return "uninterpretedOption." + error;
+ }
+ }
+ return null;
+ };
+
+ /**
+ * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.protobuf.ExtensionRangeOptions
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions
+ */
+ ExtensionRangeOptions.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.protobuf.ExtensionRangeOptions)
+ return object;
+ var message = new $root.google.protobuf.ExtensionRangeOptions();
+ if (object.uninterpretedOption) {
+ if (!Array.isArray(object.uninterpretedOption))
+ throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected");
+ message.uninterpretedOption = [];
+ for (var i = 0; i < object.uninterpretedOption.length; ++i) {
+ if (typeof object.uninterpretedOption[i] !== "object")
+ throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected");
+ message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.protobuf.ExtensionRangeOptions
+ * @static
+ * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ExtensionRangeOptions.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.uninterpretedOption = [];
+ if (message.uninterpretedOption && message.uninterpretedOption.length) {
+ object.uninterpretedOption = [];
+ for (var j = 0; j < message.uninterpretedOption.length; ++j)
+ object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
+ }
+ return object;
+ };
+
+ /**
+ * Converts this ExtensionRangeOptions to JSON.
+ * @function toJSON
+ * @memberof google.protobuf.ExtensionRangeOptions
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ExtensionRangeOptions.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ExtensionRangeOptions
+ * @function getTypeUrl
+ * @memberof google.protobuf.ExtensionRangeOptions
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions";
+ };
+
+ return ExtensionRangeOptions;
+ })();
+
+ protobuf.FieldDescriptorProto = (function() {
+
+ /**
+ * Properties of a FieldDescriptorProto.
+ * @memberof google.protobuf
+ * @interface IFieldDescriptorProto
+ * @property {string|null} [name] FieldDescriptorProto name
+ * @property {number|null} [number] FieldDescriptorProto number
+ * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label
+ * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type
+ * @property {string|null} [typeName] FieldDescriptorProto typeName
+ * @property {string|null} [extendee] FieldDescriptorProto extendee
+ * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue
+ * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex
+ * @property {string|null} [jsonName] FieldDescriptorProto jsonName
+ * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options
+ * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional
+ */
+
+ /**
+ * Constructs a new FieldDescriptorProto.
+ * @memberof google.protobuf
+ * @classdesc Represents a FieldDescriptorProto.
+ * @implements IFieldDescriptorProto
+ * @constructor
+ * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set
+ */
+ function FieldDescriptorProto(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * FieldDescriptorProto name.
+ * @member {string} name
+ * @memberof google.protobuf.FieldDescriptorProto
+ * @instance
+ */
+ FieldDescriptorProto.prototype.name = "";
+
+ /**
+ * FieldDescriptorProto number.
+ * @member {number} number
+ * @memberof google.protobuf.FieldDescriptorProto
+ * @instance
+ */
+ FieldDescriptorProto.prototype.number = 0;
+
+ /**
+ * FieldDescriptorProto label.
+ * @member {google.protobuf.FieldDescriptorProto.Label} label
+ * @memberof google.protobuf.FieldDescriptorProto
+ * @instance
+ */
+ FieldDescriptorProto.prototype.label = 1;
+
+ /**
+ * FieldDescriptorProto type.
+ * @member {google.protobuf.FieldDescriptorProto.Type} type
+ * @memberof google.protobuf.FieldDescriptorProto
+ * @instance
+ */
+ FieldDescriptorProto.prototype.type = 1;
+
+ /**
+ * FieldDescriptorProto typeName.
+ * @member {string} typeName
+ * @memberof google.protobuf.FieldDescriptorProto
+ * @instance
+ */
+ FieldDescriptorProto.prototype.typeName = "";
+
+ /**
+ * FieldDescriptorProto extendee.
+ * @member {string} extendee
+ * @memberof google.protobuf.FieldDescriptorProto
+ * @instance
+ */
+ FieldDescriptorProto.prototype.extendee = "";
+
+ /**
+ * FieldDescriptorProto defaultValue.
+ * @member {string} defaultValue
+ * @memberof google.protobuf.FieldDescriptorProto
+ * @instance
+ */
+ FieldDescriptorProto.prototype.defaultValue = "";
+
+ /**
+ * FieldDescriptorProto oneofIndex.
+ * @member {number} oneofIndex
+ * @memberof google.protobuf.FieldDescriptorProto
+ * @instance
+ */
+ FieldDescriptorProto.prototype.oneofIndex = 0;
+
+ /**
+ * FieldDescriptorProto jsonName.
+ * @member {string} jsonName
+ * @memberof google.protobuf.FieldDescriptorProto
+ * @instance
+ */
+ FieldDescriptorProto.prototype.jsonName = "";
+
+ /**
+ * FieldDescriptorProto options.
+ * @member {google.protobuf.IFieldOptions|null|undefined} options
+ * @memberof google.protobuf.FieldDescriptorProto
+ * @instance
+ */
+ FieldDescriptorProto.prototype.options = null;
+
+ /**
+ * FieldDescriptorProto proto3Optional.
+ * @member {boolean} proto3Optional
+ * @memberof google.protobuf.FieldDescriptorProto
+ * @instance
+ */
+ FieldDescriptorProto.prototype.proto3Optional = false;
+
+ /**
+ * Creates a new FieldDescriptorProto instance using the specified properties.
+ * @function create
+ * @memberof google.protobuf.FieldDescriptorProto
+ * @static
+ * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set
+ * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance
+ */
+ FieldDescriptorProto.create = function create(properties) {
+ return new FieldDescriptorProto(properties);
+ };
+
+ /**
+ * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages.
+ * @function encode
+ * @memberof google.protobuf.FieldDescriptorProto
+ * @static
+ * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ FieldDescriptorProto.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee);
+ if (message.number != null && Object.hasOwnProperty.call(message, "number"))
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number);
+ if (message.label != null && Object.hasOwnProperty.call(message, "label"))
+ writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label);
+ if (message.type != null && Object.hasOwnProperty.call(message, "type"))
+ writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type);
+ if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName"))
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName);
+ if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue"))
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue);
+ if (message.options != null && Object.hasOwnProperty.call(message, "options"))
+ $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
+ if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex"))
+ writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex);
+ if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName"))
+ writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName);
+ if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional"))
+ writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.protobuf.FieldDescriptorProto
+ * @static
+ * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a FieldDescriptorProto message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.protobuf.FieldDescriptorProto
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ FieldDescriptorProto.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 3: {
+ message.number = reader.int32();
+ break;
+ }
+ case 4: {
+ message.label = reader.int32();
+ break;
+ }
+ case 5: {
+ message.type = reader.int32();
+ break;
+ }
+ case 6: {
+ message.typeName = reader.string();
+ break;
+ }
+ case 2: {
+ message.extendee = reader.string();
+ break;
+ }
+ case 7: {
+ message.defaultValue = reader.string();
+ break;
+ }
+ case 9: {
+ message.oneofIndex = reader.int32();
+ break;
+ }
+ case 10: {
+ message.jsonName = reader.string();
+ break;
+ }
+ case 8: {
+ message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32());
+ break;
+ }
+ case 17: {
+ message.proto3Optional = reader.bool();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.protobuf.FieldDescriptorProto
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a FieldDescriptorProto message.
+ * @function verify
+ * @memberof google.protobuf.FieldDescriptorProto
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ FieldDescriptorProto.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.number != null && message.hasOwnProperty("number"))
+ if (!$util.isInteger(message.number))
+ return "number: integer expected";
+ if (message.label != null && message.hasOwnProperty("label"))
+ switch (message.label) {
+ default:
+ return "label: enum value expected";
+ case 1:
+ case 2:
+ case 3:
+ break;
+ }
+ if (message.type != null && message.hasOwnProperty("type"))
+ switch (message.type) {
+ default:
+ return "type: enum value expected";
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ case 10:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ case 16:
+ case 17:
+ case 18:
+ break;
+ }
+ if (message.typeName != null && message.hasOwnProperty("typeName"))
+ if (!$util.isString(message.typeName))
+ return "typeName: string expected";
+ if (message.extendee != null && message.hasOwnProperty("extendee"))
+ if (!$util.isString(message.extendee))
+ return "extendee: string expected";
+ if (message.defaultValue != null && message.hasOwnProperty("defaultValue"))
+ if (!$util.isString(message.defaultValue))
+ return "defaultValue: string expected";
+ if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex"))
+ if (!$util.isInteger(message.oneofIndex))
+ return "oneofIndex: integer expected";
+ if (message.jsonName != null && message.hasOwnProperty("jsonName"))
+ if (!$util.isString(message.jsonName))
+ return "jsonName: string expected";
+ if (message.options != null && message.hasOwnProperty("options")) {
+ var error = $root.google.protobuf.FieldOptions.verify(message.options);
+ if (error)
+ return "options." + error;
+ }
+ if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional"))
+ if (typeof message.proto3Optional !== "boolean")
+ return "proto3Optional: boolean expected";
+ return null;
+ };
+
+ /**
+ * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.protobuf.FieldDescriptorProto
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto
+ */
+ FieldDescriptorProto.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.protobuf.FieldDescriptorProto)
+ return object;
+ var message = new $root.google.protobuf.FieldDescriptorProto();
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object.number != null)
+ message.number = object.number | 0;
+ switch (object.label) {
+ case "LABEL_OPTIONAL":
+ case 1:
+ message.label = 1;
+ break;
+ case "LABEL_REQUIRED":
+ case 2:
+ message.label = 2;
+ break;
+ case "LABEL_REPEATED":
+ case 3:
+ message.label = 3;
+ break;
+ }
+ switch (object.type) {
+ case "TYPE_DOUBLE":
+ case 1:
+ message.type = 1;
+ break;
+ case "TYPE_FLOAT":
+ case 2:
+ message.type = 2;
+ break;
+ case "TYPE_INT64":
+ case 3:
+ message.type = 3;
+ break;
+ case "TYPE_UINT64":
+ case 4:
+ message.type = 4;
+ break;
+ case "TYPE_INT32":
+ case 5:
+ message.type = 5;
+ break;
+ case "TYPE_FIXED64":
+ case 6:
+ message.type = 6;
+ break;
+ case "TYPE_FIXED32":
+ case 7:
+ message.type = 7;
+ break;
+ case "TYPE_BOOL":
+ case 8:
+ message.type = 8;
+ break;
+ case "TYPE_STRING":
+ case 9:
+ message.type = 9;
+ break;
+ case "TYPE_GROUP":
+ case 10:
+ message.type = 10;
+ break;
+ case "TYPE_MESSAGE":
+ case 11:
+ message.type = 11;
+ break;
+ case "TYPE_BYTES":
+ case 12:
+ message.type = 12;
+ break;
+ case "TYPE_UINT32":
+ case 13:
+ message.type = 13;
+ break;
+ case "TYPE_ENUM":
+ case 14:
+ message.type = 14;
+ break;
+ case "TYPE_SFIXED32":
+ case 15:
+ message.type = 15;
+ break;
+ case "TYPE_SFIXED64":
+ case 16:
+ message.type = 16;
+ break;
+ case "TYPE_SINT32":
+ case 17:
+ message.type = 17;
+ break;
+ case "TYPE_SINT64":
+ case 18:
+ message.type = 18;
+ break;
+ }
+ if (object.typeName != null)
+ message.typeName = String(object.typeName);
+ if (object.extendee != null)
+ message.extendee = String(object.extendee);
+ if (object.defaultValue != null)
+ message.defaultValue = String(object.defaultValue);
+ if (object.oneofIndex != null)
+ message.oneofIndex = object.oneofIndex | 0;
+ if (object.jsonName != null)
+ message.jsonName = String(object.jsonName);
+ if (object.options != null) {
+ if (typeof object.options !== "object")
+ throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected");
+ message.options = $root.google.protobuf.FieldOptions.fromObject(object.options);
+ }
+ if (object.proto3Optional != null)
+ message.proto3Optional = Boolean(object.proto3Optional);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.protobuf.FieldDescriptorProto
+ * @static
+ * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ FieldDescriptorProto.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.name = "";
+ object.extendee = "";
+ object.number = 0;
+ object.label = options.enums === String ? "LABEL_OPTIONAL" : 1;
+ object.type = options.enums === String ? "TYPE_DOUBLE" : 1;
+ object.typeName = "";
+ object.defaultValue = "";
+ object.options = null;
+ object.oneofIndex = 0;
+ object.jsonName = "";
+ object.proto3Optional = false;
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.extendee != null && message.hasOwnProperty("extendee"))
+ object.extendee = message.extendee;
+ if (message.number != null && message.hasOwnProperty("number"))
+ object.number = message.number;
+ if (message.label != null && message.hasOwnProperty("label"))
+ object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label;
+ if (message.type != null && message.hasOwnProperty("type"))
+ object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type;
+ if (message.typeName != null && message.hasOwnProperty("typeName"))
+ object.typeName = message.typeName;
+ if (message.defaultValue != null && message.hasOwnProperty("defaultValue"))
+ object.defaultValue = message.defaultValue;
+ if (message.options != null && message.hasOwnProperty("options"))
+ object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options);
+ if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex"))
+ object.oneofIndex = message.oneofIndex;
+ if (message.jsonName != null && message.hasOwnProperty("jsonName"))
+ object.jsonName = message.jsonName;
+ if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional"))
+ object.proto3Optional = message.proto3Optional;
+ return object;
+ };
+
+ /**
+ * Converts this FieldDescriptorProto to JSON.
+ * @function toJSON
+ * @memberof google.protobuf.FieldDescriptorProto
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ FieldDescriptorProto.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for FieldDescriptorProto
+ * @function getTypeUrl
+ * @memberof google.protobuf.FieldDescriptorProto
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto";
+ };
+
+ /**
+ * Type enum.
+ * @name google.protobuf.FieldDescriptorProto.Type
+ * @enum {number}
+ * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value
+ * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value
+ * @property {number} TYPE_INT64=3 TYPE_INT64 value
+ * @property {number} TYPE_UINT64=4 TYPE_UINT64 value
+ * @property {number} TYPE_INT32=5 TYPE_INT32 value
+ * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value
+ * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value
+ * @property {number} TYPE_BOOL=8 TYPE_BOOL value
+ * @property {number} TYPE_STRING=9 TYPE_STRING value
+ * @property {number} TYPE_GROUP=10 TYPE_GROUP value
+ * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value
+ * @property {number} TYPE_BYTES=12 TYPE_BYTES value
+ * @property {number} TYPE_UINT32=13 TYPE_UINT32 value
+ * @property {number} TYPE_ENUM=14 TYPE_ENUM value
+ * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value
+ * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value
+ * @property {number} TYPE_SINT32=17 TYPE_SINT32 value
+ * @property {number} TYPE_SINT64=18 TYPE_SINT64 value
+ */
+ FieldDescriptorProto.Type = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[1] = "TYPE_DOUBLE"] = 1;
+ values[valuesById[2] = "TYPE_FLOAT"] = 2;
+ values[valuesById[3] = "TYPE_INT64"] = 3;
+ values[valuesById[4] = "TYPE_UINT64"] = 4;
+ values[valuesById[5] = "TYPE_INT32"] = 5;
+ values[valuesById[6] = "TYPE_FIXED64"] = 6;
+ values[valuesById[7] = "TYPE_FIXED32"] = 7;
+ values[valuesById[8] = "TYPE_BOOL"] = 8;
+ values[valuesById[9] = "TYPE_STRING"] = 9;
+ values[valuesById[10] = "TYPE_GROUP"] = 10;
+ values[valuesById[11] = "TYPE_MESSAGE"] = 11;
+ values[valuesById[12] = "TYPE_BYTES"] = 12;
+ values[valuesById[13] = "TYPE_UINT32"] = 13;
+ values[valuesById[14] = "TYPE_ENUM"] = 14;
+ values[valuesById[15] = "TYPE_SFIXED32"] = 15;
+ values[valuesById[16] = "TYPE_SFIXED64"] = 16;
+ values[valuesById[17] = "TYPE_SINT32"] = 17;
+ values[valuesById[18] = "TYPE_SINT64"] = 18;
+ return values;
+ })();
+
+ /**
+ * Label enum.
+ * @name google.protobuf.FieldDescriptorProto.Label
+ * @enum {number}
+ * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value
+ * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value
+ * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value
+ */
+ FieldDescriptorProto.Label = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[1] = "LABEL_OPTIONAL"] = 1;
+ values[valuesById[2] = "LABEL_REQUIRED"] = 2;
+ values[valuesById[3] = "LABEL_REPEATED"] = 3;
+ return values;
+ })();
+
+ return FieldDescriptorProto;
+ })();
+
+ protobuf.OneofDescriptorProto = (function() {
+
+ /**
+ * Properties of an OneofDescriptorProto.
+ * @memberof google.protobuf
+ * @interface IOneofDescriptorProto
+ * @property {string|null} [name] OneofDescriptorProto name
+ * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options
+ */
+
+ /**
+ * Constructs a new OneofDescriptorProto.
+ * @memberof google.protobuf
+ * @classdesc Represents an OneofDescriptorProto.
+ * @implements IOneofDescriptorProto
+ * @constructor
+ * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set
+ */
+ function OneofDescriptorProto(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * OneofDescriptorProto name.
+ * @member {string} name
+ * @memberof google.protobuf.OneofDescriptorProto
+ * @instance
+ */
+ OneofDescriptorProto.prototype.name = "";
+
+ /**
+ * OneofDescriptorProto options.
+ * @member {google.protobuf.IOneofOptions|null|undefined} options
+ * @memberof google.protobuf.OneofDescriptorProto
+ * @instance
+ */
+ OneofDescriptorProto.prototype.options = null;
+
+ /**
+ * Creates a new OneofDescriptorProto instance using the specified properties.
+ * @function create
+ * @memberof google.protobuf.OneofDescriptorProto
+ * @static
+ * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set
+ * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance
+ */
+ OneofDescriptorProto.create = function create(properties) {
+ return new OneofDescriptorProto(properties);
+ };
+
+ /**
+ * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages.
+ * @function encode
+ * @memberof google.protobuf.OneofDescriptorProto
+ * @static
+ * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ OneofDescriptorProto.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ if (message.options != null && Object.hasOwnProperty.call(message, "options"))
+ $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.protobuf.OneofDescriptorProto
+ * @static
+ * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an OneofDescriptorProto message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.protobuf.OneofDescriptorProto
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ OneofDescriptorProto.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 2: {
+ message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.protobuf.OneofDescriptorProto
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an OneofDescriptorProto message.
+ * @function verify
+ * @memberof google.protobuf.OneofDescriptorProto
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ OneofDescriptorProto.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.options != null && message.hasOwnProperty("options")) {
+ var error = $root.google.protobuf.OneofOptions.verify(message.options);
+ if (error)
+ return "options." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.protobuf.OneofDescriptorProto
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto
+ */
+ OneofDescriptorProto.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.protobuf.OneofDescriptorProto)
+ return object;
+ var message = new $root.google.protobuf.OneofDescriptorProto();
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object.options != null) {
+ if (typeof object.options !== "object")
+ throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected");
+ message.options = $root.google.protobuf.OneofOptions.fromObject(object.options);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.protobuf.OneofDescriptorProto
+ * @static
+ * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ OneofDescriptorProto.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.name = "";
+ object.options = null;
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.options != null && message.hasOwnProperty("options"))
+ object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options);
+ return object;
+ };
+
+ /**
+ * Converts this OneofDescriptorProto to JSON.
+ * @function toJSON
+ * @memberof google.protobuf.OneofDescriptorProto
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ OneofDescriptorProto.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for OneofDescriptorProto
+ * @function getTypeUrl
+ * @memberof google.protobuf.OneofDescriptorProto
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto";
+ };
+
+ return OneofDescriptorProto;
+ })();
+
+ protobuf.EnumDescriptorProto = (function() {
+
+ /**
+ * Properties of an EnumDescriptorProto.
+ * @memberof google.protobuf
+ * @interface IEnumDescriptorProto
+ * @property {string|null} [name] EnumDescriptorProto name
+ * @property {Array.|null} [value] EnumDescriptorProto value
+ * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options
+ * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange
+ * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName
+ */
+
+ /**
+ * Constructs a new EnumDescriptorProto.
+ * @memberof google.protobuf
+ * @classdesc Represents an EnumDescriptorProto.
+ * @implements IEnumDescriptorProto
+ * @constructor
+ * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set
+ */
+ function EnumDescriptorProto(properties) {
+ this.value = [];
+ this.reservedRange = [];
+ this.reservedName = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * EnumDescriptorProto name.
+ * @member {string} name
+ * @memberof google.protobuf.EnumDescriptorProto
+ * @instance
+ */
+ EnumDescriptorProto.prototype.name = "";
+
+ /**
+ * EnumDescriptorProto value.
+ * @member {Array.} value
+ * @memberof google.protobuf.EnumDescriptorProto
+ * @instance
+ */
+ EnumDescriptorProto.prototype.value = $util.emptyArray;
+
+ /**
+ * EnumDescriptorProto options.
+ * @member {google.protobuf.IEnumOptions|null|undefined} options
+ * @memberof google.protobuf.EnumDescriptorProto
+ * @instance
+ */
+ EnumDescriptorProto.prototype.options = null;
+
+ /**
+ * EnumDescriptorProto reservedRange.
+ * @member {Array.} reservedRange
+ * @memberof google.protobuf.EnumDescriptorProto
+ * @instance
+ */
+ EnumDescriptorProto.prototype.reservedRange = $util.emptyArray;
+
+ /**
+ * EnumDescriptorProto reservedName.
+ * @member {Array.} reservedName
+ * @memberof google.protobuf.EnumDescriptorProto
+ * @instance
+ */
+ EnumDescriptorProto.prototype.reservedName = $util.emptyArray;
+
+ /**
+ * Creates a new EnumDescriptorProto instance using the specified properties.
+ * @function create
+ * @memberof google.protobuf.EnumDescriptorProto
+ * @static
+ * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set
+ * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance
+ */
+ EnumDescriptorProto.create = function create(properties) {
+ return new EnumDescriptorProto(properties);
+ };
+
+ /**
+ * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages.
+ * @function encode
+ * @memberof google.protobuf.EnumDescriptorProto
+ * @static
+ * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ EnumDescriptorProto.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ if (message.value != null && message.value.length)
+ for (var i = 0; i < message.value.length; ++i)
+ $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ if (message.options != null && Object.hasOwnProperty.call(message, "options"))
+ $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ if (message.reservedRange != null && message.reservedRange.length)
+ for (var i = 0; i < message.reservedRange.length; ++i)
+ $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
+ if (message.reservedName != null && message.reservedName.length)
+ for (var i = 0; i < message.reservedName.length; ++i)
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.protobuf.EnumDescriptorProto
+ * @static
+ * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an EnumDescriptorProto message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.protobuf.EnumDescriptorProto
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ EnumDescriptorProto.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 2: {
+ if (!(message.value && message.value.length))
+ message.value = [];
+ message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32()));
+ break;
+ }
+ case 3: {
+ message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32());
+ break;
+ }
+ case 4: {
+ if (!(message.reservedRange && message.reservedRange.length))
+ message.reservedRange = [];
+ message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32()));
+ break;
+ }
+ case 5: {
+ if (!(message.reservedName && message.reservedName.length))
+ message.reservedName = [];
+ message.reservedName.push(reader.string());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.protobuf.EnumDescriptorProto
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an EnumDescriptorProto message.
+ * @function verify
+ * @memberof google.protobuf.EnumDescriptorProto
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ EnumDescriptorProto.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.value != null && message.hasOwnProperty("value")) {
+ if (!Array.isArray(message.value))
+ return "value: array expected";
+ for (var i = 0; i < message.value.length; ++i) {
+ var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]);
+ if (error)
+ return "value." + error;
+ }
+ }
+ if (message.options != null && message.hasOwnProperty("options")) {
+ var error = $root.google.protobuf.EnumOptions.verify(message.options);
+ if (error)
+ return "options." + error;
+ }
+ if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) {
+ if (!Array.isArray(message.reservedRange))
+ return "reservedRange: array expected";
+ for (var i = 0; i < message.reservedRange.length; ++i) {
+ var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]);
+ if (error)
+ return "reservedRange." + error;
+ }
+ }
+ if (message.reservedName != null && message.hasOwnProperty("reservedName")) {
+ if (!Array.isArray(message.reservedName))
+ return "reservedName: array expected";
+ for (var i = 0; i < message.reservedName.length; ++i)
+ if (!$util.isString(message.reservedName[i]))
+ return "reservedName: string[] expected";
+ }
+ return null;
+ };
+
+ /**
+ * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.protobuf.EnumDescriptorProto
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto
+ */
+ EnumDescriptorProto.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.protobuf.EnumDescriptorProto)
+ return object;
+ var message = new $root.google.protobuf.EnumDescriptorProto();
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object.value) {
+ if (!Array.isArray(object.value))
+ throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected");
+ message.value = [];
+ for (var i = 0; i < object.value.length; ++i) {
+ if (typeof object.value[i] !== "object")
+ throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected");
+ message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]);
+ }
+ }
+ if (object.options != null) {
+ if (typeof object.options !== "object")
+ throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected");
+ message.options = $root.google.protobuf.EnumOptions.fromObject(object.options);
+ }
+ if (object.reservedRange) {
+ if (!Array.isArray(object.reservedRange))
+ throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected");
+ message.reservedRange = [];
+ for (var i = 0; i < object.reservedRange.length; ++i) {
+ if (typeof object.reservedRange[i] !== "object")
+ throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected");
+ message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]);
+ }
+ }
+ if (object.reservedName) {
+ if (!Array.isArray(object.reservedName))
+ throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected");
+ message.reservedName = [];
+ for (var i = 0; i < object.reservedName.length; ++i)
+ message.reservedName[i] = String(object.reservedName[i]);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.protobuf.EnumDescriptorProto
+ * @static
+ * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ EnumDescriptorProto.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults) {
+ object.value = [];
+ object.reservedRange = [];
+ object.reservedName = [];
+ }
+ if (options.defaults) {
+ object.name = "";
+ object.options = null;
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.value && message.value.length) {
+ object.value = [];
+ for (var j = 0; j < message.value.length; ++j)
+ object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options);
+ }
+ if (message.options != null && message.hasOwnProperty("options"))
+ object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options);
+ if (message.reservedRange && message.reservedRange.length) {
+ object.reservedRange = [];
+ for (var j = 0; j < message.reservedRange.length; ++j)
+ object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options);
+ }
+ if (message.reservedName && message.reservedName.length) {
+ object.reservedName = [];
+ for (var j = 0; j < message.reservedName.length; ++j)
+ object.reservedName[j] = message.reservedName[j];
+ }
+ return object;
+ };
+
+ /**
+ * Converts this EnumDescriptorProto to JSON.
+ * @function toJSON
+ * @memberof google.protobuf.EnumDescriptorProto
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ EnumDescriptorProto.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for EnumDescriptorProto
+ * @function getTypeUrl
+ * @memberof google.protobuf.EnumDescriptorProto
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto";
+ };
+
+ EnumDescriptorProto.EnumReservedRange = (function() {
+
+ /**
+ * Properties of an EnumReservedRange.
+ * @memberof google.protobuf.EnumDescriptorProto
+ * @interface IEnumReservedRange
+ * @property {number|null} [start] EnumReservedRange start
+ * @property {number|null} [end] EnumReservedRange end
+ */
+
+ /**
+ * Constructs a new EnumReservedRange.
+ * @memberof google.protobuf.EnumDescriptorProto
+ * @classdesc Represents an EnumReservedRange.
+ * @implements IEnumReservedRange
+ * @constructor
+ * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set
+ */
+ function EnumReservedRange(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * EnumReservedRange start.
+ * @member {number} start
+ * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
+ * @instance
+ */
+ EnumReservedRange.prototype.start = 0;
+
+ /**
+ * EnumReservedRange end.
+ * @member {number} end
+ * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
+ * @instance
+ */
+ EnumReservedRange.prototype.end = 0;
+
+ /**
+ * Creates a new EnumReservedRange instance using the specified properties.
+ * @function create
+ * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
+ * @static
+ * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set
+ * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance
+ */
+ EnumReservedRange.create = function create(properties) {
+ return new EnumReservedRange(properties);
+ };
+
+ /**
+ * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages.
+ * @function encode
+ * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
+ * @static
+ * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ EnumReservedRange.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.start != null && Object.hasOwnProperty.call(message, "start"))
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start);
+ if (message.end != null && Object.hasOwnProperty.call(message, "end"))
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
+ * @static
+ * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an EnumReservedRange message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ EnumReservedRange.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.start = reader.int32();
+ break;
+ }
+ case 2: {
+ message.end = reader.int32();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ EnumReservedRange.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an EnumReservedRange message.
+ * @function verify
+ * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ EnumReservedRange.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.start != null && message.hasOwnProperty("start"))
+ if (!$util.isInteger(message.start))
+ return "start: integer expected";
+ if (message.end != null && message.hasOwnProperty("end"))
+ if (!$util.isInteger(message.end))
+ return "end: integer expected";
+ return null;
+ };
+
+ /**
+ * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange
+ */
+ EnumReservedRange.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange)
+ return object;
+ var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange();
+ if (object.start != null)
+ message.start = object.start | 0;
+ if (object.end != null)
+ message.end = object.end | 0;
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
+ * @static
+ * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ EnumReservedRange.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.start = 0;
+ object.end = 0;
+ }
+ if (message.start != null && message.hasOwnProperty("start"))
+ object.start = message.start;
+ if (message.end != null && message.hasOwnProperty("end"))
+ object.end = message.end;
+ return object;
+ };
+
+ /**
+ * Converts this EnumReservedRange to JSON.
+ * @function toJSON
+ * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ EnumReservedRange.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for EnumReservedRange
+ * @function getTypeUrl
+ * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange";
+ };
+
+ return EnumReservedRange;
+ })();
+
+ return EnumDescriptorProto;
+ })();
+
+ protobuf.EnumValueDescriptorProto = (function() {
+
+ /**
+ * Properties of an EnumValueDescriptorProto.
+ * @memberof google.protobuf
+ * @interface IEnumValueDescriptorProto
+ * @property {string|null} [name] EnumValueDescriptorProto name
+ * @property {number|null} [number] EnumValueDescriptorProto number
+ * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options
+ */
+
+ /**
+ * Constructs a new EnumValueDescriptorProto.
+ * @memberof google.protobuf
+ * @classdesc Represents an EnumValueDescriptorProto.
+ * @implements IEnumValueDescriptorProto
+ * @constructor
+ * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set
+ */
+ function EnumValueDescriptorProto(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * EnumValueDescriptorProto name.
+ * @member {string} name
+ * @memberof google.protobuf.EnumValueDescriptorProto
+ * @instance
+ */
+ EnumValueDescriptorProto.prototype.name = "";
+
+ /**
+ * EnumValueDescriptorProto number.
+ * @member {number} number
+ * @memberof google.protobuf.EnumValueDescriptorProto
+ * @instance
+ */
+ EnumValueDescriptorProto.prototype.number = 0;
+
+ /**
+ * EnumValueDescriptorProto options.
+ * @member {google.protobuf.IEnumValueOptions|null|undefined} options
+ * @memberof google.protobuf.EnumValueDescriptorProto
+ * @instance
+ */
+ EnumValueDescriptorProto.prototype.options = null;
+
+ /**
+ * Creates a new EnumValueDescriptorProto instance using the specified properties.
+ * @function create
+ * @memberof google.protobuf.EnumValueDescriptorProto
+ * @static
+ * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set
+ * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance
+ */
+ EnumValueDescriptorProto.create = function create(properties) {
+ return new EnumValueDescriptorProto(properties);
+ };
+
+ /**
+ * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages.
+ * @function encode
+ * @memberof google.protobuf.EnumValueDescriptorProto
+ * @static
+ * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ EnumValueDescriptorProto.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ if (message.number != null && Object.hasOwnProperty.call(message, "number"))
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number);
+ if (message.options != null && Object.hasOwnProperty.call(message, "options"))
+ $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.protobuf.EnumValueDescriptorProto
+ * @static
+ * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an EnumValueDescriptorProto message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.protobuf.EnumValueDescriptorProto
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ EnumValueDescriptorProto.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 2: {
+ message.number = reader.int32();
+ break;
+ }
+ case 3: {
+ message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.protobuf.EnumValueDescriptorProto
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an EnumValueDescriptorProto message.
+ * @function verify
+ * @memberof google.protobuf.EnumValueDescriptorProto
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ EnumValueDescriptorProto.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.number != null && message.hasOwnProperty("number"))
+ if (!$util.isInteger(message.number))
+ return "number: integer expected";
+ if (message.options != null && message.hasOwnProperty("options")) {
+ var error = $root.google.protobuf.EnumValueOptions.verify(message.options);
+ if (error)
+ return "options." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.protobuf.EnumValueDescriptorProto
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto
+ */
+ EnumValueDescriptorProto.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.protobuf.EnumValueDescriptorProto)
+ return object;
+ var message = new $root.google.protobuf.EnumValueDescriptorProto();
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object.number != null)
+ message.number = object.number | 0;
+ if (object.options != null) {
+ if (typeof object.options !== "object")
+ throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected");
+ message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.protobuf.EnumValueDescriptorProto
+ * @static
+ * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ EnumValueDescriptorProto.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.name = "";
+ object.number = 0;
+ object.options = null;
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.number != null && message.hasOwnProperty("number"))
+ object.number = message.number;
+ if (message.options != null && message.hasOwnProperty("options"))
+ object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options);
+ return object;
+ };
+
+ /**
+ * Converts this EnumValueDescriptorProto to JSON.
+ * @function toJSON
+ * @memberof google.protobuf.EnumValueDescriptorProto
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ EnumValueDescriptorProto.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for EnumValueDescriptorProto
+ * @function getTypeUrl
+ * @memberof google.protobuf.EnumValueDescriptorProto
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto";
+ };
+
+ return EnumValueDescriptorProto;
+ })();
+
+ protobuf.ServiceDescriptorProto = (function() {
+
+ /**
+ * Properties of a ServiceDescriptorProto.
+ * @memberof google.protobuf
+ * @interface IServiceDescriptorProto
+ * @property {string|null} [name] ServiceDescriptorProto name
+ * @property {Array.|null} [method] ServiceDescriptorProto method
+ * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options
+ */
+
+ /**
+ * Constructs a new ServiceDescriptorProto.
+ * @memberof google.protobuf
+ * @classdesc Represents a ServiceDescriptorProto.
+ * @implements IServiceDescriptorProto
+ * @constructor
+ * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set
+ */
+ function ServiceDescriptorProto(properties) {
+ this.method = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ServiceDescriptorProto name.
+ * @member {string} name
+ * @memberof google.protobuf.ServiceDescriptorProto
+ * @instance
+ */
+ ServiceDescriptorProto.prototype.name = "";
+
+ /**
+ * ServiceDescriptorProto method.
+ * @member {Array.} method
+ * @memberof google.protobuf.ServiceDescriptorProto
+ * @instance
+ */
+ ServiceDescriptorProto.prototype.method = $util.emptyArray;
+
+ /**
+ * ServiceDescriptorProto options.
+ * @member {google.protobuf.IServiceOptions|null|undefined} options
+ * @memberof google.protobuf.ServiceDescriptorProto
+ * @instance
+ */
+ ServiceDescriptorProto.prototype.options = null;
+
+ /**
+ * Creates a new ServiceDescriptorProto instance using the specified properties.
+ * @function create
+ * @memberof google.protobuf.ServiceDescriptorProto
+ * @static
+ * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set
+ * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance
+ */
+ ServiceDescriptorProto.create = function create(properties) {
+ return new ServiceDescriptorProto(properties);
+ };
+
+ /**
+ * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages.
+ * @function encode
+ * @memberof google.protobuf.ServiceDescriptorProto
+ * @static
+ * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ServiceDescriptorProto.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ if (message.method != null && message.method.length)
+ for (var i = 0; i < message.method.length; ++i)
+ $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ if (message.options != null && Object.hasOwnProperty.call(message, "options"))
+ $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.protobuf.ServiceDescriptorProto
+ * @static
+ * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ServiceDescriptorProto message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.protobuf.ServiceDescriptorProto
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ServiceDescriptorProto.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 2: {
+ if (!(message.method && message.method.length))
+ message.method = [];
+ message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32()));
+ break;
+ }
+ case 3: {
+ message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.protobuf.ServiceDescriptorProto
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ServiceDescriptorProto message.
+ * @function verify
+ * @memberof google.protobuf.ServiceDescriptorProto
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ServiceDescriptorProto.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.method != null && message.hasOwnProperty("method")) {
+ if (!Array.isArray(message.method))
+ return "method: array expected";
+ for (var i = 0; i < message.method.length; ++i) {
+ var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]);
+ if (error)
+ return "method." + error;
+ }
+ }
+ if (message.options != null && message.hasOwnProperty("options")) {
+ var error = $root.google.protobuf.ServiceOptions.verify(message.options);
+ if (error)
+ return "options." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.protobuf.ServiceDescriptorProto
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto
+ */
+ ServiceDescriptorProto.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.protobuf.ServiceDescriptorProto)
+ return object;
+ var message = new $root.google.protobuf.ServiceDescriptorProto();
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object.method) {
+ if (!Array.isArray(object.method))
+ throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected");
+ message.method = [];
+ for (var i = 0; i < object.method.length; ++i) {
+ if (typeof object.method[i] !== "object")
+ throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected");
+ message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]);
+ }
+ }
+ if (object.options != null) {
+ if (typeof object.options !== "object")
+ throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected");
+ message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.protobuf.ServiceDescriptorProto
+ * @static
+ * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ServiceDescriptorProto.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.method = [];
+ if (options.defaults) {
+ object.name = "";
+ object.options = null;
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.method && message.method.length) {
+ object.method = [];
+ for (var j = 0; j < message.method.length; ++j)
+ object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options);
+ }
+ if (message.options != null && message.hasOwnProperty("options"))
+ object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options);
+ return object;
+ };
+
+ /**
+ * Converts this ServiceDescriptorProto to JSON.
+ * @function toJSON
+ * @memberof google.protobuf.ServiceDescriptorProto
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ServiceDescriptorProto.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ServiceDescriptorProto
+ * @function getTypeUrl
+ * @memberof google.protobuf.ServiceDescriptorProto
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto";
+ };
+
+ return ServiceDescriptorProto;
+ })();
+
+ protobuf.MethodDescriptorProto = (function() {
+
+ /**
+ * Properties of a MethodDescriptorProto.
+ * @memberof google.protobuf
+ * @interface IMethodDescriptorProto
+ * @property {string|null} [name] MethodDescriptorProto name
+ * @property {string|null} [inputType] MethodDescriptorProto inputType
+ * @property {string|null} [outputType] MethodDescriptorProto outputType
+ * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options
+ * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming
+ * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming
+ */
+
+ /**
+ * Constructs a new MethodDescriptorProto.
+ * @memberof google.protobuf
+ * @classdesc Represents a MethodDescriptorProto.
+ * @implements IMethodDescriptorProto
+ * @constructor
+ * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set
+ */
+ function MethodDescriptorProto(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * MethodDescriptorProto name.
+ * @member {string} name
+ * @memberof google.protobuf.MethodDescriptorProto
+ * @instance
+ */
+ MethodDescriptorProto.prototype.name = "";
+
+ /**
+ * MethodDescriptorProto inputType.
+ * @member {string} inputType
+ * @memberof google.protobuf.MethodDescriptorProto
+ * @instance
+ */
+ MethodDescriptorProto.prototype.inputType = "";
+
+ /**
+ * MethodDescriptorProto outputType.
+ * @member {string} outputType
+ * @memberof google.protobuf.MethodDescriptorProto
+ * @instance
+ */
+ MethodDescriptorProto.prototype.outputType = "";
+
+ /**
+ * MethodDescriptorProto options.
+ * @member {google.protobuf.IMethodOptions|null|undefined} options
+ * @memberof google.protobuf.MethodDescriptorProto
+ * @instance
+ */
+ MethodDescriptorProto.prototype.options = null;
+
+ /**
+ * MethodDescriptorProto clientStreaming.
+ * @member {boolean} clientStreaming
+ * @memberof google.protobuf.MethodDescriptorProto
+ * @instance
+ */
+ MethodDescriptorProto.prototype.clientStreaming = false;
+
+ /**
+ * MethodDescriptorProto serverStreaming.
+ * @member {boolean} serverStreaming
+ * @memberof google.protobuf.MethodDescriptorProto
+ * @instance
+ */
+ MethodDescriptorProto.prototype.serverStreaming = false;
+
+ /**
+ * Creates a new MethodDescriptorProto instance using the specified properties.
+ * @function create
+ * @memberof google.protobuf.MethodDescriptorProto
+ * @static
+ * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set
+ * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance
+ */
+ MethodDescriptorProto.create = function create(properties) {
+ return new MethodDescriptorProto(properties);
+ };
+
+ /**
+ * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages.
+ * @function encode
+ * @memberof google.protobuf.MethodDescriptorProto
+ * @static
+ * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ MethodDescriptorProto.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType);
+ if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType);
+ if (message.options != null && Object.hasOwnProperty.call(message, "options"))
+ $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
+ if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming"))
+ writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming);
+ if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming"))
+ writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.protobuf.MethodDescriptorProto
+ * @static
+ * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a MethodDescriptorProto message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.protobuf.MethodDescriptorProto
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ MethodDescriptorProto.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 2: {
+ message.inputType = reader.string();
+ break;
+ }
+ case 3: {
+ message.outputType = reader.string();
+ break;
+ }
+ case 4: {
+ message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32());
+ break;
+ }
+ case 5: {
+ message.clientStreaming = reader.bool();
+ break;
+ }
+ case 6: {
+ message.serverStreaming = reader.bool();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.protobuf.MethodDescriptorProto
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a MethodDescriptorProto message.
+ * @function verify
+ * @memberof google.protobuf.MethodDescriptorProto
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ MethodDescriptorProto.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.inputType != null && message.hasOwnProperty("inputType"))
+ if (!$util.isString(message.inputType))
+ return "inputType: string expected";
+ if (message.outputType != null && message.hasOwnProperty("outputType"))
+ if (!$util.isString(message.outputType))
+ return "outputType: string expected";
+ if (message.options != null && message.hasOwnProperty("options")) {
+ var error = $root.google.protobuf.MethodOptions.verify(message.options);
+ if (error)
+ return "options." + error;
+ }
+ if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming"))
+ if (typeof message.clientStreaming !== "boolean")
+ return "clientStreaming: boolean expected";
+ if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming"))
+ if (typeof message.serverStreaming !== "boolean")
+ return "serverStreaming: boolean expected";
+ return null;
+ };
+
+ /**
+ * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.protobuf.MethodDescriptorProto
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto
+ */
+ MethodDescriptorProto.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.protobuf.MethodDescriptorProto)
+ return object;
+ var message = new $root.google.protobuf.MethodDescriptorProto();
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object.inputType != null)
+ message.inputType = String(object.inputType);
+ if (object.outputType != null)
+ message.outputType = String(object.outputType);
+ if (object.options != null) {
+ if (typeof object.options !== "object")
+ throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected");
+ message.options = $root.google.protobuf.MethodOptions.fromObject(object.options);
+ }
+ if (object.clientStreaming != null)
+ message.clientStreaming = Boolean(object.clientStreaming);
+ if (object.serverStreaming != null)
+ message.serverStreaming = Boolean(object.serverStreaming);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.protobuf.MethodDescriptorProto
+ * @static
+ * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ MethodDescriptorProto.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.name = "";
+ object.inputType = "";
+ object.outputType = "";
+ object.options = null;
+ object.clientStreaming = false;
+ object.serverStreaming = false;
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.inputType != null && message.hasOwnProperty("inputType"))
+ object.inputType = message.inputType;
+ if (message.outputType != null && message.hasOwnProperty("outputType"))
+ object.outputType = message.outputType;
+ if (message.options != null && message.hasOwnProperty("options"))
+ object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options);
+ if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming"))
+ object.clientStreaming = message.clientStreaming;
+ if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming"))
+ object.serverStreaming = message.serverStreaming;
+ return object;
+ };
+
+ /**
+ * Converts this MethodDescriptorProto to JSON.
+ * @function toJSON
+ * @memberof google.protobuf.MethodDescriptorProto
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ MethodDescriptorProto.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for MethodDescriptorProto
+ * @function getTypeUrl
+ * @memberof google.protobuf.MethodDescriptorProto
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto";
+ };
+
+ return MethodDescriptorProto;
+ })();
+
+ protobuf.FileOptions = (function() {
+
+ /**
+ * Properties of a FileOptions.
+ * @memberof google.protobuf
+ * @interface IFileOptions
+ * @property {string|null} [javaPackage] FileOptions javaPackage
+ * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname
+ * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles
+ * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash
+ * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8
+ * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor
+ * @property {string|null} [goPackage] FileOptions goPackage
+ * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices
+ * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices
+ * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices
+ * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices
+ * @property {boolean|null} [deprecated] FileOptions deprecated
+ * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas
+ * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix
+ * @property {string|null} [csharpNamespace] FileOptions csharpNamespace
+ * @property {string|null} [swiftPrefix] FileOptions swiftPrefix
+ * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix
+ * @property {string|null} [phpNamespace] FileOptions phpNamespace
+ * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace
+ * @property {string|null} [rubyPackage] FileOptions rubyPackage
+ * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption
+ */
+
+ /**
+ * Constructs a new FileOptions.
+ * @memberof google.protobuf
+ * @classdesc Represents a FileOptions.
+ * @implements IFileOptions
+ * @constructor
+ * @param {google.protobuf.IFileOptions=} [properties] Properties to set
+ */
+ function FileOptions(properties) {
+ this.uninterpretedOption = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * FileOptions javaPackage.
+ * @member {string} javaPackage
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.javaPackage = "";
+
+ /**
+ * FileOptions javaOuterClassname.
+ * @member {string} javaOuterClassname
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.javaOuterClassname = "";
+
+ /**
+ * FileOptions javaMultipleFiles.
+ * @member {boolean} javaMultipleFiles
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.javaMultipleFiles = false;
+
+ /**
+ * FileOptions javaGenerateEqualsAndHash.
+ * @member {boolean} javaGenerateEqualsAndHash
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.javaGenerateEqualsAndHash = false;
+
+ /**
+ * FileOptions javaStringCheckUtf8.
+ * @member {boolean} javaStringCheckUtf8
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.javaStringCheckUtf8 = false;
+
+ /**
+ * FileOptions optimizeFor.
+ * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.optimizeFor = 1;
+
+ /**
+ * FileOptions goPackage.
+ * @member {string} goPackage
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.goPackage = "";
+
+ /**
+ * FileOptions ccGenericServices.
+ * @member {boolean} ccGenericServices
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.ccGenericServices = false;
+
+ /**
+ * FileOptions javaGenericServices.
+ * @member {boolean} javaGenericServices
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.javaGenericServices = false;
+
+ /**
+ * FileOptions pyGenericServices.
+ * @member {boolean} pyGenericServices
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.pyGenericServices = false;
+
+ /**
+ * FileOptions phpGenericServices.
+ * @member {boolean} phpGenericServices
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.phpGenericServices = false;
+
+ /**
+ * FileOptions deprecated.
+ * @member {boolean} deprecated
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.deprecated = false;
+
+ /**
+ * FileOptions ccEnableArenas.
+ * @member {boolean} ccEnableArenas
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.ccEnableArenas = true;
+
+ /**
+ * FileOptions objcClassPrefix.
+ * @member {string} objcClassPrefix
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.objcClassPrefix = "";
+
+ /**
+ * FileOptions csharpNamespace.
+ * @member {string} csharpNamespace
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.csharpNamespace = "";
+
+ /**
+ * FileOptions swiftPrefix.
+ * @member {string} swiftPrefix
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.swiftPrefix = "";
+
+ /**
+ * FileOptions phpClassPrefix.
+ * @member {string} phpClassPrefix
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.phpClassPrefix = "";
+
+ /**
+ * FileOptions phpNamespace.
+ * @member {string} phpNamespace
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.phpNamespace = "";
+
+ /**
+ * FileOptions phpMetadataNamespace.
+ * @member {string} phpMetadataNamespace
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.phpMetadataNamespace = "";
+
+ /**
+ * FileOptions rubyPackage.
+ * @member {string} rubyPackage
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.rubyPackage = "";
+
+ /**
+ * FileOptions uninterpretedOption.
+ * @member {Array.} uninterpretedOption
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.uninterpretedOption = $util.emptyArray;
+
+ /**
+ * Creates a new FileOptions instance using the specified properties.
+ * @function create
+ * @memberof google.protobuf.FileOptions
+ * @static
+ * @param {google.protobuf.IFileOptions=} [properties] Properties to set
+ * @returns {google.protobuf.FileOptions} FileOptions instance
+ */
+ FileOptions.create = function create(properties) {
+ return new FileOptions(properties);
+ };
+
+ /**
+ * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages.
+ * @function encode
+ * @memberof google.protobuf.FileOptions
+ * @static
+ * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ FileOptions.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage);
+ if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname"))
+ writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname);
+ if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor"))
+ writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor);
+ if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles"))
+ writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles);
+ if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage"))
+ writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage);
+ if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices"))
+ writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices);
+ if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices"))
+ writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices);
+ if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices"))
+ writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices);
+ if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash"))
+ writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash);
+ if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated"))
+ writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated);
+ if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8"))
+ writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8);
+ if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas"))
+ writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas);
+ if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix"))
+ writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix);
+ if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace"))
+ writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace);
+ if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix"))
+ writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix);
+ if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix"))
+ writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix);
+ if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace"))
+ writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace);
+ if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices"))
+ writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices);
+ if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace"))
+ writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace);
+ if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage"))
+ writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage);
+ if (message.uninterpretedOption != null && message.uninterpretedOption.length)
+ for (var i = 0; i < message.uninterpretedOption.length; ++i)
+ $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.protobuf.FileOptions
+ * @static
+ * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ FileOptions.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a FileOptions message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.protobuf.FileOptions
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.protobuf.FileOptions} FileOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ FileOptions.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.javaPackage = reader.string();
+ break;
+ }
+ case 8: {
+ message.javaOuterClassname = reader.string();
+ break;
+ }
+ case 10: {
+ message.javaMultipleFiles = reader.bool();
+ break;
+ }
+ case 20: {
+ message.javaGenerateEqualsAndHash = reader.bool();
+ break;
+ }
+ case 27: {
+ message.javaStringCheckUtf8 = reader.bool();
+ break;
+ }
+ case 9: {
+ message.optimizeFor = reader.int32();
+ break;
+ }
+ case 11: {
+ message.goPackage = reader.string();
+ break;
+ }
+ case 16: {
+ message.ccGenericServices = reader.bool();
+ break;
+ }
+ case 17: {
+ message.javaGenericServices = reader.bool();
+ break;
+ }
+ case 18: {
+ message.pyGenericServices = reader.bool();
+ break;
+ }
+ case 42: {
+ message.phpGenericServices = reader.bool();
+ break;
+ }
+ case 23: {
+ message.deprecated = reader.bool();
+ break;
+ }
+ case 31: {
+ message.ccEnableArenas = reader.bool();
+ break;
+ }
+ case 36: {
+ message.objcClassPrefix = reader.string();
+ break;
+ }
+ case 37: {
+ message.csharpNamespace = reader.string();
+ break;
+ }
+ case 39: {
+ message.swiftPrefix = reader.string();
+ break;
+ }
+ case 40: {
+ message.phpClassPrefix = reader.string();
+ break;
+ }
+ case 41: {
+ message.phpNamespace = reader.string();
+ break;
+ }
+ case 44: {
+ message.phpMetadataNamespace = reader.string();
+ break;
+ }
+ case 45: {
+ message.rubyPackage = reader.string();
+ break;
+ }
+ case 999: {
+ if (!(message.uninterpretedOption && message.uninterpretedOption.length))
+ message.uninterpretedOption = [];
+ message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a FileOptions message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.protobuf.FileOptions
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.protobuf.FileOptions} FileOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ FileOptions.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a FileOptions message.
+ * @function verify
+ * @memberof google.protobuf.FileOptions
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ FileOptions.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.javaPackage != null && message.hasOwnProperty("javaPackage"))
+ if (!$util.isString(message.javaPackage))
+ return "javaPackage: string expected";
+ if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname"))
+ if (!$util.isString(message.javaOuterClassname))
+ return "javaOuterClassname: string expected";
+ if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles"))
+ if (typeof message.javaMultipleFiles !== "boolean")
+ return "javaMultipleFiles: boolean expected";
+ if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash"))
+ if (typeof message.javaGenerateEqualsAndHash !== "boolean")
+ return "javaGenerateEqualsAndHash: boolean expected";
+ if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8"))
+ if (typeof message.javaStringCheckUtf8 !== "boolean")
+ return "javaStringCheckUtf8: boolean expected";
+ if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor"))
+ switch (message.optimizeFor) {
+ default:
+ return "optimizeFor: enum value expected";
+ case 1:
+ case 2:
+ case 3:
+ break;
+ }
+ if (message.goPackage != null && message.hasOwnProperty("goPackage"))
+ if (!$util.isString(message.goPackage))
+ return "goPackage: string expected";
+ if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices"))
+ if (typeof message.ccGenericServices !== "boolean")
+ return "ccGenericServices: boolean expected";
+ if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices"))
+ if (typeof message.javaGenericServices !== "boolean")
+ return "javaGenericServices: boolean expected";
+ if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices"))
+ if (typeof message.pyGenericServices !== "boolean")
+ return "pyGenericServices: boolean expected";
+ if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices"))
+ if (typeof message.phpGenericServices !== "boolean")
+ return "phpGenericServices: boolean expected";
+ if (message.deprecated != null && message.hasOwnProperty("deprecated"))
+ if (typeof message.deprecated !== "boolean")
+ return "deprecated: boolean expected";
+ if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas"))
+ if (typeof message.ccEnableArenas !== "boolean")
+ return "ccEnableArenas: boolean expected";
+ if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix"))
+ if (!$util.isString(message.objcClassPrefix))
+ return "objcClassPrefix: string expected";
+ if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace"))
+ if (!$util.isString(message.csharpNamespace))
+ return "csharpNamespace: string expected";
+ if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix"))
+ if (!$util.isString(message.swiftPrefix))
+ return "swiftPrefix: string expected";
+ if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix"))
+ if (!$util.isString(message.phpClassPrefix))
+ return "phpClassPrefix: string expected";
+ if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace"))
+ if (!$util.isString(message.phpNamespace))
+ return "phpNamespace: string expected";
+ if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace"))
+ if (!$util.isString(message.phpMetadataNamespace))
+ return "phpMetadataNamespace: string expected";
+ if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage"))
+ if (!$util.isString(message.rubyPackage))
+ return "rubyPackage: string expected";
+ if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
+ if (!Array.isArray(message.uninterpretedOption))
+ return "uninterpretedOption: array expected";
+ for (var i = 0; i < message.uninterpretedOption.length; ++i) {
+ var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
+ if (error)
+ return "uninterpretedOption." + error;
+ }
+ }
+ return null;
+ };
+
+ /**
+ * Creates a FileOptions message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.protobuf.FileOptions
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.protobuf.FileOptions} FileOptions
+ */
+ FileOptions.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.protobuf.FileOptions)
+ return object;
+ var message = new $root.google.protobuf.FileOptions();
+ if (object.javaPackage != null)
+ message.javaPackage = String(object.javaPackage);
+ if (object.javaOuterClassname != null)
+ message.javaOuterClassname = String(object.javaOuterClassname);
+ if (object.javaMultipleFiles != null)
+ message.javaMultipleFiles = Boolean(object.javaMultipleFiles);
+ if (object.javaGenerateEqualsAndHash != null)
+ message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash);
+ if (object.javaStringCheckUtf8 != null)
+ message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8);
+ switch (object.optimizeFor) {
+ case "SPEED":
+ case 1:
+ message.optimizeFor = 1;
+ break;
+ case "CODE_SIZE":
+ case 2:
+ message.optimizeFor = 2;
+ break;
+ case "LITE_RUNTIME":
+ case 3:
+ message.optimizeFor = 3;
+ break;
+ }
+ if (object.goPackage != null)
+ message.goPackage = String(object.goPackage);
+ if (object.ccGenericServices != null)
+ message.ccGenericServices = Boolean(object.ccGenericServices);
+ if (object.javaGenericServices != null)
+ message.javaGenericServices = Boolean(object.javaGenericServices);
+ if (object.pyGenericServices != null)
+ message.pyGenericServices = Boolean(object.pyGenericServices);
+ if (object.phpGenericServices != null)
+ message.phpGenericServices = Boolean(object.phpGenericServices);
+ if (object.deprecated != null)
+ message.deprecated = Boolean(object.deprecated);
+ if (object.ccEnableArenas != null)
+ message.ccEnableArenas = Boolean(object.ccEnableArenas);
+ if (object.objcClassPrefix != null)
+ message.objcClassPrefix = String(object.objcClassPrefix);
+ if (object.csharpNamespace != null)
+ message.csharpNamespace = String(object.csharpNamespace);
+ if (object.swiftPrefix != null)
+ message.swiftPrefix = String(object.swiftPrefix);
+ if (object.phpClassPrefix != null)
+ message.phpClassPrefix = String(object.phpClassPrefix);
+ if (object.phpNamespace != null)
+ message.phpNamespace = String(object.phpNamespace);
+ if (object.phpMetadataNamespace != null)
+ message.phpMetadataNamespace = String(object.phpMetadataNamespace);
+ if (object.rubyPackage != null)
+ message.rubyPackage = String(object.rubyPackage);
+ if (object.uninterpretedOption) {
+ if (!Array.isArray(object.uninterpretedOption))
+ throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected");
+ message.uninterpretedOption = [];
+ for (var i = 0; i < object.uninterpretedOption.length; ++i) {
+ if (typeof object.uninterpretedOption[i] !== "object")
+ throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected");
+ message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a FileOptions message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.protobuf.FileOptions
+ * @static
+ * @param {google.protobuf.FileOptions} message FileOptions
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ FileOptions.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.uninterpretedOption = [];
+ if (options.defaults) {
+ object.javaPackage = "";
+ object.javaOuterClassname = "";
+ object.optimizeFor = options.enums === String ? "SPEED" : 1;
+ object.javaMultipleFiles = false;
+ object.goPackage = "";
+ object.ccGenericServices = false;
+ object.javaGenericServices = false;
+ object.pyGenericServices = false;
+ object.javaGenerateEqualsAndHash = false;
+ object.deprecated = false;
+ object.javaStringCheckUtf8 = false;
+ object.ccEnableArenas = true;
+ object.objcClassPrefix = "";
+ object.csharpNamespace = "";
+ object.swiftPrefix = "";
+ object.phpClassPrefix = "";
+ object.phpNamespace = "";
+ object.phpGenericServices = false;
+ object.phpMetadataNamespace = "";
+ object.rubyPackage = "";
+ }
+ if (message.javaPackage != null && message.hasOwnProperty("javaPackage"))
+ object.javaPackage = message.javaPackage;
+ if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname"))
+ object.javaOuterClassname = message.javaOuterClassname;
+ if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor"))
+ object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor;
+ if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles"))
+ object.javaMultipleFiles = message.javaMultipleFiles;
+ if (message.goPackage != null && message.hasOwnProperty("goPackage"))
+ object.goPackage = message.goPackage;
+ if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices"))
+ object.ccGenericServices = message.ccGenericServices;
+ if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices"))
+ object.javaGenericServices = message.javaGenericServices;
+ if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices"))
+ object.pyGenericServices = message.pyGenericServices;
+ if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash"))
+ object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash;
+ if (message.deprecated != null && message.hasOwnProperty("deprecated"))
+ object.deprecated = message.deprecated;
+ if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8"))
+ object.javaStringCheckUtf8 = message.javaStringCheckUtf8;
+ if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas"))
+ object.ccEnableArenas = message.ccEnableArenas;
+ if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix"))
+ object.objcClassPrefix = message.objcClassPrefix;
+ if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace"))
+ object.csharpNamespace = message.csharpNamespace;
+ if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix"))
+ object.swiftPrefix = message.swiftPrefix;
+ if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix"))
+ object.phpClassPrefix = message.phpClassPrefix;
+ if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace"))
+ object.phpNamespace = message.phpNamespace;
+ if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices"))
+ object.phpGenericServices = message.phpGenericServices;
+ if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace"))
+ object.phpMetadataNamespace = message.phpMetadataNamespace;
+ if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage"))
+ object.rubyPackage = message.rubyPackage;
+ if (message.uninterpretedOption && message.uninterpretedOption.length) {
+ object.uninterpretedOption = [];
+ for (var j = 0; j < message.uninterpretedOption.length; ++j)
+ object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
+ }
+ return object;
+ };
+
+ /**
+ * Converts this FileOptions to JSON.
+ * @function toJSON
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ FileOptions.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for FileOptions
+ * @function getTypeUrl
+ * @memberof google.protobuf.FileOptions
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.protobuf.FileOptions";
+ };
+
+ /**
+ * OptimizeMode enum.
+ * @name google.protobuf.FileOptions.OptimizeMode
+ * @enum {number}
+ * @property {number} SPEED=1 SPEED value
+ * @property {number} CODE_SIZE=2 CODE_SIZE value
+ * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value
+ */
+ FileOptions.OptimizeMode = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[1] = "SPEED"] = 1;
+ values[valuesById[2] = "CODE_SIZE"] = 2;
+ values[valuesById[3] = "LITE_RUNTIME"] = 3;
+ return values;
+ })();
+
+ return FileOptions;
+ })();
+
+ protobuf.MessageOptions = (function() {
+
+ /**
+ * Properties of a MessageOptions.
+ * @memberof google.protobuf
+ * @interface IMessageOptions
+ * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat
+ * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor
+ * @property {boolean|null} [deprecated] MessageOptions deprecated
+ * @property {boolean|null} [mapEntry] MessageOptions mapEntry
+ * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption
+ */
+
+ /**
+ * Constructs a new MessageOptions.
+ * @memberof google.protobuf
+ * @classdesc Represents a MessageOptions.
+ * @implements IMessageOptions
+ * @constructor
+ * @param {google.protobuf.IMessageOptions=} [properties] Properties to set
+ */
+ function MessageOptions(properties) {
+ this.uninterpretedOption = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * MessageOptions messageSetWireFormat.
+ * @member {boolean} messageSetWireFormat
+ * @memberof google.protobuf.MessageOptions
+ * @instance
+ */
+ MessageOptions.prototype.messageSetWireFormat = false;
+
+ /**
+ * MessageOptions noStandardDescriptorAccessor.
+ * @member {boolean} noStandardDescriptorAccessor
+ * @memberof google.protobuf.MessageOptions
+ * @instance
+ */
+ MessageOptions.prototype.noStandardDescriptorAccessor = false;
+
+ /**
+ * MessageOptions deprecated.
+ * @member {boolean} deprecated
+ * @memberof google.protobuf.MessageOptions
+ * @instance
+ */
+ MessageOptions.prototype.deprecated = false;
+
+ /**
+ * MessageOptions mapEntry.
+ * @member {boolean} mapEntry
+ * @memberof google.protobuf.MessageOptions
+ * @instance
+ */
+ MessageOptions.prototype.mapEntry = false;
+
+ /**
+ * MessageOptions uninterpretedOption.
+ * @member {Array.} uninterpretedOption
+ * @memberof google.protobuf.MessageOptions
+ * @instance
+ */
+ MessageOptions.prototype.uninterpretedOption = $util.emptyArray;
+
+ /**
+ * Creates a new MessageOptions instance using the specified properties.
+ * @function create
+ * @memberof google.protobuf.MessageOptions
+ * @static
+ * @param {google.protobuf.IMessageOptions=} [properties] Properties to set
+ * @returns {google.protobuf.MessageOptions} MessageOptions instance
+ */
+ MessageOptions.create = function create(properties) {
+ return new MessageOptions(properties);
+ };
+
+ /**
+ * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages.
+ * @function encode
+ * @memberof google.protobuf.MessageOptions
+ * @static
+ * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ MessageOptions.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat"))
+ writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat);
+ if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor"))
+ writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor);
+ if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated"))
+ writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated);
+ if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry"))
+ writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry);
+ if (message.uninterpretedOption != null && message.uninterpretedOption.length)
+ for (var i = 0; i < message.uninterpretedOption.length; ++i)
+ $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.protobuf.MessageOptions
+ * @static
+ * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ MessageOptions.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a MessageOptions message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.protobuf.MessageOptions
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.protobuf.MessageOptions} MessageOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ MessageOptions.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.messageSetWireFormat = reader.bool();
+ break;
+ }
+ case 2: {
+ message.noStandardDescriptorAccessor = reader.bool();
+ break;
+ }
+ case 3: {
+ message.deprecated = reader.bool();
+ break;
+ }
+ case 7: {
+ message.mapEntry = reader.bool();
+ break;
+ }
+ case 999: {
+ if (!(message.uninterpretedOption && message.uninterpretedOption.length))
+ message.uninterpretedOption = [];
+ message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a MessageOptions message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.protobuf.MessageOptions
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.protobuf.MessageOptions} MessageOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ MessageOptions.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a MessageOptions message.
+ * @function verify
+ * @memberof google.protobuf.MessageOptions
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ MessageOptions.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat"))
+ if (typeof message.messageSetWireFormat !== "boolean")
+ return "messageSetWireFormat: boolean expected";
+ if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor"))
+ if (typeof message.noStandardDescriptorAccessor !== "boolean")
+ return "noStandardDescriptorAccessor: boolean expected";
+ if (message.deprecated != null && message.hasOwnProperty("deprecated"))
+ if (typeof message.deprecated !== "boolean")
+ return "deprecated: boolean expected";
+ if (message.mapEntry != null && message.hasOwnProperty("mapEntry"))
+ if (typeof message.mapEntry !== "boolean")
+ return "mapEntry: boolean expected";
+ if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
+ if (!Array.isArray(message.uninterpretedOption))
+ return "uninterpretedOption: array expected";
+ for (var i = 0; i < message.uninterpretedOption.length; ++i) {
+ var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
+ if (error)
+ return "uninterpretedOption." + error;
+ }
+ }
+ return null;
+ };
+
+ /**
+ * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.protobuf.MessageOptions
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.protobuf.MessageOptions} MessageOptions
+ */
+ MessageOptions.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.protobuf.MessageOptions)
+ return object;
+ var message = new $root.google.protobuf.MessageOptions();
+ if (object.messageSetWireFormat != null)
+ message.messageSetWireFormat = Boolean(object.messageSetWireFormat);
+ if (object.noStandardDescriptorAccessor != null)
+ message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor);
+ if (object.deprecated != null)
+ message.deprecated = Boolean(object.deprecated);
+ if (object.mapEntry != null)
+ message.mapEntry = Boolean(object.mapEntry);
+ if (object.uninterpretedOption) {
+ if (!Array.isArray(object.uninterpretedOption))
+ throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected");
+ message.uninterpretedOption = [];
+ for (var i = 0; i < object.uninterpretedOption.length; ++i) {
+ if (typeof object.uninterpretedOption[i] !== "object")
+ throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected");
+ message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a MessageOptions message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.protobuf.MessageOptions
+ * @static
+ * @param {google.protobuf.MessageOptions} message MessageOptions
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ MessageOptions.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.uninterpretedOption = [];
+ if (options.defaults) {
+ object.messageSetWireFormat = false;
+ object.noStandardDescriptorAccessor = false;
+ object.deprecated = false;
+ object.mapEntry = false;
+ }
+ if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat"))
+ object.messageSetWireFormat = message.messageSetWireFormat;
+ if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor"))
+ object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor;
+ if (message.deprecated != null && message.hasOwnProperty("deprecated"))
+ object.deprecated = message.deprecated;
+ if (message.mapEntry != null && message.hasOwnProperty("mapEntry"))
+ object.mapEntry = message.mapEntry;
+ if (message.uninterpretedOption && message.uninterpretedOption.length) {
+ object.uninterpretedOption = [];
+ for (var j = 0; j < message.uninterpretedOption.length; ++j)
+ object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
+ }
+ return object;
+ };
+
+ /**
+ * Converts this MessageOptions to JSON.
+ * @function toJSON
+ * @memberof google.protobuf.MessageOptions
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ MessageOptions.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for MessageOptions
+ * @function getTypeUrl
+ * @memberof google.protobuf.MessageOptions
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.protobuf.MessageOptions";
+ };
+
+ return MessageOptions;
+ })();
+
+ protobuf.FieldOptions = (function() {
+
+ /**
+ * Properties of a FieldOptions.
+ * @memberof google.protobuf
+ * @interface IFieldOptions
+ * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype
+ * @property {boolean|null} [packed] FieldOptions packed
+ * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype
+ * @property {boolean|null} [lazy] FieldOptions lazy
+ * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy
+ * @property {boolean|null} [deprecated] FieldOptions deprecated
+ * @property {boolean|null} [weak] FieldOptions weak
+ * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption
+ * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior
+ */
+
+ /**
+ * Constructs a new FieldOptions.
+ * @memberof google.protobuf
+ * @classdesc Represents a FieldOptions.
+ * @implements IFieldOptions
+ * @constructor
+ * @param {google.protobuf.IFieldOptions=} [properties] Properties to set
+ */
+ function FieldOptions(properties) {
+ this.uninterpretedOption = [];
+ this[".google.api.fieldBehavior"] = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * FieldOptions ctype.
+ * @member {google.protobuf.FieldOptions.CType} ctype
+ * @memberof google.protobuf.FieldOptions
+ * @instance
+ */
+ FieldOptions.prototype.ctype = 0;
+
+ /**
+ * FieldOptions packed.
+ * @member {boolean} packed
+ * @memberof google.protobuf.FieldOptions
+ * @instance
+ */
+ FieldOptions.prototype.packed = false;
+
+ /**
+ * FieldOptions jstype.
+ * @member {google.protobuf.FieldOptions.JSType} jstype
+ * @memberof google.protobuf.FieldOptions
+ * @instance
+ */
+ FieldOptions.prototype.jstype = 0;
+
+ /**
+ * FieldOptions lazy.
+ * @member {boolean} lazy
+ * @memberof google.protobuf.FieldOptions
+ * @instance
+ */
+ FieldOptions.prototype.lazy = false;
+
+ /**
+ * FieldOptions unverifiedLazy.
+ * @member {boolean} unverifiedLazy
+ * @memberof google.protobuf.FieldOptions
+ * @instance
+ */
+ FieldOptions.prototype.unverifiedLazy = false;
+
+ /**
+ * FieldOptions deprecated.
+ * @member {boolean} deprecated
+ * @memberof google.protobuf.FieldOptions
+ * @instance
+ */
+ FieldOptions.prototype.deprecated = false;
+
+ /**
+ * FieldOptions weak.
+ * @member {boolean} weak
+ * @memberof google.protobuf.FieldOptions
+ * @instance
+ */
+ FieldOptions.prototype.weak = false;
+
+ /**
+ * FieldOptions uninterpretedOption.
+ * @member {Array.} uninterpretedOption
+ * @memberof google.protobuf.FieldOptions
+ * @instance
+ */
+ FieldOptions.prototype.uninterpretedOption = $util.emptyArray;
+
+ /**
+ * FieldOptions .google.api.fieldBehavior.
+ * @member {Array.} .google.api.fieldBehavior
+ * @memberof google.protobuf.FieldOptions
+ * @instance
+ */
+ FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray;
+
+ /**
+ * Creates a new FieldOptions instance using the specified properties.
+ * @function create
+ * @memberof google.protobuf.FieldOptions
+ * @static
+ * @param {google.protobuf.IFieldOptions=} [properties] Properties to set
+ * @returns {google.protobuf.FieldOptions} FieldOptions instance
+ */
+ FieldOptions.create = function create(properties) {
+ return new FieldOptions(properties);
+ };
+
+ /**
+ * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages.
+ * @function encode
+ * @memberof google.protobuf.FieldOptions
+ * @static
+ * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ FieldOptions.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype"))
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype);
+ if (message.packed != null && Object.hasOwnProperty.call(message, "packed"))
+ writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed);
+ if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated"))
+ writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated);
+ if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy"))
+ writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy);
+ if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype"))
+ writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype);
+ if (message.weak != null && Object.hasOwnProperty.call(message, "weak"))
+ writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak);
+ if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy"))
+ writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy);
+ if (message.uninterpretedOption != null && message.uninterpretedOption.length)
+ for (var i = 0; i < message.uninterpretedOption.length; ++i)
+ $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
+ if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) {
+ writer.uint32(/* id 1052, wireType 2 =*/8418).fork();
+ for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i)
+ writer.int32(message[".google.api.fieldBehavior"][i]);
+ writer.ldelim();
+ }
+ return writer;
+ };
+
+ /**
+ * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.protobuf.FieldOptions
+ * @static
+ * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ FieldOptions.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a FieldOptions message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.protobuf.FieldOptions
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.protobuf.FieldOptions} FieldOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ FieldOptions.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.ctype = reader.int32();
+ break;
+ }
+ case 2: {
+ message.packed = reader.bool();
+ break;
+ }
+ case 6: {
+ message.jstype = reader.int32();
+ break;
+ }
+ case 5: {
+ message.lazy = reader.bool();
+ break;
+ }
+ case 15: {
+ message.unverifiedLazy = reader.bool();
+ break;
+ }
+ case 3: {
+ message.deprecated = reader.bool();
+ break;
+ }
+ case 10: {
+ message.weak = reader.bool();
+ break;
+ }
+ case 999: {
+ if (!(message.uninterpretedOption && message.uninterpretedOption.length))
+ message.uninterpretedOption = [];
+ message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
+ break;
+ }
+ case 1052: {
+ if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length))
+ message[".google.api.fieldBehavior"] = [];
+ if ((tag & 7) === 2) {
+ var end2 = reader.uint32() + reader.pos;
+ while (reader.pos < end2)
+ message[".google.api.fieldBehavior"].push(reader.int32());
+ } else
+ message[".google.api.fieldBehavior"].push(reader.int32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a FieldOptions message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.protobuf.FieldOptions
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.protobuf.FieldOptions} FieldOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ FieldOptions.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a FieldOptions message.
+ * @function verify
+ * @memberof google.protobuf.FieldOptions
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ FieldOptions.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.ctype != null && message.hasOwnProperty("ctype"))
+ switch (message.ctype) {
+ default:
+ return "ctype: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ break;
+ }
+ if (message.packed != null && message.hasOwnProperty("packed"))
+ if (typeof message.packed !== "boolean")
+ return "packed: boolean expected";
+ if (message.jstype != null && message.hasOwnProperty("jstype"))
+ switch (message.jstype) {
+ default:
+ return "jstype: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ break;
+ }
+ if (message.lazy != null && message.hasOwnProperty("lazy"))
+ if (typeof message.lazy !== "boolean")
+ return "lazy: boolean expected";
+ if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy"))
+ if (typeof message.unverifiedLazy !== "boolean")
+ return "unverifiedLazy: boolean expected";
+ if (message.deprecated != null && message.hasOwnProperty("deprecated"))
+ if (typeof message.deprecated !== "boolean")
+ return "deprecated: boolean expected";
+ if (message.weak != null && message.hasOwnProperty("weak"))
+ if (typeof message.weak !== "boolean")
+ return "weak: boolean expected";
+ if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
+ if (!Array.isArray(message.uninterpretedOption))
+ return "uninterpretedOption: array expected";
+ for (var i = 0; i < message.uninterpretedOption.length; ++i) {
+ var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
+ if (error)
+ return "uninterpretedOption." + error;
+ }
+ }
+ if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) {
+ if (!Array.isArray(message[".google.api.fieldBehavior"]))
+ return ".google.api.fieldBehavior: array expected";
+ for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i)
+ switch (message[".google.api.fieldBehavior"][i]) {
+ default:
+ return ".google.api.fieldBehavior: enum value[] expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ break;
+ }
+ }
+ return null;
+ };
+
+ /**
+ * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.protobuf.FieldOptions
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.protobuf.FieldOptions} FieldOptions
+ */
+ FieldOptions.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.protobuf.FieldOptions)
+ return object;
+ var message = new $root.google.protobuf.FieldOptions();
+ switch (object.ctype) {
+ case "STRING":
+ case 0:
+ message.ctype = 0;
+ break;
+ case "CORD":
+ case 1:
+ message.ctype = 1;
+ break;
+ case "STRING_PIECE":
+ case 2:
+ message.ctype = 2;
+ break;
+ }
+ if (object.packed != null)
+ message.packed = Boolean(object.packed);
+ switch (object.jstype) {
+ case "JS_NORMAL":
+ case 0:
+ message.jstype = 0;
+ break;
+ case "JS_STRING":
+ case 1:
+ message.jstype = 1;
+ break;
+ case "JS_NUMBER":
+ case 2:
+ message.jstype = 2;
+ break;
+ }
+ if (object.lazy != null)
+ message.lazy = Boolean(object.lazy);
+ if (object.unverifiedLazy != null)
+ message.unverifiedLazy = Boolean(object.unverifiedLazy);
+ if (object.deprecated != null)
+ message.deprecated = Boolean(object.deprecated);
+ if (object.weak != null)
+ message.weak = Boolean(object.weak);
+ if (object.uninterpretedOption) {
+ if (!Array.isArray(object.uninterpretedOption))
+ throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected");
+ message.uninterpretedOption = [];
+ for (var i = 0; i < object.uninterpretedOption.length; ++i) {
+ if (typeof object.uninterpretedOption[i] !== "object")
+ throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected");
+ message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
+ }
+ }
+ if (object[".google.api.fieldBehavior"]) {
+ if (!Array.isArray(object[".google.api.fieldBehavior"]))
+ throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected");
+ message[".google.api.fieldBehavior"] = [];
+ for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i)
+ switch (object[".google.api.fieldBehavior"][i]) {
+ default:
+ case "FIELD_BEHAVIOR_UNSPECIFIED":
+ case 0:
+ message[".google.api.fieldBehavior"][i] = 0;
+ break;
+ case "OPTIONAL":
+ case 1:
+ message[".google.api.fieldBehavior"][i] = 1;
+ break;
+ case "REQUIRED":
+ case 2:
+ message[".google.api.fieldBehavior"][i] = 2;
+ break;
+ case "OUTPUT_ONLY":
+ case 3:
+ message[".google.api.fieldBehavior"][i] = 3;
+ break;
+ case "INPUT_ONLY":
+ case 4:
+ message[".google.api.fieldBehavior"][i] = 4;
+ break;
+ case "IMMUTABLE":
+ case 5:
+ message[".google.api.fieldBehavior"][i] = 5;
+ break;
+ case "UNORDERED_LIST":
+ case 6:
+ message[".google.api.fieldBehavior"][i] = 6;
+ break;
+ case "NON_EMPTY_DEFAULT":
+ case 7:
+ message[".google.api.fieldBehavior"][i] = 7;
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a FieldOptions message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.protobuf.FieldOptions
+ * @static
+ * @param {google.protobuf.FieldOptions} message FieldOptions
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ FieldOptions.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults) {
+ object.uninterpretedOption = [];
+ object[".google.api.fieldBehavior"] = [];
+ }
+ if (options.defaults) {
+ object.ctype = options.enums === String ? "STRING" : 0;
+ object.packed = false;
+ object.deprecated = false;
+ object.lazy = false;
+ object.jstype = options.enums === String ? "JS_NORMAL" : 0;
+ object.weak = false;
+ object.unverifiedLazy = false;
+ }
+ if (message.ctype != null && message.hasOwnProperty("ctype"))
+ object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype;
+ if (message.packed != null && message.hasOwnProperty("packed"))
+ object.packed = message.packed;
+ if (message.deprecated != null && message.hasOwnProperty("deprecated"))
+ object.deprecated = message.deprecated;
+ if (message.lazy != null && message.hasOwnProperty("lazy"))
+ object.lazy = message.lazy;
+ if (message.jstype != null && message.hasOwnProperty("jstype"))
+ object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype;
+ if (message.weak != null && message.hasOwnProperty("weak"))
+ object.weak = message.weak;
+ if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy"))
+ object.unverifiedLazy = message.unverifiedLazy;
+ if (message.uninterpretedOption && message.uninterpretedOption.length) {
+ object.uninterpretedOption = [];
+ for (var j = 0; j < message.uninterpretedOption.length; ++j)
+ object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
+ }
+ if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) {
+ object[".google.api.fieldBehavior"] = [];
+ for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j)
+ object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j];
+ }
+ return object;
+ };
+
+ /**
+ * Converts this FieldOptions to JSON.
+ * @function toJSON
+ * @memberof google.protobuf.FieldOptions
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ FieldOptions.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for FieldOptions
+ * @function getTypeUrl
+ * @memberof google.protobuf.FieldOptions
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.protobuf.FieldOptions";
+ };
+
+ /**
+ * CType enum.
+ * @name google.protobuf.FieldOptions.CType
+ * @enum {number}
+ * @property {number} STRING=0 STRING value
+ * @property {number} CORD=1 CORD value
+ * @property {number} STRING_PIECE=2 STRING_PIECE value
+ */
+ FieldOptions.CType = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "STRING"] = 0;
+ values[valuesById[1] = "CORD"] = 1;
+ values[valuesById[2] = "STRING_PIECE"] = 2;
+ return values;
+ })();
+
+ /**
+ * JSType enum.
+ * @name google.protobuf.FieldOptions.JSType
+ * @enum {number}
+ * @property {number} JS_NORMAL=0 JS_NORMAL value
+ * @property {number} JS_STRING=1 JS_STRING value
+ * @property {number} JS_NUMBER=2 JS_NUMBER value
+ */
+ FieldOptions.JSType = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "JS_NORMAL"] = 0;
+ values[valuesById[1] = "JS_STRING"] = 1;
+ values[valuesById[2] = "JS_NUMBER"] = 2;
+ return values;
+ })();
+
+ return FieldOptions;
+ })();
+
+ protobuf.OneofOptions = (function() {
+
+ /**
+ * Properties of an OneofOptions.
+ * @memberof google.protobuf
+ * @interface IOneofOptions
+ * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption
+ */
+
+ /**
+ * Constructs a new OneofOptions.
+ * @memberof google.protobuf
+ * @classdesc Represents an OneofOptions.
+ * @implements IOneofOptions
+ * @constructor
+ * @param {google.protobuf.IOneofOptions=} [properties] Properties to set
+ */
+ function OneofOptions(properties) {
+ this.uninterpretedOption = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * OneofOptions uninterpretedOption.
+ * @member {Array.} uninterpretedOption
+ * @memberof google.protobuf.OneofOptions
+ * @instance
+ */
+ OneofOptions.prototype.uninterpretedOption = $util.emptyArray;
+
+ /**
+ * Creates a new OneofOptions instance using the specified properties.
+ * @function create
+ * @memberof google.protobuf.OneofOptions
+ * @static
+ * @param {google.protobuf.IOneofOptions=} [properties] Properties to set
+ * @returns {google.protobuf.OneofOptions} OneofOptions instance
+ */
+ OneofOptions.create = function create(properties) {
+ return new OneofOptions(properties);
+ };
+
+ /**
+ * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages.
+ * @function encode
+ * @memberof google.protobuf.OneofOptions
+ * @static
+ * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ OneofOptions.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.uninterpretedOption != null && message.uninterpretedOption.length)
+ for (var i = 0; i < message.uninterpretedOption.length; ++i)
+ $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.protobuf.OneofOptions
+ * @static
+ * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ OneofOptions.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an OneofOptions message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.protobuf.OneofOptions
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.protobuf.OneofOptions} OneofOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ OneofOptions.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 999: {
+ if (!(message.uninterpretedOption && message.uninterpretedOption.length))
+ message.uninterpretedOption = [];
+ message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an OneofOptions message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.protobuf.OneofOptions
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.protobuf.OneofOptions} OneofOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ OneofOptions.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an OneofOptions message.
+ * @function verify
+ * @memberof google.protobuf.OneofOptions
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ OneofOptions.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
+ if (!Array.isArray(message.uninterpretedOption))
+ return "uninterpretedOption: array expected";
+ for (var i = 0; i < message.uninterpretedOption.length; ++i) {
+ var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
+ if (error)
+ return "uninterpretedOption." + error;
+ }
+ }
+ return null;
+ };
+
+ /**
+ * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.protobuf.OneofOptions
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.protobuf.OneofOptions} OneofOptions
+ */
+ OneofOptions.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.protobuf.OneofOptions)
+ return object;
+ var message = new $root.google.protobuf.OneofOptions();
+ if (object.uninterpretedOption) {
+ if (!Array.isArray(object.uninterpretedOption))
+ throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected");
+ message.uninterpretedOption = [];
+ for (var i = 0; i < object.uninterpretedOption.length; ++i) {
+ if (typeof object.uninterpretedOption[i] !== "object")
+ throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected");
+ message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an OneofOptions message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.protobuf.OneofOptions
+ * @static
+ * @param {google.protobuf.OneofOptions} message OneofOptions
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ OneofOptions.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.uninterpretedOption = [];
+ if (message.uninterpretedOption && message.uninterpretedOption.length) {
+ object.uninterpretedOption = [];
+ for (var j = 0; j < message.uninterpretedOption.length; ++j)
+ object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
+ }
+ return object;
+ };
+
+ /**
+ * Converts this OneofOptions to JSON.
+ * @function toJSON
+ * @memberof google.protobuf.OneofOptions
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ OneofOptions.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for OneofOptions
+ * @function getTypeUrl
+ * @memberof google.protobuf.OneofOptions
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.protobuf.OneofOptions";
+ };
+
+ return OneofOptions;
+ })();
+
+ protobuf.EnumOptions = (function() {
+
+ /**
+ * Properties of an EnumOptions.
+ * @memberof google.protobuf
+ * @interface IEnumOptions
+ * @property {boolean|null} [allowAlias] EnumOptions allowAlias
+ * @property {boolean|null} [deprecated] EnumOptions deprecated
+ * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption
+ */
+
+ /**
+ * Constructs a new EnumOptions.
+ * @memberof google.protobuf
+ * @classdesc Represents an EnumOptions.
+ * @implements IEnumOptions
+ * @constructor
+ * @param {google.protobuf.IEnumOptions=} [properties] Properties to set
+ */
+ function EnumOptions(properties) {
+ this.uninterpretedOption = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * EnumOptions allowAlias.
+ * @member {boolean} allowAlias
+ * @memberof google.protobuf.EnumOptions
+ * @instance
+ */
+ EnumOptions.prototype.allowAlias = false;
+
+ /**
+ * EnumOptions deprecated.
+ * @member {boolean} deprecated
+ * @memberof google.protobuf.EnumOptions
+ * @instance
+ */
+ EnumOptions.prototype.deprecated = false;
+
+ /**
+ * EnumOptions uninterpretedOption.
+ * @member {Array.} uninterpretedOption
+ * @memberof google.protobuf.EnumOptions
+ * @instance
+ */
+ EnumOptions.prototype.uninterpretedOption = $util.emptyArray;
+
+ /**
+ * Creates a new EnumOptions instance using the specified properties.
+ * @function create
+ * @memberof google.protobuf.EnumOptions
+ * @static
+ * @param {google.protobuf.IEnumOptions=} [properties] Properties to set
+ * @returns {google.protobuf.EnumOptions} EnumOptions instance
+ */
+ EnumOptions.create = function create(properties) {
+ return new EnumOptions(properties);
+ };
+
+ /**
+ * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages.
+ * @function encode
+ * @memberof google.protobuf.EnumOptions
+ * @static
+ * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ EnumOptions.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias"))
+ writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias);
+ if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated"))
+ writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated);
+ if (message.uninterpretedOption != null && message.uninterpretedOption.length)
+ for (var i = 0; i < message.uninterpretedOption.length; ++i)
+ $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.protobuf.EnumOptions
+ * @static
+ * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ EnumOptions.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an EnumOptions message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.protobuf.EnumOptions
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.protobuf.EnumOptions} EnumOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ EnumOptions.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 2: {
+ message.allowAlias = reader.bool();
+ break;
+ }
+ case 3: {
+ message.deprecated = reader.bool();
+ break;
+ }
+ case 999: {
+ if (!(message.uninterpretedOption && message.uninterpretedOption.length))
+ message.uninterpretedOption = [];
+ message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an EnumOptions message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.protobuf.EnumOptions
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.protobuf.EnumOptions} EnumOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ EnumOptions.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an EnumOptions message.
+ * @function verify
+ * @memberof google.protobuf.EnumOptions
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ EnumOptions.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.allowAlias != null && message.hasOwnProperty("allowAlias"))
+ if (typeof message.allowAlias !== "boolean")
+ return "allowAlias: boolean expected";
+ if (message.deprecated != null && message.hasOwnProperty("deprecated"))
+ if (typeof message.deprecated !== "boolean")
+ return "deprecated: boolean expected";
+ if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
+ if (!Array.isArray(message.uninterpretedOption))
+ return "uninterpretedOption: array expected";
+ for (var i = 0; i < message.uninterpretedOption.length; ++i) {
+ var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
+ if (error)
+ return "uninterpretedOption." + error;
+ }
+ }
+ return null;
+ };
+
+ /**
+ * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.protobuf.EnumOptions
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.protobuf.EnumOptions} EnumOptions
+ */
+ EnumOptions.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.protobuf.EnumOptions)
+ return object;
+ var message = new $root.google.protobuf.EnumOptions();
+ if (object.allowAlias != null)
+ message.allowAlias = Boolean(object.allowAlias);
+ if (object.deprecated != null)
+ message.deprecated = Boolean(object.deprecated);
+ if (object.uninterpretedOption) {
+ if (!Array.isArray(object.uninterpretedOption))
+ throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected");
+ message.uninterpretedOption = [];
+ for (var i = 0; i < object.uninterpretedOption.length; ++i) {
+ if (typeof object.uninterpretedOption[i] !== "object")
+ throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected");
+ message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an EnumOptions message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.protobuf.EnumOptions
+ * @static
+ * @param {google.protobuf.EnumOptions} message EnumOptions
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ EnumOptions.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.uninterpretedOption = [];
+ if (options.defaults) {
+ object.allowAlias = false;
+ object.deprecated = false;
+ }
+ if (message.allowAlias != null && message.hasOwnProperty("allowAlias"))
+ object.allowAlias = message.allowAlias;
+ if (message.deprecated != null && message.hasOwnProperty("deprecated"))
+ object.deprecated = message.deprecated;
+ if (message.uninterpretedOption && message.uninterpretedOption.length) {
+ object.uninterpretedOption = [];
+ for (var j = 0; j < message.uninterpretedOption.length; ++j)
+ object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
+ }
+ return object;
+ };
+
+ /**
+ * Converts this EnumOptions to JSON.
+ * @function toJSON
+ * @memberof google.protobuf.EnumOptions
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ EnumOptions.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for EnumOptions
+ * @function getTypeUrl
+ * @memberof google.protobuf.EnumOptions
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.protobuf.EnumOptions";
+ };
+
+ return EnumOptions;
+ })();
+
+ protobuf.EnumValueOptions = (function() {
+
+ /**
+ * Properties of an EnumValueOptions.
+ * @memberof google.protobuf
+ * @interface IEnumValueOptions
+ * @property {boolean|null} [deprecated] EnumValueOptions deprecated
+ * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption
+ */
+
+ /**
+ * Constructs a new EnumValueOptions.
+ * @memberof google.protobuf
+ * @classdesc Represents an EnumValueOptions.
+ * @implements IEnumValueOptions
+ * @constructor
+ * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set
+ */
+ function EnumValueOptions(properties) {
+ this.uninterpretedOption = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * EnumValueOptions deprecated.
+ * @member {boolean} deprecated
+ * @memberof google.protobuf.EnumValueOptions
+ * @instance
+ */
+ EnumValueOptions.prototype.deprecated = false;
+
+ /**
+ * EnumValueOptions uninterpretedOption.
+ * @member {Array.} uninterpretedOption
+ * @memberof google.protobuf.EnumValueOptions
+ * @instance
+ */
+ EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray;
+
+ /**
+ * Creates a new EnumValueOptions instance using the specified properties.
+ * @function create
+ * @memberof google.protobuf.EnumValueOptions
+ * @static
+ * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set
+ * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance
+ */
+ EnumValueOptions.create = function create(properties) {
+ return new EnumValueOptions(properties);
+ };
+
+ /**
+ * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages.
+ * @function encode
+ * @memberof google.protobuf.EnumValueOptions
+ * @static
+ * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ EnumValueOptions.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated"))
+ writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated);
+ if (message.uninterpretedOption != null && message.uninterpretedOption.length)
+ for (var i = 0; i < message.uninterpretedOption.length; ++i)
+ $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.protobuf.EnumValueOptions
+ * @static
+ * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an EnumValueOptions message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.protobuf.EnumValueOptions
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.protobuf.EnumValueOptions} EnumValueOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ EnumValueOptions.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.deprecated = reader.bool();
+ break;
+ }
+ case 999: {
+ if (!(message.uninterpretedOption && message.uninterpretedOption.length))
+ message.uninterpretedOption = [];
+ message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.protobuf.EnumValueOptions
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.protobuf.EnumValueOptions} EnumValueOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ EnumValueOptions.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an EnumValueOptions message.
+ * @function verify
+ * @memberof google.protobuf.EnumValueOptions
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ EnumValueOptions.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.deprecated != null && message.hasOwnProperty("deprecated"))
+ if (typeof message.deprecated !== "boolean")
+ return "deprecated: boolean expected";
+ if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
+ if (!Array.isArray(message.uninterpretedOption))
+ return "uninterpretedOption: array expected";
+ for (var i = 0; i < message.uninterpretedOption.length; ++i) {
+ var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
+ if (error)
+ return "uninterpretedOption." + error;
+ }
+ }
+ return null;
+ };
+
+ /**
+ * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.protobuf.EnumValueOptions
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.protobuf.EnumValueOptions} EnumValueOptions
+ */
+ EnumValueOptions.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.protobuf.EnumValueOptions)
+ return object;
+ var message = new $root.google.protobuf.EnumValueOptions();
+ if (object.deprecated != null)
+ message.deprecated = Boolean(object.deprecated);
+ if (object.uninterpretedOption) {
+ if (!Array.isArray(object.uninterpretedOption))
+ throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected");
+ message.uninterpretedOption = [];
+ for (var i = 0; i < object.uninterpretedOption.length; ++i) {
+ if (typeof object.uninterpretedOption[i] !== "object")
+ throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected");
+ message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.protobuf.EnumValueOptions
+ * @static
+ * @param {google.protobuf.EnumValueOptions} message EnumValueOptions
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ EnumValueOptions.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.uninterpretedOption = [];
+ if (options.defaults)
+ object.deprecated = false;
+ if (message.deprecated != null && message.hasOwnProperty("deprecated"))
+ object.deprecated = message.deprecated;
+ if (message.uninterpretedOption && message.uninterpretedOption.length) {
+ object.uninterpretedOption = [];
+ for (var j = 0; j < message.uninterpretedOption.length; ++j)
+ object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
+ }
+ return object;
+ };
+
+ /**
+ * Converts this EnumValueOptions to JSON.
+ * @function toJSON
+ * @memberof google.protobuf.EnumValueOptions
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ EnumValueOptions.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for EnumValueOptions
+ * @function getTypeUrl
+ * @memberof google.protobuf.EnumValueOptions
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.protobuf.EnumValueOptions";
+ };
+
+ return EnumValueOptions;
+ })();
+
+ protobuf.ServiceOptions = (function() {
+
+ /**
+ * Properties of a ServiceOptions.
+ * @memberof google.protobuf
+ * @interface IServiceOptions
+ * @property {boolean|null} [deprecated] ServiceOptions deprecated
+ * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption
+ * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost
+ * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes
+ */
+
+ /**
+ * Constructs a new ServiceOptions.
+ * @memberof google.protobuf
+ * @classdesc Represents a ServiceOptions.
+ * @implements IServiceOptions
+ * @constructor
+ * @param {google.protobuf.IServiceOptions=} [properties] Properties to set
+ */
+ function ServiceOptions(properties) {
+ this.uninterpretedOption = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ServiceOptions deprecated.
+ * @member {boolean} deprecated
+ * @memberof google.protobuf.ServiceOptions
+ * @instance
+ */
+ ServiceOptions.prototype.deprecated = false;
+
+ /**
+ * ServiceOptions uninterpretedOption.
+ * @member {Array.} uninterpretedOption
+ * @memberof google.protobuf.ServiceOptions
+ * @instance
+ */
+ ServiceOptions.prototype.uninterpretedOption = $util.emptyArray;
+
+ /**
+ * ServiceOptions .google.api.defaultHost.
+ * @member {string} .google.api.defaultHost
+ * @memberof google.protobuf.ServiceOptions
+ * @instance
+ */
+ ServiceOptions.prototype[".google.api.defaultHost"] = "";
+
+ /**
+ * ServiceOptions .google.api.oauthScopes.
+ * @member {string} .google.api.oauthScopes
+ * @memberof google.protobuf.ServiceOptions
+ * @instance
+ */
+ ServiceOptions.prototype[".google.api.oauthScopes"] = "";
+
+ /**
+ * Creates a new ServiceOptions instance using the specified properties.
+ * @function create
+ * @memberof google.protobuf.ServiceOptions
+ * @static
+ * @param {google.protobuf.IServiceOptions=} [properties] Properties to set
+ * @returns {google.protobuf.ServiceOptions} ServiceOptions instance
+ */
+ ServiceOptions.create = function create(properties) {
+ return new ServiceOptions(properties);
+ };
+
+ /**
+ * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages.
+ * @function encode
+ * @memberof google.protobuf.ServiceOptions
+ * @static
+ * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ServiceOptions.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated"))
+ writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated);
+ if (message.uninterpretedOption != null && message.uninterpretedOption.length)
+ for (var i = 0; i < message.uninterpretedOption.length; ++i)
+ $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
+ if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost"))
+ writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]);
+ if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes"))
+ writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.protobuf.ServiceOptions
+ * @static
+ * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ServiceOptions message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.protobuf.ServiceOptions
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.protobuf.ServiceOptions} ServiceOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ServiceOptions.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 33: {
+ message.deprecated = reader.bool();
+ break;
+ }
+ case 999: {
+ if (!(message.uninterpretedOption && message.uninterpretedOption.length))
+ message.uninterpretedOption = [];
+ message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
+ break;
+ }
+ case 1049: {
+ message[".google.api.defaultHost"] = reader.string();
+ break;
+ }
+ case 1050: {
+ message[".google.api.oauthScopes"] = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ServiceOptions message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.protobuf.ServiceOptions
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.protobuf.ServiceOptions} ServiceOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ServiceOptions.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ServiceOptions message.
+ * @function verify
+ * @memberof google.protobuf.ServiceOptions
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ServiceOptions.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.deprecated != null && message.hasOwnProperty("deprecated"))
+ if (typeof message.deprecated !== "boolean")
+ return "deprecated: boolean expected";
+ if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
+ if (!Array.isArray(message.uninterpretedOption))
+ return "uninterpretedOption: array expected";
+ for (var i = 0; i < message.uninterpretedOption.length; ++i) {
+ var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
+ if (error)
+ return "uninterpretedOption." + error;
+ }
+ }
+ if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost"))
+ if (!$util.isString(message[".google.api.defaultHost"]))
+ return ".google.api.defaultHost: string expected";
+ if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes"))
+ if (!$util.isString(message[".google.api.oauthScopes"]))
+ return ".google.api.oauthScopes: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.protobuf.ServiceOptions
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.protobuf.ServiceOptions} ServiceOptions
+ */
+ ServiceOptions.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.protobuf.ServiceOptions)
+ return object;
+ var message = new $root.google.protobuf.ServiceOptions();
+ if (object.deprecated != null)
+ message.deprecated = Boolean(object.deprecated);
+ if (object.uninterpretedOption) {
+ if (!Array.isArray(object.uninterpretedOption))
+ throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected");
+ message.uninterpretedOption = [];
+ for (var i = 0; i < object.uninterpretedOption.length; ++i) {
+ if (typeof object.uninterpretedOption[i] !== "object")
+ throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected");
+ message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
+ }
+ }
+ if (object[".google.api.defaultHost"] != null)
+ message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]);
+ if (object[".google.api.oauthScopes"] != null)
+ message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.protobuf.ServiceOptions
+ * @static
+ * @param {google.protobuf.ServiceOptions} message ServiceOptions
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ServiceOptions.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.uninterpretedOption = [];
+ if (options.defaults) {
+ object.deprecated = false;
+ object[".google.api.defaultHost"] = "";
+ object[".google.api.oauthScopes"] = "";
+ }
+ if (message.deprecated != null && message.hasOwnProperty("deprecated"))
+ object.deprecated = message.deprecated;
+ if (message.uninterpretedOption && message.uninterpretedOption.length) {
+ object.uninterpretedOption = [];
+ for (var j = 0; j < message.uninterpretedOption.length; ++j)
+ object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
+ }
+ if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost"))
+ object[".google.api.defaultHost"] = message[".google.api.defaultHost"];
+ if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes"))
+ object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"];
+ return object;
+ };
+
+ /**
+ * Converts this ServiceOptions to JSON.
+ * @function toJSON
+ * @memberof google.protobuf.ServiceOptions
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ServiceOptions.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ServiceOptions
+ * @function getTypeUrl
+ * @memberof google.protobuf.ServiceOptions
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.protobuf.ServiceOptions";
+ };
+
+ return ServiceOptions;
+ })();
+
+ protobuf.MethodOptions = (function() {
+
+ /**
+ * Properties of a MethodOptions.
+ * @memberof google.protobuf
+ * @interface IMethodOptions
+ * @property {boolean|null} [deprecated] MethodOptions deprecated
+ * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel
+ * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption
+ * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http
+ * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature
+ */
+
+ /**
+ * Constructs a new MethodOptions.
+ * @memberof google.protobuf
+ * @classdesc Represents a MethodOptions.
+ * @implements IMethodOptions
+ * @constructor
+ * @param {google.protobuf.IMethodOptions=} [properties] Properties to set
+ */
+ function MethodOptions(properties) {
+ this.uninterpretedOption = [];
+ this[".google.api.methodSignature"] = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * MethodOptions deprecated.
+ * @member {boolean} deprecated
+ * @memberof google.protobuf.MethodOptions
+ * @instance
+ */
+ MethodOptions.prototype.deprecated = false;
+
+ /**
+ * MethodOptions idempotencyLevel.
+ * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel
+ * @memberof google.protobuf.MethodOptions
+ * @instance
+ */
+ MethodOptions.prototype.idempotencyLevel = 0;
+
+ /**
+ * MethodOptions uninterpretedOption.
+ * @member {Array.} uninterpretedOption
+ * @memberof google.protobuf.MethodOptions
+ * @instance
+ */
+ MethodOptions.prototype.uninterpretedOption = $util.emptyArray;
+
+ /**
+ * MethodOptions .google.api.http.
+ * @member {google.api.IHttpRule|null|undefined} .google.api.http
+ * @memberof google.protobuf.MethodOptions
+ * @instance
+ */
+ MethodOptions.prototype[".google.api.http"] = null;
+
+ /**
+ * MethodOptions .google.api.methodSignature.
+ * @member {Array.} .google.api.methodSignature
+ * @memberof google.protobuf.MethodOptions
+ * @instance
+ */
+ MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray;
+
+ /**
+ * Creates a new MethodOptions instance using the specified properties.
+ * @function create
+ * @memberof google.protobuf.MethodOptions
+ * @static
+ * @param {google.protobuf.IMethodOptions=} [properties] Properties to set
+ * @returns {google.protobuf.MethodOptions} MethodOptions instance
+ */
+ MethodOptions.create = function create(properties) {
+ return new MethodOptions(properties);
+ };
+
+ /**
+ * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages.
+ * @function encode
+ * @memberof google.protobuf.MethodOptions
+ * @static
+ * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ MethodOptions.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated"))
+ writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated);
+ if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel"))
+ writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel);
+ if (message.uninterpretedOption != null && message.uninterpretedOption.length)
+ for (var i = 0; i < message.uninterpretedOption.length; ++i)
+ $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
+ if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length)
+ for (var i = 0; i < message[".google.api.methodSignature"].length; ++i)
+ writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]);
+ if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http"))
+ $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.protobuf.MethodOptions
+ * @static
+ * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ MethodOptions.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a MethodOptions message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.protobuf.MethodOptions
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.protobuf.MethodOptions} MethodOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ MethodOptions.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 33: {
+ message.deprecated = reader.bool();
+ break;
+ }
+ case 34: {
+ message.idempotencyLevel = reader.int32();
+ break;
+ }
+ case 999: {
+ if (!(message.uninterpretedOption && message.uninterpretedOption.length))
+ message.uninterpretedOption = [];
+ message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
+ break;
+ }
+ case 72295728: {
+ message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32());
+ break;
+ }
+ case 1051: {
+ if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length))
+ message[".google.api.methodSignature"] = [];
+ message[".google.api.methodSignature"].push(reader.string());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a MethodOptions message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.protobuf.MethodOptions
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.protobuf.MethodOptions} MethodOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ MethodOptions.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a MethodOptions message.
+ * @function verify
+ * @memberof google.protobuf.MethodOptions
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ MethodOptions.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.deprecated != null && message.hasOwnProperty("deprecated"))
+ if (typeof message.deprecated !== "boolean")
+ return "deprecated: boolean expected";
+ if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel"))
+ switch (message.idempotencyLevel) {
+ default:
+ return "idempotencyLevel: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ break;
+ }
+ if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
+ if (!Array.isArray(message.uninterpretedOption))
+ return "uninterpretedOption: array expected";
+ for (var i = 0; i < message.uninterpretedOption.length; ++i) {
+ var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
+ if (error)
+ return "uninterpretedOption." + error;
+ }
+ }
+ if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) {
+ var error = $root.google.api.HttpRule.verify(message[".google.api.http"]);
+ if (error)
+ return ".google.api.http." + error;
+ }
+ if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) {
+ if (!Array.isArray(message[".google.api.methodSignature"]))
+ return ".google.api.methodSignature: array expected";
+ for (var i = 0; i < message[".google.api.methodSignature"].length; ++i)
+ if (!$util.isString(message[".google.api.methodSignature"][i]))
+ return ".google.api.methodSignature: string[] expected";
+ }
+ return null;
+ };
+
+ /**
+ * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.protobuf.MethodOptions
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.protobuf.MethodOptions} MethodOptions
+ */
+ MethodOptions.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.protobuf.MethodOptions)
+ return object;
+ var message = new $root.google.protobuf.MethodOptions();
+ if (object.deprecated != null)
+ message.deprecated = Boolean(object.deprecated);
+ switch (object.idempotencyLevel) {
+ case "IDEMPOTENCY_UNKNOWN":
+ case 0:
+ message.idempotencyLevel = 0;
+ break;
+ case "NO_SIDE_EFFECTS":
+ case 1:
+ message.idempotencyLevel = 1;
+ break;
+ case "IDEMPOTENT":
+ case 2:
+ message.idempotencyLevel = 2;
+ break;
+ }
+ if (object.uninterpretedOption) {
+ if (!Array.isArray(object.uninterpretedOption))
+ throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected");
+ message.uninterpretedOption = [];
+ for (var i = 0; i < object.uninterpretedOption.length; ++i) {
+ if (typeof object.uninterpretedOption[i] !== "object")
+ throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected");
+ message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
+ }
+ }
+ if (object[".google.api.http"] != null) {
+ if (typeof object[".google.api.http"] !== "object")
+ throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected");
+ message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]);
+ }
+ if (object[".google.api.methodSignature"]) {
+ if (!Array.isArray(object[".google.api.methodSignature"]))
+ throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected");
+ message[".google.api.methodSignature"] = [];
+ for (var i = 0; i < object[".google.api.methodSignature"].length; ++i)
+ message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a MethodOptions message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.protobuf.MethodOptions
+ * @static
+ * @param {google.protobuf.MethodOptions} message MethodOptions
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ MethodOptions.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults) {
+ object.uninterpretedOption = [];
+ object[".google.api.methodSignature"] = [];
+ }
+ if (options.defaults) {
+ object.deprecated = false;
+ object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0;
+ object[".google.api.http"] = null;
+ }
+ if (message.deprecated != null && message.hasOwnProperty("deprecated"))
+ object.deprecated = message.deprecated;
+ if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel"))
+ object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel;
+ if (message.uninterpretedOption && message.uninterpretedOption.length) {
+ object.uninterpretedOption = [];
+ for (var j = 0; j < message.uninterpretedOption.length; ++j)
+ object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
+ }
+ if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) {
+ object[".google.api.methodSignature"] = [];
+ for (var j = 0; j < message[".google.api.methodSignature"].length; ++j)
+ object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j];
+ }
+ if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http"))
+ object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options);
+ return object;
+ };
+
+ /**
+ * Converts this MethodOptions to JSON.
+ * @function toJSON
+ * @memberof google.protobuf.MethodOptions
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ MethodOptions.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for MethodOptions
+ * @function getTypeUrl
+ * @memberof google.protobuf.MethodOptions
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.protobuf.MethodOptions";
+ };
+
+ /**
+ * IdempotencyLevel enum.
+ * @name google.protobuf.MethodOptions.IdempotencyLevel
+ * @enum {number}
+ * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value
+ * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value
+ * @property {number} IDEMPOTENT=2 IDEMPOTENT value
+ */
+ MethodOptions.IdempotencyLevel = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0;
+ values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1;
+ values[valuesById[2] = "IDEMPOTENT"] = 2;
+ return values;
+ })();
+
+ return MethodOptions;
+ })();
+
+ protobuf.UninterpretedOption = (function() {
+
+ /**
+ * Properties of an UninterpretedOption.
+ * @memberof google.protobuf
+ * @interface IUninterpretedOption
+ * @property {Array.|null} [name] UninterpretedOption name
+ * @property {string|null} [identifierValue] UninterpretedOption identifierValue
+ * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue
+ * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue
+ * @property {number|null} [doubleValue] UninterpretedOption doubleValue
+ * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue
+ * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue
+ */
+
+ /**
+ * Constructs a new UninterpretedOption.
+ * @memberof google.protobuf
+ * @classdesc Represents an UninterpretedOption.
+ * @implements IUninterpretedOption
+ * @constructor
+ * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set
+ */
+ function UninterpretedOption(properties) {
+ this.name = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * UninterpretedOption name.
+ * @member {Array.} name
+ * @memberof google.protobuf.UninterpretedOption
+ * @instance
+ */
+ UninterpretedOption.prototype.name = $util.emptyArray;
+
+ /**
+ * UninterpretedOption identifierValue.
+ * @member {string} identifierValue
+ * @memberof google.protobuf.UninterpretedOption
+ * @instance
+ */
+ UninterpretedOption.prototype.identifierValue = "";
+
+ /**
+ * UninterpretedOption positiveIntValue.
+ * @member {number|Long} positiveIntValue
+ * @memberof google.protobuf.UninterpretedOption
+ * @instance
+ */
+ UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
+
+ /**
+ * UninterpretedOption negativeIntValue.
+ * @member {number|Long} negativeIntValue
+ * @memberof google.protobuf.UninterpretedOption
+ * @instance
+ */
+ UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
+
+ /**
+ * UninterpretedOption doubleValue.
+ * @member {number} doubleValue
+ * @memberof google.protobuf.UninterpretedOption
+ * @instance
+ */
+ UninterpretedOption.prototype.doubleValue = 0;
+
+ /**
+ * UninterpretedOption stringValue.
+ * @member {Uint8Array} stringValue
+ * @memberof google.protobuf.UninterpretedOption
+ * @instance
+ */
+ UninterpretedOption.prototype.stringValue = $util.newBuffer([]);
+
+ /**
+ * UninterpretedOption aggregateValue.
+ * @member {string} aggregateValue
+ * @memberof google.protobuf.UninterpretedOption
+ * @instance
+ */
+ UninterpretedOption.prototype.aggregateValue = "";
+
+ /**
+ * Creates a new UninterpretedOption instance using the specified properties.
+ * @function create
+ * @memberof google.protobuf.UninterpretedOption
+ * @static
+ * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set
+ * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance
+ */
+ UninterpretedOption.create = function create(properties) {
+ return new UninterpretedOption(properties);
+ };
+
+ /**
+ * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages.
+ * @function encode
+ * @memberof google.protobuf.UninterpretedOption
+ * @static
+ * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ UninterpretedOption.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.name != null && message.name.length)
+ for (var i = 0; i < message.name.length; ++i)
+ $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue);
+ if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue"))
+ writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue);
+ if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue"))
+ writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue);
+ if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue"))
+ writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue);
+ if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue"))
+ writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue);
+ if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue"))
+ writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.protobuf.UninterpretedOption
+ * @static
+ * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an UninterpretedOption message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.protobuf.UninterpretedOption
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.protobuf.UninterpretedOption} UninterpretedOption
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ UninterpretedOption.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 2: {
+ if (!(message.name && message.name.length))
+ message.name = [];
+ message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32()));
+ break;
+ }
+ case 3: {
+ message.identifierValue = reader.string();
+ break;
+ }
+ case 4: {
+ message.positiveIntValue = reader.uint64();
+ break;
+ }
+ case 5: {
+ message.negativeIntValue = reader.int64();
+ break;
+ }
+ case 6: {
+ message.doubleValue = reader.double();
+ break;
+ }
+ case 7: {
+ message.stringValue = reader.bytes();
+ break;
+ }
+ case 8: {
+ message.aggregateValue = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.protobuf.UninterpretedOption
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.protobuf.UninterpretedOption} UninterpretedOption
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ UninterpretedOption.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an UninterpretedOption message.
+ * @function verify
+ * @memberof google.protobuf.UninterpretedOption
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ UninterpretedOption.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.name != null && message.hasOwnProperty("name")) {
+ if (!Array.isArray(message.name))
+ return "name: array expected";
+ for (var i = 0; i < message.name.length; ++i) {
+ var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]);
+ if (error)
+ return "name." + error;
+ }
+ }
+ if (message.identifierValue != null && message.hasOwnProperty("identifierValue"))
+ if (!$util.isString(message.identifierValue))
+ return "identifierValue: string expected";
+ if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue"))
+ if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high)))
+ return "positiveIntValue: integer|Long expected";
+ if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue"))
+ if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high)))
+ return "negativeIntValue: integer|Long expected";
+ if (message.doubleValue != null && message.hasOwnProperty("doubleValue"))
+ if (typeof message.doubleValue !== "number")
+ return "doubleValue: number expected";
+ if (message.stringValue != null && message.hasOwnProperty("stringValue"))
+ if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue)))
+ return "stringValue: buffer expected";
+ if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue"))
+ if (!$util.isString(message.aggregateValue))
+ return "aggregateValue: string expected";
+ return null;
+ };
+
+ /**
+ * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.protobuf.UninterpretedOption
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.protobuf.UninterpretedOption} UninterpretedOption
+ */
+ UninterpretedOption.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.protobuf.UninterpretedOption)
+ return object;
+ var message = new $root.google.protobuf.UninterpretedOption();
+ if (object.name) {
+ if (!Array.isArray(object.name))
+ throw TypeError(".google.protobuf.UninterpretedOption.name: array expected");
+ message.name = [];
+ for (var i = 0; i < object.name.length; ++i) {
+ if (typeof object.name[i] !== "object")
+ throw TypeError(".google.protobuf.UninterpretedOption.name: object expected");
+ message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]);
+ }
+ }
+ if (object.identifierValue != null)
+ message.identifierValue = String(object.identifierValue);
+ if (object.positiveIntValue != null)
+ if ($util.Long)
+ (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true;
+ else if (typeof object.positiveIntValue === "string")
+ message.positiveIntValue = parseInt(object.positiveIntValue, 10);
+ else if (typeof object.positiveIntValue === "number")
+ message.positiveIntValue = object.positiveIntValue;
+ else if (typeof object.positiveIntValue === "object")
+ message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true);
+ if (object.negativeIntValue != null)
+ if ($util.Long)
+ (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false;
+ else if (typeof object.negativeIntValue === "string")
+ message.negativeIntValue = parseInt(object.negativeIntValue, 10);
+ else if (typeof object.negativeIntValue === "number")
+ message.negativeIntValue = object.negativeIntValue;
+ else if (typeof object.negativeIntValue === "object")
+ message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber();
+ if (object.doubleValue != null)
+ message.doubleValue = Number(object.doubleValue);
+ if (object.stringValue != null)
+ if (typeof object.stringValue === "string")
+ $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0);
+ else if (object.stringValue.length >= 0)
+ message.stringValue = object.stringValue;
+ if (object.aggregateValue != null)
+ message.aggregateValue = String(object.aggregateValue);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.protobuf.UninterpretedOption
+ * @static
+ * @param {google.protobuf.UninterpretedOption} message UninterpretedOption
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ UninterpretedOption.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.name = [];
+ if (options.defaults) {
+ object.identifierValue = "";
+ if ($util.Long) {
+ var long = new $util.Long(0, 0, true);
+ object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
+ } else
+ object.positiveIntValue = options.longs === String ? "0" : 0;
+ if ($util.Long) {
+ var long = new $util.Long(0, 0, false);
+ object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
+ } else
+ object.negativeIntValue = options.longs === String ? "0" : 0;
+ object.doubleValue = 0;
+ if (options.bytes === String)
+ object.stringValue = "";
+ else {
+ object.stringValue = [];
+ if (options.bytes !== Array)
+ object.stringValue = $util.newBuffer(object.stringValue);
+ }
+ object.aggregateValue = "";
+ }
+ if (message.name && message.name.length) {
+ object.name = [];
+ for (var j = 0; j < message.name.length; ++j)
+ object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options);
+ }
+ if (message.identifierValue != null && message.hasOwnProperty("identifierValue"))
+ object.identifierValue = message.identifierValue;
+ if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue"))
+ if (typeof message.positiveIntValue === "number")
+ object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue;
+ else
+ object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue;
+ if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue"))
+ if (typeof message.negativeIntValue === "number")
+ object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue;
+ else
+ object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue;
+ if (message.doubleValue != null && message.hasOwnProperty("doubleValue"))
+ object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue;
+ if (message.stringValue != null && message.hasOwnProperty("stringValue"))
+ object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue;
+ if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue"))
+ object.aggregateValue = message.aggregateValue;
+ return object;
+ };
+
+ /**
+ * Converts this UninterpretedOption to JSON.
+ * @function toJSON
+ * @memberof google.protobuf.UninterpretedOption
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ UninterpretedOption.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for UninterpretedOption
+ * @function getTypeUrl
+ * @memberof google.protobuf.UninterpretedOption
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.protobuf.UninterpretedOption";
+ };
+
+ UninterpretedOption.NamePart = (function() {
+
+ /**
+ * Properties of a NamePart.
+ * @memberof google.protobuf.UninterpretedOption
+ * @interface INamePart
+ * @property {string} namePart NamePart namePart
+ * @property {boolean} isExtension NamePart isExtension
+ */
+
+ /**
+ * Constructs a new NamePart.
+ * @memberof google.protobuf.UninterpretedOption
+ * @classdesc Represents a NamePart.
+ * @implements INamePart
+ * @constructor
+ * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set
+ */
+ function NamePart(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * NamePart namePart.
+ * @member {string} namePart
+ * @memberof google.protobuf.UninterpretedOption.NamePart
+ * @instance
+ */
+ NamePart.prototype.namePart = "";
+
+ /**
+ * NamePart isExtension.
+ * @member {boolean} isExtension
+ * @memberof google.protobuf.UninterpretedOption.NamePart
+ * @instance
+ */
+ NamePart.prototype.isExtension = false;
+
+ /**
+ * Creates a new NamePart instance using the specified properties.
+ * @function create
+ * @memberof google.protobuf.UninterpretedOption.NamePart
+ * @static
+ * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set
+ * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance
+ */
+ NamePart.create = function create(properties) {
+ return new NamePart(properties);
+ };
+
+ /**
+ * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages.
+ * @function encode
+ * @memberof google.protobuf.UninterpretedOption.NamePart
+ * @static
+ * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ NamePart.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart);
+ writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.protobuf.UninterpretedOption.NamePart
+ * @static
+ * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ NamePart.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a NamePart message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.protobuf.UninterpretedOption.NamePart
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ NamePart.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.namePart = reader.string();
+ break;
+ }
+ case 2: {
+ message.isExtension = reader.bool();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ if (!message.hasOwnProperty("namePart"))
+ throw $util.ProtocolError("missing required 'namePart'", { instance: message });
+ if (!message.hasOwnProperty("isExtension"))
+ throw $util.ProtocolError("missing required 'isExtension'", { instance: message });
+ return message;
+ };
+
+ /**
+ * Decodes a NamePart message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.protobuf.UninterpretedOption.NamePart
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ NamePart.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a NamePart message.
+ * @function verify
+ * @memberof google.protobuf.UninterpretedOption.NamePart
+ * @static
+ * @param {Object.