diff --git a/packages/google-cloud-billing/.eslintignore b/packages/google-cloud-billing/.eslintignore
new file mode 100644
index 00000000000..ea5b04aebe6
--- /dev/null
+++ b/packages/google-cloud-billing/.eslintignore
@@ -0,0 +1,7 @@
+**/node_modules
+**/coverage
+test/fixtures
+build/
+docs/
+protos/
+samples/generated/
diff --git a/packages/google-cloud-billing/.eslintrc.json b/packages/google-cloud-billing/.eslintrc.json
new file mode 100644
index 00000000000..78215349546
--- /dev/null
+++ b/packages/google-cloud-billing/.eslintrc.json
@@ -0,0 +1,3 @@
+{
+ "extends": "./node_modules/gts"
+}
diff --git a/packages/google-cloud-billing/.gitattributes b/packages/google-cloud-billing/.gitattributes
new file mode 100644
index 00000000000..33739cb74e4
--- /dev/null
+++ b/packages/google-cloud-billing/.gitattributes
@@ -0,0 +1,4 @@
+*.ts text eol=lf
+*.js text eol=lf
+protos/* linguist-generated
+**/api-extractor.json linguist-language=JSON-with-Comments
diff --git a/packages/google-cloud-billing/.github/.OwlBot.yaml b/packages/google-cloud-billing/.github/.OwlBot.yaml
new file mode 100644
index 00000000000..56fc8dbf595
--- /dev/null
+++ b/packages/google-cloud-billing/.github/.OwlBot.yaml
@@ -0,0 +1,25 @@
+# Copyright 2021 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+docker:
+ image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest
+
+deep-remove-regex:
+ - /owl-bot-staging
+
+deep-copy-regex:
+ - source: /google/cloud/billing/(v.*)/.*-nodejs/(.*)
+ dest: /owl-bot-staging/$1/$2
+
+begin-after-commit-hash: fb91803ccef5d7c695139b22788b309e2197856b
+
diff --git a/packages/google-cloud-billing/.gitignore b/packages/google-cloud-billing/.gitignore
new file mode 100644
index 00000000000..5d32b23782f
--- /dev/null
+++ b/packages/google-cloud-billing/.gitignore
@@ -0,0 +1,14 @@
+**/*.log
+**/node_modules
+.coverage
+coverage
+.nyc_output
+docs/
+out/
+build/
+system-test/secrets.js
+system-test/*key.json
+*.lock
+.DS_Store
+package-lock.json
+__pycache__
diff --git a/packages/google-cloud-billing/.jsdoc.js b/packages/google-cloud-billing/.jsdoc.js
new file mode 100644
index 00000000000..a1fe10efe19
--- /dev/null
+++ b/packages/google-cloud-billing/.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/billing',
+ theme: 'lumen',
+ default: {
+ outputSourceFiles: false
+ }
+ },
+ markdown: {
+ idInHeadings: true
+ }
+};
diff --git a/packages/google-cloud-billing/.mocharc.js b/packages/google-cloud-billing/.mocharc.js
new file mode 100644
index 00000000000..0b600509bed
--- /dev/null
+++ b/packages/google-cloud-billing/.mocharc.js
@@ -0,0 +1,29 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+const config = {
+ "enable-source-maps": true,
+ "throw-deprecation": true,
+ "timeout": 10000,
+ "recursive": true
+}
+if (process.env.MOCHA_THROW_DEPRECATION === 'false') {
+ delete config['throw-deprecation'];
+}
+if (process.env.MOCHA_REPORTER) {
+ config.reporter = process.env.MOCHA_REPORTER;
+}
+if (process.env.MOCHA_REPORTER_OUTPUT) {
+ config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`;
+}
+module.exports = config
diff --git a/packages/google-cloud-billing/.mocharc.json b/packages/google-cloud-billing/.mocharc.json
new file mode 100644
index 00000000000..670c5e2c24b
--- /dev/null
+++ b/packages/google-cloud-billing/.mocharc.json
@@ -0,0 +1,5 @@
+{
+ "enable-source-maps": true,
+ "throw-deprecation": true,
+ "timeout": 10000
+}
diff --git a/packages/google-cloud-billing/.nycrc b/packages/google-cloud-billing/.nycrc
new file mode 100644
index 00000000000..b18d5472b62
--- /dev/null
+++ b/packages/google-cloud-billing/.nycrc
@@ -0,0 +1,24 @@
+{
+ "report-dir": "./.coverage",
+ "reporter": ["text", "lcov"],
+ "exclude": [
+ "**/*-test",
+ "**/.coverage",
+ "**/apis",
+ "**/benchmark",
+ "**/conformance",
+ "**/docs",
+ "**/samples",
+ "**/scripts",
+ "**/protos",
+ "**/test",
+ "**/*.d.ts",
+ ".jsdoc.js",
+ "**/.jsdoc.js",
+ "karma.conf.js",
+ "webpack-tests.config.js",
+ "webpack.config.js"
+ ],
+ "exclude-after-remap": false,
+ "all": true
+}
diff --git a/packages/google-cloud-billing/.prettierignore b/packages/google-cloud-billing/.prettierignore
new file mode 100644
index 00000000000..9340ad9b86d
--- /dev/null
+++ b/packages/google-cloud-billing/.prettierignore
@@ -0,0 +1,6 @@
+**/node_modules
+**/coverage
+test/fixtures
+build/
+docs/
+protos/
diff --git a/packages/google-cloud-billing/.prettierrc.js b/packages/google-cloud-billing/.prettierrc.js
new file mode 100644
index 00000000000..d1b95106f4c
--- /dev/null
+++ b/packages/google-cloud-billing/.prettierrc.js
@@ -0,0 +1,17 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+module.exports = {
+ ...require('gts/.prettierrc.json')
+}
diff --git a/packages/google-cloud-billing/.repo-metadata.json b/packages/google-cloud-billing/.repo-metadata.json
new file mode 100644
index 00000000000..7ee5cc0ad47
--- /dev/null
+++ b/packages/google-cloud-billing/.repo-metadata.json
@@ -0,0 +1,16 @@
+{
+ "language": "nodejs",
+ "requires_billing": true,
+ "product_documentation": "https://cloud.google.com/billing/docs",
+ "repo": "googleapis/nodejs-billing",
+ "default_version": "v1",
+ "name_pretty": "Cloud Billing",
+ "release_level": "stable",
+ "distribution_name": "@google-cloud/billing",
+ "name": "billing",
+ "client_documentation": "https://cloud.google.com/nodejs/docs/reference/billing/latest",
+ "api_id": "cloudbilling.googleapis.com",
+ "issue_tracker": "https://issuetracker.google.com/savedsearches/559770",
+ "api_shortname": "cloudbilling",
+ "library_type": "GAPIC_AUTO"
+}
diff --git a/packages/google-cloud-billing/CHANGELOG.md b/packages/google-cloud-billing/CHANGELOG.md
new file mode 100644
index 00000000000..86cb09ed140
--- /dev/null
+++ b/packages/google-cloud-billing/CHANGELOG.md
@@ -0,0 +1,202 @@
+# Changelog
+
+## [3.1.3](https://github.com/googleapis/nodejs-billing/compare/v3.1.2...v3.1.3) (2022-11-10)
+
+
+### Bug Fixes
+
+* **deps:** Use google-gax v3.5.2 ([#255](https://github.com/googleapis/nodejs-billing/issues/255)) ([231ab13](https://github.com/googleapis/nodejs-billing/commit/231ab13fc1895dab416c10a7768f89d84557d10b))
+* Preserve default values in x-goog-request-params header ([#247](https://github.com/googleapis/nodejs-billing/issues/247)) ([d12b854](https://github.com/googleapis/nodejs-billing/commit/d12b854825eb1cc75426077979dd574ef08a5bf0))
+* Regenerated protos JS and TS definitions ([#258](https://github.com/googleapis/nodejs-billing/issues/258)) ([2a148e7](https://github.com/googleapis/nodejs-billing/commit/2a148e75a59ab48d405c40e8a549c4d257161332))
+
+## [3.1.2](https://github.com/googleapis/nodejs-billing/compare/v3.1.1...v3.1.2) (2022-09-01)
+
+
+### Bug Fixes
+
+* Allow passing gax instance to client constructor ([#245](https://github.com/googleapis/nodejs-billing/issues/245)) ([68bb343](https://github.com/googleapis/nodejs-billing/commit/68bb3435033a105250d20f60ef68e0849ddeecba))
+* Do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-billing/issues/1553)) ([#244](https://github.com/googleapis/nodejs-billing/issues/244)) ([eaa9bee](https://github.com/googleapis/nodejs-billing/commit/eaa9bee03df0efe9ed741281c8d927d922574aba))
+
+## [3.1.1](https://github.com/googleapis/nodejs-billing/compare/v3.1.0...v3.1.1) (2022-08-23)
+
+
+### Bug Fixes
+
+* better support for fallback mode ([#240](https://github.com/googleapis/nodejs-billing/issues/240)) ([b56bc7d](https://github.com/googleapis/nodejs-billing/commit/b56bc7d793cc28edc272a257f0477c240653c4bb))
+* change import long to require ([#241](https://github.com/googleapis/nodejs-billing/issues/241)) ([b9a1546](https://github.com/googleapis/nodejs-billing/commit/b9a15460a5075c4f1cbf9686f33f1117b82b1134))
+* remove pip install statements ([#1546](https://github.com/googleapis/nodejs-billing/issues/1546)) ([#243](https://github.com/googleapis/nodejs-billing/issues/243)) ([64c462c](https://github.com/googleapis/nodejs-billing/commit/64c462caa3db15dd193a3043111e33453a5b8bab))
+
+## [3.1.0](https://github.com/googleapis/nodejs-billing/compare/v3.0.0...v3.1.0) (2022-07-04)
+
+
+### Features
+
+* support regapic LRO ([caf329e](https://github.com/googleapis/nodejs-billing/commit/caf329e7a9661a35a3b0600cc7bc0bdb983aa115))
+
+## [3.0.0](https://github.com/googleapis/nodejs-billing/compare/v2.4.0...v3.0.0) (2022-05-20)
+
+
+### ⚠ BREAKING CHANGES
+
+* update library to use Node 12 (#230)
+
+### Build System
+
+* update library to use Node 12 ([#230](https://github.com/googleapis/nodejs-billing/issues/230)) ([9521ea0](https://github.com/googleapis/nodejs-billing/commit/9521ea0ab1916f493da9430800b0dd64bd2f3113))
+
+## [2.4.0](https://github.com/googleapis/nodejs-billing/compare/v2.3.0...v2.4.0) (2022-04-06)
+
+
+### Features
+
+* AuditConfig for IAM v1 ([#218](https://github.com/googleapis/nodejs-billing/issues/218)) ([88e6535](https://github.com/googleapis/nodejs-billing/commit/88e6535e6c356534884c09f7d781a53f330bfef3))
+
+## [2.3.0](https://www.github.com/googleapis/nodejs-billing/compare/v2.2.7...v2.3.0) (2021-08-23)
+
+
+### Features
+
+* turns on self-signed JWT feature flag ([#179](https://www.github.com/googleapis/nodejs-billing/issues/179)) ([9ef0c0d](https://www.github.com/googleapis/nodejs-billing/commit/9ef0c0dfb125a57073fb16ff0ea6bf7c7109816d))
+
+### [2.2.7](https://www.github.com/googleapis/nodejs-billing/compare/v2.2.6...v2.2.7) (2021-08-17)
+
+
+### Bug Fixes
+
+* **deps:** google-gax v2.24.1 ([#177](https://www.github.com/googleapis/nodejs-billing/issues/177)) ([ffad245](https://www.github.com/googleapis/nodejs-billing/commit/ffad2459f25bc1e05a8f022fe754fb28896a021c))
+
+### [2.2.6](https://www.github.com/googleapis/nodejs-billing/compare/v2.2.5...v2.2.6) (2021-07-16)
+
+
+### Bug Fixes
+
+* Updating WORKSPACE files to use the newest version of the Typescript generator. ([#169](https://www.github.com/googleapis/nodejs-billing/issues/169)) ([012b494](https://www.github.com/googleapis/nodejs-billing/commit/012b4942d77e8f59c7a434f8e8c34622d6991553))
+
+### [2.2.5](https://www.github.com/googleapis/nodejs-billing/compare/v2.2.4...v2.2.5) (2021-07-12)
+
+
+### Bug Fixes
+
+* **deps:** google-gax v2.17.1 ([#167](https://www.github.com/googleapis/nodejs-billing/issues/167)) ([a3cc52e](https://www.github.com/googleapis/nodejs-billing/commit/a3cc52ec1b8a73a7c439f1756e37e14b521e0598))
+
+### [2.2.4](https://www.github.com/googleapis/nodejs-billing/compare/v2.2.3...v2.2.4) (2021-06-29)
+
+
+### Bug Fixes
+
+* **deps:** google-gax v2.17.0 with mTLS ([#164](https://www.github.com/googleapis/nodejs-billing/issues/164)) ([f07c6b0](https://www.github.com/googleapis/nodejs-billing/commit/f07c6b0128e7d4962d98f2ae8f0c2f60d91c289f))
+
+### [2.2.3](https://www.github.com/googleapis/nodejs-billing/compare/v2.2.2...v2.2.3) (2021-06-24)
+
+
+### Bug Fixes
+
+* make request optional in all cases ([#160](https://www.github.com/googleapis/nodejs-billing/issues/160)) ([b3859bd](https://www.github.com/googleapis/nodejs-billing/commit/b3859bd8e4aca9df94c4b8dea62b1709c80bd86d))
+
+### [2.2.2](https://www.github.com/googleapis/nodejs-billing/compare/v2.2.1...v2.2.2) (2021-05-25)
+
+
+### Bug Fixes
+
+* GoogleAdsError missing using generator version after 1.3.0 ([#152](https://www.github.com/googleapis/nodejs-billing/issues/152)) ([139287c](https://www.github.com/googleapis/nodejs-billing/commit/139287cfb544d8fe84cc0fc2abd2d4f4755e563b))
+
+### [2.2.1](https://www.github.com/googleapis/nodejs-billing/compare/v2.2.0...v2.2.1) (2021-05-12)
+
+
+### Bug Fixes
+
+* **deps:** require google-gax v2.12.0 ([#143](https://www.github.com/googleapis/nodejs-billing/issues/143)) ([3e56f40](https://www.github.com/googleapis/nodejs-billing/commit/3e56f40026b51001fbefa23a0544a19fdbba8c25))
+* use require() to load JSON protos ([#146](https://www.github.com/googleapis/nodejs-billing/issues/146)) ([c06c0d0](https://www.github.com/googleapis/nodejs-billing/commit/c06c0d09af9882b3f305fbaf25864f84d5aebfa6))
+
+## [2.2.0](https://www.github.com/googleapis/nodejs-billing/compare/v2.1.3...v2.2.0) (2021-01-09)
+
+
+### Features
+
+* adds style enumeration ([#120](https://www.github.com/googleapis/nodejs-billing/issues/120)) ([8f70df9](https://www.github.com/googleapis/nodejs-billing/commit/8f70df92f1a2a5217ae64c10819da55cb01b20fd))
+
+### [2.1.3](https://www.github.com/googleapis/nodejs-billing/compare/v2.1.2...v2.1.3) (2020-11-25)
+
+
+### Bug Fixes
+
+* **browser:** check for fetch on window ([abd3067](https://www.github.com/googleapis/nodejs-billing/commit/abd30678d328bdb62c54dc892c5300342c275e72))
+* do not modify options object, use defaultScopes ([#111](https://www.github.com/googleapis/nodejs-billing/issues/111)) ([be029ad](https://www.github.com/googleapis/nodejs-billing/commit/be029ad5c807cc8d04b8bddde83eb2d53f580a1c))
+
+### [2.1.2](https://www.github.com/googleapis/nodejs-billing/compare/v2.1.1...v2.1.2) (2020-07-09)
+
+
+### Bug Fixes
+
+* typeo in nodejs .gitattribute ([#73](https://www.github.com/googleapis/nodejs-billing/issues/73)) ([286ac25](https://www.github.com/googleapis/nodejs-billing/commit/286ac2555eddc0a36fc3c7eff1c7b5f8ebf4b475))
+
+### [2.1.1](https://www.github.com/googleapis/nodejs-billing/compare/v2.1.0...v2.1.1) (2020-07-07)
+
+
+### Bug Fixes
+
+* update default timeouts for list calls ([#65](https://www.github.com/googleapis/nodejs-billing/issues/65)) ([749e14c](https://www.github.com/googleapis/nodejs-billing/commit/749e14cd9fac5b08b105d93bcaba1d45b6ead6cc))
+
+### [2.1.1](https://www.github.com/googleapis/nodejs-billing/compare/v2.1.0...v2.1.1) (2020-07-06)
+
+
+### Bug Fixes
+
+* update default timeouts for list calls ([#65](https://www.github.com/googleapis/nodejs-billing/issues/65)) ([749e14c](https://www.github.com/googleapis/nodejs-billing/commit/749e14cd9fac5b08b105d93bcaba1d45b6ead6cc))
+
+## [2.1.0](https://www.github.com/googleapis/nodejs-billing/compare/v2.0.0...v2.1.0) (2020-06-15)
+
+
+### Features
+
+* move ts target to es2018 from es2016 ([#59](https://www.github.com/googleapis/nodejs-billing/issues/59)) ([68749b4](https://www.github.com/googleapis/nodejs-billing/commit/68749b419b70eec762479b938f96727ccdc2b49d))
+
+
+### Bug Fixes
+
+* proper fallback option handling ([25a0c07](https://www.github.com/googleapis/nodejs-billing/commit/25a0c0723a87c13b55565bdfd3ad98703f6d5e44))
+
+## [2.0.0](https://www.github.com/googleapis/nodejs-billing/compare/v1.2.0...v2.0.0) (2020-06-04)
+
+
+### ⚠ BREAKING CHANGES
+
+* The library now supports Node.js v10+. The last version to support Node.js v8 is tagged legacy-8 on NPM.
+
+### Features
+
+* drop node8 support, support for async iterators ([#27](https://www.github.com/googleapis/nodejs-billing/issues/27)) ([fb95727](https://www.github.com/googleapis/nodejs-billing/commit/fb9572795d02572feb8c465df01445c1d425c0e6))
+* promote release level to GA ([#52](https://www.github.com/googleapis/nodejs-billing/issues/52)) ([079a4a0](https://www.github.com/googleapis/nodejs-billing/commit/079a4a03fcf161c2f8b84706b7b5d9481deba829)), closes [#3](https://www.github.com/googleapis/nodejs-billing/issues/3)
+
+
+### Bug Fixes
+
+* export explicit version from protos.js ([#33](https://www.github.com/googleapis/nodejs-billing/issues/33)) ([6c2863e](https://www.github.com/googleapis/nodejs-billing/commit/6c2863e520fdeb541ebe65a5edb3c70c18830936))
+* regen protos and tests ([#50](https://www.github.com/googleapis/nodejs-billing/issues/50)) ([7cfa275](https://www.github.com/googleapis/nodejs-billing/commit/7cfa275d3f0bba5436dcfbfde806283b7168e024))
+* remove eslint, update gax, fix generated protos, run the generator ([#37](https://www.github.com/googleapis/nodejs-billing/issues/37)) ([5107cef](https://www.github.com/googleapis/nodejs-billing/commit/5107cef41905344ab25f73a474b27098e15b9f98))
+* update common protos and fix synth ([#56](https://www.github.com/googleapis/nodejs-billing/issues/56)) ([ac7d6b1](https://www.github.com/googleapis/nodejs-billing/commit/ac7d6b1f447d978b0c2c04841a512b8f7218bbae))
+
+## [1.2.0](https://www.github.com/googleapis/nodejs-billing/compare/v1.1.0...v1.2.0) (2020-03-06)
+
+
+### Features
+
+* deferred client initialization ([#12](https://www.github.com/googleapis/nodejs-billing/issues/12)) ([63c6abf](https://www.github.com/googleapis/nodejs-billing/commit/63c6abfc0b1f6322177222a7d65456517fce1e1b))
+
+## [1.1.0](https://www.github.com/googleapis/nodejs-billing/compare/v1.0.0...v1.1.0) (2020-02-29)
+
+
+### Features
+
+* export protos from src/index.ts; update jsdoc config ([ea41ed3](https://www.github.com/googleapis/nodejs-billing/commit/ea41ed3bdb792c8a3de3c168ebf18904127c9edc))
+
+## 1.0.0 (2020-02-27)
+
+
+### ⚠ BREAKING CHANGES
+
+* initial library generation (#1)
+
+### Features
+
+* initial library generation ([#1](https://www.github.com/googleapis/nodejs-billing/issues/1)) ([5a04fa9](https://www.github.com/googleapis/nodejs-billing/commit/5a04fa957a8a83325744c5a275f742bf3abd4579))
diff --git a/packages/google-cloud-billing/CODE_OF_CONDUCT.md b/packages/google-cloud-billing/CODE_OF_CONDUCT.md
new file mode 100644
index 00000000000..2add2547a81
--- /dev/null
+++ b/packages/google-cloud-billing/CODE_OF_CONDUCT.md
@@ -0,0 +1,94 @@
+
+# Code of Conduct
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as
+contributors and maintainers pledge to making participation in our project and
+our community a harassment-free experience for everyone, regardless of age, body
+size, disability, ethnicity, gender identity and expression, level of
+experience, education, socio-economic status, nationality, personal appearance,
+race, religion, or sexual identity and orientation.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment
+include:
+
+* Using welcoming and inclusive language
+* Being respectful of differing viewpoints and experiences
+* Gracefully accepting constructive criticism
+* Focusing on what is best for the community
+* Showing empathy towards other community members
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery and unwelcome sexual attention or
+ advances
+* Trolling, insulting/derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or electronic
+ address, without explicit permission
+* Other conduct which could reasonably be considered inappropriate in a
+ professional setting
+
+## Our Responsibilities
+
+Project maintainers are responsible for clarifying the standards of acceptable
+behavior and are expected to take appropriate and fair corrective action in
+response to any instances of unacceptable behavior.
+
+Project maintainers have the right and responsibility to remove, edit, or reject
+comments, commits, code, wiki edits, issues, and other contributions that are
+not aligned to this Code of Conduct, or to ban temporarily or permanently any
+contributor for other behaviors that they deem inappropriate, threatening,
+offensive, or harmful.
+
+## Scope
+
+This Code of Conduct applies both within project spaces and in public spaces
+when an individual is representing the project or its community. Examples of
+representing a project or community include using an official project e-mail
+address, posting via an official social media account, or acting as an appointed
+representative at an online or offline event. Representation of a project may be
+further defined and clarified by project maintainers.
+
+This Code of Conduct also applies outside the project spaces when the Project
+Steward has a reasonable belief that an individual's behavior may have a
+negative impact on the project or its community.
+
+## Conflict Resolution
+
+We do not believe that all conflict is bad; healthy debate and disagreement
+often yield positive results. However, it is never okay to be disrespectful or
+to engage in behavior that violates the project’s code of conduct.
+
+If you see someone violating the code of conduct, you are encouraged to address
+the behavior directly with those involved. Many issues can be resolved quickly
+and easily, and this gives people more control over the outcome of their
+dispute. If you are unable to resolve the matter for any reason, or if the
+behavior is threatening or harassing, report it. We are dedicated to providing
+an environment where participants feel welcome and safe.
+
+Reports should be directed to *googleapis-stewards@google.com*, the
+Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to
+receive and address reported violations of the code of conduct. They will then
+work with a committee consisting of representatives from the Open Source
+Programs Office and the Google Open Source Strategy team. If for any reason you
+are uncomfortable reaching out to the Project Steward, please email
+opensource@google.com.
+
+We will investigate every complaint, but you may not receive a direct response.
+We will use our discretion in determining when and how to follow up on reported
+incidents, which may range from not taking action to permanent expulsion from
+the project and project-sponsored spaces. We will notify the accused of the
+report and provide them an opportunity to discuss it before any action is taken.
+The identity of the reporter will be omitted from the details of the report
+supplied to the accused. In potentially harmful situations, such as ongoing
+harassment or threats to anyone's safety, we may take action without notice.
+
+## Attribution
+
+This Code of Conduct is adapted from the Contributor Covenant, version 1.4,
+available at
+https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
\ No newline at end of file
diff --git a/packages/google-cloud-billing/CONTRIBUTING.md b/packages/google-cloud-billing/CONTRIBUTING.md
new file mode 100644
index 00000000000..5436815212e
--- /dev/null
+++ b/packages/google-cloud-billing/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 Cloud Billing 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=cloudbilling.googleapis.com
+[auth]: https://cloud.google.com/docs/authentication/getting-started
\ No newline at end of file
diff --git a/packages/google-cloud-billing/LICENSE b/packages/google-cloud-billing/LICENSE
new file mode 100644
index 00000000000..d6456956733
--- /dev/null
+++ b/packages/google-cloud-billing/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/packages/google-cloud-billing/README.md b/packages/google-cloud-billing/README.md
new file mode 100644
index 00000000000..3475973ee50
--- /dev/null
+++ b/packages/google-cloud-billing/README.md
@@ -0,0 +1,161 @@
+[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
+[//]: # "To regenerate it, use `python -m synthtool`."
+
+
+# [Cloud Billing: Node.js Client](https://github.com/googleapis/nodejs-billing)
+
+[](https://cloud.google.com/terms/launch-stages)
+[](https://www.npmjs.org/package/@google-cloud/billing)
+
+
+
+
+Billing client for Node.js
+
+
+A comprehensive list of changes in each version may be found in
+[the CHANGELOG](https://github.com/googleapis/nodejs-billing/blob/main/CHANGELOG.md).
+
+* [Cloud Billing Node.js Client API Reference][client-docs]
+* [Cloud Billing Documentation][product-docs]
+* [github.com/googleapis/nodejs-billing](https://github.com/googleapis/nodejs-billing)
+
+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 Cloud Billing 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/billing
+```
+
+
+### Using the client library
+
+```javascript
+// Imports the Google Cloud client library
+const {CloudBillingClient} = require('@google-cloud/billing');
+
+// Creates a client
+const client = new CloudBillingClient();
+
+// name = 'my-project' // Project name to list billing accounts for.
+
+async function listBillingAccounts() {
+ const [accounts] = await client.listBillingAccounts({
+ name,
+ });
+ console.info(`found ${accounts.length} billing accounts:`);
+ for (const account of accounts) {
+ console.info(`${account.displayName}:`);
+ console.info(`\topen: ${account.open}`);
+ console.info(`\tparentBillingAccount: ${account.masterBillingAccount}`);
+ }
+}
+listBillingAccounts();
+
+```
+
+
+
+## Samples
+
+Samples are in the [`samples/`](https://github.com/googleapis/nodejs-billing/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample.
+
+| Sample | Source Code | Try it |
+| --------------------------- | --------------------------------- | ------ |
+| Quickstart | [source code](https://github.com/googleapis/nodejs-billing/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-billing&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |
+
+
+
+The [Cloud Billing 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/billing@legacy-8` installs client libraries
+for versions compatible with Node.js 8.
+
+## Versioning
+
+This library follows [Semantic Versioning](http://semver.org/).
+
+
+
+This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways
+unless absolutely necessary (e.g. because of critical security issues) or with
+an extensive deprecation period. Issues and requests against **stable** libraries
+are addressed with the highest priority.
+
+
+
+
+
+
+More Information: [Google Cloud Platform Launch Stages][launch_stages]
+
+[launch_stages]: https://cloud.google.com/terms/launch-stages
+
+## Contributing
+
+Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-billing/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/nodejs-billing/blob/main/LICENSE)
+
+[client-docs]: https://cloud.google.com/nodejs/docs/reference/billing/latest
+[product-docs]: https://cloud.google.com/billing/docs
+[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
+[projects]: https://console.cloud.google.com/project
+[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
+[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=cloudbilling.googleapis.com
+[auth]: https://cloud.google.com/docs/authentication/getting-started
diff --git a/packages/google-cloud-billing/linkinator.config.json b/packages/google-cloud-billing/linkinator.config.json
new file mode 100644
index 00000000000..befd23c8633
--- /dev/null
+++ b/packages/google-cloud-billing/linkinator.config.json
@@ -0,0 +1,16 @@
+{
+ "recurse": true,
+ "skip": [
+ "https://codecov.io/gh/googleapis/",
+ "www.googleapis.com",
+ "img.shields.io",
+ "https://console.cloud.google.com/cloudshell",
+ "https://support.google.com"
+ ],
+ "silent": true,
+ "concurrency": 5,
+ "retry": true,
+ "retryErrors": true,
+ "retryErrorsCount": 5,
+ "retryErrorsJitter": 3000
+}
diff --git a/packages/google-cloud-billing/package.json b/packages/google-cloud-billing/package.json
new file mode 100644
index 00000000000..b54e206d831
--- /dev/null
+++ b/packages/google-cloud-billing/package.json
@@ -0,0 +1,54 @@
+{
+ "name": "@google-cloud/billing",
+ "version": "3.1.3",
+ "description": "Billing client for Node.js",
+ "repository": "googleapis/nodejs-billing",
+ "license": "Apache-2.0",
+ "author": "Google LLC",
+ "files": [
+ "build/src",
+ "build/protos"
+ ],
+ "main": "build/src/index.js",
+ "scripts": {
+ "clean": "gts clean",
+ "compile": "tsc -p . && cp -r protos build/",
+ "compile-protos": "compileProtos src",
+ "docs": "jsdoc -c .jsdoc.js",
+ "docs-test": "linkinator docs",
+ "fix": "gts fix",
+ "lint": "gts check",
+ "prelint": "cd samples; npm link ../; npm install",
+ "predocs-test": "npm run docs",
+ "prepare": "npm run compile-protos && npm run compile",
+ "system-test": "c8 mocha build/system-test",
+ "test": "c8 mocha build/test",
+ "samples-test": "cd samples/ && npm link ../ && npm test && cd ../",
+ "precompile": "gts clean"
+ },
+ "dependencies": {
+ "google-gax": "^3.5.2"
+ },
+ "devDependencies": {
+ "@types/mocha": "^9.0.0",
+ "@types/node": "^18.0.0",
+ "@types/sinon": "^10.0.0",
+ "c8": "^7.0.0",
+ "gts": "^3.1.0",
+ "jsdoc": "^4.0.0",
+ "jsdoc-fresh": "^2.0.0",
+ "jsdoc-region-tag": "^2.0.0",
+ "linkinator": "^4.0.0",
+ "mocha": "^9.2.2",
+ "null-loader": "^4.0.0",
+ "pack-n-play": "^1.0.0-2",
+ "sinon": "^14.0.0",
+ "ts-loader": "^9.0.0",
+ "typescript": "^4.6.4",
+ "webpack": "^5.0.0",
+ "webpack-cli": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ }
+}
diff --git a/packages/google-cloud-billing/protos/google/cloud/billing/v1/cloud_billing.proto b/packages/google-cloud-billing/protos/google/cloud/billing/v1/cloud_billing.proto
new file mode 100644
index 00000000000..f0b19d14d13
--- /dev/null
+++ b/packages/google-cloud-billing/protos/google/cloud/billing/v1/cloud_billing.proto
@@ -0,0 +1,360 @@
+// 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.cloud.billing.v1;
+
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "google/iam/v1/iam_policy.proto";
+import "google/iam/v1/policy.proto";
+import "google/protobuf/field_mask.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/cloud/billing/v1;billing";
+option java_multiple_files = true;
+option java_outer_classname = "CloudBillingProto";
+option java_package = "com.google.cloud.billing.v1";
+
+// Retrieves GCP Console billing accounts and associates them with projects.
+service CloudBilling {
+ option (google.api.default_host) = "cloudbilling.googleapis.com";
+ option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
+
+ // Gets information about a billing account. The current authenticated user
+ // must be a [viewer of the billing
+ // account](https://cloud.google.com/billing/docs/how-to/billing-access).
+ rpc GetBillingAccount(GetBillingAccountRequest) returns (BillingAccount) {
+ option (google.api.http) = {
+ get: "/v1/{name=billingAccounts/*}"
+ };
+ option (google.api.method_signature) = "name";
+ }
+
+ // Lists the billing accounts that the current authenticated user has
+ // permission to
+ // [view](https://cloud.google.com/billing/docs/how-to/billing-access).
+ rpc ListBillingAccounts(ListBillingAccountsRequest) returns (ListBillingAccountsResponse) {
+ option (google.api.http) = {
+ get: "/v1/billingAccounts"
+ };
+ option (google.api.method_signature) = "";
+ }
+
+ // Updates a billing account's fields.
+ // Currently the only field that can be edited is `display_name`.
+ // The current authenticated user must have the `billing.accounts.update`
+ // IAM permission, which is typically given to the
+ // [administrator](https://cloud.google.com/billing/docs/how-to/billing-access)
+ // of the billing account.
+ rpc UpdateBillingAccount(UpdateBillingAccountRequest) returns (BillingAccount) {
+ option (google.api.http) = {
+ patch: "/v1/{name=billingAccounts/*}"
+ body: "account"
+ };
+ option (google.api.method_signature) = "name,account";
+ }
+
+ // Creates a billing account.
+ // This method can only be used to create
+ // [billing subaccounts](https://cloud.google.com/billing/docs/concepts)
+ // by GCP resellers.
+ // When creating a subaccount, the current authenticated user must have the
+ // `billing.accounts.update` IAM permission on the master account, which is
+ // typically given to billing account
+ // [administrators](https://cloud.google.com/billing/docs/how-to/billing-access).
+ // This method will return an error if the master account has not been
+ // provisioned as a reseller account.
+ rpc CreateBillingAccount(CreateBillingAccountRequest) returns (BillingAccount) {
+ option (google.api.http) = {
+ post: "/v1/billingAccounts"
+ body: "billing_account"
+ };
+ option (google.api.method_signature) = "billing_account";
+ }
+
+ // Lists the projects associated with a billing account. The current
+ // authenticated user must have the `billing.resourceAssociations.list` IAM
+ // permission, which is often given to billing account
+ // [viewers](https://cloud.google.com/billing/docs/how-to/billing-access).
+ rpc ListProjectBillingInfo(ListProjectBillingInfoRequest) returns (ListProjectBillingInfoResponse) {
+ option (google.api.http) = {
+ get: "/v1/{name=billingAccounts/*}/projects"
+ };
+ option (google.api.method_signature) = "name";
+ }
+
+ // Gets the billing information for a project. The current authenticated user
+ // must have [permission to view the
+ // project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo
+ // ).
+ rpc GetProjectBillingInfo(GetProjectBillingInfoRequest) returns (ProjectBillingInfo) {
+ option (google.api.http) = {
+ get: "/v1/{name=projects/*}/billingInfo"
+ };
+ option (google.api.method_signature) = "name";
+ }
+
+ // Sets or updates the billing account associated with a project. You specify
+ // the new billing account by setting the `billing_account_name` in the
+ // `ProjectBillingInfo` resource to the resource name of a billing account.
+ // Associating a project with an open billing account enables billing on the
+ // project and allows charges for resource usage. If the project already had a
+ // billing account, this method changes the billing account used for resource
+ // usage charges.
+ //
+ // *Note:* Incurred charges that have not yet been reported in the transaction
+ // history of the GCP Console might be billed to the new billing
+ // account, even if the charge occurred before the new billing account was
+ // assigned to the project.
+ //
+ // The current authenticated user must have ownership privileges for both the
+ // [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo
+ // ) and the [billing
+ // account](https://cloud.google.com/billing/docs/how-to/billing-access).
+ //
+ // You can disable billing on the project by setting the
+ // `billing_account_name` field to empty. This action disassociates the
+ // current billing account from the project. Any billable activity of your
+ // in-use services will stop, and your application could stop functioning as
+ // expected. Any unbilled charges to date will be billed to the previously
+ // associated account. The current authenticated user must be either an owner
+ // of the project or an owner of the billing account for the project.
+ //
+ // Note that associating a project with a *closed* billing account will have
+ // much the same effect as disabling billing on the project: any paid
+ // resources used by the project will be shut down. Thus, unless you wish to
+ // disable billing, you should always call this method with the name of an
+ // *open* billing account.
+ rpc UpdateProjectBillingInfo(UpdateProjectBillingInfoRequest) returns (ProjectBillingInfo) {
+ option (google.api.http) = {
+ put: "/v1/{name=projects/*}/billingInfo"
+ body: "project_billing_info"
+ };
+ option (google.api.method_signature) = "name,project_billing_info";
+ }
+
+ // Gets the access control policy for a billing account.
+ // The caller must have the `billing.accounts.getIamPolicy` permission on the
+ // account, which is often given to billing account
+ // [viewers](https://cloud.google.com/billing/docs/how-to/billing-access).
+ rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ get: "/v1/{resource=billingAccounts/*}:getIamPolicy"
+ };
+ option (google.api.method_signature) = "resource";
+ }
+
+ // Sets the access control policy for a billing account. Replaces any existing
+ // policy.
+ // The caller must have the `billing.accounts.setIamPolicy` permission on the
+ // account, which is often given to billing account
+ // [administrators](https://cloud.google.com/billing/docs/how-to/billing-access).
+ rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) {
+ option (google.api.http) = {
+ post: "/v1/{resource=billingAccounts/*}:setIamPolicy"
+ body: "*"
+ };
+ option (google.api.method_signature) = "resource,policy";
+ }
+
+ // Tests the access control policy for a billing account. This method takes
+ // the resource and a set of permissions as input and returns the subset of
+ // the input permissions that the caller is allowed for that resource.
+ rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) {
+ option (google.api.http) = {
+ post: "/v1/{resource=billingAccounts/*}:testIamPermissions"
+ body: "*"
+ };
+ option (google.api.method_signature) = "resource,permissions";
+ }
+}
+
+// A billing account in [GCP Console](https://console.cloud.google.com/).
+// You can assign a billing account to one or more projects.
+message BillingAccount {
+ // The resource name of the billing account. The resource name has the form
+ // `billingAccounts/{billing_account_id}`. For example,
+ // `billingAccounts/012345-567890-ABCDEF` would be the resource name for
+ // billing account `012345-567890-ABCDEF`.
+ string name = 1 [(google.api.resource_reference) = {
+ type: "cloudbilling.googleapis.com/BillingAccount"
+ }];
+
+ // Output only. True if the billing account is open, and will therefore be charged for any
+ // usage on associated projects. False if the billing account is closed, and
+ // therefore projects associated with it will be unable to use paid services.
+ bool open = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // The display name given to the billing account, such as `My Billing
+ // Account`. This name is displayed in the GCP Console.
+ string display_name = 3;
+
+ // If this account is a
+ // [subaccount](https://cloud.google.com/billing/docs/concepts), then this
+ // will be the resource name of the master billing account that it is being
+ // resold through.
+ // Otherwise this will be empty.
+ string master_billing_account = 4;
+}
+
+// Encapsulation of billing information for a GCP Console project. A project
+// has at most one associated billing account at a time (but a billing account
+// can be assigned to multiple projects).
+message ProjectBillingInfo {
+ // The resource name for the `ProjectBillingInfo`; has the form
+ // `projects/{project_id}/billingInfo`. For example, the resource name for the
+ // billing information for project `tokyo-rain-123` would be
+ // `projects/tokyo-rain-123/billingInfo`. This field is read-only.
+ string name = 1;
+
+ // The ID of the project that this `ProjectBillingInfo` represents, such as
+ // `tokyo-rain-123`. This is a convenience field so that you don't need to
+ // parse the `name` field to obtain a project ID. This field is read-only.
+ string project_id = 2;
+
+ // The resource name of the billing account associated with the project, if
+ // any. For example, `billingAccounts/012345-567890-ABCDEF`.
+ string billing_account_name = 3;
+
+ // True if the project is associated with an open billing account, to which
+ // usage on the project is charged. False if the project is associated with a
+ // closed billing account, or no billing account at all, and therefore cannot
+ // use paid services. This field is read-only.
+ bool billing_enabled = 4;
+}
+
+// Request message for `GetBillingAccount`.
+message GetBillingAccountRequest {
+ // Required. The resource name of the billing account to retrieve. For example,
+ // `billingAccounts/012345-567890-ABCDEF`.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudbilling.googleapis.com/BillingAccount"
+ }
+ ];
+}
+
+// Request message for `ListBillingAccounts`.
+message ListBillingAccountsRequest {
+ // Requested page size. The maximum page size is 100; this is also the
+ // default.
+ int32 page_size = 1;
+
+ // A token identifying a page of results to return. This should be a
+ // `next_page_token` value returned from a previous `ListBillingAccounts`
+ // call. If unspecified, the first page of results is returned.
+ string page_token = 2;
+
+ // Options for how to filter the returned billing accounts.
+ // Currently this only supports filtering for
+ // [subaccounts](https://cloud.google.com/billing/docs/concepts) under a
+ // single provided reseller billing account.
+ // (e.g. "master_billing_account=billingAccounts/012345-678901-ABCDEF").
+ // Boolean algebra and other fields are not currently supported.
+ string filter = 3;
+}
+
+// Response message for `ListBillingAccounts`.
+message ListBillingAccountsResponse {
+ // A list of billing accounts.
+ repeated BillingAccount billing_accounts = 1;
+
+ // A token to retrieve the next page of results. To retrieve the next page,
+ // call `ListBillingAccounts` again with the `page_token` field set to this
+ // value. This field is empty if there are no more results to retrieve.
+ string next_page_token = 2;
+}
+
+// Request message for `CreateBillingAccount`.
+message CreateBillingAccountRequest {
+ // Required. The billing account resource to create.
+ // Currently CreateBillingAccount only supports subaccount creation, so
+ // any created billing accounts must be under a provided master billing
+ // account.
+ BillingAccount billing_account = 1 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Request message for `UpdateBillingAccount`.
+message UpdateBillingAccountRequest {
+ // Required. The name of the billing account resource to be updated.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudbilling.googleapis.com/BillingAccount"
+ }
+ ];
+
+ // Required. The billing account resource to replace the resource on the server.
+ BillingAccount account = 2 [(google.api.field_behavior) = REQUIRED];
+
+ // The update mask applied to the resource.
+ // Only "display_name" is currently supported.
+ google.protobuf.FieldMask update_mask = 3;
+}
+
+// Request message for `ListProjectBillingInfo`.
+message ListProjectBillingInfoRequest {
+ // Required. The resource name of the billing account associated with the projects that
+ // you want to list. For example, `billingAccounts/012345-567890-ABCDEF`.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudbilling.googleapis.com/BillingAccount"
+ }
+ ];
+
+ // Requested page size. The maximum page size is 100; this is also the
+ // default.
+ int32 page_size = 2;
+
+ // A token identifying a page of results to be returned. This should be a
+ // `next_page_token` value returned from a previous `ListProjectBillingInfo`
+ // call. If unspecified, the first page of results is returned.
+ string page_token = 3;
+}
+
+// Request message for `ListProjectBillingInfoResponse`.
+message ListProjectBillingInfoResponse {
+ // A list of `ProjectBillingInfo` resources representing the projects
+ // associated with the billing account.
+ repeated ProjectBillingInfo project_billing_info = 1;
+
+ // A token to retrieve the next page of results. To retrieve the next page,
+ // call `ListProjectBillingInfo` again with the `page_token` field set to this
+ // value. This field is empty if there are no more results to retrieve.
+ string next_page_token = 2;
+}
+
+// Request message for `GetProjectBillingInfo`.
+message GetProjectBillingInfoRequest {
+ // Required. The resource name of the project for which billing information is
+ // retrieved. For example, `projects/tokyo-rain-123`.
+ string name = 1 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Request message for `UpdateProjectBillingInfo`.
+message UpdateProjectBillingInfoRequest {
+ // Required. The resource name of the project associated with the billing information
+ // that you want to update. For example, `projects/tokyo-rain-123`.
+ string name = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // The new billing information for the project. Read-only fields are ignored;
+ // thus, you can leave empty all fields except `billing_account_name`.
+ ProjectBillingInfo project_billing_info = 2;
+}
diff --git a/packages/google-cloud-billing/protos/google/cloud/billing/v1/cloud_catalog.proto b/packages/google-cloud-billing/protos/google/cloud/billing/v1/cloud_catalog.proto
new file mode 100644
index 00000000000..7bc2f14e3b1
--- /dev/null
+++ b/packages/google-cloud-billing/protos/google/cloud/billing/v1/cloud_catalog.proto
@@ -0,0 +1,331 @@
+// 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.cloud.billing.v1;
+
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "google/protobuf/timestamp.proto";
+import "google/type/money.proto";
+
+option csharp_namespace = "Google.Cloud.Billing.V1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/billing/v1;billing";
+option java_multiple_files = true;
+option java_outer_classname = "CloudCatalogProto";
+option java_package = "com.google.cloud.billing.v1";
+option objc_class_prefix = "CLDCTLG";
+
+// A catalog of Google Cloud Platform services and SKUs.
+// Provides pricing information and metadata on Google Cloud Platform services
+// and SKUs.
+service CloudCatalog {
+ option (google.api.default_host) = "cloudbilling.googleapis.com";
+ option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
+
+ // Lists all public cloud services.
+ rpc ListServices(ListServicesRequest) returns (ListServicesResponse) {
+ option (google.api.http) = {
+ get: "/v1/services"
+ };
+ option (google.api.method_signature) = "";
+ }
+
+ // Lists all publicly available SKUs for a given cloud service.
+ rpc ListSkus(ListSkusRequest) returns (ListSkusResponse) {
+ option (google.api.http) = {
+ get: "/v1/{parent=services/*}/skus"
+ };
+ option (google.api.method_signature) = "parent";
+ }
+}
+
+// Encapsulates a single service in Google Cloud Platform.
+message Service {
+ option (google.api.resource) = {
+ type: "cloudbilling.googleapis.com/Service"
+ pattern: "services/{service}"
+ };
+
+ // The resource name for the service.
+ // Example: "services/DA34-426B-A397"
+ string name = 1;
+
+ // The identifier for the service.
+ // Example: "DA34-426B-A397"
+ string service_id = 2;
+
+ // A human readable display name for this service.
+ string display_name = 3;
+
+ // The business under which the service is offered.
+ // Ex. "businessEntities/GCP", "businessEntities/Maps"
+ string business_entity_name = 4;
+}
+
+// Encapsulates a single SKU in Google Cloud Platform
+message Sku {
+ option (google.api.resource) = {
+ type: "cloudbilling.googleapis.com/Sku"
+ pattern: "services/{service}/skus/{sku}"
+ };
+
+ // The resource name for the SKU.
+ // Example: "services/DA34-426B-A397/skus/AA95-CD31-42FE"
+ string name = 1;
+
+ // The identifier for the SKU.
+ // Example: "AA95-CD31-42FE"
+ string sku_id = 2;
+
+ // A human readable description of the SKU, has a maximum length of 256
+ // characters.
+ string description = 3;
+
+ // The category hierarchy of this SKU, purely for organizational purpose.
+ Category category = 4;
+
+ // List of service regions this SKU is offered at.
+ // Example: "asia-east1"
+ // Service regions can be found at https://cloud.google.com/about/locations/
+ repeated string service_regions = 5;
+
+ // A timeline of pricing info for this SKU in chronological order.
+ repeated PricingInfo pricing_info = 6;
+
+ // Identifies the service provider.
+ // This is 'Google' for first party services in Google Cloud Platform.
+ string service_provider_name = 7;
+}
+
+// Represents the category hierarchy of a SKU.
+message Category {
+ // The display name of the service this SKU belongs to.
+ string service_display_name = 1;
+
+ // The type of product the SKU refers to.
+ // Example: "Compute", "Storage", "Network", "ApplicationServices" etc.
+ string resource_family = 2;
+
+ // A group classification for related SKUs.
+ // Example: "RAM", "GPU", "Prediction", "Ops", "GoogleEgress" etc.
+ string resource_group = 3;
+
+ // Represents how the SKU is consumed.
+ // Example: "OnDemand", "Preemptible", "Commit1Mo", "Commit1Yr" etc.
+ string usage_type = 4;
+}
+
+// Represents the pricing information for a SKU at a single point of time.
+message PricingInfo {
+ // The timestamp from which this pricing was effective within the requested
+ // time range. This is guaranteed to be greater than or equal to the
+ // start_time field in the request and less than the end_time field in the
+ // request. If a time range was not specified in the request this field will
+ // be equivalent to a time within the last 12 hours, indicating the latest
+ // pricing info.
+ google.protobuf.Timestamp effective_time = 1;
+
+ // An optional human readable summary of the pricing information, has a
+ // maximum length of 256 characters.
+ string summary = 2;
+
+ // Expresses the pricing formula. See `PricingExpression` for an example.
+ PricingExpression pricing_expression = 3;
+
+ // Aggregation Info. This can be left unspecified if the pricing expression
+ // doesn't require aggregation.
+ AggregationInfo aggregation_info = 4;
+
+ // Conversion rate used for currency conversion, from USD to the currency
+ // specified in the request. This includes any surcharge collected for billing
+ // in non USD currency. If a currency is not specified in the request this
+ // defaults to 1.0.
+ // Example: USD * currency_conversion_rate = JPY
+ double currency_conversion_rate = 5;
+}
+
+// Expresses a mathematical pricing formula. For Example:-
+//
+// `usage_unit: GBy`
+// `tiered_rates:`
+// `[start_usage_amount: 20, unit_price: $10]`
+// `[start_usage_amount: 100, unit_price: $5]`
+//
+// The above expresses a pricing formula where the first 20GB is free, the
+// next 80GB is priced at $10 per GB followed by $5 per GB for additional
+// usage.
+message PricingExpression {
+ // The price rate indicating starting usage and its corresponding price.
+ message TierRate {
+ // Usage is priced at this rate only after this amount.
+ // Example: start_usage_amount of 10 indicates that the usage will be priced
+ // at the unit_price after the first 10 usage_units.
+ double start_usage_amount = 1;
+
+ // The price per unit of usage.
+ // Example: unit_price of amount $10 indicates that each unit will cost $10.
+ google.type.Money unit_price = 2;
+ }
+
+ // The short hand for unit of usage this pricing is specified in.
+ // Example: usage_unit of "GiBy" means that usage is specified in "Gibi Byte".
+ string usage_unit = 1;
+
+ // The unit of usage in human readable form.
+ // Example: "gibi byte".
+ string usage_unit_description = 4;
+
+ // The base unit for the SKU which is the unit used in usage exports.
+ // Example: "By"
+ string base_unit = 5;
+
+ // The base unit in human readable form.
+ // Example: "byte".
+ string base_unit_description = 6;
+
+ // Conversion factor for converting from price per usage_unit to price per
+ // base_unit, and start_usage_amount to start_usage_amount in base_unit.
+ // unit_price / base_unit_conversion_factor = price per base_unit.
+ // start_usage_amount * base_unit_conversion_factor = start_usage_amount in
+ // base_unit.
+ double base_unit_conversion_factor = 7;
+
+ // The recommended quantity of units for displaying pricing info. When
+ // displaying pricing info it is recommended to display:
+ // (unit_price * display_quantity) per display_quantity usage_unit.
+ // This field does not affect the pricing formula and is for display purposes
+ // only.
+ // Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and
+ // the display_quantity is "1000" then the recommended way of displaying the
+ // pricing info is "0.10 USD per 1000 GB"
+ double display_quantity = 2;
+
+ // The list of tiered rates for this pricing. The total cost is computed by
+ // applying each of the tiered rates on usage. This repeated list is sorted
+ // by ascending order of start_usage_amount.
+ repeated TierRate tiered_rates = 3;
+}
+
+// Represents the aggregation level and interval for pricing of a single SKU.
+message AggregationInfo {
+ // The level at which usage is aggregated to compute cost.
+ // Example: "ACCOUNT" aggregation level indicates that usage for tiered
+ // pricing is aggregated across all projects in a single account.
+ enum AggregationLevel {
+ AGGREGATION_LEVEL_UNSPECIFIED = 0;
+
+ ACCOUNT = 1;
+
+ PROJECT = 2;
+ }
+
+ // The interval at which usage is aggregated to compute cost.
+ // Example: "MONTHLY" aggregation interval indicates that usage for tiered
+ // pricing is aggregated every month.
+ enum AggregationInterval {
+ AGGREGATION_INTERVAL_UNSPECIFIED = 0;
+
+ DAILY = 1;
+
+ MONTHLY = 2;
+ }
+
+ AggregationLevel aggregation_level = 1;
+
+ AggregationInterval aggregation_interval = 2;
+
+ // The number of intervals to aggregate over.
+ // Example: If aggregation_level is "DAILY" and aggregation_count is 14,
+ // aggregation will be over 14 days.
+ int32 aggregation_count = 3;
+}
+
+// Request message for `ListServices`.
+message ListServicesRequest {
+ // Requested page size. Defaults to 5000.
+ int32 page_size = 1;
+
+ // A token identifying a page of results to return. This should be a
+ // `next_page_token` value returned from a previous `ListServices`
+ // call. If unspecified, the first page of results is returned.
+ string page_token = 2;
+}
+
+// Response message for `ListServices`.
+message ListServicesResponse {
+ // A list of services.
+ repeated Service services = 1;
+
+ // A token to retrieve the next page of results. To retrieve the next page,
+ // call `ListServices` again with the `page_token` field set to this
+ // value. This field is empty if there are no more results to retrieve.
+ string next_page_token = 2;
+}
+
+// Request message for `ListSkus`.
+message ListSkusRequest {
+ // Required. The name of the service.
+ // Example: "services/DA34-426B-A397"
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudbilling.googleapis.com/Service"
+ }
+ ];
+
+ // Optional inclusive start time of the time range for which the pricing
+ // versions will be returned. Timestamps in the future are not allowed.
+ // The time range has to be within a single calendar month in
+ // America/Los_Angeles timezone. Time range as a whole is optional. If not
+ // specified, the latest pricing will be returned (up to 12 hours old at
+ // most).
+ google.protobuf.Timestamp start_time = 2;
+
+ // Optional exclusive end time of the time range for which the pricing
+ // versions will be returned. Timestamps in the future are not allowed.
+ // The time range has to be within a single calendar month in
+ // America/Los_Angeles timezone. Time range as a whole is optional. If not
+ // specified, the latest pricing will be returned (up to 12 hours old at
+ // most).
+ google.protobuf.Timestamp end_time = 3;
+
+ // The ISO 4217 currency code for the pricing info in the response proto.
+ // Will use the conversion rate as of start_time.
+ // Optional. If not specified USD will be used.
+ string currency_code = 4;
+
+ // Requested page size. Defaults to 5000.
+ int32 page_size = 5;
+
+ // A token identifying a page of results to return. This should be a
+ // `next_page_token` value returned from a previous `ListSkus`
+ // call. If unspecified, the first page of results is returned.
+ string page_token = 6;
+}
+
+// Response message for `ListSkus`.
+message ListSkusResponse {
+ // The list of public SKUs of the given service.
+ repeated Sku skus = 1;
+
+ // A token to retrieve the next page of results. To retrieve the next page,
+ // call `ListSkus` again with the `page_token` field set to this
+ // value. This field is empty if there are no more results to retrieve.
+ string next_page_token = 2;
+}
diff --git a/packages/google-cloud-billing/protos/google/cloud/common_resources.proto b/packages/google-cloud-billing/protos/google/cloud/common_resources.proto
new file mode 100644
index 00000000000..56c9f800d5e
--- /dev/null
+++ b/packages/google-cloud-billing/protos/google/cloud/common_resources.proto
@@ -0,0 +1,52 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// This file contains stub messages for common resources in GCP.
+// It is not intended to be directly generated, and is instead used by
+// other tooling to be able to match common resource patterns.
+syntax = "proto3";
+
+package google.cloud;
+
+import "google/api/resource.proto";
+
+
+option (google.api.resource_definition) = {
+ type: "cloudresourcemanager.googleapis.com/Project"
+ pattern: "projects/{project}"
+};
+
+
+option (google.api.resource_definition) = {
+ type: "cloudresourcemanager.googleapis.com/Organization"
+ pattern: "organizations/{organization}"
+};
+
+
+option (google.api.resource_definition) = {
+ type: "cloudresourcemanager.googleapis.com/Folder"
+ pattern: "folders/{folder}"
+};
+
+
+option (google.api.resource_definition) = {
+ type: "cloudbilling.googleapis.com/BillingAccount"
+ pattern: "billingAccounts/{billing_account}"
+};
+
+option (google.api.resource_definition) = {
+ type: "locations.googleapis.com/Location"
+ pattern: "projects/{project}/locations/{location}"
+};
+
diff --git a/packages/google-cloud-billing/protos/protos.d.ts b/packages/google-cloud-billing/protos/protos.d.ts
new file mode 100644
index 00000000000..478f7a3002a
--- /dev/null
+++ b/packages/google-cloud-billing/protos/protos.d.ts
@@ -0,0 +1,8574 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+import type {protobuf as $protobuf} from "google-gax";
+import Long = require("long");
+/** Namespace google. */
+export namespace google {
+
+ /** Namespace cloud. */
+ namespace cloud {
+
+ /** Namespace billing. */
+ namespace billing {
+
+ /** Namespace v1. */
+ namespace v1 {
+
+ /** Represents a CloudBilling */
+ class CloudBilling extends $protobuf.rpc.Service {
+
+ /**
+ * Constructs a new CloudBilling 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 CloudBilling 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): CloudBilling;
+
+ /**
+ * Calls GetBillingAccount.
+ * @param request GetBillingAccountRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and BillingAccount
+ */
+ public getBillingAccount(request: google.cloud.billing.v1.IGetBillingAccountRequest, callback: google.cloud.billing.v1.CloudBilling.GetBillingAccountCallback): void;
+
+ /**
+ * Calls GetBillingAccount.
+ * @param request GetBillingAccountRequest message or plain object
+ * @returns Promise
+ */
+ public getBillingAccount(request: google.cloud.billing.v1.IGetBillingAccountRequest): Promise;
+
+ /**
+ * Calls ListBillingAccounts.
+ * @param request ListBillingAccountsRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and ListBillingAccountsResponse
+ */
+ public listBillingAccounts(request: google.cloud.billing.v1.IListBillingAccountsRequest, callback: google.cloud.billing.v1.CloudBilling.ListBillingAccountsCallback): void;
+
+ /**
+ * Calls ListBillingAccounts.
+ * @param request ListBillingAccountsRequest message or plain object
+ * @returns Promise
+ */
+ public listBillingAccounts(request: google.cloud.billing.v1.IListBillingAccountsRequest): Promise;
+
+ /**
+ * Calls UpdateBillingAccount.
+ * @param request UpdateBillingAccountRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and BillingAccount
+ */
+ public updateBillingAccount(request: google.cloud.billing.v1.IUpdateBillingAccountRequest, callback: google.cloud.billing.v1.CloudBilling.UpdateBillingAccountCallback): void;
+
+ /**
+ * Calls UpdateBillingAccount.
+ * @param request UpdateBillingAccountRequest message or plain object
+ * @returns Promise
+ */
+ public updateBillingAccount(request: google.cloud.billing.v1.IUpdateBillingAccountRequest): Promise;
+
+ /**
+ * Calls CreateBillingAccount.
+ * @param request CreateBillingAccountRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and BillingAccount
+ */
+ public createBillingAccount(request: google.cloud.billing.v1.ICreateBillingAccountRequest, callback: google.cloud.billing.v1.CloudBilling.CreateBillingAccountCallback): void;
+
+ /**
+ * Calls CreateBillingAccount.
+ * @param request CreateBillingAccountRequest message or plain object
+ * @returns Promise
+ */
+ public createBillingAccount(request: google.cloud.billing.v1.ICreateBillingAccountRequest): Promise;
+
+ /**
+ * Calls ListProjectBillingInfo.
+ * @param request ListProjectBillingInfoRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and ListProjectBillingInfoResponse
+ */
+ public listProjectBillingInfo(request: google.cloud.billing.v1.IListProjectBillingInfoRequest, callback: google.cloud.billing.v1.CloudBilling.ListProjectBillingInfoCallback): void;
+
+ /**
+ * Calls ListProjectBillingInfo.
+ * @param request ListProjectBillingInfoRequest message or plain object
+ * @returns Promise
+ */
+ public listProjectBillingInfo(request: google.cloud.billing.v1.IListProjectBillingInfoRequest): Promise;
+
+ /**
+ * Calls GetProjectBillingInfo.
+ * @param request GetProjectBillingInfoRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and ProjectBillingInfo
+ */
+ public getProjectBillingInfo(request: google.cloud.billing.v1.IGetProjectBillingInfoRequest, callback: google.cloud.billing.v1.CloudBilling.GetProjectBillingInfoCallback): void;
+
+ /**
+ * Calls GetProjectBillingInfo.
+ * @param request GetProjectBillingInfoRequest message or plain object
+ * @returns Promise
+ */
+ public getProjectBillingInfo(request: google.cloud.billing.v1.IGetProjectBillingInfoRequest): Promise;
+
+ /**
+ * Calls UpdateProjectBillingInfo.
+ * @param request UpdateProjectBillingInfoRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and ProjectBillingInfo
+ */
+ public updateProjectBillingInfo(request: google.cloud.billing.v1.IUpdateProjectBillingInfoRequest, callback: google.cloud.billing.v1.CloudBilling.UpdateProjectBillingInfoCallback): void;
+
+ /**
+ * Calls UpdateProjectBillingInfo.
+ * @param request UpdateProjectBillingInfoRequest message or plain object
+ * @returns Promise
+ */
+ public updateProjectBillingInfo(request: google.cloud.billing.v1.IUpdateProjectBillingInfoRequest): Promise;
+
+ /**
+ * Calls GetIamPolicy.
+ * @param request GetIamPolicyRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and Policy
+ */
+ public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.cloud.billing.v1.CloudBilling.GetIamPolicyCallback): void;
+
+ /**
+ * Calls GetIamPolicy.
+ * @param request GetIamPolicyRequest message or plain object
+ * @returns Promise
+ */
+ public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise;
+
+ /**
+ * Calls SetIamPolicy.
+ * @param request SetIamPolicyRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and Policy
+ */
+ public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.cloud.billing.v1.CloudBilling.SetIamPolicyCallback): void;
+
+ /**
+ * Calls SetIamPolicy.
+ * @param request SetIamPolicyRequest message or plain object
+ * @returns Promise
+ */
+ public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise;
+
+ /**
+ * Calls TestIamPermissions.
+ * @param request TestIamPermissionsRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse
+ */
+ public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.cloud.billing.v1.CloudBilling.TestIamPermissionsCallback): void;
+
+ /**
+ * Calls TestIamPermissions.
+ * @param request TestIamPermissionsRequest message or plain object
+ * @returns Promise
+ */
+ public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise;
+ }
+
+ namespace CloudBilling {
+
+ /**
+ * Callback as used by {@link google.cloud.billing.v1.CloudBilling|getBillingAccount}.
+ * @param error Error, if any
+ * @param [response] BillingAccount
+ */
+ type GetBillingAccountCallback = (error: (Error|null), response?: google.cloud.billing.v1.BillingAccount) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.billing.v1.CloudBilling|listBillingAccounts}.
+ * @param error Error, if any
+ * @param [response] ListBillingAccountsResponse
+ */
+ type ListBillingAccountsCallback = (error: (Error|null), response?: google.cloud.billing.v1.ListBillingAccountsResponse) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.billing.v1.CloudBilling|updateBillingAccount}.
+ * @param error Error, if any
+ * @param [response] BillingAccount
+ */
+ type UpdateBillingAccountCallback = (error: (Error|null), response?: google.cloud.billing.v1.BillingAccount) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.billing.v1.CloudBilling|createBillingAccount}.
+ * @param error Error, if any
+ * @param [response] BillingAccount
+ */
+ type CreateBillingAccountCallback = (error: (Error|null), response?: google.cloud.billing.v1.BillingAccount) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.billing.v1.CloudBilling|listProjectBillingInfo}.
+ * @param error Error, if any
+ * @param [response] ListProjectBillingInfoResponse
+ */
+ type ListProjectBillingInfoCallback = (error: (Error|null), response?: google.cloud.billing.v1.ListProjectBillingInfoResponse) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.billing.v1.CloudBilling|getProjectBillingInfo}.
+ * @param error Error, if any
+ * @param [response] ProjectBillingInfo
+ */
+ type GetProjectBillingInfoCallback = (error: (Error|null), response?: google.cloud.billing.v1.ProjectBillingInfo) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.billing.v1.CloudBilling|updateProjectBillingInfo}.
+ * @param error Error, if any
+ * @param [response] ProjectBillingInfo
+ */
+ type UpdateProjectBillingInfoCallback = (error: (Error|null), response?: google.cloud.billing.v1.ProjectBillingInfo) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.billing.v1.CloudBilling|getIamPolicy}.
+ * @param error Error, if any
+ * @param [response] Policy
+ */
+ type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.billing.v1.CloudBilling|setIamPolicy}.
+ * @param error Error, if any
+ * @param [response] Policy
+ */
+ type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.billing.v1.CloudBilling|testIamPermissions}.
+ * @param error Error, if any
+ * @param [response] TestIamPermissionsResponse
+ */
+ type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void;
+ }
+
+ /** Properties of a BillingAccount. */
+ interface IBillingAccount {
+
+ /** BillingAccount name */
+ name?: (string|null);
+
+ /** BillingAccount open */
+ open?: (boolean|null);
+
+ /** BillingAccount displayName */
+ displayName?: (string|null);
+
+ /** BillingAccount masterBillingAccount */
+ masterBillingAccount?: (string|null);
+ }
+
+ /** Represents a BillingAccount. */
+ class BillingAccount implements IBillingAccount {
+
+ /**
+ * Constructs a new BillingAccount.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.billing.v1.IBillingAccount);
+
+ /** BillingAccount name. */
+ public name: string;
+
+ /** BillingAccount open. */
+ public open: boolean;
+
+ /** BillingAccount displayName. */
+ public displayName: string;
+
+ /** BillingAccount masterBillingAccount. */
+ public masterBillingAccount: string;
+
+ /**
+ * Creates a new BillingAccount instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns BillingAccount instance
+ */
+ public static create(properties?: google.cloud.billing.v1.IBillingAccount): google.cloud.billing.v1.BillingAccount;
+
+ /**
+ * Encodes the specified BillingAccount message. Does not implicitly {@link google.cloud.billing.v1.BillingAccount.verify|verify} messages.
+ * @param message BillingAccount message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.billing.v1.IBillingAccount, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified BillingAccount message, length delimited. Does not implicitly {@link google.cloud.billing.v1.BillingAccount.verify|verify} messages.
+ * @param message BillingAccount message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.billing.v1.IBillingAccount, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a BillingAccount message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns BillingAccount
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.billing.v1.BillingAccount;
+
+ /**
+ * Decodes a BillingAccount message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns BillingAccount
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.billing.v1.BillingAccount;
+
+ /**
+ * Verifies a BillingAccount message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a BillingAccount message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns BillingAccount
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.billing.v1.BillingAccount;
+
+ /**
+ * Creates a plain object from a BillingAccount message. Also converts values to other types if specified.
+ * @param message BillingAccount
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.billing.v1.BillingAccount, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this BillingAccount to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for BillingAccount
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ProjectBillingInfo. */
+ interface IProjectBillingInfo {
+
+ /** ProjectBillingInfo name */
+ name?: (string|null);
+
+ /** ProjectBillingInfo projectId */
+ projectId?: (string|null);
+
+ /** ProjectBillingInfo billingAccountName */
+ billingAccountName?: (string|null);
+
+ /** ProjectBillingInfo billingEnabled */
+ billingEnabled?: (boolean|null);
+ }
+
+ /** Represents a ProjectBillingInfo. */
+ class ProjectBillingInfo implements IProjectBillingInfo {
+
+ /**
+ * Constructs a new ProjectBillingInfo.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.billing.v1.IProjectBillingInfo);
+
+ /** ProjectBillingInfo name. */
+ public name: string;
+
+ /** ProjectBillingInfo projectId. */
+ public projectId: string;
+
+ /** ProjectBillingInfo billingAccountName. */
+ public billingAccountName: string;
+
+ /** ProjectBillingInfo billingEnabled. */
+ public billingEnabled: boolean;
+
+ /**
+ * Creates a new ProjectBillingInfo instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ProjectBillingInfo instance
+ */
+ public static create(properties?: google.cloud.billing.v1.IProjectBillingInfo): google.cloud.billing.v1.ProjectBillingInfo;
+
+ /**
+ * Encodes the specified ProjectBillingInfo message. Does not implicitly {@link google.cloud.billing.v1.ProjectBillingInfo.verify|verify} messages.
+ * @param message ProjectBillingInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.billing.v1.IProjectBillingInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ProjectBillingInfo message, length delimited. Does not implicitly {@link google.cloud.billing.v1.ProjectBillingInfo.verify|verify} messages.
+ * @param message ProjectBillingInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.billing.v1.IProjectBillingInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ProjectBillingInfo message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ProjectBillingInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.billing.v1.ProjectBillingInfo;
+
+ /**
+ * Decodes a ProjectBillingInfo message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ProjectBillingInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.billing.v1.ProjectBillingInfo;
+
+ /**
+ * Verifies a ProjectBillingInfo message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ProjectBillingInfo message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ProjectBillingInfo
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.billing.v1.ProjectBillingInfo;
+
+ /**
+ * Creates a plain object from a ProjectBillingInfo message. Also converts values to other types if specified.
+ * @param message ProjectBillingInfo
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.billing.v1.ProjectBillingInfo, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ProjectBillingInfo to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ProjectBillingInfo
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a GetBillingAccountRequest. */
+ interface IGetBillingAccountRequest {
+
+ /** GetBillingAccountRequest name */
+ name?: (string|null);
+ }
+
+ /** Represents a GetBillingAccountRequest. */
+ class GetBillingAccountRequest implements IGetBillingAccountRequest {
+
+ /**
+ * Constructs a new GetBillingAccountRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.billing.v1.IGetBillingAccountRequest);
+
+ /** GetBillingAccountRequest name. */
+ public name: string;
+
+ /**
+ * Creates a new GetBillingAccountRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns GetBillingAccountRequest instance
+ */
+ public static create(properties?: google.cloud.billing.v1.IGetBillingAccountRequest): google.cloud.billing.v1.GetBillingAccountRequest;
+
+ /**
+ * Encodes the specified GetBillingAccountRequest message. Does not implicitly {@link google.cloud.billing.v1.GetBillingAccountRequest.verify|verify} messages.
+ * @param message GetBillingAccountRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.billing.v1.IGetBillingAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified GetBillingAccountRequest message, length delimited. Does not implicitly {@link google.cloud.billing.v1.GetBillingAccountRequest.verify|verify} messages.
+ * @param message GetBillingAccountRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.billing.v1.IGetBillingAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a GetBillingAccountRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns GetBillingAccountRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.billing.v1.GetBillingAccountRequest;
+
+ /**
+ * Decodes a GetBillingAccountRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns GetBillingAccountRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.billing.v1.GetBillingAccountRequest;
+
+ /**
+ * Verifies a GetBillingAccountRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a GetBillingAccountRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns GetBillingAccountRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.billing.v1.GetBillingAccountRequest;
+
+ /**
+ * Creates a plain object from a GetBillingAccountRequest message. Also converts values to other types if specified.
+ * @param message GetBillingAccountRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.billing.v1.GetBillingAccountRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this GetBillingAccountRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for GetBillingAccountRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ListBillingAccountsRequest. */
+ interface IListBillingAccountsRequest {
+
+ /** ListBillingAccountsRequest pageSize */
+ pageSize?: (number|null);
+
+ /** ListBillingAccountsRequest pageToken */
+ pageToken?: (string|null);
+
+ /** ListBillingAccountsRequest filter */
+ filter?: (string|null);
+ }
+
+ /** Represents a ListBillingAccountsRequest. */
+ class ListBillingAccountsRequest implements IListBillingAccountsRequest {
+
+ /**
+ * Constructs a new ListBillingAccountsRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.billing.v1.IListBillingAccountsRequest);
+
+ /** ListBillingAccountsRequest pageSize. */
+ public pageSize: number;
+
+ /** ListBillingAccountsRequest pageToken. */
+ public pageToken: string;
+
+ /** ListBillingAccountsRequest filter. */
+ public filter: string;
+
+ /**
+ * Creates a new ListBillingAccountsRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ListBillingAccountsRequest instance
+ */
+ public static create(properties?: google.cloud.billing.v1.IListBillingAccountsRequest): google.cloud.billing.v1.ListBillingAccountsRequest;
+
+ /**
+ * Encodes the specified ListBillingAccountsRequest message. Does not implicitly {@link google.cloud.billing.v1.ListBillingAccountsRequest.verify|verify} messages.
+ * @param message ListBillingAccountsRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.billing.v1.IListBillingAccountsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ListBillingAccountsRequest message, length delimited. Does not implicitly {@link google.cloud.billing.v1.ListBillingAccountsRequest.verify|verify} messages.
+ * @param message ListBillingAccountsRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.billing.v1.IListBillingAccountsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ListBillingAccountsRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ListBillingAccountsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.billing.v1.ListBillingAccountsRequest;
+
+ /**
+ * Decodes a ListBillingAccountsRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ListBillingAccountsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.billing.v1.ListBillingAccountsRequest;
+
+ /**
+ * Verifies a ListBillingAccountsRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ListBillingAccountsRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ListBillingAccountsRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.billing.v1.ListBillingAccountsRequest;
+
+ /**
+ * Creates a plain object from a ListBillingAccountsRequest message. Also converts values to other types if specified.
+ * @param message ListBillingAccountsRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.billing.v1.ListBillingAccountsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ListBillingAccountsRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ListBillingAccountsRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ListBillingAccountsResponse. */
+ interface IListBillingAccountsResponse {
+
+ /** ListBillingAccountsResponse billingAccounts */
+ billingAccounts?: (google.cloud.billing.v1.IBillingAccount[]|null);
+
+ /** ListBillingAccountsResponse nextPageToken */
+ nextPageToken?: (string|null);
+ }
+
+ /** Represents a ListBillingAccountsResponse. */
+ class ListBillingAccountsResponse implements IListBillingAccountsResponse {
+
+ /**
+ * Constructs a new ListBillingAccountsResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.billing.v1.IListBillingAccountsResponse);
+
+ /** ListBillingAccountsResponse billingAccounts. */
+ public billingAccounts: google.cloud.billing.v1.IBillingAccount[];
+
+ /** ListBillingAccountsResponse nextPageToken. */
+ public nextPageToken: string;
+
+ /**
+ * Creates a new ListBillingAccountsResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ListBillingAccountsResponse instance
+ */
+ public static create(properties?: google.cloud.billing.v1.IListBillingAccountsResponse): google.cloud.billing.v1.ListBillingAccountsResponse;
+
+ /**
+ * Encodes the specified ListBillingAccountsResponse message. Does not implicitly {@link google.cloud.billing.v1.ListBillingAccountsResponse.verify|verify} messages.
+ * @param message ListBillingAccountsResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.billing.v1.IListBillingAccountsResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ListBillingAccountsResponse message, length delimited. Does not implicitly {@link google.cloud.billing.v1.ListBillingAccountsResponse.verify|verify} messages.
+ * @param message ListBillingAccountsResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.billing.v1.IListBillingAccountsResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ListBillingAccountsResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ListBillingAccountsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.billing.v1.ListBillingAccountsResponse;
+
+ /**
+ * Decodes a ListBillingAccountsResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ListBillingAccountsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.billing.v1.ListBillingAccountsResponse;
+
+ /**
+ * Verifies a ListBillingAccountsResponse message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ListBillingAccountsResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ListBillingAccountsResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.billing.v1.ListBillingAccountsResponse;
+
+ /**
+ * Creates a plain object from a ListBillingAccountsResponse message. Also converts values to other types if specified.
+ * @param message ListBillingAccountsResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.billing.v1.ListBillingAccountsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ListBillingAccountsResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ListBillingAccountsResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a CreateBillingAccountRequest. */
+ interface ICreateBillingAccountRequest {
+
+ /** CreateBillingAccountRequest billingAccount */
+ billingAccount?: (google.cloud.billing.v1.IBillingAccount|null);
+ }
+
+ /** Represents a CreateBillingAccountRequest. */
+ class CreateBillingAccountRequest implements ICreateBillingAccountRequest {
+
+ /**
+ * Constructs a new CreateBillingAccountRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.billing.v1.ICreateBillingAccountRequest);
+
+ /** CreateBillingAccountRequest billingAccount. */
+ public billingAccount?: (google.cloud.billing.v1.IBillingAccount|null);
+
+ /**
+ * Creates a new CreateBillingAccountRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns CreateBillingAccountRequest instance
+ */
+ public static create(properties?: google.cloud.billing.v1.ICreateBillingAccountRequest): google.cloud.billing.v1.CreateBillingAccountRequest;
+
+ /**
+ * Encodes the specified CreateBillingAccountRequest message. Does not implicitly {@link google.cloud.billing.v1.CreateBillingAccountRequest.verify|verify} messages.
+ * @param message CreateBillingAccountRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.billing.v1.ICreateBillingAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified CreateBillingAccountRequest message, length delimited. Does not implicitly {@link google.cloud.billing.v1.CreateBillingAccountRequest.verify|verify} messages.
+ * @param message CreateBillingAccountRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.billing.v1.ICreateBillingAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a CreateBillingAccountRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns CreateBillingAccountRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.billing.v1.CreateBillingAccountRequest;
+
+ /**
+ * Decodes a CreateBillingAccountRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns CreateBillingAccountRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.billing.v1.CreateBillingAccountRequest;
+
+ /**
+ * Verifies a CreateBillingAccountRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a CreateBillingAccountRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns CreateBillingAccountRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.billing.v1.CreateBillingAccountRequest;
+
+ /**
+ * Creates a plain object from a CreateBillingAccountRequest message. Also converts values to other types if specified.
+ * @param message CreateBillingAccountRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.billing.v1.CreateBillingAccountRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this CreateBillingAccountRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for CreateBillingAccountRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an UpdateBillingAccountRequest. */
+ interface IUpdateBillingAccountRequest {
+
+ /** UpdateBillingAccountRequest name */
+ name?: (string|null);
+
+ /** UpdateBillingAccountRequest account */
+ account?: (google.cloud.billing.v1.IBillingAccount|null);
+
+ /** UpdateBillingAccountRequest updateMask */
+ updateMask?: (google.protobuf.IFieldMask|null);
+ }
+
+ /** Represents an UpdateBillingAccountRequest. */
+ class UpdateBillingAccountRequest implements IUpdateBillingAccountRequest {
+
+ /**
+ * Constructs a new UpdateBillingAccountRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.billing.v1.IUpdateBillingAccountRequest);
+
+ /** UpdateBillingAccountRequest name. */
+ public name: string;
+
+ /** UpdateBillingAccountRequest account. */
+ public account?: (google.cloud.billing.v1.IBillingAccount|null);
+
+ /** UpdateBillingAccountRequest updateMask. */
+ public updateMask?: (google.protobuf.IFieldMask|null);
+
+ /**
+ * Creates a new UpdateBillingAccountRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns UpdateBillingAccountRequest instance
+ */
+ public static create(properties?: google.cloud.billing.v1.IUpdateBillingAccountRequest): google.cloud.billing.v1.UpdateBillingAccountRequest;
+
+ /**
+ * Encodes the specified UpdateBillingAccountRequest message. Does not implicitly {@link google.cloud.billing.v1.UpdateBillingAccountRequest.verify|verify} messages.
+ * @param message UpdateBillingAccountRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.billing.v1.IUpdateBillingAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified UpdateBillingAccountRequest message, length delimited. Does not implicitly {@link google.cloud.billing.v1.UpdateBillingAccountRequest.verify|verify} messages.
+ * @param message UpdateBillingAccountRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.billing.v1.IUpdateBillingAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an UpdateBillingAccountRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns UpdateBillingAccountRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.billing.v1.UpdateBillingAccountRequest;
+
+ /**
+ * Decodes an UpdateBillingAccountRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns UpdateBillingAccountRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.billing.v1.UpdateBillingAccountRequest;
+
+ /**
+ * Verifies an UpdateBillingAccountRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an UpdateBillingAccountRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns UpdateBillingAccountRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.billing.v1.UpdateBillingAccountRequest;
+
+ /**
+ * Creates a plain object from an UpdateBillingAccountRequest message. Also converts values to other types if specified.
+ * @param message UpdateBillingAccountRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.billing.v1.UpdateBillingAccountRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this UpdateBillingAccountRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for UpdateBillingAccountRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ListProjectBillingInfoRequest. */
+ interface IListProjectBillingInfoRequest {
+
+ /** ListProjectBillingInfoRequest name */
+ name?: (string|null);
+
+ /** ListProjectBillingInfoRequest pageSize */
+ pageSize?: (number|null);
+
+ /** ListProjectBillingInfoRequest pageToken */
+ pageToken?: (string|null);
+ }
+
+ /** Represents a ListProjectBillingInfoRequest. */
+ class ListProjectBillingInfoRequest implements IListProjectBillingInfoRequest {
+
+ /**
+ * Constructs a new ListProjectBillingInfoRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.billing.v1.IListProjectBillingInfoRequest);
+
+ /** ListProjectBillingInfoRequest name. */
+ public name: string;
+
+ /** ListProjectBillingInfoRequest pageSize. */
+ public pageSize: number;
+
+ /** ListProjectBillingInfoRequest pageToken. */
+ public pageToken: string;
+
+ /**
+ * Creates a new ListProjectBillingInfoRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ListProjectBillingInfoRequest instance
+ */
+ public static create(properties?: google.cloud.billing.v1.IListProjectBillingInfoRequest): google.cloud.billing.v1.ListProjectBillingInfoRequest;
+
+ /**
+ * Encodes the specified ListProjectBillingInfoRequest message. Does not implicitly {@link google.cloud.billing.v1.ListProjectBillingInfoRequest.verify|verify} messages.
+ * @param message ListProjectBillingInfoRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.billing.v1.IListProjectBillingInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ListProjectBillingInfoRequest message, length delimited. Does not implicitly {@link google.cloud.billing.v1.ListProjectBillingInfoRequest.verify|verify} messages.
+ * @param message ListProjectBillingInfoRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.billing.v1.IListProjectBillingInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ListProjectBillingInfoRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ListProjectBillingInfoRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.billing.v1.ListProjectBillingInfoRequest;
+
+ /**
+ * Decodes a ListProjectBillingInfoRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ListProjectBillingInfoRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.billing.v1.ListProjectBillingInfoRequest;
+
+ /**
+ * Verifies a ListProjectBillingInfoRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ListProjectBillingInfoRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ListProjectBillingInfoRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.billing.v1.ListProjectBillingInfoRequest;
+
+ /**
+ * Creates a plain object from a ListProjectBillingInfoRequest message. Also converts values to other types if specified.
+ * @param message ListProjectBillingInfoRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.billing.v1.ListProjectBillingInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ListProjectBillingInfoRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ListProjectBillingInfoRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ListProjectBillingInfoResponse. */
+ interface IListProjectBillingInfoResponse {
+
+ /** ListProjectBillingInfoResponse projectBillingInfo */
+ projectBillingInfo?: (google.cloud.billing.v1.IProjectBillingInfo[]|null);
+
+ /** ListProjectBillingInfoResponse nextPageToken */
+ nextPageToken?: (string|null);
+ }
+
+ /** Represents a ListProjectBillingInfoResponse. */
+ class ListProjectBillingInfoResponse implements IListProjectBillingInfoResponse {
+
+ /**
+ * Constructs a new ListProjectBillingInfoResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.billing.v1.IListProjectBillingInfoResponse);
+
+ /** ListProjectBillingInfoResponse projectBillingInfo. */
+ public projectBillingInfo: google.cloud.billing.v1.IProjectBillingInfo[];
+
+ /** ListProjectBillingInfoResponse nextPageToken. */
+ public nextPageToken: string;
+
+ /**
+ * Creates a new ListProjectBillingInfoResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ListProjectBillingInfoResponse instance
+ */
+ public static create(properties?: google.cloud.billing.v1.IListProjectBillingInfoResponse): google.cloud.billing.v1.ListProjectBillingInfoResponse;
+
+ /**
+ * Encodes the specified ListProjectBillingInfoResponse message. Does not implicitly {@link google.cloud.billing.v1.ListProjectBillingInfoResponse.verify|verify} messages.
+ * @param message ListProjectBillingInfoResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.billing.v1.IListProjectBillingInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ListProjectBillingInfoResponse message, length delimited. Does not implicitly {@link google.cloud.billing.v1.ListProjectBillingInfoResponse.verify|verify} messages.
+ * @param message ListProjectBillingInfoResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.billing.v1.IListProjectBillingInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ListProjectBillingInfoResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ListProjectBillingInfoResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.billing.v1.ListProjectBillingInfoResponse;
+
+ /**
+ * Decodes a ListProjectBillingInfoResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ListProjectBillingInfoResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.billing.v1.ListProjectBillingInfoResponse;
+
+ /**
+ * Verifies a ListProjectBillingInfoResponse message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ListProjectBillingInfoResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ListProjectBillingInfoResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.billing.v1.ListProjectBillingInfoResponse;
+
+ /**
+ * Creates a plain object from a ListProjectBillingInfoResponse message. Also converts values to other types if specified.
+ * @param message ListProjectBillingInfoResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.billing.v1.ListProjectBillingInfoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ListProjectBillingInfoResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ListProjectBillingInfoResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a GetProjectBillingInfoRequest. */
+ interface IGetProjectBillingInfoRequest {
+
+ /** GetProjectBillingInfoRequest name */
+ name?: (string|null);
+ }
+
+ /** Represents a GetProjectBillingInfoRequest. */
+ class GetProjectBillingInfoRequest implements IGetProjectBillingInfoRequest {
+
+ /**
+ * Constructs a new GetProjectBillingInfoRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.billing.v1.IGetProjectBillingInfoRequest);
+
+ /** GetProjectBillingInfoRequest name. */
+ public name: string;
+
+ /**
+ * Creates a new GetProjectBillingInfoRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns GetProjectBillingInfoRequest instance
+ */
+ public static create(properties?: google.cloud.billing.v1.IGetProjectBillingInfoRequest): google.cloud.billing.v1.GetProjectBillingInfoRequest;
+
+ /**
+ * Encodes the specified GetProjectBillingInfoRequest message. Does not implicitly {@link google.cloud.billing.v1.GetProjectBillingInfoRequest.verify|verify} messages.
+ * @param message GetProjectBillingInfoRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.billing.v1.IGetProjectBillingInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified GetProjectBillingInfoRequest message, length delimited. Does not implicitly {@link google.cloud.billing.v1.GetProjectBillingInfoRequest.verify|verify} messages.
+ * @param message GetProjectBillingInfoRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.billing.v1.IGetProjectBillingInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a GetProjectBillingInfoRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns GetProjectBillingInfoRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.billing.v1.GetProjectBillingInfoRequest;
+
+ /**
+ * Decodes a GetProjectBillingInfoRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns GetProjectBillingInfoRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.billing.v1.GetProjectBillingInfoRequest;
+
+ /**
+ * Verifies a GetProjectBillingInfoRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a GetProjectBillingInfoRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns GetProjectBillingInfoRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.billing.v1.GetProjectBillingInfoRequest;
+
+ /**
+ * Creates a plain object from a GetProjectBillingInfoRequest message. Also converts values to other types if specified.
+ * @param message GetProjectBillingInfoRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.billing.v1.GetProjectBillingInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this GetProjectBillingInfoRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for GetProjectBillingInfoRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an UpdateProjectBillingInfoRequest. */
+ interface IUpdateProjectBillingInfoRequest {
+
+ /** UpdateProjectBillingInfoRequest name */
+ name?: (string|null);
+
+ /** UpdateProjectBillingInfoRequest projectBillingInfo */
+ projectBillingInfo?: (google.cloud.billing.v1.IProjectBillingInfo|null);
+ }
+
+ /** Represents an UpdateProjectBillingInfoRequest. */
+ class UpdateProjectBillingInfoRequest implements IUpdateProjectBillingInfoRequest {
+
+ /**
+ * Constructs a new UpdateProjectBillingInfoRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.billing.v1.IUpdateProjectBillingInfoRequest);
+
+ /** UpdateProjectBillingInfoRequest name. */
+ public name: string;
+
+ /** UpdateProjectBillingInfoRequest projectBillingInfo. */
+ public projectBillingInfo?: (google.cloud.billing.v1.IProjectBillingInfo|null);
+
+ /**
+ * Creates a new UpdateProjectBillingInfoRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns UpdateProjectBillingInfoRequest instance
+ */
+ public static create(properties?: google.cloud.billing.v1.IUpdateProjectBillingInfoRequest): google.cloud.billing.v1.UpdateProjectBillingInfoRequest;
+
+ /**
+ * Encodes the specified UpdateProjectBillingInfoRequest message. Does not implicitly {@link google.cloud.billing.v1.UpdateProjectBillingInfoRequest.verify|verify} messages.
+ * @param message UpdateProjectBillingInfoRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.billing.v1.IUpdateProjectBillingInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified UpdateProjectBillingInfoRequest message, length delimited. Does not implicitly {@link google.cloud.billing.v1.UpdateProjectBillingInfoRequest.verify|verify} messages.
+ * @param message UpdateProjectBillingInfoRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.billing.v1.IUpdateProjectBillingInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an UpdateProjectBillingInfoRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns UpdateProjectBillingInfoRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.billing.v1.UpdateProjectBillingInfoRequest;
+
+ /**
+ * Decodes an UpdateProjectBillingInfoRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns UpdateProjectBillingInfoRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.billing.v1.UpdateProjectBillingInfoRequest;
+
+ /**
+ * Verifies an UpdateProjectBillingInfoRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an UpdateProjectBillingInfoRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns UpdateProjectBillingInfoRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.billing.v1.UpdateProjectBillingInfoRequest;
+
+ /**
+ * Creates a plain object from an UpdateProjectBillingInfoRequest message. Also converts values to other types if specified.
+ * @param message UpdateProjectBillingInfoRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.billing.v1.UpdateProjectBillingInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this UpdateProjectBillingInfoRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for UpdateProjectBillingInfoRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Represents a CloudCatalog */
+ class CloudCatalog extends $protobuf.rpc.Service {
+
+ /**
+ * Constructs a new CloudCatalog 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 CloudCatalog 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): CloudCatalog;
+
+ /**
+ * Calls ListServices.
+ * @param request ListServicesRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and ListServicesResponse
+ */
+ public listServices(request: google.cloud.billing.v1.IListServicesRequest, callback: google.cloud.billing.v1.CloudCatalog.ListServicesCallback): void;
+
+ /**
+ * Calls ListServices.
+ * @param request ListServicesRequest message or plain object
+ * @returns Promise
+ */
+ public listServices(request: google.cloud.billing.v1.IListServicesRequest): Promise;
+
+ /**
+ * Calls ListSkus.
+ * @param request ListSkusRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and ListSkusResponse
+ */
+ public listSkus(request: google.cloud.billing.v1.IListSkusRequest, callback: google.cloud.billing.v1.CloudCatalog.ListSkusCallback): void;
+
+ /**
+ * Calls ListSkus.
+ * @param request ListSkusRequest message or plain object
+ * @returns Promise
+ */
+ public listSkus(request: google.cloud.billing.v1.IListSkusRequest): Promise;
+ }
+
+ namespace CloudCatalog {
+
+ /**
+ * Callback as used by {@link google.cloud.billing.v1.CloudCatalog|listServices}.
+ * @param error Error, if any
+ * @param [response] ListServicesResponse
+ */
+ type ListServicesCallback = (error: (Error|null), response?: google.cloud.billing.v1.ListServicesResponse) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.billing.v1.CloudCatalog|listSkus}.
+ * @param error Error, if any
+ * @param [response] ListSkusResponse
+ */
+ type ListSkusCallback = (error: (Error|null), response?: google.cloud.billing.v1.ListSkusResponse) => void;
+ }
+
+ /** Properties of a Service. */
+ interface IService {
+
+ /** Service name */
+ name?: (string|null);
+
+ /** Service serviceId */
+ serviceId?: (string|null);
+
+ /** Service displayName */
+ displayName?: (string|null);
+
+ /** Service businessEntityName */
+ businessEntityName?: (string|null);
+ }
+
+ /** Represents a Service. */
+ class Service implements IService {
+
+ /**
+ * Constructs a new Service.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.billing.v1.IService);
+
+ /** Service name. */
+ public name: string;
+
+ /** Service serviceId. */
+ public serviceId: string;
+
+ /** Service displayName. */
+ public displayName: string;
+
+ /** Service businessEntityName. */
+ public businessEntityName: string;
+
+ /**
+ * Creates a new Service instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Service instance
+ */
+ public static create(properties?: google.cloud.billing.v1.IService): google.cloud.billing.v1.Service;
+
+ /**
+ * Encodes the specified Service message. Does not implicitly {@link google.cloud.billing.v1.Service.verify|verify} messages.
+ * @param message Service message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.billing.v1.IService, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Service message, length delimited. Does not implicitly {@link google.cloud.billing.v1.Service.verify|verify} messages.
+ * @param message Service message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.billing.v1.IService, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Service message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Service
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.billing.v1.Service;
+
+ /**
+ * Decodes a Service message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Service
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.billing.v1.Service;
+
+ /**
+ * Verifies a Service message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a Service message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Service
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.billing.v1.Service;
+
+ /**
+ * Creates a plain object from a Service message. Also converts values to other types if specified.
+ * @param message Service
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.billing.v1.Service, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Service to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Service
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a Sku. */
+ interface ISku {
+
+ /** Sku name */
+ name?: (string|null);
+
+ /** Sku skuId */
+ skuId?: (string|null);
+
+ /** Sku description */
+ description?: (string|null);
+
+ /** Sku category */
+ category?: (google.cloud.billing.v1.ICategory|null);
+
+ /** Sku serviceRegions */
+ serviceRegions?: (string[]|null);
+
+ /** Sku pricingInfo */
+ pricingInfo?: (google.cloud.billing.v1.IPricingInfo[]|null);
+
+ /** Sku serviceProviderName */
+ serviceProviderName?: (string|null);
+ }
+
+ /** Represents a Sku. */
+ class Sku implements ISku {
+
+ /**
+ * Constructs a new Sku.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.billing.v1.ISku);
+
+ /** Sku name. */
+ public name: string;
+
+ /** Sku skuId. */
+ public skuId: string;
+
+ /** Sku description. */
+ public description: string;
+
+ /** Sku category. */
+ public category?: (google.cloud.billing.v1.ICategory|null);
+
+ /** Sku serviceRegions. */
+ public serviceRegions: string[];
+
+ /** Sku pricingInfo. */
+ public pricingInfo: google.cloud.billing.v1.IPricingInfo[];
+
+ /** Sku serviceProviderName. */
+ public serviceProviderName: string;
+
+ /**
+ * Creates a new Sku instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Sku instance
+ */
+ public static create(properties?: google.cloud.billing.v1.ISku): google.cloud.billing.v1.Sku;
+
+ /**
+ * Encodes the specified Sku message. Does not implicitly {@link google.cloud.billing.v1.Sku.verify|verify} messages.
+ * @param message Sku message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.billing.v1.ISku, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Sku message, length delimited. Does not implicitly {@link google.cloud.billing.v1.Sku.verify|verify} messages.
+ * @param message Sku message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.billing.v1.ISku, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Sku message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Sku
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.billing.v1.Sku;
+
+ /**
+ * Decodes a Sku message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Sku
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.billing.v1.Sku;
+
+ /**
+ * Verifies a Sku message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a Sku message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Sku
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.billing.v1.Sku;
+
+ /**
+ * Creates a plain object from a Sku message. Also converts values to other types if specified.
+ * @param message Sku
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.billing.v1.Sku, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Sku to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Sku
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a Category. */
+ interface ICategory {
+
+ /** Category serviceDisplayName */
+ serviceDisplayName?: (string|null);
+
+ /** Category resourceFamily */
+ resourceFamily?: (string|null);
+
+ /** Category resourceGroup */
+ resourceGroup?: (string|null);
+
+ /** Category usageType */
+ usageType?: (string|null);
+ }
+
+ /** Represents a Category. */
+ class Category implements ICategory {
+
+ /**
+ * Constructs a new Category.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.billing.v1.ICategory);
+
+ /** Category serviceDisplayName. */
+ public serviceDisplayName: string;
+
+ /** Category resourceFamily. */
+ public resourceFamily: string;
+
+ /** Category resourceGroup. */
+ public resourceGroup: string;
+
+ /** Category usageType. */
+ public usageType: string;
+
+ /**
+ * Creates a new Category instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Category instance
+ */
+ public static create(properties?: google.cloud.billing.v1.ICategory): google.cloud.billing.v1.Category;
+
+ /**
+ * Encodes the specified Category message. Does not implicitly {@link google.cloud.billing.v1.Category.verify|verify} messages.
+ * @param message Category message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.billing.v1.ICategory, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Category message, length delimited. Does not implicitly {@link google.cloud.billing.v1.Category.verify|verify} messages.
+ * @param message Category message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.billing.v1.ICategory, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Category message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Category
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.billing.v1.Category;
+
+ /**
+ * Decodes a Category message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Category
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.billing.v1.Category;
+
+ /**
+ * Verifies a Category message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a Category message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Category
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.billing.v1.Category;
+
+ /**
+ * Creates a plain object from a Category message. Also converts values to other types if specified.
+ * @param message Category
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.billing.v1.Category, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Category to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Category
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a PricingInfo. */
+ interface IPricingInfo {
+
+ /** PricingInfo effectiveTime */
+ effectiveTime?: (google.protobuf.ITimestamp|null);
+
+ /** PricingInfo summary */
+ summary?: (string|null);
+
+ /** PricingInfo pricingExpression */
+ pricingExpression?: (google.cloud.billing.v1.IPricingExpression|null);
+
+ /** PricingInfo aggregationInfo */
+ aggregationInfo?: (google.cloud.billing.v1.IAggregationInfo|null);
+
+ /** PricingInfo currencyConversionRate */
+ currencyConversionRate?: (number|null);
+ }
+
+ /** Represents a PricingInfo. */
+ class PricingInfo implements IPricingInfo {
+
+ /**
+ * Constructs a new PricingInfo.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.billing.v1.IPricingInfo);
+
+ /** PricingInfo effectiveTime. */
+ public effectiveTime?: (google.protobuf.ITimestamp|null);
+
+ /** PricingInfo summary. */
+ public summary: string;
+
+ /** PricingInfo pricingExpression. */
+ public pricingExpression?: (google.cloud.billing.v1.IPricingExpression|null);
+
+ /** PricingInfo aggregationInfo. */
+ public aggregationInfo?: (google.cloud.billing.v1.IAggregationInfo|null);
+
+ /** PricingInfo currencyConversionRate. */
+ public currencyConversionRate: number;
+
+ /**
+ * Creates a new PricingInfo instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns PricingInfo instance
+ */
+ public static create(properties?: google.cloud.billing.v1.IPricingInfo): google.cloud.billing.v1.PricingInfo;
+
+ /**
+ * Encodes the specified PricingInfo message. Does not implicitly {@link google.cloud.billing.v1.PricingInfo.verify|verify} messages.
+ * @param message PricingInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.billing.v1.IPricingInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified PricingInfo message, length delimited. Does not implicitly {@link google.cloud.billing.v1.PricingInfo.verify|verify} messages.
+ * @param message PricingInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.billing.v1.IPricingInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a PricingInfo message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns PricingInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.billing.v1.PricingInfo;
+
+ /**
+ * Decodes a PricingInfo message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns PricingInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.billing.v1.PricingInfo;
+
+ /**
+ * Verifies a PricingInfo message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a PricingInfo message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns PricingInfo
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.billing.v1.PricingInfo;
+
+ /**
+ * Creates a plain object from a PricingInfo message. Also converts values to other types if specified.
+ * @param message PricingInfo
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.billing.v1.PricingInfo, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this PricingInfo to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for PricingInfo
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a PricingExpression. */
+ interface IPricingExpression {
+
+ /** PricingExpression usageUnit */
+ usageUnit?: (string|null);
+
+ /** PricingExpression usageUnitDescription */
+ usageUnitDescription?: (string|null);
+
+ /** PricingExpression baseUnit */
+ baseUnit?: (string|null);
+
+ /** PricingExpression baseUnitDescription */
+ baseUnitDescription?: (string|null);
+
+ /** PricingExpression baseUnitConversionFactor */
+ baseUnitConversionFactor?: (number|null);
+
+ /** PricingExpression displayQuantity */
+ displayQuantity?: (number|null);
+
+ /** PricingExpression tieredRates */
+ tieredRates?: (google.cloud.billing.v1.PricingExpression.ITierRate[]|null);
+ }
+
+ /** Represents a PricingExpression. */
+ class PricingExpression implements IPricingExpression {
+
+ /**
+ * Constructs a new PricingExpression.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.billing.v1.IPricingExpression);
+
+ /** PricingExpression usageUnit. */
+ public usageUnit: string;
+
+ /** PricingExpression usageUnitDescription. */
+ public usageUnitDescription: string;
+
+ /** PricingExpression baseUnit. */
+ public baseUnit: string;
+
+ /** PricingExpression baseUnitDescription. */
+ public baseUnitDescription: string;
+
+ /** PricingExpression baseUnitConversionFactor. */
+ public baseUnitConversionFactor: number;
+
+ /** PricingExpression displayQuantity. */
+ public displayQuantity: number;
+
+ /** PricingExpression tieredRates. */
+ public tieredRates: google.cloud.billing.v1.PricingExpression.ITierRate[];
+
+ /**
+ * Creates a new PricingExpression instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns PricingExpression instance
+ */
+ public static create(properties?: google.cloud.billing.v1.IPricingExpression): google.cloud.billing.v1.PricingExpression;
+
+ /**
+ * Encodes the specified PricingExpression message. Does not implicitly {@link google.cloud.billing.v1.PricingExpression.verify|verify} messages.
+ * @param message PricingExpression message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.billing.v1.IPricingExpression, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified PricingExpression message, length delimited. Does not implicitly {@link google.cloud.billing.v1.PricingExpression.verify|verify} messages.
+ * @param message PricingExpression message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.billing.v1.IPricingExpression, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a PricingExpression message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns PricingExpression
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.billing.v1.PricingExpression;
+
+ /**
+ * Decodes a PricingExpression message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns PricingExpression
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.billing.v1.PricingExpression;
+
+ /**
+ * Verifies a PricingExpression message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a PricingExpression message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns PricingExpression
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.billing.v1.PricingExpression;
+
+ /**
+ * Creates a plain object from a PricingExpression message. Also converts values to other types if specified.
+ * @param message PricingExpression
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.billing.v1.PricingExpression, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this PricingExpression to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for PricingExpression
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace PricingExpression {
+
+ /** Properties of a TierRate. */
+ interface ITierRate {
+
+ /** TierRate startUsageAmount */
+ startUsageAmount?: (number|null);
+
+ /** TierRate unitPrice */
+ unitPrice?: (google.type.IMoney|null);
+ }
+
+ /** Represents a TierRate. */
+ class TierRate implements ITierRate {
+
+ /**
+ * Constructs a new TierRate.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.billing.v1.PricingExpression.ITierRate);
+
+ /** TierRate startUsageAmount. */
+ public startUsageAmount: number;
+
+ /** TierRate unitPrice. */
+ public unitPrice?: (google.type.IMoney|null);
+
+ /**
+ * Creates a new TierRate instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns TierRate instance
+ */
+ public static create(properties?: google.cloud.billing.v1.PricingExpression.ITierRate): google.cloud.billing.v1.PricingExpression.TierRate;
+
+ /**
+ * Encodes the specified TierRate message. Does not implicitly {@link google.cloud.billing.v1.PricingExpression.TierRate.verify|verify} messages.
+ * @param message TierRate message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.billing.v1.PricingExpression.ITierRate, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified TierRate message, length delimited. Does not implicitly {@link google.cloud.billing.v1.PricingExpression.TierRate.verify|verify} messages.
+ * @param message TierRate message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.billing.v1.PricingExpression.ITierRate, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a TierRate message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns TierRate
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.billing.v1.PricingExpression.TierRate;
+
+ /**
+ * Decodes a TierRate message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns TierRate
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.billing.v1.PricingExpression.TierRate;
+
+ /**
+ * Verifies a TierRate message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a TierRate message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns TierRate
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.billing.v1.PricingExpression.TierRate;
+
+ /**
+ * Creates a plain object from a TierRate message. Also converts values to other types if specified.
+ * @param message TierRate
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.billing.v1.PricingExpression.TierRate, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this TierRate to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for TierRate
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+
+ /** Properties of an AggregationInfo. */
+ interface IAggregationInfo {
+
+ /** AggregationInfo aggregationLevel */
+ aggregationLevel?: (google.cloud.billing.v1.AggregationInfo.AggregationLevel|keyof typeof google.cloud.billing.v1.AggregationInfo.AggregationLevel|null);
+
+ /** AggregationInfo aggregationInterval */
+ aggregationInterval?: (google.cloud.billing.v1.AggregationInfo.AggregationInterval|keyof typeof google.cloud.billing.v1.AggregationInfo.AggregationInterval|null);
+
+ /** AggregationInfo aggregationCount */
+ aggregationCount?: (number|null);
+ }
+
+ /** Represents an AggregationInfo. */
+ class AggregationInfo implements IAggregationInfo {
+
+ /**
+ * Constructs a new AggregationInfo.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.billing.v1.IAggregationInfo);
+
+ /** AggregationInfo aggregationLevel. */
+ public aggregationLevel: (google.cloud.billing.v1.AggregationInfo.AggregationLevel|keyof typeof google.cloud.billing.v1.AggregationInfo.AggregationLevel);
+
+ /** AggregationInfo aggregationInterval. */
+ public aggregationInterval: (google.cloud.billing.v1.AggregationInfo.AggregationInterval|keyof typeof google.cloud.billing.v1.AggregationInfo.AggregationInterval);
+
+ /** AggregationInfo aggregationCount. */
+ public aggregationCount: number;
+
+ /**
+ * Creates a new AggregationInfo instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns AggregationInfo instance
+ */
+ public static create(properties?: google.cloud.billing.v1.IAggregationInfo): google.cloud.billing.v1.AggregationInfo;
+
+ /**
+ * Encodes the specified AggregationInfo message. Does not implicitly {@link google.cloud.billing.v1.AggregationInfo.verify|verify} messages.
+ * @param message AggregationInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.billing.v1.IAggregationInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified AggregationInfo message, length delimited. Does not implicitly {@link google.cloud.billing.v1.AggregationInfo.verify|verify} messages.
+ * @param message AggregationInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.billing.v1.IAggregationInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an AggregationInfo message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns AggregationInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.billing.v1.AggregationInfo;
+
+ /**
+ * Decodes an AggregationInfo message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns AggregationInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.billing.v1.AggregationInfo;
+
+ /**
+ * Verifies an AggregationInfo message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an AggregationInfo message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns AggregationInfo
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.billing.v1.AggregationInfo;
+
+ /**
+ * Creates a plain object from an AggregationInfo message. Also converts values to other types if specified.
+ * @param message AggregationInfo
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.billing.v1.AggregationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this AggregationInfo to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for AggregationInfo
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace AggregationInfo {
+
+ /** AggregationLevel enum. */
+ enum AggregationLevel {
+ AGGREGATION_LEVEL_UNSPECIFIED = 0,
+ ACCOUNT = 1,
+ PROJECT = 2
+ }
+
+ /** AggregationInterval enum. */
+ enum AggregationInterval {
+ AGGREGATION_INTERVAL_UNSPECIFIED = 0,
+ DAILY = 1,
+ MONTHLY = 2
+ }
+ }
+
+ /** Properties of a ListServicesRequest. */
+ interface IListServicesRequest {
+
+ /** ListServicesRequest pageSize */
+ pageSize?: (number|null);
+
+ /** ListServicesRequest pageToken */
+ pageToken?: (string|null);
+ }
+
+ /** Represents a ListServicesRequest. */
+ class ListServicesRequest implements IListServicesRequest {
+
+ /**
+ * Constructs a new ListServicesRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.billing.v1.IListServicesRequest);
+
+ /** ListServicesRequest pageSize. */
+ public pageSize: number;
+
+ /** ListServicesRequest pageToken. */
+ public pageToken: string;
+
+ /**
+ * Creates a new ListServicesRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ListServicesRequest instance
+ */
+ public static create(properties?: google.cloud.billing.v1.IListServicesRequest): google.cloud.billing.v1.ListServicesRequest;
+
+ /**
+ * Encodes the specified ListServicesRequest message. Does not implicitly {@link google.cloud.billing.v1.ListServicesRequest.verify|verify} messages.
+ * @param message ListServicesRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.billing.v1.IListServicesRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ListServicesRequest message, length delimited. Does not implicitly {@link google.cloud.billing.v1.ListServicesRequest.verify|verify} messages.
+ * @param message ListServicesRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.billing.v1.IListServicesRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ListServicesRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ListServicesRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.billing.v1.ListServicesRequest;
+
+ /**
+ * Decodes a ListServicesRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ListServicesRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.billing.v1.ListServicesRequest;
+
+ /**
+ * Verifies a ListServicesRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ListServicesRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ListServicesRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.billing.v1.ListServicesRequest;
+
+ /**
+ * Creates a plain object from a ListServicesRequest message. Also converts values to other types if specified.
+ * @param message ListServicesRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.billing.v1.ListServicesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ListServicesRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ListServicesRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ListServicesResponse. */
+ interface IListServicesResponse {
+
+ /** ListServicesResponse services */
+ services?: (google.cloud.billing.v1.IService[]|null);
+
+ /** ListServicesResponse nextPageToken */
+ nextPageToken?: (string|null);
+ }
+
+ /** Represents a ListServicesResponse. */
+ class ListServicesResponse implements IListServicesResponse {
+
+ /**
+ * Constructs a new ListServicesResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.billing.v1.IListServicesResponse);
+
+ /** ListServicesResponse services. */
+ public services: google.cloud.billing.v1.IService[];
+
+ /** ListServicesResponse nextPageToken. */
+ public nextPageToken: string;
+
+ /**
+ * Creates a new ListServicesResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ListServicesResponse instance
+ */
+ public static create(properties?: google.cloud.billing.v1.IListServicesResponse): google.cloud.billing.v1.ListServicesResponse;
+
+ /**
+ * Encodes the specified ListServicesResponse message. Does not implicitly {@link google.cloud.billing.v1.ListServicesResponse.verify|verify} messages.
+ * @param message ListServicesResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.billing.v1.IListServicesResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ListServicesResponse message, length delimited. Does not implicitly {@link google.cloud.billing.v1.ListServicesResponse.verify|verify} messages.
+ * @param message ListServicesResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.billing.v1.IListServicesResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ListServicesResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ListServicesResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.billing.v1.ListServicesResponse;
+
+ /**
+ * Decodes a ListServicesResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ListServicesResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.billing.v1.ListServicesResponse;
+
+ /**
+ * Verifies a ListServicesResponse message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ListServicesResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ListServicesResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.billing.v1.ListServicesResponse;
+
+ /**
+ * Creates a plain object from a ListServicesResponse message. Also converts values to other types if specified.
+ * @param message ListServicesResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.billing.v1.ListServicesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ListServicesResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ListServicesResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ListSkusRequest. */
+ interface IListSkusRequest {
+
+ /** ListSkusRequest parent */
+ parent?: (string|null);
+
+ /** ListSkusRequest startTime */
+ startTime?: (google.protobuf.ITimestamp|null);
+
+ /** ListSkusRequest endTime */
+ endTime?: (google.protobuf.ITimestamp|null);
+
+ /** ListSkusRequest currencyCode */
+ currencyCode?: (string|null);
+
+ /** ListSkusRequest pageSize */
+ pageSize?: (number|null);
+
+ /** ListSkusRequest pageToken */
+ pageToken?: (string|null);
+ }
+
+ /** Represents a ListSkusRequest. */
+ class ListSkusRequest implements IListSkusRequest {
+
+ /**
+ * Constructs a new ListSkusRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.billing.v1.IListSkusRequest);
+
+ /** ListSkusRequest parent. */
+ public parent: string;
+
+ /** ListSkusRequest startTime. */
+ public startTime?: (google.protobuf.ITimestamp|null);
+
+ /** ListSkusRequest endTime. */
+ public endTime?: (google.protobuf.ITimestamp|null);
+
+ /** ListSkusRequest currencyCode. */
+ public currencyCode: string;
+
+ /** ListSkusRequest pageSize. */
+ public pageSize: number;
+
+ /** ListSkusRequest pageToken. */
+ public pageToken: string;
+
+ /**
+ * Creates a new ListSkusRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ListSkusRequest instance
+ */
+ public static create(properties?: google.cloud.billing.v1.IListSkusRequest): google.cloud.billing.v1.ListSkusRequest;
+
+ /**
+ * Encodes the specified ListSkusRequest message. Does not implicitly {@link google.cloud.billing.v1.ListSkusRequest.verify|verify} messages.
+ * @param message ListSkusRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.billing.v1.IListSkusRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ListSkusRequest message, length delimited. Does not implicitly {@link google.cloud.billing.v1.ListSkusRequest.verify|verify} messages.
+ * @param message ListSkusRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.billing.v1.IListSkusRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ListSkusRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ListSkusRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.billing.v1.ListSkusRequest;
+
+ /**
+ * Decodes a ListSkusRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ListSkusRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.billing.v1.ListSkusRequest;
+
+ /**
+ * Verifies a ListSkusRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ListSkusRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ListSkusRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.billing.v1.ListSkusRequest;
+
+ /**
+ * Creates a plain object from a ListSkusRequest message. Also converts values to other types if specified.
+ * @param message ListSkusRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.billing.v1.ListSkusRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ListSkusRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ListSkusRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ListSkusResponse. */
+ interface IListSkusResponse {
+
+ /** ListSkusResponse skus */
+ skus?: (google.cloud.billing.v1.ISku[]|null);
+
+ /** ListSkusResponse nextPageToken */
+ nextPageToken?: (string|null);
+ }
+
+ /** Represents a ListSkusResponse. */
+ class ListSkusResponse implements IListSkusResponse {
+
+ /**
+ * Constructs a new ListSkusResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.billing.v1.IListSkusResponse);
+
+ /** ListSkusResponse skus. */
+ public skus: google.cloud.billing.v1.ISku[];
+
+ /** ListSkusResponse nextPageToken. */
+ public nextPageToken: string;
+
+ /**
+ * Creates a new ListSkusResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ListSkusResponse instance
+ */
+ public static create(properties?: google.cloud.billing.v1.IListSkusResponse): google.cloud.billing.v1.ListSkusResponse;
+
+ /**
+ * Encodes the specified ListSkusResponse message. Does not implicitly {@link google.cloud.billing.v1.ListSkusResponse.verify|verify} messages.
+ * @param message ListSkusResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.billing.v1.IListSkusResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ListSkusResponse message, length delimited. Does not implicitly {@link google.cloud.billing.v1.ListSkusResponse.verify|verify} messages.
+ * @param message ListSkusResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.billing.v1.IListSkusResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ListSkusResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ListSkusResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.billing.v1.ListSkusResponse;
+
+ /**
+ * Decodes a ListSkusResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ListSkusResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.billing.v1.ListSkusResponse;
+
+ /**
+ * Verifies a ListSkusResponse message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ListSkusResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ListSkusResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.billing.v1.ListSkusResponse;
+
+ /**
+ * Creates a plain object from a ListSkusResponse message. Also converts values to other types if specified.
+ * @param message ListSkusResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.billing.v1.ListSkusResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ListSkusResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ListSkusResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+ }
+ }
+
+ /** Namespace api. */
+ namespace api {
+
+ /** Properties of a Http. */
+ interface IHttp {
+
+ /** Http rules */
+ rules?: (google.api.IHttpRule[]|null);
+
+ /** Http fullyDecodeReservedExpansion */
+ fullyDecodeReservedExpansion?: (boolean|null);
+ }
+
+ /** Represents a Http. */
+ class Http implements IHttp {
+
+ /**
+ * Constructs a new Http.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.api.IHttp);
+
+ /** Http rules. */
+ public rules: google.api.IHttpRule[];
+
+ /** Http fullyDecodeReservedExpansion. */
+ public fullyDecodeReservedExpansion: boolean;
+
+ /**
+ * Creates a new Http instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Http instance
+ */
+ public static create(properties?: google.api.IHttp): google.api.Http;
+
+ /**
+ * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages.
+ * @param message Http message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages.
+ * @param message Http message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Http message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Http
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http;
+
+ /**
+ * Decodes a Http message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Http
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http;
+
+ /**
+ * Verifies a Http message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a Http message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Http
+ */
+ public static fromObject(object: { [k: string]: any }): google.api.Http;
+
+ /**
+ * Creates a plain object from a Http message. Also converts values to other types if specified.
+ * @param message Http
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Http to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Http
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a HttpRule. */
+ interface IHttpRule {
+
+ /** HttpRule selector */
+ selector?: (string|null);
+
+ /** HttpRule get */
+ get?: (string|null);
+
+ /** HttpRule put */
+ put?: (string|null);
+
+ /** HttpRule post */
+ post?: (string|null);
+
+ /** HttpRule delete */
+ "delete"?: (string|null);
+
+ /** HttpRule patch */
+ patch?: (string|null);
+
+ /** HttpRule custom */
+ custom?: (google.api.ICustomHttpPattern|null);
+
+ /** HttpRule body */
+ body?: (string|null);
+
+ /** HttpRule responseBody */
+ responseBody?: (string|null);
+
+ /** HttpRule additionalBindings */
+ additionalBindings?: (google.api.IHttpRule[]|null);
+ }
+
+ /** Represents a HttpRule. */
+ class HttpRule implements IHttpRule {
+
+ /**
+ * Constructs a new HttpRule.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.api.IHttpRule);
+
+ /** HttpRule selector. */
+ public selector: string;
+
+ /** HttpRule get. */
+ public get?: (string|null);
+
+ /** HttpRule put. */
+ public put?: (string|null);
+
+ /** HttpRule post. */
+ public post?: (string|null);
+
+ /** HttpRule delete. */
+ public delete?: (string|null);
+
+ /** HttpRule patch. */
+ public patch?: (string|null);
+
+ /** HttpRule custom. */
+ public custom?: (google.api.ICustomHttpPattern|null);
+
+ /** HttpRule body. */
+ public body: string;
+
+ /** HttpRule responseBody. */
+ public responseBody: string;
+
+ /** HttpRule additionalBindings. */
+ public additionalBindings: google.api.IHttpRule[];
+
+ /** HttpRule pattern. */
+ public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom");
+
+ /**
+ * Creates a new HttpRule instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns HttpRule instance
+ */
+ public static create(properties?: google.api.IHttpRule): google.api.HttpRule;
+
+ /**
+ * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages.
+ * @param message HttpRule message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages.
+ * @param message HttpRule message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a HttpRule message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns HttpRule
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule;
+
+ /**
+ * Decodes a HttpRule message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns HttpRule
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule;
+
+ /**
+ * Verifies a HttpRule message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a HttpRule message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns HttpRule
+ */
+ public static fromObject(object: { [k: string]: any }): google.api.HttpRule;
+
+ /**
+ * Creates a plain object from a HttpRule message. Also converts values to other types if specified.
+ * @param message HttpRule
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this HttpRule to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for HttpRule
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a CustomHttpPattern. */
+ interface ICustomHttpPattern {
+
+ /** CustomHttpPattern kind */
+ kind?: (string|null);
+
+ /** CustomHttpPattern path */
+ path?: (string|null);
+ }
+
+ /** Represents a CustomHttpPattern. */
+ class CustomHttpPattern implements ICustomHttpPattern {
+
+ /**
+ * Constructs a new CustomHttpPattern.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.api.ICustomHttpPattern);
+
+ /** CustomHttpPattern kind. */
+ public kind: string;
+
+ /** CustomHttpPattern path. */
+ public path: string;
+
+ /**
+ * Creates a new CustomHttpPattern instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns CustomHttpPattern instance
+ */
+ public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern;
+
+ /**
+ * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages.
+ * @param message CustomHttpPattern message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages.
+ * @param message CustomHttpPattern message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a CustomHttpPattern message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns CustomHttpPattern
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern;
+
+ /**
+ * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns CustomHttpPattern
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern;
+
+ /**
+ * Verifies a CustomHttpPattern message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns CustomHttpPattern
+ */
+ public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern;
+
+ /**
+ * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified.
+ * @param message CustomHttpPattern
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this CustomHttpPattern to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for CustomHttpPattern
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** FieldBehavior enum. */
+ enum FieldBehavior {
+ FIELD_BEHAVIOR_UNSPECIFIED = 0,
+ OPTIONAL = 1,
+ REQUIRED = 2,
+ OUTPUT_ONLY = 3,
+ INPUT_ONLY = 4,
+ IMMUTABLE = 5,
+ UNORDERED_LIST = 6,
+ NON_EMPTY_DEFAULT = 7
+ }
+
+ /** Properties of a ResourceDescriptor. */
+ interface IResourceDescriptor {
+
+ /** ResourceDescriptor type */
+ type?: (string|null);
+
+ /** ResourceDescriptor pattern */
+ pattern?: (string[]|null);
+
+ /** ResourceDescriptor nameField */
+ nameField?: (string|null);
+
+ /** ResourceDescriptor history */
+ history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null);
+
+ /** ResourceDescriptor plural */
+ plural?: (string|null);
+
+ /** ResourceDescriptor singular */
+ singular?: (string|null);
+
+ /** ResourceDescriptor style */
+ style?: (google.api.ResourceDescriptor.Style[]|null);
+ }
+
+ /** Represents a ResourceDescriptor. */
+ class ResourceDescriptor implements IResourceDescriptor {
+
+ /**
+ * Constructs a new ResourceDescriptor.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.api.IResourceDescriptor);
+
+ /** ResourceDescriptor type. */
+ public type: string;
+
+ /** ResourceDescriptor pattern. */
+ public pattern: string[];
+
+ /** ResourceDescriptor nameField. */
+ public nameField: string;
+
+ /** ResourceDescriptor history. */
+ public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History);
+
+ /** ResourceDescriptor plural. */
+ public plural: string;
+
+ /** ResourceDescriptor singular. */
+ public singular: string;
+
+ /** ResourceDescriptor style. */
+ public style: google.api.ResourceDescriptor.Style[];
+
+ /**
+ * Creates a new ResourceDescriptor instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ResourceDescriptor instance
+ */
+ public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor;
+
+ /**
+ * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages.
+ * @param message ResourceDescriptor message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages.
+ * @param message ResourceDescriptor message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ResourceDescriptor message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ResourceDescriptor
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor;
+
+ /**
+ * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ResourceDescriptor
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor;
+
+ /**
+ * Verifies a ResourceDescriptor message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ResourceDescriptor
+ */
+ public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor;
+
+ /**
+ * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified.
+ * @param message ResourceDescriptor
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ResourceDescriptor to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ResourceDescriptor
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace ResourceDescriptor {
+
+ /** History enum. */
+ enum History {
+ HISTORY_UNSPECIFIED = 0,
+ ORIGINALLY_SINGLE_PATTERN = 1,
+ FUTURE_MULTI_PATTERN = 2
+ }
+
+ /** Style enum. */
+ enum Style {
+ STYLE_UNSPECIFIED = 0,
+ DECLARATIVE_FRIENDLY = 1
+ }
+ }
+
+ /** Properties of a ResourceReference. */
+ interface IResourceReference {
+
+ /** ResourceReference type */
+ type?: (string|null);
+
+ /** ResourceReference childType */
+ childType?: (string|null);
+ }
+
+ /** Represents a ResourceReference. */
+ class ResourceReference implements IResourceReference {
+
+ /**
+ * Constructs a new ResourceReference.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.api.IResourceReference);
+
+ /** ResourceReference type. */
+ public type: string;
+
+ /** ResourceReference childType. */
+ public childType: string;
+
+ /**
+ * Creates a new ResourceReference instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ResourceReference instance
+ */
+ public static create(properties?: google.api.IResourceReference): google.api.ResourceReference;
+
+ /**
+ * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages.
+ * @param message ResourceReference message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages.
+ * @param message ResourceReference message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ResourceReference message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ResourceReference
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference;
+
+ /**
+ * Decodes a ResourceReference message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ResourceReference
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference;
+
+ /**
+ * Verifies a ResourceReference message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ResourceReference
+ */
+ public static fromObject(object: { [k: string]: any }): google.api.ResourceReference;
+
+ /**
+ * Creates a plain object from a ResourceReference message. Also converts values to other types if specified.
+ * @param message ResourceReference
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ResourceReference to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ResourceReference
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+
+ /** Namespace protobuf. */
+ namespace protobuf {
+
+ /** Properties of a FileDescriptorSet. */
+ interface IFileDescriptorSet {
+
+ /** FileDescriptorSet file */
+ file?: (google.protobuf.IFileDescriptorProto[]|null);
+ }
+
+ /** Represents a FileDescriptorSet. */
+ class FileDescriptorSet implements IFileDescriptorSet {
+
+ /**
+ * Constructs a new FileDescriptorSet.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IFileDescriptorSet);
+
+ /** FileDescriptorSet file. */
+ public file: google.protobuf.IFileDescriptorProto[];
+
+ /**
+ * Creates a new FileDescriptorSet instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns FileDescriptorSet instance
+ */
+ public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet;
+
+ /**
+ * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages.
+ * @param message FileDescriptorSet message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages.
+ * @param message FileDescriptorSet message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a FileDescriptorSet message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns FileDescriptorSet
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet;
+
+ /**
+ * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns FileDescriptorSet
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet;
+
+ /**
+ * Verifies a FileDescriptorSet message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns FileDescriptorSet
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet;
+
+ /**
+ * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified.
+ * @param message FileDescriptorSet
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this FileDescriptorSet to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for FileDescriptorSet
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a FileDescriptorProto. */
+ interface IFileDescriptorProto {
+
+ /** FileDescriptorProto name */
+ name?: (string|null);
+
+ /** FileDescriptorProto package */
+ "package"?: (string|null);
+
+ /** FileDescriptorProto dependency */
+ dependency?: (string[]|null);
+
+ /** FileDescriptorProto publicDependency */
+ publicDependency?: (number[]|null);
+
+ /** FileDescriptorProto weakDependency */
+ weakDependency?: (number[]|null);
+
+ /** FileDescriptorProto messageType */
+ messageType?: (google.protobuf.IDescriptorProto[]|null);
+
+ /** FileDescriptorProto enumType */
+ enumType?: (google.protobuf.IEnumDescriptorProto[]|null);
+
+ /** FileDescriptorProto service */
+ service?: (google.protobuf.IServiceDescriptorProto[]|null);
+
+ /** FileDescriptorProto extension */
+ extension?: (google.protobuf.IFieldDescriptorProto[]|null);
+
+ /** FileDescriptorProto options */
+ options?: (google.protobuf.IFileOptions|null);
+
+ /** FileDescriptorProto sourceCodeInfo */
+ sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null);
+
+ /** FileDescriptorProto syntax */
+ syntax?: (string|null);
+
+ /** FileDescriptorProto edition */
+ edition?: (string|null);
+ }
+
+ /** Represents a FileDescriptorProto. */
+ class FileDescriptorProto implements IFileDescriptorProto {
+
+ /**
+ * Constructs a new FileDescriptorProto.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IFileDescriptorProto);
+
+ /** FileDescriptorProto name. */
+ public name: string;
+
+ /** FileDescriptorProto package. */
+ public package: string;
+
+ /** FileDescriptorProto dependency. */
+ public dependency: string[];
+
+ /** FileDescriptorProto publicDependency. */
+ public publicDependency: number[];
+
+ /** FileDescriptorProto weakDependency. */
+ public weakDependency: number[];
+
+ /** FileDescriptorProto messageType. */
+ public messageType: google.protobuf.IDescriptorProto[];
+
+ /** FileDescriptorProto enumType. */
+ public enumType: google.protobuf.IEnumDescriptorProto[];
+
+ /** FileDescriptorProto service. */
+ public service: google.protobuf.IServiceDescriptorProto[];
+
+ /** FileDescriptorProto extension. */
+ public extension: google.protobuf.IFieldDescriptorProto[];
+
+ /** FileDescriptorProto options. */
+ public options?: (google.protobuf.IFileOptions|null);
+
+ /** FileDescriptorProto sourceCodeInfo. */
+ public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null);
+
+ /** FileDescriptorProto syntax. */
+ public syntax: string;
+
+ /** FileDescriptorProto edition. */
+ public edition: string;
+
+ /**
+ * Creates a new FileDescriptorProto instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns FileDescriptorProto instance
+ */
+ public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto;
+
+ /**
+ * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages.
+ * @param message FileDescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages.
+ * @param message FileDescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a FileDescriptorProto message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns FileDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto;
+
+ /**
+ * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns FileDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto;
+
+ /**
+ * Verifies a FileDescriptorProto message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns FileDescriptorProto
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto;
+
+ /**
+ * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified.
+ * @param message FileDescriptorProto
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this FileDescriptorProto to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for FileDescriptorProto
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a DescriptorProto. */
+ interface IDescriptorProto {
+
+ /** DescriptorProto name */
+ name?: (string|null);
+
+ /** DescriptorProto field */
+ field?: (google.protobuf.IFieldDescriptorProto[]|null);
+
+ /** DescriptorProto extension */
+ extension?: (google.protobuf.IFieldDescriptorProto[]|null);
+
+ /** DescriptorProto nestedType */
+ nestedType?: (google.protobuf.IDescriptorProto[]|null);
+
+ /** DescriptorProto enumType */
+ enumType?: (google.protobuf.IEnumDescriptorProto[]|null);
+
+ /** DescriptorProto extensionRange */
+ extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null);
+
+ /** DescriptorProto oneofDecl */
+ oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null);
+
+ /** DescriptorProto options */
+ options?: (google.protobuf.IMessageOptions|null);
+
+ /** DescriptorProto reservedRange */
+ reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null);
+
+ /** DescriptorProto reservedName */
+ reservedName?: (string[]|null);
+ }
+
+ /** Represents a DescriptorProto. */
+ class DescriptorProto implements IDescriptorProto {
+
+ /**
+ * Constructs a new DescriptorProto.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IDescriptorProto);
+
+ /** DescriptorProto name. */
+ public name: string;
+
+ /** DescriptorProto field. */
+ public field: google.protobuf.IFieldDescriptorProto[];
+
+ /** DescriptorProto extension. */
+ public extension: google.protobuf.IFieldDescriptorProto[];
+
+ /** DescriptorProto nestedType. */
+ public nestedType: google.protobuf.IDescriptorProto[];
+
+ /** DescriptorProto enumType. */
+ public enumType: google.protobuf.IEnumDescriptorProto[];
+
+ /** DescriptorProto extensionRange. */
+ public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[];
+
+ /** DescriptorProto oneofDecl. */
+ public oneofDecl: google.protobuf.IOneofDescriptorProto[];
+
+ /** DescriptorProto options. */
+ public options?: (google.protobuf.IMessageOptions|null);
+
+ /** DescriptorProto reservedRange. */
+ public reservedRange: google.protobuf.DescriptorProto.IReservedRange[];
+
+ /** DescriptorProto reservedName. */
+ public reservedName: string[];
+
+ /**
+ * Creates a new DescriptorProto instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns DescriptorProto instance
+ */
+ public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto;
+
+ /**
+ * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages.
+ * @param message DescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages.
+ * @param message DescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a DescriptorProto message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns DescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto;
+
+ /**
+ * Decodes a DescriptorProto message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns DescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto;
+
+ /**
+ * Verifies a DescriptorProto message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns DescriptorProto
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto;
+
+ /**
+ * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified.
+ * @param message DescriptorProto
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this DescriptorProto to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for DescriptorProto
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace DescriptorProto {
+
+ /** Properties of an ExtensionRange. */
+ interface IExtensionRange {
+
+ /** ExtensionRange start */
+ start?: (number|null);
+
+ /** ExtensionRange end */
+ end?: (number|null);
+
+ /** ExtensionRange options */
+ options?: (google.protobuf.IExtensionRangeOptions|null);
+ }
+
+ /** Represents an ExtensionRange. */
+ class ExtensionRange implements IExtensionRange {
+
+ /**
+ * Constructs a new ExtensionRange.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange);
+
+ /** ExtensionRange start. */
+ public start: number;
+
+ /** ExtensionRange end. */
+ public end: number;
+
+ /** ExtensionRange options. */
+ public options?: (google.protobuf.IExtensionRangeOptions|null);
+
+ /**
+ * Creates a new ExtensionRange instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ExtensionRange instance
+ */
+ public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange;
+
+ /**
+ * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages.
+ * @param message ExtensionRange message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages.
+ * @param message ExtensionRange message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an ExtensionRange message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ExtensionRange
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange;
+
+ /**
+ * Decodes an ExtensionRange message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ExtensionRange
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange;
+
+ /**
+ * Verifies an ExtensionRange message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ExtensionRange
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange;
+
+ /**
+ * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified.
+ * @param message ExtensionRange
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ExtensionRange to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ExtensionRange
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ReservedRange. */
+ interface IReservedRange {
+
+ /** ReservedRange start */
+ start?: (number|null);
+
+ /** ReservedRange end */
+ end?: (number|null);
+ }
+
+ /** Represents a ReservedRange. */
+ class ReservedRange implements IReservedRange {
+
+ /**
+ * Constructs a new ReservedRange.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.DescriptorProto.IReservedRange);
+
+ /** ReservedRange start. */
+ public start: number;
+
+ /** ReservedRange end. */
+ public end: number;
+
+ /**
+ * Creates a new ReservedRange instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ReservedRange instance
+ */
+ public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange;
+
+ /**
+ * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages.
+ * @param message ReservedRange message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages.
+ * @param message ReservedRange message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ReservedRange message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ReservedRange
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange;
+
+ /**
+ * Decodes a ReservedRange message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ReservedRange
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange;
+
+ /**
+ * Verifies a ReservedRange message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ReservedRange
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange;
+
+ /**
+ * Creates a plain object from a ReservedRange message. Also converts values to other types if specified.
+ * @param message ReservedRange
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ReservedRange to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ReservedRange
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+
+ /** Properties of an ExtensionRangeOptions. */
+ interface IExtensionRangeOptions {
+
+ /** ExtensionRangeOptions uninterpretedOption */
+ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null);
+ }
+
+ /** Represents an ExtensionRangeOptions. */
+ class ExtensionRangeOptions implements IExtensionRangeOptions {
+
+ /**
+ * Constructs a new ExtensionRangeOptions.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IExtensionRangeOptions);
+
+ /** ExtensionRangeOptions uninterpretedOption. */
+ public uninterpretedOption: google.protobuf.IUninterpretedOption[];
+
+ /**
+ * Creates a new ExtensionRangeOptions instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ExtensionRangeOptions instance
+ */
+ public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions;
+
+ /**
+ * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages.
+ * @param message ExtensionRangeOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages.
+ * @param message ExtensionRangeOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an ExtensionRangeOptions message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ExtensionRangeOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions;
+
+ /**
+ * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ExtensionRangeOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions;
+
+ /**
+ * Verifies an ExtensionRangeOptions message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ExtensionRangeOptions
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions;
+
+ /**
+ * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified.
+ * @param message ExtensionRangeOptions
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ExtensionRangeOptions to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ExtensionRangeOptions
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a FieldDescriptorProto. */
+ interface IFieldDescriptorProto {
+
+ /** FieldDescriptorProto name */
+ name?: (string|null);
+
+ /** FieldDescriptorProto number */
+ number?: (number|null);
+
+ /** FieldDescriptorProto label */
+ label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null);
+
+ /** FieldDescriptorProto type */
+ type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null);
+
+ /** FieldDescriptorProto typeName */
+ typeName?: (string|null);
+
+ /** FieldDescriptorProto extendee */
+ extendee?: (string|null);
+
+ /** FieldDescriptorProto defaultValue */
+ defaultValue?: (string|null);
+
+ /** FieldDescriptorProto oneofIndex */
+ oneofIndex?: (number|null);
+
+ /** FieldDescriptorProto jsonName */
+ jsonName?: (string|null);
+
+ /** FieldDescriptorProto options */
+ options?: (google.protobuf.IFieldOptions|null);
+
+ /** FieldDescriptorProto proto3Optional */
+ proto3Optional?: (boolean|null);
+ }
+
+ /** Represents a FieldDescriptorProto. */
+ class FieldDescriptorProto implements IFieldDescriptorProto {
+
+ /**
+ * Constructs a new FieldDescriptorProto.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IFieldDescriptorProto);
+
+ /** FieldDescriptorProto name. */
+ public name: string;
+
+ /** FieldDescriptorProto number. */
+ public number: number;
+
+ /** FieldDescriptorProto label. */
+ public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label);
+
+ /** FieldDescriptorProto type. */
+ public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type);
+
+ /** FieldDescriptorProto typeName. */
+ public typeName: string;
+
+ /** FieldDescriptorProto extendee. */
+ public extendee: string;
+
+ /** FieldDescriptorProto defaultValue. */
+ public defaultValue: string;
+
+ /** FieldDescriptorProto oneofIndex. */
+ public oneofIndex: number;
+
+ /** FieldDescriptorProto jsonName. */
+ public jsonName: string;
+
+ /** FieldDescriptorProto options. */
+ public options?: (google.protobuf.IFieldOptions|null);
+
+ /** FieldDescriptorProto proto3Optional. */
+ public proto3Optional: boolean;
+
+ /**
+ * Creates a new FieldDescriptorProto instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns FieldDescriptorProto instance
+ */
+ public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto;
+
+ /**
+ * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages.
+ * @param message FieldDescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages.
+ * @param message FieldDescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a FieldDescriptorProto message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns FieldDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto;
+
+ /**
+ * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns FieldDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto;
+
+ /**
+ * Verifies a FieldDescriptorProto message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns FieldDescriptorProto
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto;
+
+ /**
+ * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified.
+ * @param message FieldDescriptorProto
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this FieldDescriptorProto to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for FieldDescriptorProto
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace FieldDescriptorProto {
+
+ /** Type enum. */
+ enum Type {
+ TYPE_DOUBLE = 1,
+ TYPE_FLOAT = 2,
+ TYPE_INT64 = 3,
+ TYPE_UINT64 = 4,
+ TYPE_INT32 = 5,
+ TYPE_FIXED64 = 6,
+ TYPE_FIXED32 = 7,
+ TYPE_BOOL = 8,
+ TYPE_STRING = 9,
+ TYPE_GROUP = 10,
+ TYPE_MESSAGE = 11,
+ TYPE_BYTES = 12,
+ TYPE_UINT32 = 13,
+ TYPE_ENUM = 14,
+ TYPE_SFIXED32 = 15,
+ TYPE_SFIXED64 = 16,
+ TYPE_SINT32 = 17,
+ TYPE_SINT64 = 18
+ }
+
+ /** Label enum. */
+ enum Label {
+ LABEL_OPTIONAL = 1,
+ LABEL_REQUIRED = 2,
+ LABEL_REPEATED = 3
+ }
+ }
+
+ /** Properties of an OneofDescriptorProto. */
+ interface IOneofDescriptorProto {
+
+ /** OneofDescriptorProto name */
+ name?: (string|null);
+
+ /** OneofDescriptorProto options */
+ options?: (google.protobuf.IOneofOptions|null);
+ }
+
+ /** Represents an OneofDescriptorProto. */
+ class OneofDescriptorProto implements IOneofDescriptorProto {
+
+ /**
+ * Constructs a new OneofDescriptorProto.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IOneofDescriptorProto);
+
+ /** OneofDescriptorProto name. */
+ public name: string;
+
+ /** OneofDescriptorProto options. */
+ public options?: (google.protobuf.IOneofOptions|null);
+
+ /**
+ * Creates a new OneofDescriptorProto instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns OneofDescriptorProto instance
+ */
+ public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto;
+
+ /**
+ * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages.
+ * @param message OneofDescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages.
+ * @param message OneofDescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an OneofDescriptorProto message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns OneofDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto;
+
+ /**
+ * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns OneofDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto;
+
+ /**
+ * Verifies an OneofDescriptorProto message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns OneofDescriptorProto
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto;
+
+ /**
+ * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified.
+ * @param message OneofDescriptorProto
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this OneofDescriptorProto to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for OneofDescriptorProto
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an EnumDescriptorProto. */
+ interface IEnumDescriptorProto {
+
+ /** EnumDescriptorProto name */
+ name?: (string|null);
+
+ /** EnumDescriptorProto value */
+ value?: (google.protobuf.IEnumValueDescriptorProto[]|null);
+
+ /** EnumDescriptorProto options */
+ options?: (google.protobuf.IEnumOptions|null);
+
+ /** EnumDescriptorProto reservedRange */
+ reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null);
+
+ /** EnumDescriptorProto reservedName */
+ reservedName?: (string[]|null);
+ }
+
+ /** Represents an EnumDescriptorProto. */
+ class EnumDescriptorProto implements IEnumDescriptorProto {
+
+ /**
+ * Constructs a new EnumDescriptorProto.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IEnumDescriptorProto);
+
+ /** EnumDescriptorProto name. */
+ public name: string;
+
+ /** EnumDescriptorProto value. */
+ public value: google.protobuf.IEnumValueDescriptorProto[];
+
+ /** EnumDescriptorProto options. */
+ public options?: (google.protobuf.IEnumOptions|null);
+
+ /** EnumDescriptorProto reservedRange. */
+ public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[];
+
+ /** EnumDescriptorProto reservedName. */
+ public reservedName: string[];
+
+ /**
+ * Creates a new EnumDescriptorProto instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns EnumDescriptorProto instance
+ */
+ public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto;
+
+ /**
+ * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages.
+ * @param message EnumDescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages.
+ * @param message EnumDescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an EnumDescriptorProto message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns EnumDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto;
+
+ /**
+ * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns EnumDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto;
+
+ /**
+ * Verifies an EnumDescriptorProto message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns EnumDescriptorProto
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto;
+
+ /**
+ * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified.
+ * @param message EnumDescriptorProto
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this EnumDescriptorProto to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for EnumDescriptorProto
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace EnumDescriptorProto {
+
+ /** Properties of an EnumReservedRange. */
+ interface IEnumReservedRange {
+
+ /** EnumReservedRange start */
+ start?: (number|null);
+
+ /** EnumReservedRange end */
+ end?: (number|null);
+ }
+
+ /** Represents an EnumReservedRange. */
+ class EnumReservedRange implements IEnumReservedRange {
+
+ /**
+ * Constructs a new EnumReservedRange.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange);
+
+ /** EnumReservedRange start. */
+ public start: number;
+
+ /** EnumReservedRange end. */
+ public end: number;
+
+ /**
+ * Creates a new EnumReservedRange instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns EnumReservedRange instance
+ */
+ public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange;
+
+ /**
+ * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages.
+ * @param message EnumReservedRange message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages.
+ * @param message EnumReservedRange message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an EnumReservedRange message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns EnumReservedRange
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange;
+
+ /**
+ * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns EnumReservedRange
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange;
+
+ /**
+ * Verifies an EnumReservedRange message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns EnumReservedRange
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange;
+
+ /**
+ * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified.
+ * @param message EnumReservedRange
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this EnumReservedRange to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for EnumReservedRange
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+
+ /** Properties of an EnumValueDescriptorProto. */
+ interface IEnumValueDescriptorProto {
+
+ /** EnumValueDescriptorProto name */
+ name?: (string|null);
+
+ /** EnumValueDescriptorProto number */
+ number?: (number|null);
+
+ /** EnumValueDescriptorProto options */
+ options?: (google.protobuf.IEnumValueOptions|null);
+ }
+
+ /** Represents an EnumValueDescriptorProto. */
+ class EnumValueDescriptorProto implements IEnumValueDescriptorProto {
+
+ /**
+ * Constructs a new EnumValueDescriptorProto.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IEnumValueDescriptorProto);
+
+ /** EnumValueDescriptorProto name. */
+ public name: string;
+
+ /** EnumValueDescriptorProto number. */
+ public number: number;
+
+ /** EnumValueDescriptorProto options. */
+ public options?: (google.protobuf.IEnumValueOptions|null);
+
+ /**
+ * Creates a new EnumValueDescriptorProto instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns EnumValueDescriptorProto instance
+ */
+ public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto;
+
+ /**
+ * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages.
+ * @param message EnumValueDescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages.
+ * @param message EnumValueDescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an EnumValueDescriptorProto message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns EnumValueDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto;
+
+ /**
+ * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns EnumValueDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto;
+
+ /**
+ * Verifies an EnumValueDescriptorProto message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns EnumValueDescriptorProto
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto;
+
+ /**
+ * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified.
+ * @param message EnumValueDescriptorProto
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this EnumValueDescriptorProto to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for EnumValueDescriptorProto
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ServiceDescriptorProto. */
+ interface IServiceDescriptorProto {
+
+ /** ServiceDescriptorProto name */
+ name?: (string|null);
+
+ /** ServiceDescriptorProto method */
+ method?: (google.protobuf.IMethodDescriptorProto[]|null);
+
+ /** ServiceDescriptorProto options */
+ options?: (google.protobuf.IServiceOptions|null);
+ }
+
+ /** Represents a ServiceDescriptorProto. */
+ class ServiceDescriptorProto implements IServiceDescriptorProto {
+
+ /**
+ * Constructs a new ServiceDescriptorProto.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IServiceDescriptorProto);
+
+ /** ServiceDescriptorProto name. */
+ public name: string;
+
+ /** ServiceDescriptorProto method. */
+ public method: google.protobuf.IMethodDescriptorProto[];
+
+ /** ServiceDescriptorProto options. */
+ public options?: (google.protobuf.IServiceOptions|null);
+
+ /**
+ * Creates a new ServiceDescriptorProto instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ServiceDescriptorProto instance
+ */
+ public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto;
+
+ /**
+ * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages.
+ * @param message ServiceDescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages.
+ * @param message ServiceDescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ServiceDescriptorProto message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ServiceDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto;
+
+ /**
+ * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ServiceDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto;
+
+ /**
+ * Verifies a ServiceDescriptorProto message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ServiceDescriptorProto
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto;
+
+ /**
+ * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified.
+ * @param message ServiceDescriptorProto
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ServiceDescriptorProto to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ServiceDescriptorProto
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a MethodDescriptorProto. */
+ interface IMethodDescriptorProto {
+
+ /** MethodDescriptorProto name */
+ name?: (string|null);
+
+ /** MethodDescriptorProto inputType */
+ inputType?: (string|null);
+
+ /** MethodDescriptorProto outputType */
+ outputType?: (string|null);
+
+ /** MethodDescriptorProto options */
+ options?: (google.protobuf.IMethodOptions|null);
+
+ /** MethodDescriptorProto clientStreaming */
+ clientStreaming?: (boolean|null);
+
+ /** MethodDescriptorProto serverStreaming */
+ serverStreaming?: (boolean|null);
+ }
+
+ /** Represents a MethodDescriptorProto. */
+ class MethodDescriptorProto implements IMethodDescriptorProto {
+
+ /**
+ * Constructs a new MethodDescriptorProto.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IMethodDescriptorProto);
+
+ /** MethodDescriptorProto name. */
+ public name: string;
+
+ /** MethodDescriptorProto inputType. */
+ public inputType: string;
+
+ /** MethodDescriptorProto outputType. */
+ public outputType: string;
+
+ /** MethodDescriptorProto options. */
+ public options?: (google.protobuf.IMethodOptions|null);
+
+ /** MethodDescriptorProto clientStreaming. */
+ public clientStreaming: boolean;
+
+ /** MethodDescriptorProto serverStreaming. */
+ public serverStreaming: boolean;
+
+ /**
+ * Creates a new MethodDescriptorProto instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns MethodDescriptorProto instance
+ */
+ public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto;
+
+ /**
+ * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages.
+ * @param message MethodDescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages.
+ * @param message MethodDescriptorProto message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a MethodDescriptorProto message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns MethodDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto;
+
+ /**
+ * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns MethodDescriptorProto
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto;
+
+ /**
+ * Verifies a MethodDescriptorProto message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns MethodDescriptorProto
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto;
+
+ /**
+ * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified.
+ * @param message MethodDescriptorProto
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this MethodDescriptorProto to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for MethodDescriptorProto
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a FileOptions. */
+ interface IFileOptions {
+
+ /** FileOptions javaPackage */
+ javaPackage?: (string|null);
+
+ /** FileOptions javaOuterClassname */
+ javaOuterClassname?: (string|null);
+
+ /** FileOptions javaMultipleFiles */
+ javaMultipleFiles?: (boolean|null);
+
+ /** FileOptions javaGenerateEqualsAndHash */
+ javaGenerateEqualsAndHash?: (boolean|null);
+
+ /** FileOptions javaStringCheckUtf8 */
+ javaStringCheckUtf8?: (boolean|null);
+
+ /** FileOptions optimizeFor */
+ optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null);
+
+ /** FileOptions goPackage */
+ goPackage?: (string|null);
+
+ /** FileOptions ccGenericServices */
+ ccGenericServices?: (boolean|null);
+
+ /** FileOptions javaGenericServices */
+ javaGenericServices?: (boolean|null);
+
+ /** FileOptions pyGenericServices */
+ pyGenericServices?: (boolean|null);
+
+ /** FileOptions phpGenericServices */
+ phpGenericServices?: (boolean|null);
+
+ /** FileOptions deprecated */
+ deprecated?: (boolean|null);
+
+ /** FileOptions ccEnableArenas */
+ ccEnableArenas?: (boolean|null);
+
+ /** FileOptions objcClassPrefix */
+ objcClassPrefix?: (string|null);
+
+ /** FileOptions csharpNamespace */
+ csharpNamespace?: (string|null);
+
+ /** FileOptions swiftPrefix */
+ swiftPrefix?: (string|null);
+
+ /** FileOptions phpClassPrefix */
+ phpClassPrefix?: (string|null);
+
+ /** FileOptions phpNamespace */
+ phpNamespace?: (string|null);
+
+ /** FileOptions phpMetadataNamespace */
+ phpMetadataNamespace?: (string|null);
+
+ /** FileOptions rubyPackage */
+ rubyPackage?: (string|null);
+
+ /** FileOptions uninterpretedOption */
+ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null);
+
+ /** FileOptions .google.api.resourceDefinition */
+ ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null);
+ }
+
+ /** Represents a FileOptions. */
+ class FileOptions implements IFileOptions {
+
+ /**
+ * Constructs a new FileOptions.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IFileOptions);
+
+ /** FileOptions javaPackage. */
+ public javaPackage: string;
+
+ /** FileOptions javaOuterClassname. */
+ public javaOuterClassname: string;
+
+ /** FileOptions javaMultipleFiles. */
+ public javaMultipleFiles: boolean;
+
+ /** FileOptions javaGenerateEqualsAndHash. */
+ public javaGenerateEqualsAndHash: boolean;
+
+ /** FileOptions javaStringCheckUtf8. */
+ public javaStringCheckUtf8: boolean;
+
+ /** FileOptions optimizeFor. */
+ public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode);
+
+ /** FileOptions goPackage. */
+ public goPackage: string;
+
+ /** FileOptions ccGenericServices. */
+ public ccGenericServices: boolean;
+
+ /** FileOptions javaGenericServices. */
+ public javaGenericServices: boolean;
+
+ /** FileOptions pyGenericServices. */
+ public pyGenericServices: boolean;
+
+ /** FileOptions phpGenericServices. */
+ public phpGenericServices: boolean;
+
+ /** FileOptions deprecated. */
+ public deprecated: boolean;
+
+ /** FileOptions ccEnableArenas. */
+ public ccEnableArenas: boolean;
+
+ /** FileOptions objcClassPrefix. */
+ public objcClassPrefix: string;
+
+ /** FileOptions csharpNamespace. */
+ public csharpNamespace: string;
+
+ /** FileOptions swiftPrefix. */
+ public swiftPrefix: string;
+
+ /** FileOptions phpClassPrefix. */
+ public phpClassPrefix: string;
+
+ /** FileOptions phpNamespace. */
+ public phpNamespace: string;
+
+ /** FileOptions phpMetadataNamespace. */
+ public phpMetadataNamespace: string;
+
+ /** FileOptions rubyPackage. */
+ public rubyPackage: string;
+
+ /** FileOptions uninterpretedOption. */
+ public uninterpretedOption: google.protobuf.IUninterpretedOption[];
+
+ /**
+ * Creates a new FileOptions instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns FileOptions instance
+ */
+ public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions;
+
+ /**
+ * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages.
+ * @param message FileOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages.
+ * @param message FileOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a FileOptions message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns FileOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions;
+
+ /**
+ * Decodes a FileOptions message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns FileOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions;
+
+ /**
+ * Verifies a FileOptions message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a FileOptions message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns FileOptions
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions;
+
+ /**
+ * Creates a plain object from a FileOptions message. Also converts values to other types if specified.
+ * @param message FileOptions
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this FileOptions to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for FileOptions
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace FileOptions {
+
+ /** OptimizeMode enum. */
+ enum OptimizeMode {
+ SPEED = 1,
+ CODE_SIZE = 2,
+ LITE_RUNTIME = 3
+ }
+ }
+
+ /** Properties of a MessageOptions. */
+ interface IMessageOptions {
+
+ /** MessageOptions messageSetWireFormat */
+ messageSetWireFormat?: (boolean|null);
+
+ /** MessageOptions noStandardDescriptorAccessor */
+ noStandardDescriptorAccessor?: (boolean|null);
+
+ /** MessageOptions deprecated */
+ deprecated?: (boolean|null);
+
+ /** MessageOptions mapEntry */
+ mapEntry?: (boolean|null);
+
+ /** MessageOptions uninterpretedOption */
+ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null);
+
+ /** MessageOptions .google.api.resource */
+ ".google.api.resource"?: (google.api.IResourceDescriptor|null);
+ }
+
+ /** Represents a MessageOptions. */
+ class MessageOptions implements IMessageOptions {
+
+ /**
+ * Constructs a new MessageOptions.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IMessageOptions);
+
+ /** MessageOptions messageSetWireFormat. */
+ public messageSetWireFormat: boolean;
+
+ /** MessageOptions noStandardDescriptorAccessor. */
+ public noStandardDescriptorAccessor: boolean;
+
+ /** MessageOptions deprecated. */
+ public deprecated: boolean;
+
+ /** MessageOptions mapEntry. */
+ public mapEntry: boolean;
+
+ /** MessageOptions uninterpretedOption. */
+ public uninterpretedOption: google.protobuf.IUninterpretedOption[];
+
+ /**
+ * Creates a new MessageOptions instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns MessageOptions instance
+ */
+ public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions;
+
+ /**
+ * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages.
+ * @param message MessageOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages.
+ * @param message MessageOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a MessageOptions message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns MessageOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions;
+
+ /**
+ * Decodes a MessageOptions message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns MessageOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions;
+
+ /**
+ * Verifies a MessageOptions message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns MessageOptions
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions;
+
+ /**
+ * Creates a plain object from a MessageOptions message. Also converts values to other types if specified.
+ * @param message MessageOptions
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this MessageOptions to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for MessageOptions
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a FieldOptions. */
+ interface IFieldOptions {
+
+ /** FieldOptions ctype */
+ ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null);
+
+ /** FieldOptions packed */
+ packed?: (boolean|null);
+
+ /** FieldOptions jstype */
+ jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null);
+
+ /** FieldOptions lazy */
+ lazy?: (boolean|null);
+
+ /** FieldOptions unverifiedLazy */
+ unverifiedLazy?: (boolean|null);
+
+ /** FieldOptions deprecated */
+ deprecated?: (boolean|null);
+
+ /** FieldOptions weak */
+ weak?: (boolean|null);
+
+ /** FieldOptions uninterpretedOption */
+ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null);
+
+ /** FieldOptions .google.api.fieldBehavior */
+ ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null);
+
+ /** FieldOptions .google.api.resourceReference */
+ ".google.api.resourceReference"?: (google.api.IResourceReference|null);
+ }
+
+ /** Represents a FieldOptions. */
+ class FieldOptions implements IFieldOptions {
+
+ /**
+ * Constructs a new FieldOptions.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IFieldOptions);
+
+ /** FieldOptions ctype. */
+ public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType);
+
+ /** FieldOptions packed. */
+ public packed: boolean;
+
+ /** FieldOptions jstype. */
+ public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType);
+
+ /** FieldOptions lazy. */
+ public lazy: boolean;
+
+ /** FieldOptions unverifiedLazy. */
+ public unverifiedLazy: boolean;
+
+ /** FieldOptions deprecated. */
+ public deprecated: boolean;
+
+ /** FieldOptions weak. */
+ public weak: boolean;
+
+ /** FieldOptions uninterpretedOption. */
+ public uninterpretedOption: google.protobuf.IUninterpretedOption[];
+
+ /**
+ * Creates a new FieldOptions instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns FieldOptions instance
+ */
+ public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions;
+
+ /**
+ * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages.
+ * @param message FieldOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages.
+ * @param message FieldOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a FieldOptions message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns FieldOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions;
+
+ /**
+ * Decodes a FieldOptions message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns FieldOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions;
+
+ /**
+ * Verifies a FieldOptions message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns FieldOptions
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions;
+
+ /**
+ * Creates a plain object from a FieldOptions message. Also converts values to other types if specified.
+ * @param message FieldOptions
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this FieldOptions to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for FieldOptions
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace FieldOptions {
+
+ /** CType enum. */
+ enum CType {
+ STRING = 0,
+ CORD = 1,
+ STRING_PIECE = 2
+ }
+
+ /** JSType enum. */
+ enum JSType {
+ JS_NORMAL = 0,
+ JS_STRING = 1,
+ JS_NUMBER = 2
+ }
+ }
+
+ /** Properties of an OneofOptions. */
+ interface IOneofOptions {
+
+ /** OneofOptions uninterpretedOption */
+ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null);
+ }
+
+ /** Represents an OneofOptions. */
+ class OneofOptions implements IOneofOptions {
+
+ /**
+ * Constructs a new OneofOptions.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IOneofOptions);
+
+ /** OneofOptions uninterpretedOption. */
+ public uninterpretedOption: google.protobuf.IUninterpretedOption[];
+
+ /**
+ * Creates a new OneofOptions instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns OneofOptions instance
+ */
+ public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions;
+
+ /**
+ * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages.
+ * @param message OneofOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages.
+ * @param message OneofOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an OneofOptions message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns OneofOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions;
+
+ /**
+ * Decodes an OneofOptions message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns OneofOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions;
+
+ /**
+ * Verifies an OneofOptions message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns OneofOptions
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions;
+
+ /**
+ * Creates a plain object from an OneofOptions message. Also converts values to other types if specified.
+ * @param message OneofOptions
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this OneofOptions to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for OneofOptions
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an EnumOptions. */
+ interface IEnumOptions {
+
+ /** EnumOptions allowAlias */
+ allowAlias?: (boolean|null);
+
+ /** EnumOptions deprecated */
+ deprecated?: (boolean|null);
+
+ /** EnumOptions uninterpretedOption */
+ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null);
+ }
+
+ /** Represents an EnumOptions. */
+ class EnumOptions implements IEnumOptions {
+
+ /**
+ * Constructs a new EnumOptions.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IEnumOptions);
+
+ /** EnumOptions allowAlias. */
+ public allowAlias: boolean;
+
+ /** EnumOptions deprecated. */
+ public deprecated: boolean;
+
+ /** EnumOptions uninterpretedOption. */
+ public uninterpretedOption: google.protobuf.IUninterpretedOption[];
+
+ /**
+ * Creates a new EnumOptions instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns EnumOptions instance
+ */
+ public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions;
+
+ /**
+ * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages.
+ * @param message EnumOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages.
+ * @param message EnumOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an EnumOptions message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns EnumOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions;
+
+ /**
+ * Decodes an EnumOptions message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns EnumOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions;
+
+ /**
+ * Verifies an EnumOptions message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns EnumOptions
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions;
+
+ /**
+ * Creates a plain object from an EnumOptions message. Also converts values to other types if specified.
+ * @param message EnumOptions
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this EnumOptions to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for EnumOptions
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an EnumValueOptions. */
+ interface IEnumValueOptions {
+
+ /** EnumValueOptions deprecated */
+ deprecated?: (boolean|null);
+
+ /** EnumValueOptions uninterpretedOption */
+ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null);
+ }
+
+ /** Represents an EnumValueOptions. */
+ class EnumValueOptions implements IEnumValueOptions {
+
+ /**
+ * Constructs a new EnumValueOptions.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IEnumValueOptions);
+
+ /** EnumValueOptions deprecated. */
+ public deprecated: boolean;
+
+ /** EnumValueOptions uninterpretedOption. */
+ public uninterpretedOption: google.protobuf.IUninterpretedOption[];
+
+ /**
+ * Creates a new EnumValueOptions instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns EnumValueOptions instance
+ */
+ public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions;
+
+ /**
+ * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages.
+ * @param message EnumValueOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages.
+ * @param message EnumValueOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an EnumValueOptions message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns EnumValueOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions;
+
+ /**
+ * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns EnumValueOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions;
+
+ /**
+ * Verifies an EnumValueOptions message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns EnumValueOptions
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions;
+
+ /**
+ * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified.
+ * @param message EnumValueOptions
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this EnumValueOptions to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for EnumValueOptions
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ServiceOptions. */
+ interface IServiceOptions {
+
+ /** ServiceOptions deprecated */
+ deprecated?: (boolean|null);
+
+ /** ServiceOptions uninterpretedOption */
+ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null);
+
+ /** ServiceOptions .google.api.defaultHost */
+ ".google.api.defaultHost"?: (string|null);
+
+ /** ServiceOptions .google.api.oauthScopes */
+ ".google.api.oauthScopes"?: (string|null);
+ }
+
+ /** Represents a ServiceOptions. */
+ class ServiceOptions implements IServiceOptions {
+
+ /**
+ * Constructs a new ServiceOptions.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IServiceOptions);
+
+ /** ServiceOptions deprecated. */
+ public deprecated: boolean;
+
+ /** ServiceOptions uninterpretedOption. */
+ public uninterpretedOption: google.protobuf.IUninterpretedOption[];
+
+ /**
+ * Creates a new ServiceOptions instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ServiceOptions instance
+ */
+ public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions;
+
+ /**
+ * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages.
+ * @param message ServiceOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages.
+ * @param message ServiceOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ServiceOptions message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ServiceOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions;
+
+ /**
+ * Decodes a ServiceOptions message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ServiceOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions;
+
+ /**
+ * Verifies a ServiceOptions message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ServiceOptions
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions;
+
+ /**
+ * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified.
+ * @param message ServiceOptions
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ServiceOptions to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ServiceOptions
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a MethodOptions. */
+ interface IMethodOptions {
+
+ /** MethodOptions deprecated */
+ deprecated?: (boolean|null);
+
+ /** MethodOptions idempotencyLevel */
+ idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null);
+
+ /** MethodOptions uninterpretedOption */
+ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null);
+
+ /** MethodOptions .google.api.http */
+ ".google.api.http"?: (google.api.IHttpRule|null);
+
+ /** MethodOptions .google.api.methodSignature */
+ ".google.api.methodSignature"?: (string[]|null);
+ }
+
+ /** Represents a MethodOptions. */
+ class MethodOptions implements IMethodOptions {
+
+ /**
+ * Constructs a new MethodOptions.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IMethodOptions);
+
+ /** MethodOptions deprecated. */
+ public deprecated: boolean;
+
+ /** MethodOptions idempotencyLevel. */
+ public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel);
+
+ /** MethodOptions uninterpretedOption. */
+ public uninterpretedOption: google.protobuf.IUninterpretedOption[];
+
+ /**
+ * Creates a new MethodOptions instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns MethodOptions instance
+ */
+ public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions;
+
+ /**
+ * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages.
+ * @param message MethodOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages.
+ * @param message MethodOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a MethodOptions message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns MethodOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions;
+
+ /**
+ * Decodes a MethodOptions message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns MethodOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions;
+
+ /**
+ * Verifies a MethodOptions message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns MethodOptions
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions;
+
+ /**
+ * Creates a plain object from a MethodOptions message. Also converts values to other types if specified.
+ * @param message MethodOptions
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this MethodOptions to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for MethodOptions
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace MethodOptions {
+
+ /** IdempotencyLevel enum. */
+ enum IdempotencyLevel {
+ IDEMPOTENCY_UNKNOWN = 0,
+ NO_SIDE_EFFECTS = 1,
+ IDEMPOTENT = 2
+ }
+ }
+
+ /** Properties of an UninterpretedOption. */
+ interface IUninterpretedOption {
+
+ /** UninterpretedOption name */
+ name?: (google.protobuf.UninterpretedOption.INamePart[]|null);
+
+ /** UninterpretedOption identifierValue */
+ identifierValue?: (string|null);
+
+ /** UninterpretedOption positiveIntValue */
+ positiveIntValue?: (number|Long|string|null);
+
+ /** UninterpretedOption negativeIntValue */
+ negativeIntValue?: (number|Long|string|null);
+
+ /** UninterpretedOption doubleValue */
+ doubleValue?: (number|null);
+
+ /** UninterpretedOption stringValue */
+ stringValue?: (Uint8Array|string|null);
+
+ /** UninterpretedOption aggregateValue */
+ aggregateValue?: (string|null);
+ }
+
+ /** Represents an UninterpretedOption. */
+ class UninterpretedOption implements IUninterpretedOption {
+
+ /**
+ * Constructs a new UninterpretedOption.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IUninterpretedOption);
+
+ /** UninterpretedOption name. */
+ public name: google.protobuf.UninterpretedOption.INamePart[];
+
+ /** UninterpretedOption identifierValue. */
+ public identifierValue: string;
+
+ /** UninterpretedOption positiveIntValue. */
+ public positiveIntValue: (number|Long|string);
+
+ /** UninterpretedOption negativeIntValue. */
+ public negativeIntValue: (number|Long|string);
+
+ /** UninterpretedOption doubleValue. */
+ public doubleValue: number;
+
+ /** UninterpretedOption stringValue. */
+ public stringValue: (Uint8Array|string);
+
+ /** UninterpretedOption aggregateValue. */
+ public aggregateValue: string;
+
+ /**
+ * Creates a new UninterpretedOption instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns UninterpretedOption instance
+ */
+ public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption;
+
+ /**
+ * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages.
+ * @param message UninterpretedOption message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages.
+ * @param message UninterpretedOption message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an UninterpretedOption message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns UninterpretedOption
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption;
+
+ /**
+ * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns UninterpretedOption
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption;
+
+ /**
+ * Verifies an UninterpretedOption message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns UninterpretedOption
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption;
+
+ /**
+ * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified.
+ * @param message UninterpretedOption
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this UninterpretedOption to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for UninterpretedOption
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace UninterpretedOption {
+
+ /** Properties of a NamePart. */
+ interface INamePart {
+
+ /** NamePart namePart */
+ namePart: string;
+
+ /** NamePart isExtension */
+ isExtension: boolean;
+ }
+
+ /** Represents a NamePart. */
+ class NamePart implements INamePart {
+
+ /**
+ * Constructs a new NamePart.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.UninterpretedOption.INamePart);
+
+ /** NamePart namePart. */
+ public namePart: string;
+
+ /** NamePart isExtension. */
+ public isExtension: boolean;
+
+ /**
+ * Creates a new NamePart instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns NamePart instance
+ */
+ public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart;
+
+ /**
+ * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages.
+ * @param message NamePart message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages.
+ * @param message NamePart message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a NamePart message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns NamePart
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart;
+
+ /**
+ * Decodes a NamePart message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns NamePart
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart;
+
+ /**
+ * Verifies a NamePart message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a NamePart message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns NamePart
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart;
+
+ /**
+ * Creates a plain object from a NamePart message. Also converts values to other types if specified.
+ * @param message NamePart
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this NamePart to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for NamePart
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+
+ /** Properties of a SourceCodeInfo. */
+ interface ISourceCodeInfo {
+
+ /** SourceCodeInfo location */
+ location?: (google.protobuf.SourceCodeInfo.ILocation[]|null);
+ }
+
+ /** Represents a SourceCodeInfo. */
+ class SourceCodeInfo implements ISourceCodeInfo {
+
+ /**
+ * Constructs a new SourceCodeInfo.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.ISourceCodeInfo);
+
+ /** SourceCodeInfo location. */
+ public location: google.protobuf.SourceCodeInfo.ILocation[];
+
+ /**
+ * Creates a new SourceCodeInfo instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns SourceCodeInfo instance
+ */
+ public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo;
+
+ /**
+ * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages.
+ * @param message SourceCodeInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages.
+ * @param message SourceCodeInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a SourceCodeInfo message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns SourceCodeInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo;
+
+ /**
+ * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns SourceCodeInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo;
+
+ /**
+ * Verifies a SourceCodeInfo message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns SourceCodeInfo
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo;
+
+ /**
+ * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified.
+ * @param message SourceCodeInfo
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this SourceCodeInfo to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for SourceCodeInfo
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace SourceCodeInfo {
+
+ /** Properties of a Location. */
+ interface ILocation {
+
+ /** Location path */
+ path?: (number[]|null);
+
+ /** Location span */
+ span?: (number[]|null);
+
+ /** Location leadingComments */
+ leadingComments?: (string|null);
+
+ /** Location trailingComments */
+ trailingComments?: (string|null);
+
+ /** Location leadingDetachedComments */
+ leadingDetachedComments?: (string[]|null);
+ }
+
+ /** Represents a Location. */
+ class Location implements ILocation {
+
+ /**
+ * Constructs a new Location.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.SourceCodeInfo.ILocation);
+
+ /** Location path. */
+ public path: number[];
+
+ /** Location span. */
+ public span: number[];
+
+ /** Location leadingComments. */
+ public leadingComments: string;
+
+ /** Location trailingComments. */
+ public trailingComments: string;
+
+ /** Location leadingDetachedComments. */
+ public leadingDetachedComments: string[];
+
+ /**
+ * Creates a new Location instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Location instance
+ */
+ public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location;
+
+ /**
+ * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages.
+ * @param message Location message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages.
+ * @param message Location message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Location message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Location
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location;
+
+ /**
+ * Decodes a Location message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Location
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location;
+
+ /**
+ * Verifies a Location message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a Location message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Location
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location;
+
+ /**
+ * Creates a plain object from a Location message. Also converts values to other types if specified.
+ * @param message Location
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Location to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Location
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+
+ /** Properties of a GeneratedCodeInfo. */
+ interface IGeneratedCodeInfo {
+
+ /** GeneratedCodeInfo annotation */
+ annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null);
+ }
+
+ /** Represents a GeneratedCodeInfo. */
+ class GeneratedCodeInfo implements IGeneratedCodeInfo {
+
+ /**
+ * Constructs a new GeneratedCodeInfo.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IGeneratedCodeInfo);
+
+ /** GeneratedCodeInfo annotation. */
+ public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[];
+
+ /**
+ * Creates a new GeneratedCodeInfo instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns GeneratedCodeInfo instance
+ */
+ public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo;
+
+ /**
+ * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages.
+ * @param message GeneratedCodeInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages.
+ * @param message GeneratedCodeInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a GeneratedCodeInfo message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns GeneratedCodeInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo;
+
+ /**
+ * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns GeneratedCodeInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo;
+
+ /**
+ * Verifies a GeneratedCodeInfo message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns GeneratedCodeInfo
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo;
+
+ /**
+ * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified.
+ * @param message GeneratedCodeInfo
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this GeneratedCodeInfo to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for GeneratedCodeInfo
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace GeneratedCodeInfo {
+
+ /** Properties of an Annotation. */
+ interface IAnnotation {
+
+ /** Annotation path */
+ path?: (number[]|null);
+
+ /** Annotation sourceFile */
+ sourceFile?: (string|null);
+
+ /** Annotation begin */
+ begin?: (number|null);
+
+ /** Annotation end */
+ end?: (number|null);
+
+ /** Annotation semantic */
+ semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null);
+ }
+
+ /** Represents an Annotation. */
+ class Annotation implements IAnnotation {
+
+ /**
+ * Constructs a new Annotation.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation);
+
+ /** Annotation path. */
+ public path: number[];
+
+ /** Annotation sourceFile. */
+ public sourceFile: string;
+
+ /** Annotation begin. */
+ public begin: number;
+
+ /** Annotation end. */
+ public end: number;
+
+ /** Annotation semantic. */
+ public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic);
+
+ /**
+ * Creates a new Annotation instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Annotation instance
+ */
+ public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation;
+
+ /**
+ * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages.
+ * @param message Annotation message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages.
+ * @param message Annotation message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an Annotation message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Annotation
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation;
+
+ /**
+ * Decodes an Annotation message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Annotation
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation;
+
+ /**
+ * Verifies an Annotation message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an Annotation message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Annotation
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation;
+
+ /**
+ * Creates a plain object from an Annotation message. Also converts values to other types if specified.
+ * @param message Annotation
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Annotation to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Annotation
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace Annotation {
+
+ /** Semantic enum. */
+ enum Semantic {
+ NONE = 0,
+ SET = 1,
+ ALIAS = 2
+ }
+ }
+ }
+
+ /** Properties of a FieldMask. */
+ interface IFieldMask {
+
+ /** FieldMask paths */
+ paths?: (string[]|null);
+ }
+
+ /** Represents a FieldMask. */
+ class FieldMask implements IFieldMask {
+
+ /**
+ * Constructs a new FieldMask.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IFieldMask);
+
+ /** FieldMask paths. */
+ public paths: string[];
+
+ /**
+ * Creates a new FieldMask instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns FieldMask instance
+ */
+ public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask;
+
+ /**
+ * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages.
+ * @param message FieldMask message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages.
+ * @param message FieldMask message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a FieldMask message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns FieldMask
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask;
+
+ /**
+ * Decodes a FieldMask message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns FieldMask
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask;
+
+ /**
+ * Verifies a FieldMask message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a FieldMask message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns FieldMask
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask;
+
+ /**
+ * Creates a plain object from a FieldMask message. Also converts values to other types if specified.
+ * @param message FieldMask
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this FieldMask to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for FieldMask
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a Timestamp. */
+ interface ITimestamp {
+
+ /** Timestamp seconds */
+ seconds?: (number|Long|string|null);
+
+ /** Timestamp nanos */
+ nanos?: (number|null);
+ }
+
+ /** Represents a Timestamp. */
+ class Timestamp implements ITimestamp {
+
+ /**
+ * Constructs a new Timestamp.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.ITimestamp);
+
+ /** Timestamp seconds. */
+ public seconds: (number|Long|string);
+
+ /** Timestamp nanos. */
+ public nanos: number;
+
+ /**
+ * Creates a new Timestamp instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Timestamp instance
+ */
+ public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp;
+
+ /**
+ * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages.
+ * @param message Timestamp message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages.
+ * @param message Timestamp message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Timestamp message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Timestamp
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp;
+
+ /**
+ * Decodes a Timestamp message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Timestamp
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp;
+
+ /**
+ * Verifies a Timestamp message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a Timestamp message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Timestamp
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp;
+
+ /**
+ * Creates a plain object from a Timestamp message. Also converts values to other types if specified.
+ * @param message Timestamp
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Timestamp to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Timestamp
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+
+ /** Namespace iam. */
+ namespace iam {
+
+ /** Namespace v1. */
+ namespace v1 {
+
+ /** Represents a IAMPolicy */
+ class IAMPolicy extends $protobuf.rpc.Service {
+
+ /**
+ * Constructs a new IAMPolicy service.
+ * @param rpcImpl RPC implementation
+ * @param [requestDelimited=false] Whether requests are length-delimited
+ * @param [responseDelimited=false] Whether responses are length-delimited
+ */
+ constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);
+
+ /**
+ * Creates new IAMPolicy service using the specified rpc implementation.
+ * @param rpcImpl RPC implementation
+ * @param [requestDelimited=false] Whether requests are length-delimited
+ * @param [responseDelimited=false] Whether responses are length-delimited
+ * @returns RPC service. Useful where requests and/or responses are streamed.
+ */
+ public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): IAMPolicy;
+
+ /**
+ * Calls SetIamPolicy.
+ * @param request SetIamPolicyRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and Policy
+ */
+ public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.iam.v1.IAMPolicy.SetIamPolicyCallback): void;
+
+ /**
+ * Calls SetIamPolicy.
+ * @param request SetIamPolicyRequest message or plain object
+ * @returns Promise
+ */
+ public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise;
+
+ /**
+ * Calls GetIamPolicy.
+ * @param request GetIamPolicyRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and Policy
+ */
+ public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.iam.v1.IAMPolicy.GetIamPolicyCallback): void;
+
+ /**
+ * Calls GetIamPolicy.
+ * @param request GetIamPolicyRequest message or plain object
+ * @returns Promise
+ */
+ public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise;
+
+ /**
+ * Calls TestIamPermissions.
+ * @param request TestIamPermissionsRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse
+ */
+ public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.iam.v1.IAMPolicy.TestIamPermissionsCallback): void;
+
+ /**
+ * Calls TestIamPermissions.
+ * @param request TestIamPermissionsRequest message or plain object
+ * @returns Promise
+ */
+ public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise;
+ }
+
+ namespace IAMPolicy {
+
+ /**
+ * Callback as used by {@link google.iam.v1.IAMPolicy|setIamPolicy}.
+ * @param error Error, if any
+ * @param [response] Policy
+ */
+ type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void;
+
+ /**
+ * Callback as used by {@link google.iam.v1.IAMPolicy|getIamPolicy}.
+ * @param error Error, if any
+ * @param [response] Policy
+ */
+ type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void;
+
+ /**
+ * Callback as used by {@link google.iam.v1.IAMPolicy|testIamPermissions}.
+ * @param error Error, if any
+ * @param [response] TestIamPermissionsResponse
+ */
+ type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void;
+ }
+
+ /** Properties of a SetIamPolicyRequest. */
+ interface ISetIamPolicyRequest {
+
+ /** SetIamPolicyRequest resource */
+ resource?: (string|null);
+
+ /** SetIamPolicyRequest policy */
+ policy?: (google.iam.v1.IPolicy|null);
+
+ /** SetIamPolicyRequest updateMask */
+ updateMask?: (google.protobuf.IFieldMask|null);
+ }
+
+ /** Represents a SetIamPolicyRequest. */
+ class SetIamPolicyRequest implements ISetIamPolicyRequest {
+
+ /**
+ * Constructs a new SetIamPolicyRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.iam.v1.ISetIamPolicyRequest);
+
+ /** SetIamPolicyRequest resource. */
+ public resource: string;
+
+ /** SetIamPolicyRequest policy. */
+ public policy?: (google.iam.v1.IPolicy|null);
+
+ /** SetIamPolicyRequest updateMask. */
+ public updateMask?: (google.protobuf.IFieldMask|null);
+
+ /**
+ * Creates a new SetIamPolicyRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns SetIamPolicyRequest instance
+ */
+ public static create(properties?: google.iam.v1.ISetIamPolicyRequest): google.iam.v1.SetIamPolicyRequest;
+
+ /**
+ * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages.
+ * @param message SetIamPolicyRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.iam.v1.ISetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages.
+ * @param message SetIamPolicyRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.iam.v1.ISetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a SetIamPolicyRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns SetIamPolicyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.SetIamPolicyRequest;
+
+ /**
+ * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns SetIamPolicyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.SetIamPolicyRequest;
+
+ /**
+ * Verifies a SetIamPolicyRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns SetIamPolicyRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.iam.v1.SetIamPolicyRequest;
+
+ /**
+ * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified.
+ * @param message SetIamPolicyRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.iam.v1.SetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this SetIamPolicyRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for SetIamPolicyRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a GetIamPolicyRequest. */
+ interface IGetIamPolicyRequest {
+
+ /** GetIamPolicyRequest resource */
+ resource?: (string|null);
+
+ /** GetIamPolicyRequest options */
+ options?: (google.iam.v1.IGetPolicyOptions|null);
+ }
+
+ /** Represents a GetIamPolicyRequest. */
+ class GetIamPolicyRequest implements IGetIamPolicyRequest {
+
+ /**
+ * Constructs a new GetIamPolicyRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.iam.v1.IGetIamPolicyRequest);
+
+ /** GetIamPolicyRequest resource. */
+ public resource: string;
+
+ /** GetIamPolicyRequest options. */
+ public options?: (google.iam.v1.IGetPolicyOptions|null);
+
+ /**
+ * Creates a new GetIamPolicyRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns GetIamPolicyRequest instance
+ */
+ public static create(properties?: google.iam.v1.IGetIamPolicyRequest): google.iam.v1.GetIamPolicyRequest;
+
+ /**
+ * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages.
+ * @param message GetIamPolicyRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages.
+ * @param message GetIamPolicyRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a GetIamPolicyRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns GetIamPolicyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.GetIamPolicyRequest;
+
+ /**
+ * Decodes a GetIamPolicyRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns GetIamPolicyRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.GetIamPolicyRequest;
+
+ /**
+ * Verifies a GetIamPolicyRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns GetIamPolicyRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.iam.v1.GetIamPolicyRequest;
+
+ /**
+ * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified.
+ * @param message GetIamPolicyRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.iam.v1.GetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this GetIamPolicyRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for GetIamPolicyRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a TestIamPermissionsRequest. */
+ interface ITestIamPermissionsRequest {
+
+ /** TestIamPermissionsRequest resource */
+ resource?: (string|null);
+
+ /** TestIamPermissionsRequest permissions */
+ permissions?: (string[]|null);
+ }
+
+ /** Represents a TestIamPermissionsRequest. */
+ class TestIamPermissionsRequest implements ITestIamPermissionsRequest {
+
+ /**
+ * Constructs a new TestIamPermissionsRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.iam.v1.ITestIamPermissionsRequest);
+
+ /** TestIamPermissionsRequest resource. */
+ public resource: string;
+
+ /** TestIamPermissionsRequest permissions. */
+ public permissions: string[];
+
+ /**
+ * Creates a new TestIamPermissionsRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns TestIamPermissionsRequest instance
+ */
+ public static create(properties?: google.iam.v1.ITestIamPermissionsRequest): google.iam.v1.TestIamPermissionsRequest;
+
+ /**
+ * Encodes the specified TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages.
+ * @param message TestIamPermissionsRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages.
+ * @param message TestIamPermissionsRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a TestIamPermissionsRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns TestIamPermissionsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.TestIamPermissionsRequest;
+
+ /**
+ * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns TestIamPermissionsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.TestIamPermissionsRequest;
+
+ /**
+ * Verifies a TestIamPermissionsRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns TestIamPermissionsRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsRequest;
+
+ /**
+ * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified.
+ * @param message TestIamPermissionsRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.iam.v1.TestIamPermissionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this TestIamPermissionsRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for TestIamPermissionsRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a TestIamPermissionsResponse. */
+ interface ITestIamPermissionsResponse {
+
+ /** TestIamPermissionsResponse permissions */
+ permissions?: (string[]|null);
+ }
+
+ /** Represents a TestIamPermissionsResponse. */
+ class TestIamPermissionsResponse implements ITestIamPermissionsResponse {
+
+ /**
+ * Constructs a new TestIamPermissionsResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.iam.v1.ITestIamPermissionsResponse);
+
+ /** TestIamPermissionsResponse permissions. */
+ public permissions: string[];
+
+ /**
+ * Creates a new TestIamPermissionsResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns TestIamPermissionsResponse instance
+ */
+ public static create(properties?: google.iam.v1.ITestIamPermissionsResponse): google.iam.v1.TestIamPermissionsResponse;
+
+ /**
+ * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages.
+ * @param message TestIamPermissionsResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages.
+ * @param message TestIamPermissionsResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a TestIamPermissionsResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns TestIamPermissionsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.TestIamPermissionsResponse;
+
+ /**
+ * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns TestIamPermissionsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.TestIamPermissionsResponse;
+
+ /**
+ * Verifies a TestIamPermissionsResponse message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns TestIamPermissionsResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsResponse;
+
+ /**
+ * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified.
+ * @param message TestIamPermissionsResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.iam.v1.TestIamPermissionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this TestIamPermissionsResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for TestIamPermissionsResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a GetPolicyOptions. */
+ interface IGetPolicyOptions {
+
+ /** GetPolicyOptions requestedPolicyVersion */
+ requestedPolicyVersion?: (number|null);
+ }
+
+ /** Represents a GetPolicyOptions. */
+ class GetPolicyOptions implements IGetPolicyOptions {
+
+ /**
+ * Constructs a new GetPolicyOptions.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.iam.v1.IGetPolicyOptions);
+
+ /** GetPolicyOptions requestedPolicyVersion. */
+ public requestedPolicyVersion: number;
+
+ /**
+ * Creates a new GetPolicyOptions instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns GetPolicyOptions instance
+ */
+ public static create(properties?: google.iam.v1.IGetPolicyOptions): google.iam.v1.GetPolicyOptions;
+
+ /**
+ * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages.
+ * @param message GetPolicyOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages.
+ * @param message GetPolicyOptions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a GetPolicyOptions message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns GetPolicyOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.GetPolicyOptions;
+
+ /**
+ * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns GetPolicyOptions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.GetPolicyOptions;
+
+ /**
+ * Verifies a GetPolicyOptions message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns GetPolicyOptions
+ */
+ public static fromObject(object: { [k: string]: any }): google.iam.v1.GetPolicyOptions;
+
+ /**
+ * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified.
+ * @param message GetPolicyOptions
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.iam.v1.GetPolicyOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this GetPolicyOptions to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for GetPolicyOptions
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a Policy. */
+ interface IPolicy {
+
+ /** Policy version */
+ version?: (number|null);
+
+ /** Policy bindings */
+ bindings?: (google.iam.v1.IBinding[]|null);
+
+ /** Policy auditConfigs */
+ auditConfigs?: (google.iam.v1.IAuditConfig[]|null);
+
+ /** Policy etag */
+ etag?: (Uint8Array|string|null);
+ }
+
+ /** Represents a Policy. */
+ class Policy implements IPolicy {
+
+ /**
+ * Constructs a new Policy.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.iam.v1.IPolicy);
+
+ /** Policy version. */
+ public version: number;
+
+ /** Policy bindings. */
+ public bindings: google.iam.v1.IBinding[];
+
+ /** Policy auditConfigs. */
+ public auditConfigs: google.iam.v1.IAuditConfig[];
+
+ /** Policy etag. */
+ public etag: (Uint8Array|string);
+
+ /**
+ * Creates a new Policy instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Policy instance
+ */
+ public static create(properties?: google.iam.v1.IPolicy): google.iam.v1.Policy;
+
+ /**
+ * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages.
+ * @param message Policy message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages.
+ * @param message Policy message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Policy message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Policy
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Policy;
+
+ /**
+ * Decodes a Policy message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Policy
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Policy;
+
+ /**
+ * Verifies a Policy message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a Policy message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Policy
+ */
+ public static fromObject(object: { [k: string]: any }): google.iam.v1.Policy;
+
+ /**
+ * Creates a plain object from a Policy message. Also converts values to other types if specified.
+ * @param message Policy
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.iam.v1.Policy, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Policy to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Policy
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a Binding. */
+ interface IBinding {
+
+ /** Binding role */
+ role?: (string|null);
+
+ /** Binding members */
+ members?: (string[]|null);
+
+ /** Binding condition */
+ condition?: (google.type.IExpr|null);
+ }
+
+ /** Represents a Binding. */
+ class Binding implements IBinding {
+
+ /**
+ * Constructs a new Binding.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.iam.v1.IBinding);
+
+ /** Binding role. */
+ public role: string;
+
+ /** Binding members. */
+ public members: string[];
+
+ /** Binding condition. */
+ public condition?: (google.type.IExpr|null);
+
+ /**
+ * Creates a new Binding instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Binding instance
+ */
+ public static create(properties?: google.iam.v1.IBinding): google.iam.v1.Binding;
+
+ /**
+ * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages.
+ * @param message Binding message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages.
+ * @param message Binding message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Binding message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Binding
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Binding;
+
+ /**
+ * Decodes a Binding message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Binding
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Binding;
+
+ /**
+ * Verifies a Binding message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a Binding message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Binding
+ */
+ public static fromObject(object: { [k: string]: any }): google.iam.v1.Binding;
+
+ /**
+ * Creates a plain object from a Binding message. Also converts values to other types if specified.
+ * @param message Binding
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.iam.v1.Binding, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Binding to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Binding
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an AuditConfig. */
+ interface IAuditConfig {
+
+ /** AuditConfig service */
+ service?: (string|null);
+
+ /** AuditConfig auditLogConfigs */
+ auditLogConfigs?: (google.iam.v1.IAuditLogConfig[]|null);
+ }
+
+ /** Represents an AuditConfig. */
+ class AuditConfig implements IAuditConfig {
+
+ /**
+ * Constructs a new AuditConfig.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.iam.v1.IAuditConfig);
+
+ /** AuditConfig service. */
+ public service: string;
+
+ /** AuditConfig auditLogConfigs. */
+ public auditLogConfigs: google.iam.v1.IAuditLogConfig[];
+
+ /**
+ * Creates a new AuditConfig instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns AuditConfig instance
+ */
+ public static create(properties?: google.iam.v1.IAuditConfig): google.iam.v1.AuditConfig;
+
+ /**
+ * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages.
+ * @param message AuditConfig message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages.
+ * @param message AuditConfig message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an AuditConfig message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns AuditConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfig;
+
+ /**
+ * Decodes an AuditConfig message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns AuditConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfig;
+
+ /**
+ * Verifies an AuditConfig message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an AuditConfig message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns AuditConfig
+ */
+ public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfig;
+
+ /**
+ * Creates a plain object from an AuditConfig message. Also converts values to other types if specified.
+ * @param message AuditConfig
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.iam.v1.AuditConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this AuditConfig to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for AuditConfig
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an AuditLogConfig. */
+ interface IAuditLogConfig {
+
+ /** AuditLogConfig logType */
+ logType?: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType|null);
+
+ /** AuditLogConfig exemptedMembers */
+ exemptedMembers?: (string[]|null);
+ }
+
+ /** Represents an AuditLogConfig. */
+ class AuditLogConfig implements IAuditLogConfig {
+
+ /**
+ * Constructs a new AuditLogConfig.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.iam.v1.IAuditLogConfig);
+
+ /** AuditLogConfig logType. */
+ public logType: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType);
+
+ /** AuditLogConfig exemptedMembers. */
+ public exemptedMembers: string[];
+
+ /**
+ * Creates a new AuditLogConfig instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns AuditLogConfig instance
+ */
+ public static create(properties?: google.iam.v1.IAuditLogConfig): google.iam.v1.AuditLogConfig;
+
+ /**
+ * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages.
+ * @param message AuditLogConfig message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages.
+ * @param message AuditLogConfig message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an AuditLogConfig message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns AuditLogConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditLogConfig;
+
+ /**
+ * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns AuditLogConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditLogConfig;
+
+ /**
+ * Verifies an AuditLogConfig message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an AuditLogConfig message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns AuditLogConfig
+ */
+ public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditLogConfig;
+
+ /**
+ * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified.
+ * @param message AuditLogConfig
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.iam.v1.AuditLogConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this AuditLogConfig to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for AuditLogConfig
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace AuditLogConfig {
+
+ /** LogType enum. */
+ enum LogType {
+ LOG_TYPE_UNSPECIFIED = 0,
+ ADMIN_READ = 1,
+ DATA_WRITE = 2,
+ DATA_READ = 3
+ }
+ }
+
+ /** Properties of a PolicyDelta. */
+ interface IPolicyDelta {
+
+ /** PolicyDelta bindingDeltas */
+ bindingDeltas?: (google.iam.v1.IBindingDelta[]|null);
+
+ /** PolicyDelta auditConfigDeltas */
+ auditConfigDeltas?: (google.iam.v1.IAuditConfigDelta[]|null);
+ }
+
+ /** Represents a PolicyDelta. */
+ class PolicyDelta implements IPolicyDelta {
+
+ /**
+ * Constructs a new PolicyDelta.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.iam.v1.IPolicyDelta);
+
+ /** PolicyDelta bindingDeltas. */
+ public bindingDeltas: google.iam.v1.IBindingDelta[];
+
+ /** PolicyDelta auditConfigDeltas. */
+ public auditConfigDeltas: google.iam.v1.IAuditConfigDelta[];
+
+ /**
+ * Creates a new PolicyDelta instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns PolicyDelta instance
+ */
+ public static create(properties?: google.iam.v1.IPolicyDelta): google.iam.v1.PolicyDelta;
+
+ /**
+ * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages.
+ * @param message PolicyDelta message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages.
+ * @param message PolicyDelta message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a PolicyDelta message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns PolicyDelta
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.PolicyDelta;
+
+ /**
+ * Decodes a PolicyDelta message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns PolicyDelta
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.PolicyDelta;
+
+ /**
+ * Verifies a PolicyDelta message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns PolicyDelta
+ */
+ public static fromObject(object: { [k: string]: any }): google.iam.v1.PolicyDelta;
+
+ /**
+ * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified.
+ * @param message PolicyDelta
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.iam.v1.PolicyDelta, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this PolicyDelta to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for PolicyDelta
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a BindingDelta. */
+ interface IBindingDelta {
+
+ /** BindingDelta action */
+ action?: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action|null);
+
+ /** BindingDelta role */
+ role?: (string|null);
+
+ /** BindingDelta member */
+ member?: (string|null);
+
+ /** BindingDelta condition */
+ condition?: (google.type.IExpr|null);
+ }
+
+ /** Represents a BindingDelta. */
+ class BindingDelta implements IBindingDelta {
+
+ /**
+ * Constructs a new BindingDelta.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.iam.v1.IBindingDelta);
+
+ /** BindingDelta action. */
+ public action: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action);
+
+ /** BindingDelta role. */
+ public role: string;
+
+ /** BindingDelta member. */
+ public member: string;
+
+ /** BindingDelta condition. */
+ public condition?: (google.type.IExpr|null);
+
+ /**
+ * Creates a new BindingDelta instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns BindingDelta instance
+ */
+ public static create(properties?: google.iam.v1.IBindingDelta): google.iam.v1.BindingDelta;
+
+ /**
+ * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages.
+ * @param message BindingDelta message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages.
+ * @param message BindingDelta message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a BindingDelta message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns BindingDelta
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.BindingDelta;
+
+ /**
+ * Decodes a BindingDelta message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns BindingDelta
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.BindingDelta;
+
+ /**
+ * Verifies a BindingDelta message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns BindingDelta
+ */
+ public static fromObject(object: { [k: string]: any }): google.iam.v1.BindingDelta;
+
+ /**
+ * Creates a plain object from a BindingDelta message. Also converts values to other types if specified.
+ * @param message BindingDelta
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.iam.v1.BindingDelta, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this BindingDelta to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for BindingDelta
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace BindingDelta {
+
+ /** Action enum. */
+ enum Action {
+ ACTION_UNSPECIFIED = 0,
+ ADD = 1,
+ REMOVE = 2
+ }
+ }
+
+ /** Properties of an AuditConfigDelta. */
+ interface IAuditConfigDelta {
+
+ /** AuditConfigDelta action */
+ action?: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action|null);
+
+ /** AuditConfigDelta service */
+ service?: (string|null);
+
+ /** AuditConfigDelta exemptedMember */
+ exemptedMember?: (string|null);
+
+ /** AuditConfigDelta logType */
+ logType?: (string|null);
+ }
+
+ /** Represents an AuditConfigDelta. */
+ class AuditConfigDelta implements IAuditConfigDelta {
+
+ /**
+ * Constructs a new AuditConfigDelta.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.iam.v1.IAuditConfigDelta);
+
+ /** AuditConfigDelta action. */
+ public action: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action);
+
+ /** AuditConfigDelta service. */
+ public service: string;
+
+ /** AuditConfigDelta exemptedMember. */
+ public exemptedMember: string;
+
+ /** AuditConfigDelta logType. */
+ public logType: string;
+
+ /**
+ * Creates a new AuditConfigDelta instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns AuditConfigDelta instance
+ */
+ public static create(properties?: google.iam.v1.IAuditConfigDelta): google.iam.v1.AuditConfigDelta;
+
+ /**
+ * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages.
+ * @param message AuditConfigDelta message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages.
+ * @param message AuditConfigDelta message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an AuditConfigDelta message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns AuditConfigDelta
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfigDelta;
+
+ /**
+ * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns AuditConfigDelta
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfigDelta;
+
+ /**
+ * Verifies an AuditConfigDelta message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an AuditConfigDelta message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns AuditConfigDelta
+ */
+ public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfigDelta;
+
+ /**
+ * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified.
+ * @param message AuditConfigDelta
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.iam.v1.AuditConfigDelta, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this AuditConfigDelta to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for AuditConfigDelta
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace AuditConfigDelta {
+
+ /** Action enum. */
+ enum Action {
+ ACTION_UNSPECIFIED = 0,
+ ADD = 1,
+ REMOVE = 2
+ }
+ }
+ }
+ }
+
+ /** Namespace type. */
+ namespace type {
+
+ /** Properties of an Expr. */
+ interface IExpr {
+
+ /** Expr expression */
+ expression?: (string|null);
+
+ /** Expr title */
+ title?: (string|null);
+
+ /** Expr description */
+ description?: (string|null);
+
+ /** Expr location */
+ location?: (string|null);
+ }
+
+ /** Represents an Expr. */
+ class Expr implements IExpr {
+
+ /**
+ * Constructs a new Expr.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.type.IExpr);
+
+ /** Expr expression. */
+ public expression: string;
+
+ /** Expr title. */
+ public title: string;
+
+ /** Expr description. */
+ public description: string;
+
+ /** Expr location. */
+ public location: string;
+
+ /**
+ * Creates a new Expr instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Expr instance
+ */
+ public static create(properties?: google.type.IExpr): google.type.Expr;
+
+ /**
+ * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages.
+ * @param message Expr message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages.
+ * @param message Expr message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an Expr message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Expr
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Expr;
+
+ /**
+ * Decodes an Expr message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Expr
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Expr;
+
+ /**
+ * Verifies an Expr message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an Expr message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Expr
+ */
+ public static fromObject(object: { [k: string]: any }): google.type.Expr;
+
+ /**
+ * Creates a plain object from an Expr message. Also converts values to other types if specified.
+ * @param message Expr
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.type.Expr, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Expr to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Expr
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a Money. */
+ interface IMoney {
+
+ /** Money currencyCode */
+ currencyCode?: (string|null);
+
+ /** Money units */
+ units?: (number|Long|string|null);
+
+ /** Money nanos */
+ nanos?: (number|null);
+ }
+
+ /** Represents a Money. */
+ class Money implements IMoney {
+
+ /**
+ * Constructs a new Money.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.type.IMoney);
+
+ /** Money currencyCode. */
+ public currencyCode: string;
+
+ /** Money units. */
+ public units: (number|Long|string);
+
+ /** Money nanos. */
+ public nanos: number;
+
+ /**
+ * Creates a new Money instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Money instance
+ */
+ public static create(properties?: google.type.IMoney): google.type.Money;
+
+ /**
+ * Encodes the specified Money message. Does not implicitly {@link google.type.Money.verify|verify} messages.
+ * @param message Money message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.type.IMoney, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Money message, length delimited. Does not implicitly {@link google.type.Money.verify|verify} messages.
+ * @param message Money message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.type.IMoney, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Money message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Money
+ * @throws {Error} If the payload is not 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.Money;
+
+ /**
+ * Decodes a Money message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Money
+ * @throws {Error} If the payload 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.Money;
+
+ /**
+ * Verifies a Money message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a Money message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Money
+ */
+ public static fromObject(object: { [k: string]: any }): google.type.Money;
+
+ /**
+ * Creates a plain object from a Money message. Also converts values to other types if specified.
+ * @param message Money
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.type.Money, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Money to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Money
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+}
diff --git a/packages/google-cloud-billing/protos/protos.js b/packages/google-cloud-billing/protos/protos.js
new file mode 100644
index 00000000000..faa7d08fa8b
--- /dev/null
+++ b/packages/google-cloud-billing/protos/protos.js
@@ -0,0 +1,21846 @@
+// 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_billing_protos || ($protobuf.roots._google_cloud_billing_protos = {});
+
+ $root.google = (function() {
+
+ /**
+ * Namespace google.
+ * @exports google
+ * @namespace
+ */
+ var google = {};
+
+ google.cloud = (function() {
+
+ /**
+ * Namespace cloud.
+ * @memberof google
+ * @namespace
+ */
+ var cloud = {};
+
+ cloud.billing = (function() {
+
+ /**
+ * Namespace billing.
+ * @memberof google.cloud
+ * @namespace
+ */
+ var billing = {};
+
+ billing.v1 = (function() {
+
+ /**
+ * Namespace v1.
+ * @memberof google.cloud.billing
+ * @namespace
+ */
+ var v1 = {};
+
+ v1.CloudBilling = (function() {
+
+ /**
+ * Constructs a new CloudBilling service.
+ * @memberof google.cloud.billing.v1
+ * @classdesc Represents a CloudBilling
+ * @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 CloudBilling(rpcImpl, requestDelimited, responseDelimited) {
+ $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
+ }
+
+ (CloudBilling.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CloudBilling;
+
+ /**
+ * Creates new CloudBilling service using the specified rpc implementation.
+ * @function create
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @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 {CloudBilling} RPC service. Useful where requests and/or responses are streamed.
+ */
+ CloudBilling.create = function create(rpcImpl, requestDelimited, responseDelimited) {
+ return new this(rpcImpl, requestDelimited, responseDelimited);
+ };
+
+ /**
+ * Callback as used by {@link google.cloud.billing.v1.CloudBilling|getBillingAccount}.
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @typedef GetBillingAccountCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.billing.v1.BillingAccount} [response] BillingAccount
+ */
+
+ /**
+ * Calls GetBillingAccount.
+ * @function getBillingAccount
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @instance
+ * @param {google.cloud.billing.v1.IGetBillingAccountRequest} request GetBillingAccountRequest message or plain object
+ * @param {google.cloud.billing.v1.CloudBilling.GetBillingAccountCallback} callback Node-style callback called with the error, if any, and BillingAccount
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(CloudBilling.prototype.getBillingAccount = function getBillingAccount(request, callback) {
+ return this.rpcCall(getBillingAccount, $root.google.cloud.billing.v1.GetBillingAccountRequest, $root.google.cloud.billing.v1.BillingAccount, request, callback);
+ }, "name", { value: "GetBillingAccount" });
+
+ /**
+ * Calls GetBillingAccount.
+ * @function getBillingAccount
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @instance
+ * @param {google.cloud.billing.v1.IGetBillingAccountRequest} request GetBillingAccountRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.billing.v1.CloudBilling|listBillingAccounts}.
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @typedef ListBillingAccountsCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.billing.v1.ListBillingAccountsResponse} [response] ListBillingAccountsResponse
+ */
+
+ /**
+ * Calls ListBillingAccounts.
+ * @function listBillingAccounts
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @instance
+ * @param {google.cloud.billing.v1.IListBillingAccountsRequest} request ListBillingAccountsRequest message or plain object
+ * @param {google.cloud.billing.v1.CloudBilling.ListBillingAccountsCallback} callback Node-style callback called with the error, if any, and ListBillingAccountsResponse
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(CloudBilling.prototype.listBillingAccounts = function listBillingAccounts(request, callback) {
+ return this.rpcCall(listBillingAccounts, $root.google.cloud.billing.v1.ListBillingAccountsRequest, $root.google.cloud.billing.v1.ListBillingAccountsResponse, request, callback);
+ }, "name", { value: "ListBillingAccounts" });
+
+ /**
+ * Calls ListBillingAccounts.
+ * @function listBillingAccounts
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @instance
+ * @param {google.cloud.billing.v1.IListBillingAccountsRequest} request ListBillingAccountsRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.billing.v1.CloudBilling|updateBillingAccount}.
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @typedef UpdateBillingAccountCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.billing.v1.BillingAccount} [response] BillingAccount
+ */
+
+ /**
+ * Calls UpdateBillingAccount.
+ * @function updateBillingAccount
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @instance
+ * @param {google.cloud.billing.v1.IUpdateBillingAccountRequest} request UpdateBillingAccountRequest message or plain object
+ * @param {google.cloud.billing.v1.CloudBilling.UpdateBillingAccountCallback} callback Node-style callback called with the error, if any, and BillingAccount
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(CloudBilling.prototype.updateBillingAccount = function updateBillingAccount(request, callback) {
+ return this.rpcCall(updateBillingAccount, $root.google.cloud.billing.v1.UpdateBillingAccountRequest, $root.google.cloud.billing.v1.BillingAccount, request, callback);
+ }, "name", { value: "UpdateBillingAccount" });
+
+ /**
+ * Calls UpdateBillingAccount.
+ * @function updateBillingAccount
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @instance
+ * @param {google.cloud.billing.v1.IUpdateBillingAccountRequest} request UpdateBillingAccountRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.billing.v1.CloudBilling|createBillingAccount}.
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @typedef CreateBillingAccountCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.billing.v1.BillingAccount} [response] BillingAccount
+ */
+
+ /**
+ * Calls CreateBillingAccount.
+ * @function createBillingAccount
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @instance
+ * @param {google.cloud.billing.v1.ICreateBillingAccountRequest} request CreateBillingAccountRequest message or plain object
+ * @param {google.cloud.billing.v1.CloudBilling.CreateBillingAccountCallback} callback Node-style callback called with the error, if any, and BillingAccount
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(CloudBilling.prototype.createBillingAccount = function createBillingAccount(request, callback) {
+ return this.rpcCall(createBillingAccount, $root.google.cloud.billing.v1.CreateBillingAccountRequest, $root.google.cloud.billing.v1.BillingAccount, request, callback);
+ }, "name", { value: "CreateBillingAccount" });
+
+ /**
+ * Calls CreateBillingAccount.
+ * @function createBillingAccount
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @instance
+ * @param {google.cloud.billing.v1.ICreateBillingAccountRequest} request CreateBillingAccountRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.billing.v1.CloudBilling|listProjectBillingInfo}.
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @typedef ListProjectBillingInfoCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.billing.v1.ListProjectBillingInfoResponse} [response] ListProjectBillingInfoResponse
+ */
+
+ /**
+ * Calls ListProjectBillingInfo.
+ * @function listProjectBillingInfo
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @instance
+ * @param {google.cloud.billing.v1.IListProjectBillingInfoRequest} request ListProjectBillingInfoRequest message or plain object
+ * @param {google.cloud.billing.v1.CloudBilling.ListProjectBillingInfoCallback} callback Node-style callback called with the error, if any, and ListProjectBillingInfoResponse
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(CloudBilling.prototype.listProjectBillingInfo = function listProjectBillingInfo(request, callback) {
+ return this.rpcCall(listProjectBillingInfo, $root.google.cloud.billing.v1.ListProjectBillingInfoRequest, $root.google.cloud.billing.v1.ListProjectBillingInfoResponse, request, callback);
+ }, "name", { value: "ListProjectBillingInfo" });
+
+ /**
+ * Calls ListProjectBillingInfo.
+ * @function listProjectBillingInfo
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @instance
+ * @param {google.cloud.billing.v1.IListProjectBillingInfoRequest} request ListProjectBillingInfoRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.billing.v1.CloudBilling|getProjectBillingInfo}.
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @typedef GetProjectBillingInfoCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.billing.v1.ProjectBillingInfo} [response] ProjectBillingInfo
+ */
+
+ /**
+ * Calls GetProjectBillingInfo.
+ * @function getProjectBillingInfo
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @instance
+ * @param {google.cloud.billing.v1.IGetProjectBillingInfoRequest} request GetProjectBillingInfoRequest message or plain object
+ * @param {google.cloud.billing.v1.CloudBilling.GetProjectBillingInfoCallback} callback Node-style callback called with the error, if any, and ProjectBillingInfo
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(CloudBilling.prototype.getProjectBillingInfo = function getProjectBillingInfo(request, callback) {
+ return this.rpcCall(getProjectBillingInfo, $root.google.cloud.billing.v1.GetProjectBillingInfoRequest, $root.google.cloud.billing.v1.ProjectBillingInfo, request, callback);
+ }, "name", { value: "GetProjectBillingInfo" });
+
+ /**
+ * Calls GetProjectBillingInfo.
+ * @function getProjectBillingInfo
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @instance
+ * @param {google.cloud.billing.v1.IGetProjectBillingInfoRequest} request GetProjectBillingInfoRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.billing.v1.CloudBilling|updateProjectBillingInfo}.
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @typedef UpdateProjectBillingInfoCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.billing.v1.ProjectBillingInfo} [response] ProjectBillingInfo
+ */
+
+ /**
+ * Calls UpdateProjectBillingInfo.
+ * @function updateProjectBillingInfo
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @instance
+ * @param {google.cloud.billing.v1.IUpdateProjectBillingInfoRequest} request UpdateProjectBillingInfoRequest message or plain object
+ * @param {google.cloud.billing.v1.CloudBilling.UpdateProjectBillingInfoCallback} callback Node-style callback called with the error, if any, and ProjectBillingInfo
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(CloudBilling.prototype.updateProjectBillingInfo = function updateProjectBillingInfo(request, callback) {
+ return this.rpcCall(updateProjectBillingInfo, $root.google.cloud.billing.v1.UpdateProjectBillingInfoRequest, $root.google.cloud.billing.v1.ProjectBillingInfo, request, callback);
+ }, "name", { value: "UpdateProjectBillingInfo" });
+
+ /**
+ * Calls UpdateProjectBillingInfo.
+ * @function updateProjectBillingInfo
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @instance
+ * @param {google.cloud.billing.v1.IUpdateProjectBillingInfoRequest} request UpdateProjectBillingInfoRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.billing.v1.CloudBilling|getIamPolicy}.
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @typedef GetIamPolicyCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.iam.v1.Policy} [response] Policy
+ */
+
+ /**
+ * Calls GetIamPolicy.
+ * @function getIamPolicy
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @instance
+ * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object
+ * @param {google.cloud.billing.v1.CloudBilling.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(CloudBilling.prototype.getIamPolicy = function getIamPolicy(request, callback) {
+ return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback);
+ }, "name", { value: "GetIamPolicy" });
+
+ /**
+ * Calls GetIamPolicy.
+ * @function getIamPolicy
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @instance
+ * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.billing.v1.CloudBilling|setIamPolicy}.
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @typedef SetIamPolicyCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.iam.v1.Policy} [response] Policy
+ */
+
+ /**
+ * Calls SetIamPolicy.
+ * @function setIamPolicy
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @instance
+ * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object
+ * @param {google.cloud.billing.v1.CloudBilling.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(CloudBilling.prototype.setIamPolicy = function setIamPolicy(request, callback) {
+ return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback);
+ }, "name", { value: "SetIamPolicy" });
+
+ /**
+ * Calls SetIamPolicy.
+ * @function setIamPolicy
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @instance
+ * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.billing.v1.CloudBilling|testIamPermissions}.
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @typedef TestIamPermissionsCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse
+ */
+
+ /**
+ * Calls TestIamPermissions.
+ * @function testIamPermissions
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @instance
+ * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object
+ * @param {google.cloud.billing.v1.CloudBilling.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(CloudBilling.prototype.testIamPermissions = function testIamPermissions(request, callback) {
+ return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback);
+ }, "name", { value: "TestIamPermissions" });
+
+ /**
+ * Calls TestIamPermissions.
+ * @function testIamPermissions
+ * @memberof google.cloud.billing.v1.CloudBilling
+ * @instance
+ * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ return CloudBilling;
+ })();
+
+ v1.BillingAccount = (function() {
+
+ /**
+ * Properties of a BillingAccount.
+ * @memberof google.cloud.billing.v1
+ * @interface IBillingAccount
+ * @property {string|null} [name] BillingAccount name
+ * @property {boolean|null} [open] BillingAccount open
+ * @property {string|null} [displayName] BillingAccount displayName
+ * @property {string|null} [masterBillingAccount] BillingAccount masterBillingAccount
+ */
+
+ /**
+ * Constructs a new BillingAccount.
+ * @memberof google.cloud.billing.v1
+ * @classdesc Represents a BillingAccount.
+ * @implements IBillingAccount
+ * @constructor
+ * @param {google.cloud.billing.v1.IBillingAccount=} [properties] Properties to set
+ */
+ function BillingAccount(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * BillingAccount name.
+ * @member {string} name
+ * @memberof google.cloud.billing.v1.BillingAccount
+ * @instance
+ */
+ BillingAccount.prototype.name = "";
+
+ /**
+ * BillingAccount open.
+ * @member {boolean} open
+ * @memberof google.cloud.billing.v1.BillingAccount
+ * @instance
+ */
+ BillingAccount.prototype.open = false;
+
+ /**
+ * BillingAccount displayName.
+ * @member {string} displayName
+ * @memberof google.cloud.billing.v1.BillingAccount
+ * @instance
+ */
+ BillingAccount.prototype.displayName = "";
+
+ /**
+ * BillingAccount masterBillingAccount.
+ * @member {string} masterBillingAccount
+ * @memberof google.cloud.billing.v1.BillingAccount
+ * @instance
+ */
+ BillingAccount.prototype.masterBillingAccount = "";
+
+ /**
+ * Creates a new BillingAccount instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.billing.v1.BillingAccount
+ * @static
+ * @param {google.cloud.billing.v1.IBillingAccount=} [properties] Properties to set
+ * @returns {google.cloud.billing.v1.BillingAccount} BillingAccount instance
+ */
+ BillingAccount.create = function create(properties) {
+ return new BillingAccount(properties);
+ };
+
+ /**
+ * Encodes the specified BillingAccount message. Does not implicitly {@link google.cloud.billing.v1.BillingAccount.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.billing.v1.BillingAccount
+ * @static
+ * @param {google.cloud.billing.v1.IBillingAccount} message BillingAccount message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ BillingAccount.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ if (message.open != null && Object.hasOwnProperty.call(message, "open"))
+ writer.uint32(/* id 2, wireType 0 =*/16).bool(message.open);
+ if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName);
+ if (message.masterBillingAccount != null && Object.hasOwnProperty.call(message, "masterBillingAccount"))
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.masterBillingAccount);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified BillingAccount message, length delimited. Does not implicitly {@link google.cloud.billing.v1.BillingAccount.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.billing.v1.BillingAccount
+ * @static
+ * @param {google.cloud.billing.v1.IBillingAccount} message BillingAccount message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ BillingAccount.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a BillingAccount message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.billing.v1.BillingAccount
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.billing.v1.BillingAccount} BillingAccount
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ BillingAccount.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.billing.v1.BillingAccount();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 2: {
+ message.open = reader.bool();
+ break;
+ }
+ case 3: {
+ message.displayName = reader.string();
+ break;
+ }
+ case 4: {
+ message.masterBillingAccount = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a BillingAccount message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.billing.v1.BillingAccount
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.billing.v1.BillingAccount} BillingAccount
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ BillingAccount.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a BillingAccount message.
+ * @function verify
+ * @memberof google.cloud.billing.v1.BillingAccount
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ BillingAccount.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.open != null && message.hasOwnProperty("open"))
+ if (typeof message.open !== "boolean")
+ return "open: boolean expected";
+ if (message.displayName != null && message.hasOwnProperty("displayName"))
+ if (!$util.isString(message.displayName))
+ return "displayName: string expected";
+ if (message.masterBillingAccount != null && message.hasOwnProperty("masterBillingAccount"))
+ if (!$util.isString(message.masterBillingAccount))
+ return "masterBillingAccount: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a BillingAccount message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.billing.v1.BillingAccount
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.billing.v1.BillingAccount} BillingAccount
+ */
+ BillingAccount.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.billing.v1.BillingAccount)
+ return object;
+ var message = new $root.google.cloud.billing.v1.BillingAccount();
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object.open != null)
+ message.open = Boolean(object.open);
+ if (object.displayName != null)
+ message.displayName = String(object.displayName);
+ if (object.masterBillingAccount != null)
+ message.masterBillingAccount = String(object.masterBillingAccount);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a BillingAccount message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.billing.v1.BillingAccount
+ * @static
+ * @param {google.cloud.billing.v1.BillingAccount} message BillingAccount
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ BillingAccount.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.name = "";
+ object.open = false;
+ object.displayName = "";
+ object.masterBillingAccount = "";
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.open != null && message.hasOwnProperty("open"))
+ object.open = message.open;
+ if (message.displayName != null && message.hasOwnProperty("displayName"))
+ object.displayName = message.displayName;
+ if (message.masterBillingAccount != null && message.hasOwnProperty("masterBillingAccount"))
+ object.masterBillingAccount = message.masterBillingAccount;
+ return object;
+ };
+
+ /**
+ * Converts this BillingAccount to JSON.
+ * @function toJSON
+ * @memberof google.cloud.billing.v1.BillingAccount
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ BillingAccount.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for BillingAccount
+ * @function getTypeUrl
+ * @memberof google.cloud.billing.v1.BillingAccount
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ BillingAccount.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.billing.v1.BillingAccount";
+ };
+
+ return BillingAccount;
+ })();
+
+ v1.ProjectBillingInfo = (function() {
+
+ /**
+ * Properties of a ProjectBillingInfo.
+ * @memberof google.cloud.billing.v1
+ * @interface IProjectBillingInfo
+ * @property {string|null} [name] ProjectBillingInfo name
+ * @property {string|null} [projectId] ProjectBillingInfo projectId
+ * @property {string|null} [billingAccountName] ProjectBillingInfo billingAccountName
+ * @property {boolean|null} [billingEnabled] ProjectBillingInfo billingEnabled
+ */
+
+ /**
+ * Constructs a new ProjectBillingInfo.
+ * @memberof google.cloud.billing.v1
+ * @classdesc Represents a ProjectBillingInfo.
+ * @implements IProjectBillingInfo
+ * @constructor
+ * @param {google.cloud.billing.v1.IProjectBillingInfo=} [properties] Properties to set
+ */
+ function ProjectBillingInfo(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ProjectBillingInfo name.
+ * @member {string} name
+ * @memberof google.cloud.billing.v1.ProjectBillingInfo
+ * @instance
+ */
+ ProjectBillingInfo.prototype.name = "";
+
+ /**
+ * ProjectBillingInfo projectId.
+ * @member {string} projectId
+ * @memberof google.cloud.billing.v1.ProjectBillingInfo
+ * @instance
+ */
+ ProjectBillingInfo.prototype.projectId = "";
+
+ /**
+ * ProjectBillingInfo billingAccountName.
+ * @member {string} billingAccountName
+ * @memberof google.cloud.billing.v1.ProjectBillingInfo
+ * @instance
+ */
+ ProjectBillingInfo.prototype.billingAccountName = "";
+
+ /**
+ * ProjectBillingInfo billingEnabled.
+ * @member {boolean} billingEnabled
+ * @memberof google.cloud.billing.v1.ProjectBillingInfo
+ * @instance
+ */
+ ProjectBillingInfo.prototype.billingEnabled = false;
+
+ /**
+ * Creates a new ProjectBillingInfo instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.billing.v1.ProjectBillingInfo
+ * @static
+ * @param {google.cloud.billing.v1.IProjectBillingInfo=} [properties] Properties to set
+ * @returns {google.cloud.billing.v1.ProjectBillingInfo} ProjectBillingInfo instance
+ */
+ ProjectBillingInfo.create = function create(properties) {
+ return new ProjectBillingInfo(properties);
+ };
+
+ /**
+ * Encodes the specified ProjectBillingInfo message. Does not implicitly {@link google.cloud.billing.v1.ProjectBillingInfo.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.billing.v1.ProjectBillingInfo
+ * @static
+ * @param {google.cloud.billing.v1.IProjectBillingInfo} message ProjectBillingInfo message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ProjectBillingInfo.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.projectId);
+ if (message.billingAccountName != null && Object.hasOwnProperty.call(message, "billingAccountName"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.billingAccountName);
+ if (message.billingEnabled != null && Object.hasOwnProperty.call(message, "billingEnabled"))
+ writer.uint32(/* id 4, wireType 0 =*/32).bool(message.billingEnabled);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ProjectBillingInfo message, length delimited. Does not implicitly {@link google.cloud.billing.v1.ProjectBillingInfo.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.billing.v1.ProjectBillingInfo
+ * @static
+ * @param {google.cloud.billing.v1.IProjectBillingInfo} message ProjectBillingInfo message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ProjectBillingInfo.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ProjectBillingInfo message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.billing.v1.ProjectBillingInfo
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.billing.v1.ProjectBillingInfo} ProjectBillingInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ProjectBillingInfo.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.billing.v1.ProjectBillingInfo();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 2: {
+ message.projectId = reader.string();
+ break;
+ }
+ case 3: {
+ message.billingAccountName = reader.string();
+ break;
+ }
+ case 4: {
+ message.billingEnabled = reader.bool();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ProjectBillingInfo message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.billing.v1.ProjectBillingInfo
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.billing.v1.ProjectBillingInfo} ProjectBillingInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ProjectBillingInfo.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ProjectBillingInfo message.
+ * @function verify
+ * @memberof google.cloud.billing.v1.ProjectBillingInfo
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ProjectBillingInfo.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.projectId != null && message.hasOwnProperty("projectId"))
+ if (!$util.isString(message.projectId))
+ return "projectId: string expected";
+ if (message.billingAccountName != null && message.hasOwnProperty("billingAccountName"))
+ if (!$util.isString(message.billingAccountName))
+ return "billingAccountName: string expected";
+ if (message.billingEnabled != null && message.hasOwnProperty("billingEnabled"))
+ if (typeof message.billingEnabled !== "boolean")
+ return "billingEnabled: boolean expected";
+ return null;
+ };
+
+ /**
+ * Creates a ProjectBillingInfo message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.billing.v1.ProjectBillingInfo
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.billing.v1.ProjectBillingInfo} ProjectBillingInfo
+ */
+ ProjectBillingInfo.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.billing.v1.ProjectBillingInfo)
+ return object;
+ var message = new $root.google.cloud.billing.v1.ProjectBillingInfo();
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object.projectId != null)
+ message.projectId = String(object.projectId);
+ if (object.billingAccountName != null)
+ message.billingAccountName = String(object.billingAccountName);
+ if (object.billingEnabled != null)
+ message.billingEnabled = Boolean(object.billingEnabled);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ProjectBillingInfo message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.billing.v1.ProjectBillingInfo
+ * @static
+ * @param {google.cloud.billing.v1.ProjectBillingInfo} message ProjectBillingInfo
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ProjectBillingInfo.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.name = "";
+ object.projectId = "";
+ object.billingAccountName = "";
+ object.billingEnabled = false;
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.projectId != null && message.hasOwnProperty("projectId"))
+ object.projectId = message.projectId;
+ if (message.billingAccountName != null && message.hasOwnProperty("billingAccountName"))
+ object.billingAccountName = message.billingAccountName;
+ if (message.billingEnabled != null && message.hasOwnProperty("billingEnabled"))
+ object.billingEnabled = message.billingEnabled;
+ return object;
+ };
+
+ /**
+ * Converts this ProjectBillingInfo to JSON.
+ * @function toJSON
+ * @memberof google.cloud.billing.v1.ProjectBillingInfo
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ProjectBillingInfo.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ProjectBillingInfo
+ * @function getTypeUrl
+ * @memberof google.cloud.billing.v1.ProjectBillingInfo
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ProjectBillingInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.billing.v1.ProjectBillingInfo";
+ };
+
+ return ProjectBillingInfo;
+ })();
+
+ v1.GetBillingAccountRequest = (function() {
+
+ /**
+ * Properties of a GetBillingAccountRequest.
+ * @memberof google.cloud.billing.v1
+ * @interface IGetBillingAccountRequest
+ * @property {string|null} [name] GetBillingAccountRequest name
+ */
+
+ /**
+ * Constructs a new GetBillingAccountRequest.
+ * @memberof google.cloud.billing.v1
+ * @classdesc Represents a GetBillingAccountRequest.
+ * @implements IGetBillingAccountRequest
+ * @constructor
+ * @param {google.cloud.billing.v1.IGetBillingAccountRequest=} [properties] Properties to set
+ */
+ function GetBillingAccountRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * GetBillingAccountRequest name.
+ * @member {string} name
+ * @memberof google.cloud.billing.v1.GetBillingAccountRequest
+ * @instance
+ */
+ GetBillingAccountRequest.prototype.name = "";
+
+ /**
+ * Creates a new GetBillingAccountRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.billing.v1.GetBillingAccountRequest
+ * @static
+ * @param {google.cloud.billing.v1.IGetBillingAccountRequest=} [properties] Properties to set
+ * @returns {google.cloud.billing.v1.GetBillingAccountRequest} GetBillingAccountRequest instance
+ */
+ GetBillingAccountRequest.create = function create(properties) {
+ return new GetBillingAccountRequest(properties);
+ };
+
+ /**
+ * Encodes the specified GetBillingAccountRequest message. Does not implicitly {@link google.cloud.billing.v1.GetBillingAccountRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.billing.v1.GetBillingAccountRequest
+ * @static
+ * @param {google.cloud.billing.v1.IGetBillingAccountRequest} message GetBillingAccountRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GetBillingAccountRequest.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified GetBillingAccountRequest message, length delimited. Does not implicitly {@link google.cloud.billing.v1.GetBillingAccountRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.billing.v1.GetBillingAccountRequest
+ * @static
+ * @param {google.cloud.billing.v1.IGetBillingAccountRequest} message GetBillingAccountRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GetBillingAccountRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a GetBillingAccountRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.billing.v1.GetBillingAccountRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.billing.v1.GetBillingAccountRequest} GetBillingAccountRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GetBillingAccountRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.billing.v1.GetBillingAccountRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a GetBillingAccountRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.billing.v1.GetBillingAccountRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.billing.v1.GetBillingAccountRequest} GetBillingAccountRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GetBillingAccountRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a GetBillingAccountRequest message.
+ * @function verify
+ * @memberof google.cloud.billing.v1.GetBillingAccountRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ GetBillingAccountRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a GetBillingAccountRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.billing.v1.GetBillingAccountRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.billing.v1.GetBillingAccountRequest} GetBillingAccountRequest
+ */
+ GetBillingAccountRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.billing.v1.GetBillingAccountRequest)
+ return object;
+ var message = new $root.google.cloud.billing.v1.GetBillingAccountRequest();
+ if (object.name != null)
+ message.name = String(object.name);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a GetBillingAccountRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.billing.v1.GetBillingAccountRequest
+ * @static
+ * @param {google.cloud.billing.v1.GetBillingAccountRequest} message GetBillingAccountRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ GetBillingAccountRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults)
+ object.name = "";
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ return object;
+ };
+
+ /**
+ * Converts this GetBillingAccountRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.billing.v1.GetBillingAccountRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ GetBillingAccountRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for GetBillingAccountRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.billing.v1.GetBillingAccountRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ GetBillingAccountRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.billing.v1.GetBillingAccountRequest";
+ };
+
+ return GetBillingAccountRequest;
+ })();
+
+ v1.ListBillingAccountsRequest = (function() {
+
+ /**
+ * Properties of a ListBillingAccountsRequest.
+ * @memberof google.cloud.billing.v1
+ * @interface IListBillingAccountsRequest
+ * @property {number|null} [pageSize] ListBillingAccountsRequest pageSize
+ * @property {string|null} [pageToken] ListBillingAccountsRequest pageToken
+ * @property {string|null} [filter] ListBillingAccountsRequest filter
+ */
+
+ /**
+ * Constructs a new ListBillingAccountsRequest.
+ * @memberof google.cloud.billing.v1
+ * @classdesc Represents a ListBillingAccountsRequest.
+ * @implements IListBillingAccountsRequest
+ * @constructor
+ * @param {google.cloud.billing.v1.IListBillingAccountsRequest=} [properties] Properties to set
+ */
+ function ListBillingAccountsRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ListBillingAccountsRequest pageSize.
+ * @member {number} pageSize
+ * @memberof google.cloud.billing.v1.ListBillingAccountsRequest
+ * @instance
+ */
+ ListBillingAccountsRequest.prototype.pageSize = 0;
+
+ /**
+ * ListBillingAccountsRequest pageToken.
+ * @member {string} pageToken
+ * @memberof google.cloud.billing.v1.ListBillingAccountsRequest
+ * @instance
+ */
+ ListBillingAccountsRequest.prototype.pageToken = "";
+
+ /**
+ * ListBillingAccountsRequest filter.
+ * @member {string} filter
+ * @memberof google.cloud.billing.v1.ListBillingAccountsRequest
+ * @instance
+ */
+ ListBillingAccountsRequest.prototype.filter = "";
+
+ /**
+ * Creates a new ListBillingAccountsRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.billing.v1.ListBillingAccountsRequest
+ * @static
+ * @param {google.cloud.billing.v1.IListBillingAccountsRequest=} [properties] Properties to set
+ * @returns {google.cloud.billing.v1.ListBillingAccountsRequest} ListBillingAccountsRequest instance
+ */
+ ListBillingAccountsRequest.create = function create(properties) {
+ return new ListBillingAccountsRequest(properties);
+ };
+
+ /**
+ * Encodes the specified ListBillingAccountsRequest message. Does not implicitly {@link google.cloud.billing.v1.ListBillingAccountsRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.billing.v1.ListBillingAccountsRequest
+ * @static
+ * @param {google.cloud.billing.v1.IListBillingAccountsRequest} message ListBillingAccountsRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListBillingAccountsRequest.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.pageSize);
+ if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken);
+ if (message.filter != null && Object.hasOwnProperty.call(message, "filter"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ListBillingAccountsRequest message, length delimited. Does not implicitly {@link google.cloud.billing.v1.ListBillingAccountsRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.billing.v1.ListBillingAccountsRequest
+ * @static
+ * @param {google.cloud.billing.v1.IListBillingAccountsRequest} message ListBillingAccountsRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListBillingAccountsRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ListBillingAccountsRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.billing.v1.ListBillingAccountsRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.billing.v1.ListBillingAccountsRequest} ListBillingAccountsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListBillingAccountsRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.billing.v1.ListBillingAccountsRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.pageSize = reader.int32();
+ break;
+ }
+ case 2: {
+ message.pageToken = reader.string();
+ break;
+ }
+ case 3: {
+ message.filter = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ListBillingAccountsRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.billing.v1.ListBillingAccountsRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.billing.v1.ListBillingAccountsRequest} ListBillingAccountsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListBillingAccountsRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ListBillingAccountsRequest message.
+ * @function verify
+ * @memberof google.cloud.billing.v1.ListBillingAccountsRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ListBillingAccountsRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.pageSize != null && message.hasOwnProperty("pageSize"))
+ if (!$util.isInteger(message.pageSize))
+ return "pageSize: integer expected";
+ if (message.pageToken != null && message.hasOwnProperty("pageToken"))
+ if (!$util.isString(message.pageToken))
+ return "pageToken: string expected";
+ if (message.filter != null && message.hasOwnProperty("filter"))
+ if (!$util.isString(message.filter))
+ return "filter: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a ListBillingAccountsRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.billing.v1.ListBillingAccountsRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.billing.v1.ListBillingAccountsRequest} ListBillingAccountsRequest
+ */
+ ListBillingAccountsRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.billing.v1.ListBillingAccountsRequest)
+ return object;
+ var message = new $root.google.cloud.billing.v1.ListBillingAccountsRequest();
+ if (object.pageSize != null)
+ message.pageSize = object.pageSize | 0;
+ if (object.pageToken != null)
+ message.pageToken = String(object.pageToken);
+ if (object.filter != null)
+ message.filter = String(object.filter);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ListBillingAccountsRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.billing.v1.ListBillingAccountsRequest
+ * @static
+ * @param {google.cloud.billing.v1.ListBillingAccountsRequest} message ListBillingAccountsRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ListBillingAccountsRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.pageSize = 0;
+ object.pageToken = "";
+ object.filter = "";
+ }
+ if (message.pageSize != null && message.hasOwnProperty("pageSize"))
+ object.pageSize = message.pageSize;
+ if (message.pageToken != null && message.hasOwnProperty("pageToken"))
+ object.pageToken = message.pageToken;
+ if (message.filter != null && message.hasOwnProperty("filter"))
+ object.filter = message.filter;
+ return object;
+ };
+
+ /**
+ * Converts this ListBillingAccountsRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.billing.v1.ListBillingAccountsRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ListBillingAccountsRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ListBillingAccountsRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.billing.v1.ListBillingAccountsRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ListBillingAccountsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.billing.v1.ListBillingAccountsRequest";
+ };
+
+ return ListBillingAccountsRequest;
+ })();
+
+ v1.ListBillingAccountsResponse = (function() {
+
+ /**
+ * Properties of a ListBillingAccountsResponse.
+ * @memberof google.cloud.billing.v1
+ * @interface IListBillingAccountsResponse
+ * @property {Array.|null} [billingAccounts] ListBillingAccountsResponse billingAccounts
+ * @property {string|null} [nextPageToken] ListBillingAccountsResponse nextPageToken
+ */
+
+ /**
+ * Constructs a new ListBillingAccountsResponse.
+ * @memberof google.cloud.billing.v1
+ * @classdesc Represents a ListBillingAccountsResponse.
+ * @implements IListBillingAccountsResponse
+ * @constructor
+ * @param {google.cloud.billing.v1.IListBillingAccountsResponse=} [properties] Properties to set
+ */
+ function ListBillingAccountsResponse(properties) {
+ this.billingAccounts = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ListBillingAccountsResponse billingAccounts.
+ * @member {Array.} billingAccounts
+ * @memberof google.cloud.billing.v1.ListBillingAccountsResponse
+ * @instance
+ */
+ ListBillingAccountsResponse.prototype.billingAccounts = $util.emptyArray;
+
+ /**
+ * ListBillingAccountsResponse nextPageToken.
+ * @member {string} nextPageToken
+ * @memberof google.cloud.billing.v1.ListBillingAccountsResponse
+ * @instance
+ */
+ ListBillingAccountsResponse.prototype.nextPageToken = "";
+
+ /**
+ * Creates a new ListBillingAccountsResponse instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.billing.v1.ListBillingAccountsResponse
+ * @static
+ * @param {google.cloud.billing.v1.IListBillingAccountsResponse=} [properties] Properties to set
+ * @returns {google.cloud.billing.v1.ListBillingAccountsResponse} ListBillingAccountsResponse instance
+ */
+ ListBillingAccountsResponse.create = function create(properties) {
+ return new ListBillingAccountsResponse(properties);
+ };
+
+ /**
+ * Encodes the specified ListBillingAccountsResponse message. Does not implicitly {@link google.cloud.billing.v1.ListBillingAccountsResponse.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.billing.v1.ListBillingAccountsResponse
+ * @static
+ * @param {google.cloud.billing.v1.IListBillingAccountsResponse} message ListBillingAccountsResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListBillingAccountsResponse.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.billingAccounts != null && message.billingAccounts.length)
+ for (var i = 0; i < message.billingAccounts.length; ++i)
+ $root.google.cloud.billing.v1.BillingAccount.encode(message.billingAccounts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ListBillingAccountsResponse message, length delimited. Does not implicitly {@link google.cloud.billing.v1.ListBillingAccountsResponse.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.billing.v1.ListBillingAccountsResponse
+ * @static
+ * @param {google.cloud.billing.v1.IListBillingAccountsResponse} message ListBillingAccountsResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListBillingAccountsResponse.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ListBillingAccountsResponse message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.billing.v1.ListBillingAccountsResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.billing.v1.ListBillingAccountsResponse} ListBillingAccountsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListBillingAccountsResponse.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.billing.v1.ListBillingAccountsResponse();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.billingAccounts && message.billingAccounts.length))
+ message.billingAccounts = [];
+ message.billingAccounts.push($root.google.cloud.billing.v1.BillingAccount.decode(reader, reader.uint32()));
+ break;
+ }
+ case 2: {
+ message.nextPageToken = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ListBillingAccountsResponse message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.billing.v1.ListBillingAccountsResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.billing.v1.ListBillingAccountsResponse} ListBillingAccountsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListBillingAccountsResponse.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ListBillingAccountsResponse message.
+ * @function verify
+ * @memberof google.cloud.billing.v1.ListBillingAccountsResponse
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ListBillingAccountsResponse.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.billingAccounts != null && message.hasOwnProperty("billingAccounts")) {
+ if (!Array.isArray(message.billingAccounts))
+ return "billingAccounts: array expected";
+ for (var i = 0; i < message.billingAccounts.length; ++i) {
+ var error = $root.google.cloud.billing.v1.BillingAccount.verify(message.billingAccounts[i]);
+ if (error)
+ return "billingAccounts." + error;
+ }
+ }
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
+ if (!$util.isString(message.nextPageToken))
+ return "nextPageToken: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a ListBillingAccountsResponse message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.billing.v1.ListBillingAccountsResponse
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.billing.v1.ListBillingAccountsResponse} ListBillingAccountsResponse
+ */
+ ListBillingAccountsResponse.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.billing.v1.ListBillingAccountsResponse)
+ return object;
+ var message = new $root.google.cloud.billing.v1.ListBillingAccountsResponse();
+ if (object.billingAccounts) {
+ if (!Array.isArray(object.billingAccounts))
+ throw TypeError(".google.cloud.billing.v1.ListBillingAccountsResponse.billingAccounts: array expected");
+ message.billingAccounts = [];
+ for (var i = 0; i < object.billingAccounts.length; ++i) {
+ if (typeof object.billingAccounts[i] !== "object")
+ throw TypeError(".google.cloud.billing.v1.ListBillingAccountsResponse.billingAccounts: object expected");
+ message.billingAccounts[i] = $root.google.cloud.billing.v1.BillingAccount.fromObject(object.billingAccounts[i]);
+ }
+ }
+ if (object.nextPageToken != null)
+ message.nextPageToken = String(object.nextPageToken);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ListBillingAccountsResponse message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.billing.v1.ListBillingAccountsResponse
+ * @static
+ * @param {google.cloud.billing.v1.ListBillingAccountsResponse} message ListBillingAccountsResponse
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ListBillingAccountsResponse.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.billingAccounts = [];
+ if (options.defaults)
+ object.nextPageToken = "";
+ if (message.billingAccounts && message.billingAccounts.length) {
+ object.billingAccounts = [];
+ for (var j = 0; j < message.billingAccounts.length; ++j)
+ object.billingAccounts[j] = $root.google.cloud.billing.v1.BillingAccount.toObject(message.billingAccounts[j], options);
+ }
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
+ object.nextPageToken = message.nextPageToken;
+ return object;
+ };
+
+ /**
+ * Converts this ListBillingAccountsResponse to JSON.
+ * @function toJSON
+ * @memberof google.cloud.billing.v1.ListBillingAccountsResponse
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ListBillingAccountsResponse.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ListBillingAccountsResponse
+ * @function getTypeUrl
+ * @memberof google.cloud.billing.v1.ListBillingAccountsResponse
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ListBillingAccountsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.billing.v1.ListBillingAccountsResponse";
+ };
+
+ return ListBillingAccountsResponse;
+ })();
+
+ v1.CreateBillingAccountRequest = (function() {
+
+ /**
+ * Properties of a CreateBillingAccountRequest.
+ * @memberof google.cloud.billing.v1
+ * @interface ICreateBillingAccountRequest
+ * @property {google.cloud.billing.v1.IBillingAccount|null} [billingAccount] CreateBillingAccountRequest billingAccount
+ */
+
+ /**
+ * Constructs a new CreateBillingAccountRequest.
+ * @memberof google.cloud.billing.v1
+ * @classdesc Represents a CreateBillingAccountRequest.
+ * @implements ICreateBillingAccountRequest
+ * @constructor
+ * @param {google.cloud.billing.v1.ICreateBillingAccountRequest=} [properties] Properties to set
+ */
+ function CreateBillingAccountRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * CreateBillingAccountRequest billingAccount.
+ * @member {google.cloud.billing.v1.IBillingAccount|null|undefined} billingAccount
+ * @memberof google.cloud.billing.v1.CreateBillingAccountRequest
+ * @instance
+ */
+ CreateBillingAccountRequest.prototype.billingAccount = null;
+
+ /**
+ * Creates a new CreateBillingAccountRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.billing.v1.CreateBillingAccountRequest
+ * @static
+ * @param {google.cloud.billing.v1.ICreateBillingAccountRequest=} [properties] Properties to set
+ * @returns {google.cloud.billing.v1.CreateBillingAccountRequest} CreateBillingAccountRequest instance
+ */
+ CreateBillingAccountRequest.create = function create(properties) {
+ return new CreateBillingAccountRequest(properties);
+ };
+
+ /**
+ * Encodes the specified CreateBillingAccountRequest message. Does not implicitly {@link google.cloud.billing.v1.CreateBillingAccountRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.billing.v1.CreateBillingAccountRequest
+ * @static
+ * @param {google.cloud.billing.v1.ICreateBillingAccountRequest} message CreateBillingAccountRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CreateBillingAccountRequest.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.billingAccount != null && Object.hasOwnProperty.call(message, "billingAccount"))
+ $root.google.cloud.billing.v1.BillingAccount.encode(message.billingAccount, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified CreateBillingAccountRequest message, length delimited. Does not implicitly {@link google.cloud.billing.v1.CreateBillingAccountRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.billing.v1.CreateBillingAccountRequest
+ * @static
+ * @param {google.cloud.billing.v1.ICreateBillingAccountRequest} message CreateBillingAccountRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CreateBillingAccountRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a CreateBillingAccountRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.billing.v1.CreateBillingAccountRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.billing.v1.CreateBillingAccountRequest} CreateBillingAccountRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CreateBillingAccountRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.billing.v1.CreateBillingAccountRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.billingAccount = $root.google.cloud.billing.v1.BillingAccount.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a CreateBillingAccountRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.billing.v1.CreateBillingAccountRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.billing.v1.CreateBillingAccountRequest} CreateBillingAccountRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CreateBillingAccountRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a CreateBillingAccountRequest message.
+ * @function verify
+ * @memberof google.cloud.billing.v1.CreateBillingAccountRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ CreateBillingAccountRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.billingAccount != null && message.hasOwnProperty("billingAccount")) {
+ var error = $root.google.cloud.billing.v1.BillingAccount.verify(message.billingAccount);
+ if (error)
+ return "billingAccount." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a CreateBillingAccountRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.billing.v1.CreateBillingAccountRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.billing.v1.CreateBillingAccountRequest} CreateBillingAccountRequest
+ */
+ CreateBillingAccountRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.billing.v1.CreateBillingAccountRequest)
+ return object;
+ var message = new $root.google.cloud.billing.v1.CreateBillingAccountRequest();
+ if (object.billingAccount != null) {
+ if (typeof object.billingAccount !== "object")
+ throw TypeError(".google.cloud.billing.v1.CreateBillingAccountRequest.billingAccount: object expected");
+ message.billingAccount = $root.google.cloud.billing.v1.BillingAccount.fromObject(object.billingAccount);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a CreateBillingAccountRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.billing.v1.CreateBillingAccountRequest
+ * @static
+ * @param {google.cloud.billing.v1.CreateBillingAccountRequest} message CreateBillingAccountRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ CreateBillingAccountRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults)
+ object.billingAccount = null;
+ if (message.billingAccount != null && message.hasOwnProperty("billingAccount"))
+ object.billingAccount = $root.google.cloud.billing.v1.BillingAccount.toObject(message.billingAccount, options);
+ return object;
+ };
+
+ /**
+ * Converts this CreateBillingAccountRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.billing.v1.CreateBillingAccountRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ CreateBillingAccountRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for CreateBillingAccountRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.billing.v1.CreateBillingAccountRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ CreateBillingAccountRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.billing.v1.CreateBillingAccountRequest";
+ };
+
+ return CreateBillingAccountRequest;
+ })();
+
+ v1.UpdateBillingAccountRequest = (function() {
+
+ /**
+ * Properties of an UpdateBillingAccountRequest.
+ * @memberof google.cloud.billing.v1
+ * @interface IUpdateBillingAccountRequest
+ * @property {string|null} [name] UpdateBillingAccountRequest name
+ * @property {google.cloud.billing.v1.IBillingAccount|null} [account] UpdateBillingAccountRequest account
+ * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBillingAccountRequest updateMask
+ */
+
+ /**
+ * Constructs a new UpdateBillingAccountRequest.
+ * @memberof google.cloud.billing.v1
+ * @classdesc Represents an UpdateBillingAccountRequest.
+ * @implements IUpdateBillingAccountRequest
+ * @constructor
+ * @param {google.cloud.billing.v1.IUpdateBillingAccountRequest=} [properties] Properties to set
+ */
+ function UpdateBillingAccountRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * UpdateBillingAccountRequest name.
+ * @member {string} name
+ * @memberof google.cloud.billing.v1.UpdateBillingAccountRequest
+ * @instance
+ */
+ UpdateBillingAccountRequest.prototype.name = "";
+
+ /**
+ * UpdateBillingAccountRequest account.
+ * @member {google.cloud.billing.v1.IBillingAccount|null|undefined} account
+ * @memberof google.cloud.billing.v1.UpdateBillingAccountRequest
+ * @instance
+ */
+ UpdateBillingAccountRequest.prototype.account = null;
+
+ /**
+ * UpdateBillingAccountRequest updateMask.
+ * @member {google.protobuf.IFieldMask|null|undefined} updateMask
+ * @memberof google.cloud.billing.v1.UpdateBillingAccountRequest
+ * @instance
+ */
+ UpdateBillingAccountRequest.prototype.updateMask = null;
+
+ /**
+ * Creates a new UpdateBillingAccountRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.billing.v1.UpdateBillingAccountRequest
+ * @static
+ * @param {google.cloud.billing.v1.IUpdateBillingAccountRequest=} [properties] Properties to set
+ * @returns {google.cloud.billing.v1.UpdateBillingAccountRequest} UpdateBillingAccountRequest instance
+ */
+ UpdateBillingAccountRequest.create = function create(properties) {
+ return new UpdateBillingAccountRequest(properties);
+ };
+
+ /**
+ * Encodes the specified UpdateBillingAccountRequest message. Does not implicitly {@link google.cloud.billing.v1.UpdateBillingAccountRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.billing.v1.UpdateBillingAccountRequest
+ * @static
+ * @param {google.cloud.billing.v1.IUpdateBillingAccountRequest} message UpdateBillingAccountRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ UpdateBillingAccountRequest.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ if (message.account != null && Object.hasOwnProperty.call(message, "account"))
+ $root.google.cloud.billing.v1.BillingAccount.encode(message.account, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask"))
+ $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified UpdateBillingAccountRequest message, length delimited. Does not implicitly {@link google.cloud.billing.v1.UpdateBillingAccountRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.billing.v1.UpdateBillingAccountRequest
+ * @static
+ * @param {google.cloud.billing.v1.IUpdateBillingAccountRequest} message UpdateBillingAccountRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ UpdateBillingAccountRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an UpdateBillingAccountRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.billing.v1.UpdateBillingAccountRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.billing.v1.UpdateBillingAccountRequest} UpdateBillingAccountRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ UpdateBillingAccountRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.billing.v1.UpdateBillingAccountRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 2: {
+ message.account = $root.google.cloud.billing.v1.BillingAccount.decode(reader, reader.uint32());
+ break;
+ }
+ case 3: {
+ message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an UpdateBillingAccountRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.billing.v1.UpdateBillingAccountRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.billing.v1.UpdateBillingAccountRequest} UpdateBillingAccountRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ UpdateBillingAccountRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an UpdateBillingAccountRequest message.
+ * @function verify
+ * @memberof google.cloud.billing.v1.UpdateBillingAccountRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ UpdateBillingAccountRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.account != null && message.hasOwnProperty("account")) {
+ var error = $root.google.cloud.billing.v1.BillingAccount.verify(message.account);
+ if (error)
+ return "account." + error;
+ }
+ if (message.updateMask != null && message.hasOwnProperty("updateMask")) {
+ var error = $root.google.protobuf.FieldMask.verify(message.updateMask);
+ if (error)
+ return "updateMask." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates an UpdateBillingAccountRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.billing.v1.UpdateBillingAccountRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.billing.v1.UpdateBillingAccountRequest} UpdateBillingAccountRequest
+ */
+ UpdateBillingAccountRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.billing.v1.UpdateBillingAccountRequest)
+ return object;
+ var message = new $root.google.cloud.billing.v1.UpdateBillingAccountRequest();
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object.account != null) {
+ if (typeof object.account !== "object")
+ throw TypeError(".google.cloud.billing.v1.UpdateBillingAccountRequest.account: object expected");
+ message.account = $root.google.cloud.billing.v1.BillingAccount.fromObject(object.account);
+ }
+ if (object.updateMask != null) {
+ if (typeof object.updateMask !== "object")
+ throw TypeError(".google.cloud.billing.v1.UpdateBillingAccountRequest.updateMask: object expected");
+ message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an UpdateBillingAccountRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.billing.v1.UpdateBillingAccountRequest
+ * @static
+ * @param {google.cloud.billing.v1.UpdateBillingAccountRequest} message UpdateBillingAccountRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ UpdateBillingAccountRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.name = "";
+ object.account = null;
+ object.updateMask = null;
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.account != null && message.hasOwnProperty("account"))
+ object.account = $root.google.cloud.billing.v1.BillingAccount.toObject(message.account, options);
+ if (message.updateMask != null && message.hasOwnProperty("updateMask"))
+ object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options);
+ return object;
+ };
+
+ /**
+ * Converts this UpdateBillingAccountRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.billing.v1.UpdateBillingAccountRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ UpdateBillingAccountRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for UpdateBillingAccountRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.billing.v1.UpdateBillingAccountRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ UpdateBillingAccountRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.billing.v1.UpdateBillingAccountRequest";
+ };
+
+ return UpdateBillingAccountRequest;
+ })();
+
+ v1.ListProjectBillingInfoRequest = (function() {
+
+ /**
+ * Properties of a ListProjectBillingInfoRequest.
+ * @memberof google.cloud.billing.v1
+ * @interface IListProjectBillingInfoRequest
+ * @property {string|null} [name] ListProjectBillingInfoRequest name
+ * @property {number|null} [pageSize] ListProjectBillingInfoRequest pageSize
+ * @property {string|null} [pageToken] ListProjectBillingInfoRequest pageToken
+ */
+
+ /**
+ * Constructs a new ListProjectBillingInfoRequest.
+ * @memberof google.cloud.billing.v1
+ * @classdesc Represents a ListProjectBillingInfoRequest.
+ * @implements IListProjectBillingInfoRequest
+ * @constructor
+ * @param {google.cloud.billing.v1.IListProjectBillingInfoRequest=} [properties] Properties to set
+ */
+ function ListProjectBillingInfoRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ListProjectBillingInfoRequest name.
+ * @member {string} name
+ * @memberof google.cloud.billing.v1.ListProjectBillingInfoRequest
+ * @instance
+ */
+ ListProjectBillingInfoRequest.prototype.name = "";
+
+ /**
+ * ListProjectBillingInfoRequest pageSize.
+ * @member {number} pageSize
+ * @memberof google.cloud.billing.v1.ListProjectBillingInfoRequest
+ * @instance
+ */
+ ListProjectBillingInfoRequest.prototype.pageSize = 0;
+
+ /**
+ * ListProjectBillingInfoRequest pageToken.
+ * @member {string} pageToken
+ * @memberof google.cloud.billing.v1.ListProjectBillingInfoRequest
+ * @instance
+ */
+ ListProjectBillingInfoRequest.prototype.pageToken = "";
+
+ /**
+ * Creates a new ListProjectBillingInfoRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.billing.v1.ListProjectBillingInfoRequest
+ * @static
+ * @param {google.cloud.billing.v1.IListProjectBillingInfoRequest=} [properties] Properties to set
+ * @returns {google.cloud.billing.v1.ListProjectBillingInfoRequest} ListProjectBillingInfoRequest instance
+ */
+ ListProjectBillingInfoRequest.create = function create(properties) {
+ return new ListProjectBillingInfoRequest(properties);
+ };
+
+ /**
+ * Encodes the specified ListProjectBillingInfoRequest message. Does not implicitly {@link google.cloud.billing.v1.ListProjectBillingInfoRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.billing.v1.ListProjectBillingInfoRequest
+ * @static
+ * @param {google.cloud.billing.v1.IListProjectBillingInfoRequest} message ListProjectBillingInfoRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListProjectBillingInfoRequest.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize);
+ if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ListProjectBillingInfoRequest message, length delimited. Does not implicitly {@link google.cloud.billing.v1.ListProjectBillingInfoRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.billing.v1.ListProjectBillingInfoRequest
+ * @static
+ * @param {google.cloud.billing.v1.IListProjectBillingInfoRequest} message ListProjectBillingInfoRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListProjectBillingInfoRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ListProjectBillingInfoRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.billing.v1.ListProjectBillingInfoRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.billing.v1.ListProjectBillingInfoRequest} ListProjectBillingInfoRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListProjectBillingInfoRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.billing.v1.ListProjectBillingInfoRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 2: {
+ message.pageSize = reader.int32();
+ break;
+ }
+ case 3: {
+ message.pageToken = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ListProjectBillingInfoRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.billing.v1.ListProjectBillingInfoRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.billing.v1.ListProjectBillingInfoRequest} ListProjectBillingInfoRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListProjectBillingInfoRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ListProjectBillingInfoRequest message.
+ * @function verify
+ * @memberof google.cloud.billing.v1.ListProjectBillingInfoRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ListProjectBillingInfoRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.pageSize != null && message.hasOwnProperty("pageSize"))
+ if (!$util.isInteger(message.pageSize))
+ return "pageSize: integer expected";
+ if (message.pageToken != null && message.hasOwnProperty("pageToken"))
+ if (!$util.isString(message.pageToken))
+ return "pageToken: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a ListProjectBillingInfoRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.billing.v1.ListProjectBillingInfoRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.billing.v1.ListProjectBillingInfoRequest} ListProjectBillingInfoRequest
+ */
+ ListProjectBillingInfoRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.billing.v1.ListProjectBillingInfoRequest)
+ return object;
+ var message = new $root.google.cloud.billing.v1.ListProjectBillingInfoRequest();
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object.pageSize != null)
+ message.pageSize = object.pageSize | 0;
+ if (object.pageToken != null)
+ message.pageToken = String(object.pageToken);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ListProjectBillingInfoRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.billing.v1.ListProjectBillingInfoRequest
+ * @static
+ * @param {google.cloud.billing.v1.ListProjectBillingInfoRequest} message ListProjectBillingInfoRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ListProjectBillingInfoRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.name = "";
+ object.pageSize = 0;
+ object.pageToken = "";
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.pageSize != null && message.hasOwnProperty("pageSize"))
+ object.pageSize = message.pageSize;
+ if (message.pageToken != null && message.hasOwnProperty("pageToken"))
+ object.pageToken = message.pageToken;
+ return object;
+ };
+
+ /**
+ * Converts this ListProjectBillingInfoRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.billing.v1.ListProjectBillingInfoRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ListProjectBillingInfoRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ListProjectBillingInfoRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.billing.v1.ListProjectBillingInfoRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ListProjectBillingInfoRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.billing.v1.ListProjectBillingInfoRequest";
+ };
+
+ return ListProjectBillingInfoRequest;
+ })();
+
+ v1.ListProjectBillingInfoResponse = (function() {
+
+ /**
+ * Properties of a ListProjectBillingInfoResponse.
+ * @memberof google.cloud.billing.v1
+ * @interface IListProjectBillingInfoResponse
+ * @property {Array.|null} [projectBillingInfo] ListProjectBillingInfoResponse projectBillingInfo
+ * @property {string|null} [nextPageToken] ListProjectBillingInfoResponse nextPageToken
+ */
+
+ /**
+ * Constructs a new ListProjectBillingInfoResponse.
+ * @memberof google.cloud.billing.v1
+ * @classdesc Represents a ListProjectBillingInfoResponse.
+ * @implements IListProjectBillingInfoResponse
+ * @constructor
+ * @param {google.cloud.billing.v1.IListProjectBillingInfoResponse=} [properties] Properties to set
+ */
+ function ListProjectBillingInfoResponse(properties) {
+ this.projectBillingInfo = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ListProjectBillingInfoResponse projectBillingInfo.
+ * @member {Array.} projectBillingInfo
+ * @memberof google.cloud.billing.v1.ListProjectBillingInfoResponse
+ * @instance
+ */
+ ListProjectBillingInfoResponse.prototype.projectBillingInfo = $util.emptyArray;
+
+ /**
+ * ListProjectBillingInfoResponse nextPageToken.
+ * @member {string} nextPageToken
+ * @memberof google.cloud.billing.v1.ListProjectBillingInfoResponse
+ * @instance
+ */
+ ListProjectBillingInfoResponse.prototype.nextPageToken = "";
+
+ /**
+ * Creates a new ListProjectBillingInfoResponse instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.billing.v1.ListProjectBillingInfoResponse
+ * @static
+ * @param {google.cloud.billing.v1.IListProjectBillingInfoResponse=} [properties] Properties to set
+ * @returns {google.cloud.billing.v1.ListProjectBillingInfoResponse} ListProjectBillingInfoResponse instance
+ */
+ ListProjectBillingInfoResponse.create = function create(properties) {
+ return new ListProjectBillingInfoResponse(properties);
+ };
+
+ /**
+ * Encodes the specified ListProjectBillingInfoResponse message. Does not implicitly {@link google.cloud.billing.v1.ListProjectBillingInfoResponse.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.billing.v1.ListProjectBillingInfoResponse
+ * @static
+ * @param {google.cloud.billing.v1.IListProjectBillingInfoResponse} message ListProjectBillingInfoResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListProjectBillingInfoResponse.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.projectBillingInfo != null && message.projectBillingInfo.length)
+ for (var i = 0; i < message.projectBillingInfo.length; ++i)
+ $root.google.cloud.billing.v1.ProjectBillingInfo.encode(message.projectBillingInfo[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ListProjectBillingInfoResponse message, length delimited. Does not implicitly {@link google.cloud.billing.v1.ListProjectBillingInfoResponse.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.billing.v1.ListProjectBillingInfoResponse
+ * @static
+ * @param {google.cloud.billing.v1.IListProjectBillingInfoResponse} message ListProjectBillingInfoResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListProjectBillingInfoResponse.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ListProjectBillingInfoResponse message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.billing.v1.ListProjectBillingInfoResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.billing.v1.ListProjectBillingInfoResponse} ListProjectBillingInfoResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListProjectBillingInfoResponse.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.billing.v1.ListProjectBillingInfoResponse();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.projectBillingInfo && message.projectBillingInfo.length))
+ message.projectBillingInfo = [];
+ message.projectBillingInfo.push($root.google.cloud.billing.v1.ProjectBillingInfo.decode(reader, reader.uint32()));
+ break;
+ }
+ case 2: {
+ message.nextPageToken = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ListProjectBillingInfoResponse message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.billing.v1.ListProjectBillingInfoResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.billing.v1.ListProjectBillingInfoResponse} ListProjectBillingInfoResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListProjectBillingInfoResponse.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ListProjectBillingInfoResponse message.
+ * @function verify
+ * @memberof google.cloud.billing.v1.ListProjectBillingInfoResponse
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ListProjectBillingInfoResponse.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.projectBillingInfo != null && message.hasOwnProperty("projectBillingInfo")) {
+ if (!Array.isArray(message.projectBillingInfo))
+ return "projectBillingInfo: array expected";
+ for (var i = 0; i < message.projectBillingInfo.length; ++i) {
+ var error = $root.google.cloud.billing.v1.ProjectBillingInfo.verify(message.projectBillingInfo[i]);
+ if (error)
+ return "projectBillingInfo." + error;
+ }
+ }
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
+ if (!$util.isString(message.nextPageToken))
+ return "nextPageToken: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a ListProjectBillingInfoResponse message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.billing.v1.ListProjectBillingInfoResponse
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.billing.v1.ListProjectBillingInfoResponse} ListProjectBillingInfoResponse
+ */
+ ListProjectBillingInfoResponse.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.billing.v1.ListProjectBillingInfoResponse)
+ return object;
+ var message = new $root.google.cloud.billing.v1.ListProjectBillingInfoResponse();
+ if (object.projectBillingInfo) {
+ if (!Array.isArray(object.projectBillingInfo))
+ throw TypeError(".google.cloud.billing.v1.ListProjectBillingInfoResponse.projectBillingInfo: array expected");
+ message.projectBillingInfo = [];
+ for (var i = 0; i < object.projectBillingInfo.length; ++i) {
+ if (typeof object.projectBillingInfo[i] !== "object")
+ throw TypeError(".google.cloud.billing.v1.ListProjectBillingInfoResponse.projectBillingInfo: object expected");
+ message.projectBillingInfo[i] = $root.google.cloud.billing.v1.ProjectBillingInfo.fromObject(object.projectBillingInfo[i]);
+ }
+ }
+ if (object.nextPageToken != null)
+ message.nextPageToken = String(object.nextPageToken);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ListProjectBillingInfoResponse message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.billing.v1.ListProjectBillingInfoResponse
+ * @static
+ * @param {google.cloud.billing.v1.ListProjectBillingInfoResponse} message ListProjectBillingInfoResponse
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ListProjectBillingInfoResponse.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.projectBillingInfo = [];
+ if (options.defaults)
+ object.nextPageToken = "";
+ if (message.projectBillingInfo && message.projectBillingInfo.length) {
+ object.projectBillingInfo = [];
+ for (var j = 0; j < message.projectBillingInfo.length; ++j)
+ object.projectBillingInfo[j] = $root.google.cloud.billing.v1.ProjectBillingInfo.toObject(message.projectBillingInfo[j], options);
+ }
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
+ object.nextPageToken = message.nextPageToken;
+ return object;
+ };
+
+ /**
+ * Converts this ListProjectBillingInfoResponse to JSON.
+ * @function toJSON
+ * @memberof google.cloud.billing.v1.ListProjectBillingInfoResponse
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ListProjectBillingInfoResponse.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ListProjectBillingInfoResponse
+ * @function getTypeUrl
+ * @memberof google.cloud.billing.v1.ListProjectBillingInfoResponse
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ListProjectBillingInfoResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.billing.v1.ListProjectBillingInfoResponse";
+ };
+
+ return ListProjectBillingInfoResponse;
+ })();
+
+ v1.GetProjectBillingInfoRequest = (function() {
+
+ /**
+ * Properties of a GetProjectBillingInfoRequest.
+ * @memberof google.cloud.billing.v1
+ * @interface IGetProjectBillingInfoRequest
+ * @property {string|null} [name] GetProjectBillingInfoRequest name
+ */
+
+ /**
+ * Constructs a new GetProjectBillingInfoRequest.
+ * @memberof google.cloud.billing.v1
+ * @classdesc Represents a GetProjectBillingInfoRequest.
+ * @implements IGetProjectBillingInfoRequest
+ * @constructor
+ * @param {google.cloud.billing.v1.IGetProjectBillingInfoRequest=} [properties] Properties to set
+ */
+ function GetProjectBillingInfoRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * GetProjectBillingInfoRequest name.
+ * @member {string} name
+ * @memberof google.cloud.billing.v1.GetProjectBillingInfoRequest
+ * @instance
+ */
+ GetProjectBillingInfoRequest.prototype.name = "";
+
+ /**
+ * Creates a new GetProjectBillingInfoRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.billing.v1.GetProjectBillingInfoRequest
+ * @static
+ * @param {google.cloud.billing.v1.IGetProjectBillingInfoRequest=} [properties] Properties to set
+ * @returns {google.cloud.billing.v1.GetProjectBillingInfoRequest} GetProjectBillingInfoRequest instance
+ */
+ GetProjectBillingInfoRequest.create = function create(properties) {
+ return new GetProjectBillingInfoRequest(properties);
+ };
+
+ /**
+ * Encodes the specified GetProjectBillingInfoRequest message. Does not implicitly {@link google.cloud.billing.v1.GetProjectBillingInfoRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.billing.v1.GetProjectBillingInfoRequest
+ * @static
+ * @param {google.cloud.billing.v1.IGetProjectBillingInfoRequest} message GetProjectBillingInfoRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GetProjectBillingInfoRequest.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified GetProjectBillingInfoRequest message, length delimited. Does not implicitly {@link google.cloud.billing.v1.GetProjectBillingInfoRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.billing.v1.GetProjectBillingInfoRequest
+ * @static
+ * @param {google.cloud.billing.v1.IGetProjectBillingInfoRequest} message GetProjectBillingInfoRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GetProjectBillingInfoRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a GetProjectBillingInfoRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.billing.v1.GetProjectBillingInfoRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.billing.v1.GetProjectBillingInfoRequest} GetProjectBillingInfoRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GetProjectBillingInfoRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.billing.v1.GetProjectBillingInfoRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a GetProjectBillingInfoRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.billing.v1.GetProjectBillingInfoRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.billing.v1.GetProjectBillingInfoRequest} GetProjectBillingInfoRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GetProjectBillingInfoRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a GetProjectBillingInfoRequest message.
+ * @function verify
+ * @memberof google.cloud.billing.v1.GetProjectBillingInfoRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ GetProjectBillingInfoRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a GetProjectBillingInfoRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.billing.v1.GetProjectBillingInfoRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.billing.v1.GetProjectBillingInfoRequest} GetProjectBillingInfoRequest
+ */
+ GetProjectBillingInfoRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.billing.v1.GetProjectBillingInfoRequest)
+ return object;
+ var message = new $root.google.cloud.billing.v1.GetProjectBillingInfoRequest();
+ if (object.name != null)
+ message.name = String(object.name);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a GetProjectBillingInfoRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.billing.v1.GetProjectBillingInfoRequest
+ * @static
+ * @param {google.cloud.billing.v1.GetProjectBillingInfoRequest} message GetProjectBillingInfoRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ GetProjectBillingInfoRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults)
+ object.name = "";
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ return object;
+ };
+
+ /**
+ * Converts this GetProjectBillingInfoRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.billing.v1.GetProjectBillingInfoRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ GetProjectBillingInfoRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for GetProjectBillingInfoRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.billing.v1.GetProjectBillingInfoRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ GetProjectBillingInfoRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.billing.v1.GetProjectBillingInfoRequest";
+ };
+
+ return GetProjectBillingInfoRequest;
+ })();
+
+ v1.UpdateProjectBillingInfoRequest = (function() {
+
+ /**
+ * Properties of an UpdateProjectBillingInfoRequest.
+ * @memberof google.cloud.billing.v1
+ * @interface IUpdateProjectBillingInfoRequest
+ * @property {string|null} [name] UpdateProjectBillingInfoRequest name
+ * @property {google.cloud.billing.v1.IProjectBillingInfo|null} [projectBillingInfo] UpdateProjectBillingInfoRequest projectBillingInfo
+ */
+
+ /**
+ * Constructs a new UpdateProjectBillingInfoRequest.
+ * @memberof google.cloud.billing.v1
+ * @classdesc Represents an UpdateProjectBillingInfoRequest.
+ * @implements IUpdateProjectBillingInfoRequest
+ * @constructor
+ * @param {google.cloud.billing.v1.IUpdateProjectBillingInfoRequest=} [properties] Properties to set
+ */
+ function UpdateProjectBillingInfoRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * UpdateProjectBillingInfoRequest name.
+ * @member {string} name
+ * @memberof google.cloud.billing.v1.UpdateProjectBillingInfoRequest
+ * @instance
+ */
+ UpdateProjectBillingInfoRequest.prototype.name = "";
+
+ /**
+ * UpdateProjectBillingInfoRequest projectBillingInfo.
+ * @member {google.cloud.billing.v1.IProjectBillingInfo|null|undefined} projectBillingInfo
+ * @memberof google.cloud.billing.v1.UpdateProjectBillingInfoRequest
+ * @instance
+ */
+ UpdateProjectBillingInfoRequest.prototype.projectBillingInfo = null;
+
+ /**
+ * Creates a new UpdateProjectBillingInfoRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.billing.v1.UpdateProjectBillingInfoRequest
+ * @static
+ * @param {google.cloud.billing.v1.IUpdateProjectBillingInfoRequest=} [properties] Properties to set
+ * @returns {google.cloud.billing.v1.UpdateProjectBillingInfoRequest} UpdateProjectBillingInfoRequest instance
+ */
+ UpdateProjectBillingInfoRequest.create = function create(properties) {
+ return new UpdateProjectBillingInfoRequest(properties);
+ };
+
+ /**
+ * Encodes the specified UpdateProjectBillingInfoRequest message. Does not implicitly {@link google.cloud.billing.v1.UpdateProjectBillingInfoRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.billing.v1.UpdateProjectBillingInfoRequest
+ * @static
+ * @param {google.cloud.billing.v1.IUpdateProjectBillingInfoRequest} message UpdateProjectBillingInfoRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ UpdateProjectBillingInfoRequest.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ if (message.projectBillingInfo != null && Object.hasOwnProperty.call(message, "projectBillingInfo"))
+ $root.google.cloud.billing.v1.ProjectBillingInfo.encode(message.projectBillingInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified UpdateProjectBillingInfoRequest message, length delimited. Does not implicitly {@link google.cloud.billing.v1.UpdateProjectBillingInfoRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.billing.v1.UpdateProjectBillingInfoRequest
+ * @static
+ * @param {google.cloud.billing.v1.IUpdateProjectBillingInfoRequest} message UpdateProjectBillingInfoRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ UpdateProjectBillingInfoRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an UpdateProjectBillingInfoRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.billing.v1.UpdateProjectBillingInfoRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.billing.v1.UpdateProjectBillingInfoRequest} UpdateProjectBillingInfoRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ UpdateProjectBillingInfoRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.billing.v1.UpdateProjectBillingInfoRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 2: {
+ message.projectBillingInfo = $root.google.cloud.billing.v1.ProjectBillingInfo.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an UpdateProjectBillingInfoRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.billing.v1.UpdateProjectBillingInfoRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.billing.v1.UpdateProjectBillingInfoRequest} UpdateProjectBillingInfoRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ UpdateProjectBillingInfoRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an UpdateProjectBillingInfoRequest message.
+ * @function verify
+ * @memberof google.cloud.billing.v1.UpdateProjectBillingInfoRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ UpdateProjectBillingInfoRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.projectBillingInfo != null && message.hasOwnProperty("projectBillingInfo")) {
+ var error = $root.google.cloud.billing.v1.ProjectBillingInfo.verify(message.projectBillingInfo);
+ if (error)
+ return "projectBillingInfo." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates an UpdateProjectBillingInfoRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.billing.v1.UpdateProjectBillingInfoRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.billing.v1.UpdateProjectBillingInfoRequest} UpdateProjectBillingInfoRequest
+ */
+ UpdateProjectBillingInfoRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.billing.v1.UpdateProjectBillingInfoRequest)
+ return object;
+ var message = new $root.google.cloud.billing.v1.UpdateProjectBillingInfoRequest();
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object.projectBillingInfo != null) {
+ if (typeof object.projectBillingInfo !== "object")
+ throw TypeError(".google.cloud.billing.v1.UpdateProjectBillingInfoRequest.projectBillingInfo: object expected");
+ message.projectBillingInfo = $root.google.cloud.billing.v1.ProjectBillingInfo.fromObject(object.projectBillingInfo);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an UpdateProjectBillingInfoRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.billing.v1.UpdateProjectBillingInfoRequest
+ * @static
+ * @param {google.cloud.billing.v1.UpdateProjectBillingInfoRequest} message UpdateProjectBillingInfoRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ UpdateProjectBillingInfoRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.name = "";
+ object.projectBillingInfo = null;
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.projectBillingInfo != null && message.hasOwnProperty("projectBillingInfo"))
+ object.projectBillingInfo = $root.google.cloud.billing.v1.ProjectBillingInfo.toObject(message.projectBillingInfo, options);
+ return object;
+ };
+
+ /**
+ * Converts this UpdateProjectBillingInfoRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.billing.v1.UpdateProjectBillingInfoRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ UpdateProjectBillingInfoRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for UpdateProjectBillingInfoRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.billing.v1.UpdateProjectBillingInfoRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ UpdateProjectBillingInfoRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.billing.v1.UpdateProjectBillingInfoRequest";
+ };
+
+ return UpdateProjectBillingInfoRequest;
+ })();
+
+ v1.CloudCatalog = (function() {
+
+ /**
+ * Constructs a new CloudCatalog service.
+ * @memberof google.cloud.billing.v1
+ * @classdesc Represents a CloudCatalog
+ * @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 CloudCatalog(rpcImpl, requestDelimited, responseDelimited) {
+ $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
+ }
+
+ (CloudCatalog.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CloudCatalog;
+
+ /**
+ * Creates new CloudCatalog service using the specified rpc implementation.
+ * @function create
+ * @memberof google.cloud.billing.v1.CloudCatalog
+ * @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 {CloudCatalog} RPC service. Useful where requests and/or responses are streamed.
+ */
+ CloudCatalog.create = function create(rpcImpl, requestDelimited, responseDelimited) {
+ return new this(rpcImpl, requestDelimited, responseDelimited);
+ };
+
+ /**
+ * Callback as used by {@link google.cloud.billing.v1.CloudCatalog|listServices}.
+ * @memberof google.cloud.billing.v1.CloudCatalog
+ * @typedef ListServicesCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.billing.v1.ListServicesResponse} [response] ListServicesResponse
+ */
+
+ /**
+ * Calls ListServices.
+ * @function listServices
+ * @memberof google.cloud.billing.v1.CloudCatalog
+ * @instance
+ * @param {google.cloud.billing.v1.IListServicesRequest} request ListServicesRequest message or plain object
+ * @param {google.cloud.billing.v1.CloudCatalog.ListServicesCallback} callback Node-style callback called with the error, if any, and ListServicesResponse
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(CloudCatalog.prototype.listServices = function listServices(request, callback) {
+ return this.rpcCall(listServices, $root.google.cloud.billing.v1.ListServicesRequest, $root.google.cloud.billing.v1.ListServicesResponse, request, callback);
+ }, "name", { value: "ListServices" });
+
+ /**
+ * Calls ListServices.
+ * @function listServices
+ * @memberof google.cloud.billing.v1.CloudCatalog
+ * @instance
+ * @param {google.cloud.billing.v1.IListServicesRequest} request ListServicesRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.billing.v1.CloudCatalog|listSkus}.
+ * @memberof google.cloud.billing.v1.CloudCatalog
+ * @typedef ListSkusCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.billing.v1.ListSkusResponse} [response] ListSkusResponse
+ */
+
+ /**
+ * Calls ListSkus.
+ * @function listSkus
+ * @memberof google.cloud.billing.v1.CloudCatalog
+ * @instance
+ * @param {google.cloud.billing.v1.IListSkusRequest} request ListSkusRequest message or plain object
+ * @param {google.cloud.billing.v1.CloudCatalog.ListSkusCallback} callback Node-style callback called with the error, if any, and ListSkusResponse
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(CloudCatalog.prototype.listSkus = function listSkus(request, callback) {
+ return this.rpcCall(listSkus, $root.google.cloud.billing.v1.ListSkusRequest, $root.google.cloud.billing.v1.ListSkusResponse, request, callback);
+ }, "name", { value: "ListSkus" });
+
+ /**
+ * Calls ListSkus.
+ * @function listSkus
+ * @memberof google.cloud.billing.v1.CloudCatalog
+ * @instance
+ * @param {google.cloud.billing.v1.IListSkusRequest} request ListSkusRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ return CloudCatalog;
+ })();
+
+ v1.Service = (function() {
+
+ /**
+ * Properties of a Service.
+ * @memberof google.cloud.billing.v1
+ * @interface IService
+ * @property {string|null} [name] Service name
+ * @property {string|null} [serviceId] Service serviceId
+ * @property {string|null} [displayName] Service displayName
+ * @property {string|null} [businessEntityName] Service businessEntityName
+ */
+
+ /**
+ * Constructs a new Service.
+ * @memberof google.cloud.billing.v1
+ * @classdesc Represents a Service.
+ * @implements IService
+ * @constructor
+ * @param {google.cloud.billing.v1.IService=} [properties] Properties to set
+ */
+ function Service(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * Service name.
+ * @member {string} name
+ * @memberof google.cloud.billing.v1.Service
+ * @instance
+ */
+ Service.prototype.name = "";
+
+ /**
+ * Service serviceId.
+ * @member {string} serviceId
+ * @memberof google.cloud.billing.v1.Service
+ * @instance
+ */
+ Service.prototype.serviceId = "";
+
+ /**
+ * Service displayName.
+ * @member {string} displayName
+ * @memberof google.cloud.billing.v1.Service
+ * @instance
+ */
+ Service.prototype.displayName = "";
+
+ /**
+ * Service businessEntityName.
+ * @member {string} businessEntityName
+ * @memberof google.cloud.billing.v1.Service
+ * @instance
+ */
+ Service.prototype.businessEntityName = "";
+
+ /**
+ * Creates a new Service instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.billing.v1.Service
+ * @static
+ * @param {google.cloud.billing.v1.IService=} [properties] Properties to set
+ * @returns {google.cloud.billing.v1.Service} Service instance
+ */
+ Service.create = function create(properties) {
+ return new Service(properties);
+ };
+
+ /**
+ * Encodes the specified Service message. Does not implicitly {@link google.cloud.billing.v1.Service.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.billing.v1.Service
+ * @static
+ * @param {google.cloud.billing.v1.IService} message Service message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Service.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ if (message.serviceId != null && Object.hasOwnProperty.call(message, "serviceId"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.serviceId);
+ if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName);
+ if (message.businessEntityName != null && Object.hasOwnProperty.call(message, "businessEntityName"))
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.businessEntityName);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified Service message, length delimited. Does not implicitly {@link google.cloud.billing.v1.Service.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.billing.v1.Service
+ * @static
+ * @param {google.cloud.billing.v1.IService} message Service message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Service.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a Service message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.billing.v1.Service
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.billing.v1.Service} Service
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Service.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.billing.v1.Service();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 2: {
+ message.serviceId = reader.string();
+ break;
+ }
+ case 3: {
+ message.displayName = reader.string();
+ break;
+ }
+ case 4: {
+ message.businessEntityName = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a Service message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.billing.v1.Service
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.billing.v1.Service} Service
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Service.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a Service message.
+ * @function verify
+ * @memberof google.cloud.billing.v1.Service
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ Service.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.serviceId != null && message.hasOwnProperty("serviceId"))
+ if (!$util.isString(message.serviceId))
+ return "serviceId: string expected";
+ if (message.displayName != null && message.hasOwnProperty("displayName"))
+ if (!$util.isString(message.displayName))
+ return "displayName: string expected";
+ if (message.businessEntityName != null && message.hasOwnProperty("businessEntityName"))
+ if (!$util.isString(message.businessEntityName))
+ return "businessEntityName: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a Service message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.billing.v1.Service
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.billing.v1.Service} Service
+ */
+ Service.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.billing.v1.Service)
+ return object;
+ var message = new $root.google.cloud.billing.v1.Service();
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object.serviceId != null)
+ message.serviceId = String(object.serviceId);
+ if (object.displayName != null)
+ message.displayName = String(object.displayName);
+ if (object.businessEntityName != null)
+ message.businessEntityName = String(object.businessEntityName);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a Service message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.billing.v1.Service
+ * @static
+ * @param {google.cloud.billing.v1.Service} message Service
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ Service.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.name = "";
+ object.serviceId = "";
+ object.displayName = "";
+ object.businessEntityName = "";
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.serviceId != null && message.hasOwnProperty("serviceId"))
+ object.serviceId = message.serviceId;
+ if (message.displayName != null && message.hasOwnProperty("displayName"))
+ object.displayName = message.displayName;
+ if (message.businessEntityName != null && message.hasOwnProperty("businessEntityName"))
+ object.businessEntityName = message.businessEntityName;
+ return object;
+ };
+
+ /**
+ * Converts this Service to JSON.
+ * @function toJSON
+ * @memberof google.cloud.billing.v1.Service
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ Service.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for Service
+ * @function getTypeUrl
+ * @memberof google.cloud.billing.v1.Service
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ Service.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.billing.v1.Service";
+ };
+
+ return Service;
+ })();
+
+ v1.Sku = (function() {
+
+ /**
+ * Properties of a Sku.
+ * @memberof google.cloud.billing.v1
+ * @interface ISku
+ * @property {string|null} [name] Sku name
+ * @property {string|null} [skuId] Sku skuId
+ * @property {string|null} [description] Sku description
+ * @property {google.cloud.billing.v1.ICategory|null} [category] Sku category
+ * @property {Array.|null} [serviceRegions] Sku serviceRegions
+ * @property {Array.|null} [pricingInfo] Sku pricingInfo
+ * @property {string|null} [serviceProviderName] Sku serviceProviderName
+ */
+
+ /**
+ * Constructs a new Sku.
+ * @memberof google.cloud.billing.v1
+ * @classdesc Represents a Sku.
+ * @implements ISku
+ * @constructor
+ * @param {google.cloud.billing.v1.ISku=} [properties] Properties to set
+ */
+ function Sku(properties) {
+ this.serviceRegions = [];
+ this.pricingInfo = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * Sku name.
+ * @member {string} name
+ * @memberof google.cloud.billing.v1.Sku
+ * @instance
+ */
+ Sku.prototype.name = "";
+
+ /**
+ * Sku skuId.
+ * @member {string} skuId
+ * @memberof google.cloud.billing.v1.Sku
+ * @instance
+ */
+ Sku.prototype.skuId = "";
+
+ /**
+ * Sku description.
+ * @member {string} description
+ * @memberof google.cloud.billing.v1.Sku
+ * @instance
+ */
+ Sku.prototype.description = "";
+
+ /**
+ * Sku category.
+ * @member {google.cloud.billing.v1.ICategory|null|undefined} category
+ * @memberof google.cloud.billing.v1.Sku
+ * @instance
+ */
+ Sku.prototype.category = null;
+
+ /**
+ * Sku serviceRegions.
+ * @member {Array.} serviceRegions
+ * @memberof google.cloud.billing.v1.Sku
+ * @instance
+ */
+ Sku.prototype.serviceRegions = $util.emptyArray;
+
+ /**
+ * Sku pricingInfo.
+ * @member {Array.} pricingInfo
+ * @memberof google.cloud.billing.v1.Sku
+ * @instance
+ */
+ Sku.prototype.pricingInfo = $util.emptyArray;
+
+ /**
+ * Sku serviceProviderName.
+ * @member {string} serviceProviderName
+ * @memberof google.cloud.billing.v1.Sku
+ * @instance
+ */
+ Sku.prototype.serviceProviderName = "";
+
+ /**
+ * Creates a new Sku instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.billing.v1.Sku
+ * @static
+ * @param {google.cloud.billing.v1.ISku=} [properties] Properties to set
+ * @returns {google.cloud.billing.v1.Sku} Sku instance
+ */
+ Sku.create = function create(properties) {
+ return new Sku(properties);
+ };
+
+ /**
+ * Encodes the specified Sku message. Does not implicitly {@link google.cloud.billing.v1.Sku.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.billing.v1.Sku
+ * @static
+ * @param {google.cloud.billing.v1.ISku} message Sku message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Sku.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
+ if (message.skuId != null && Object.hasOwnProperty.call(message, "skuId"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.skuId);
+ if (message.description != null && Object.hasOwnProperty.call(message, "description"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.description);
+ if (message.category != null && Object.hasOwnProperty.call(message, "category"))
+ $root.google.cloud.billing.v1.Category.encode(message.category, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
+ if (message.serviceRegions != null && message.serviceRegions.length)
+ for (var i = 0; i < message.serviceRegions.length; ++i)
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.serviceRegions[i]);
+ if (message.pricingInfo != null && message.pricingInfo.length)
+ for (var i = 0; i < message.pricingInfo.length; ++i)
+ $root.google.cloud.billing.v1.PricingInfo.encode(message.pricingInfo[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
+ if (message.serviceProviderName != null && Object.hasOwnProperty.call(message, "serviceProviderName"))
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.serviceProviderName);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified Sku message, length delimited. Does not implicitly {@link google.cloud.billing.v1.Sku.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.billing.v1.Sku
+ * @static
+ * @param {google.cloud.billing.v1.ISku} message Sku message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Sku.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a Sku message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.billing.v1.Sku
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.billing.v1.Sku} Sku
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Sku.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.billing.v1.Sku();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 2: {
+ message.skuId = reader.string();
+ break;
+ }
+ case 3: {
+ message.description = reader.string();
+ break;
+ }
+ case 4: {
+ message.category = $root.google.cloud.billing.v1.Category.decode(reader, reader.uint32());
+ break;
+ }
+ case 5: {
+ if (!(message.serviceRegions && message.serviceRegions.length))
+ message.serviceRegions = [];
+ message.serviceRegions.push(reader.string());
+ break;
+ }
+ case 6: {
+ if (!(message.pricingInfo && message.pricingInfo.length))
+ message.pricingInfo = [];
+ message.pricingInfo.push($root.google.cloud.billing.v1.PricingInfo.decode(reader, reader.uint32()));
+ break;
+ }
+ case 7: {
+ message.serviceProviderName = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a Sku message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.billing.v1.Sku
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.billing.v1.Sku} Sku
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Sku.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a Sku message.
+ * @function verify
+ * @memberof google.cloud.billing.v1.Sku
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ Sku.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.skuId != null && message.hasOwnProperty("skuId"))
+ if (!$util.isString(message.skuId))
+ return "skuId: string expected";
+ if (message.description != null && message.hasOwnProperty("description"))
+ if (!$util.isString(message.description))
+ return "description: string expected";
+ if (message.category != null && message.hasOwnProperty("category")) {
+ var error = $root.google.cloud.billing.v1.Category.verify(message.category);
+ if (error)
+ return "category." + error;
+ }
+ if (message.serviceRegions != null && message.hasOwnProperty("serviceRegions")) {
+ if (!Array.isArray(message.serviceRegions))
+ return "serviceRegions: array expected";
+ for (var i = 0; i < message.serviceRegions.length; ++i)
+ if (!$util.isString(message.serviceRegions[i]))
+ return "serviceRegions: string[] expected";
+ }
+ if (message.pricingInfo != null && message.hasOwnProperty("pricingInfo")) {
+ if (!Array.isArray(message.pricingInfo))
+ return "pricingInfo: array expected";
+ for (var i = 0; i < message.pricingInfo.length; ++i) {
+ var error = $root.google.cloud.billing.v1.PricingInfo.verify(message.pricingInfo[i]);
+ if (error)
+ return "pricingInfo." + error;
+ }
+ }
+ if (message.serviceProviderName != null && message.hasOwnProperty("serviceProviderName"))
+ if (!$util.isString(message.serviceProviderName))
+ return "serviceProviderName: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a Sku message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.billing.v1.Sku
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.billing.v1.Sku} Sku
+ */
+ Sku.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.billing.v1.Sku)
+ return object;
+ var message = new $root.google.cloud.billing.v1.Sku();
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object.skuId != null)
+ message.skuId = String(object.skuId);
+ if (object.description != null)
+ message.description = String(object.description);
+ if (object.category != null) {
+ if (typeof object.category !== "object")
+ throw TypeError(".google.cloud.billing.v1.Sku.category: object expected");
+ message.category = $root.google.cloud.billing.v1.Category.fromObject(object.category);
+ }
+ if (object.serviceRegions) {
+ if (!Array.isArray(object.serviceRegions))
+ throw TypeError(".google.cloud.billing.v1.Sku.serviceRegions: array expected");
+ message.serviceRegions = [];
+ for (var i = 0; i < object.serviceRegions.length; ++i)
+ message.serviceRegions[i] = String(object.serviceRegions[i]);
+ }
+ if (object.pricingInfo) {
+ if (!Array.isArray(object.pricingInfo))
+ throw TypeError(".google.cloud.billing.v1.Sku.pricingInfo: array expected");
+ message.pricingInfo = [];
+ for (var i = 0; i < object.pricingInfo.length; ++i) {
+ if (typeof object.pricingInfo[i] !== "object")
+ throw TypeError(".google.cloud.billing.v1.Sku.pricingInfo: object expected");
+ message.pricingInfo[i] = $root.google.cloud.billing.v1.PricingInfo.fromObject(object.pricingInfo[i]);
+ }
+ }
+ if (object.serviceProviderName != null)
+ message.serviceProviderName = String(object.serviceProviderName);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a Sku message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.billing.v1.Sku
+ * @static
+ * @param {google.cloud.billing.v1.Sku} message Sku
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ Sku.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults) {
+ object.serviceRegions = [];
+ object.pricingInfo = [];
+ }
+ if (options.defaults) {
+ object.name = "";
+ object.skuId = "";
+ object.description = "";
+ object.category = null;
+ object.serviceProviderName = "";
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.skuId != null && message.hasOwnProperty("skuId"))
+ object.skuId = message.skuId;
+ if (message.description != null && message.hasOwnProperty("description"))
+ object.description = message.description;
+ if (message.category != null && message.hasOwnProperty("category"))
+ object.category = $root.google.cloud.billing.v1.Category.toObject(message.category, options);
+ if (message.serviceRegions && message.serviceRegions.length) {
+ object.serviceRegions = [];
+ for (var j = 0; j < message.serviceRegions.length; ++j)
+ object.serviceRegions[j] = message.serviceRegions[j];
+ }
+ if (message.pricingInfo && message.pricingInfo.length) {
+ object.pricingInfo = [];
+ for (var j = 0; j < message.pricingInfo.length; ++j)
+ object.pricingInfo[j] = $root.google.cloud.billing.v1.PricingInfo.toObject(message.pricingInfo[j], options);
+ }
+ if (message.serviceProviderName != null && message.hasOwnProperty("serviceProviderName"))
+ object.serviceProviderName = message.serviceProviderName;
+ return object;
+ };
+
+ /**
+ * Converts this Sku to JSON.
+ * @function toJSON
+ * @memberof google.cloud.billing.v1.Sku
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ Sku.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for Sku
+ * @function getTypeUrl
+ * @memberof google.cloud.billing.v1.Sku
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ Sku.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.billing.v1.Sku";
+ };
+
+ return Sku;
+ })();
+
+ v1.Category = (function() {
+
+ /**
+ * Properties of a Category.
+ * @memberof google.cloud.billing.v1
+ * @interface ICategory
+ * @property {string|null} [serviceDisplayName] Category serviceDisplayName
+ * @property {string|null} [resourceFamily] Category resourceFamily
+ * @property {string|null} [resourceGroup] Category resourceGroup
+ * @property {string|null} [usageType] Category usageType
+ */
+
+ /**
+ * Constructs a new Category.
+ * @memberof google.cloud.billing.v1
+ * @classdesc Represents a Category.
+ * @implements ICategory
+ * @constructor
+ * @param {google.cloud.billing.v1.ICategory=} [properties] Properties to set
+ */
+ function Category(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * Category serviceDisplayName.
+ * @member {string} serviceDisplayName
+ * @memberof google.cloud.billing.v1.Category
+ * @instance
+ */
+ Category.prototype.serviceDisplayName = "";
+
+ /**
+ * Category resourceFamily.
+ * @member {string} resourceFamily
+ * @memberof google.cloud.billing.v1.Category
+ * @instance
+ */
+ Category.prototype.resourceFamily = "";
+
+ /**
+ * Category resourceGroup.
+ * @member {string} resourceGroup
+ * @memberof google.cloud.billing.v1.Category
+ * @instance
+ */
+ Category.prototype.resourceGroup = "";
+
+ /**
+ * Category usageType.
+ * @member {string} usageType
+ * @memberof google.cloud.billing.v1.Category
+ * @instance
+ */
+ Category.prototype.usageType = "";
+
+ /**
+ * Creates a new Category instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.billing.v1.Category
+ * @static
+ * @param {google.cloud.billing.v1.ICategory=} [properties] Properties to set
+ * @returns {google.cloud.billing.v1.Category} Category instance
+ */
+ Category.create = function create(properties) {
+ return new Category(properties);
+ };
+
+ /**
+ * Encodes the specified Category message. Does not implicitly {@link google.cloud.billing.v1.Category.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.billing.v1.Category
+ * @static
+ * @param {google.cloud.billing.v1.ICategory} message Category message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Category.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.serviceDisplayName != null && Object.hasOwnProperty.call(message, "serviceDisplayName"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.serviceDisplayName);
+ if (message.resourceFamily != null && Object.hasOwnProperty.call(message, "resourceFamily"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceFamily);
+ if (message.resourceGroup != null && Object.hasOwnProperty.call(message, "resourceGroup"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.resourceGroup);
+ if (message.usageType != null && Object.hasOwnProperty.call(message, "usageType"))
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.usageType);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified Category message, length delimited. Does not implicitly {@link google.cloud.billing.v1.Category.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.billing.v1.Category
+ * @static
+ * @param {google.cloud.billing.v1.ICategory} message Category message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Category.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a Category message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.billing.v1.Category
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.billing.v1.Category} Category
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Category.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.billing.v1.Category();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.serviceDisplayName = reader.string();
+ break;
+ }
+ case 2: {
+ message.resourceFamily = reader.string();
+ break;
+ }
+ case 3: {
+ message.resourceGroup = reader.string();
+ break;
+ }
+ case 4: {
+ message.usageType = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a Category message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.billing.v1.Category
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.billing.v1.Category} Category
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Category.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a Category message.
+ * @function verify
+ * @memberof google.cloud.billing.v1.Category
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ Category.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.serviceDisplayName != null && message.hasOwnProperty("serviceDisplayName"))
+ if (!$util.isString(message.serviceDisplayName))
+ return "serviceDisplayName: string expected";
+ if (message.resourceFamily != null && message.hasOwnProperty("resourceFamily"))
+ if (!$util.isString(message.resourceFamily))
+ return "resourceFamily: string expected";
+ if (message.resourceGroup != null && message.hasOwnProperty("resourceGroup"))
+ if (!$util.isString(message.resourceGroup))
+ return "resourceGroup: string expected";
+ if (message.usageType != null && message.hasOwnProperty("usageType"))
+ if (!$util.isString(message.usageType))
+ return "usageType: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a Category message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.billing.v1.Category
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.billing.v1.Category} Category
+ */
+ Category.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.billing.v1.Category)
+ return object;
+ var message = new $root.google.cloud.billing.v1.Category();
+ if (object.serviceDisplayName != null)
+ message.serviceDisplayName = String(object.serviceDisplayName);
+ if (object.resourceFamily != null)
+ message.resourceFamily = String(object.resourceFamily);
+ if (object.resourceGroup != null)
+ message.resourceGroup = String(object.resourceGroup);
+ if (object.usageType != null)
+ message.usageType = String(object.usageType);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a Category message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.billing.v1.Category
+ * @static
+ * @param {google.cloud.billing.v1.Category} message Category
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ Category.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.serviceDisplayName = "";
+ object.resourceFamily = "";
+ object.resourceGroup = "";
+ object.usageType = "";
+ }
+ if (message.serviceDisplayName != null && message.hasOwnProperty("serviceDisplayName"))
+ object.serviceDisplayName = message.serviceDisplayName;
+ if (message.resourceFamily != null && message.hasOwnProperty("resourceFamily"))
+ object.resourceFamily = message.resourceFamily;
+ if (message.resourceGroup != null && message.hasOwnProperty("resourceGroup"))
+ object.resourceGroup = message.resourceGroup;
+ if (message.usageType != null && message.hasOwnProperty("usageType"))
+ object.usageType = message.usageType;
+ return object;
+ };
+
+ /**
+ * Converts this Category to JSON.
+ * @function toJSON
+ * @memberof google.cloud.billing.v1.Category
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ Category.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for Category
+ * @function getTypeUrl
+ * @memberof google.cloud.billing.v1.Category
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ Category.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.billing.v1.Category";
+ };
+
+ return Category;
+ })();
+
+ v1.PricingInfo = (function() {
+
+ /**
+ * Properties of a PricingInfo.
+ * @memberof google.cloud.billing.v1
+ * @interface IPricingInfo
+ * @property {google.protobuf.ITimestamp|null} [effectiveTime] PricingInfo effectiveTime
+ * @property {string|null} [summary] PricingInfo summary
+ * @property {google.cloud.billing.v1.IPricingExpression|null} [pricingExpression] PricingInfo pricingExpression
+ * @property {google.cloud.billing.v1.IAggregationInfo|null} [aggregationInfo] PricingInfo aggregationInfo
+ * @property {number|null} [currencyConversionRate] PricingInfo currencyConversionRate
+ */
+
+ /**
+ * Constructs a new PricingInfo.
+ * @memberof google.cloud.billing.v1
+ * @classdesc Represents a PricingInfo.
+ * @implements IPricingInfo
+ * @constructor
+ * @param {google.cloud.billing.v1.IPricingInfo=} [properties] Properties to set
+ */
+ function PricingInfo(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * PricingInfo effectiveTime.
+ * @member {google.protobuf.ITimestamp|null|undefined} effectiveTime
+ * @memberof google.cloud.billing.v1.PricingInfo
+ * @instance
+ */
+ PricingInfo.prototype.effectiveTime = null;
+
+ /**
+ * PricingInfo summary.
+ * @member {string} summary
+ * @memberof google.cloud.billing.v1.PricingInfo
+ * @instance
+ */
+ PricingInfo.prototype.summary = "";
+
+ /**
+ * PricingInfo pricingExpression.
+ * @member {google.cloud.billing.v1.IPricingExpression|null|undefined} pricingExpression
+ * @memberof google.cloud.billing.v1.PricingInfo
+ * @instance
+ */
+ PricingInfo.prototype.pricingExpression = null;
+
+ /**
+ * PricingInfo aggregationInfo.
+ * @member {google.cloud.billing.v1.IAggregationInfo|null|undefined} aggregationInfo
+ * @memberof google.cloud.billing.v1.PricingInfo
+ * @instance
+ */
+ PricingInfo.prototype.aggregationInfo = null;
+
+ /**
+ * PricingInfo currencyConversionRate.
+ * @member {number} currencyConversionRate
+ * @memberof google.cloud.billing.v1.PricingInfo
+ * @instance
+ */
+ PricingInfo.prototype.currencyConversionRate = 0;
+
+ /**
+ * Creates a new PricingInfo instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.billing.v1.PricingInfo
+ * @static
+ * @param {google.cloud.billing.v1.IPricingInfo=} [properties] Properties to set
+ * @returns {google.cloud.billing.v1.PricingInfo} PricingInfo instance
+ */
+ PricingInfo.create = function create(properties) {
+ return new PricingInfo(properties);
+ };
+
+ /**
+ * Encodes the specified PricingInfo message. Does not implicitly {@link google.cloud.billing.v1.PricingInfo.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.billing.v1.PricingInfo
+ * @static
+ * @param {google.cloud.billing.v1.IPricingInfo} message PricingInfo message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ PricingInfo.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.effectiveTime != null && Object.hasOwnProperty.call(message, "effectiveTime"))
+ $root.google.protobuf.Timestamp.encode(message.effectiveTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.summary != null && Object.hasOwnProperty.call(message, "summary"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.summary);
+ if (message.pricingExpression != null && Object.hasOwnProperty.call(message, "pricingExpression"))
+ $root.google.cloud.billing.v1.PricingExpression.encode(message.pricingExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ if (message.aggregationInfo != null && Object.hasOwnProperty.call(message, "aggregationInfo"))
+ $root.google.cloud.billing.v1.AggregationInfo.encode(message.aggregationInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
+ if (message.currencyConversionRate != null && Object.hasOwnProperty.call(message, "currencyConversionRate"))
+ writer.uint32(/* id 5, wireType 1 =*/41).double(message.currencyConversionRate);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified PricingInfo message, length delimited. Does not implicitly {@link google.cloud.billing.v1.PricingInfo.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.billing.v1.PricingInfo
+ * @static
+ * @param {google.cloud.billing.v1.IPricingInfo} message PricingInfo message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ PricingInfo.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a PricingInfo message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.billing.v1.PricingInfo
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.billing.v1.PricingInfo} PricingInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ PricingInfo.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.billing.v1.PricingInfo();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.effectiveTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
+ break;
+ }
+ case 2: {
+ message.summary = reader.string();
+ break;
+ }
+ case 3: {
+ message.pricingExpression = $root.google.cloud.billing.v1.PricingExpression.decode(reader, reader.uint32());
+ break;
+ }
+ case 4: {
+ message.aggregationInfo = $root.google.cloud.billing.v1.AggregationInfo.decode(reader, reader.uint32());
+ break;
+ }
+ case 5: {
+ message.currencyConversionRate = reader.double();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a PricingInfo message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.billing.v1.PricingInfo
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.billing.v1.PricingInfo} PricingInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ PricingInfo.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a PricingInfo message.
+ * @function verify
+ * @memberof google.cloud.billing.v1.PricingInfo
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ PricingInfo.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.effectiveTime != null && message.hasOwnProperty("effectiveTime")) {
+ var error = $root.google.protobuf.Timestamp.verify(message.effectiveTime);
+ if (error)
+ return "effectiveTime." + error;
+ }
+ if (message.summary != null && message.hasOwnProperty("summary"))
+ if (!$util.isString(message.summary))
+ return "summary: string expected";
+ if (message.pricingExpression != null && message.hasOwnProperty("pricingExpression")) {
+ var error = $root.google.cloud.billing.v1.PricingExpression.verify(message.pricingExpression);
+ if (error)
+ return "pricingExpression." + error;
+ }
+ if (message.aggregationInfo != null && message.hasOwnProperty("aggregationInfo")) {
+ var error = $root.google.cloud.billing.v1.AggregationInfo.verify(message.aggregationInfo);
+ if (error)
+ return "aggregationInfo." + error;
+ }
+ if (message.currencyConversionRate != null && message.hasOwnProperty("currencyConversionRate"))
+ if (typeof message.currencyConversionRate !== "number")
+ return "currencyConversionRate: number expected";
+ return null;
+ };
+
+ /**
+ * Creates a PricingInfo message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.billing.v1.PricingInfo
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.billing.v1.PricingInfo} PricingInfo
+ */
+ PricingInfo.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.billing.v1.PricingInfo)
+ return object;
+ var message = new $root.google.cloud.billing.v1.PricingInfo();
+ if (object.effectiveTime != null) {
+ if (typeof object.effectiveTime !== "object")
+ throw TypeError(".google.cloud.billing.v1.PricingInfo.effectiveTime: object expected");
+ message.effectiveTime = $root.google.protobuf.Timestamp.fromObject(object.effectiveTime);
+ }
+ if (object.summary != null)
+ message.summary = String(object.summary);
+ if (object.pricingExpression != null) {
+ if (typeof object.pricingExpression !== "object")
+ throw TypeError(".google.cloud.billing.v1.PricingInfo.pricingExpression: object expected");
+ message.pricingExpression = $root.google.cloud.billing.v1.PricingExpression.fromObject(object.pricingExpression);
+ }
+ if (object.aggregationInfo != null) {
+ if (typeof object.aggregationInfo !== "object")
+ throw TypeError(".google.cloud.billing.v1.PricingInfo.aggregationInfo: object expected");
+ message.aggregationInfo = $root.google.cloud.billing.v1.AggregationInfo.fromObject(object.aggregationInfo);
+ }
+ if (object.currencyConversionRate != null)
+ message.currencyConversionRate = Number(object.currencyConversionRate);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a PricingInfo message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.billing.v1.PricingInfo
+ * @static
+ * @param {google.cloud.billing.v1.PricingInfo} message PricingInfo
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ PricingInfo.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.effectiveTime = null;
+ object.summary = "";
+ object.pricingExpression = null;
+ object.aggregationInfo = null;
+ object.currencyConversionRate = 0;
+ }
+ if (message.effectiveTime != null && message.hasOwnProperty("effectiveTime"))
+ object.effectiveTime = $root.google.protobuf.Timestamp.toObject(message.effectiveTime, options);
+ if (message.summary != null && message.hasOwnProperty("summary"))
+ object.summary = message.summary;
+ if (message.pricingExpression != null && message.hasOwnProperty("pricingExpression"))
+ object.pricingExpression = $root.google.cloud.billing.v1.PricingExpression.toObject(message.pricingExpression, options);
+ if (message.aggregationInfo != null && message.hasOwnProperty("aggregationInfo"))
+ object.aggregationInfo = $root.google.cloud.billing.v1.AggregationInfo.toObject(message.aggregationInfo, options);
+ if (message.currencyConversionRate != null && message.hasOwnProperty("currencyConversionRate"))
+ object.currencyConversionRate = options.json && !isFinite(message.currencyConversionRate) ? String(message.currencyConversionRate) : message.currencyConversionRate;
+ return object;
+ };
+
+ /**
+ * Converts this PricingInfo to JSON.
+ * @function toJSON
+ * @memberof google.cloud.billing.v1.PricingInfo
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ PricingInfo.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for PricingInfo
+ * @function getTypeUrl
+ * @memberof google.cloud.billing.v1.PricingInfo
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ PricingInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.billing.v1.PricingInfo";
+ };
+
+ return PricingInfo;
+ })();
+
+ v1.PricingExpression = (function() {
+
+ /**
+ * Properties of a PricingExpression.
+ * @memberof google.cloud.billing.v1
+ * @interface IPricingExpression
+ * @property {string|null} [usageUnit] PricingExpression usageUnit
+ * @property {string|null} [usageUnitDescription] PricingExpression usageUnitDescription
+ * @property {string|null} [baseUnit] PricingExpression baseUnit
+ * @property {string|null} [baseUnitDescription] PricingExpression baseUnitDescription
+ * @property {number|null} [baseUnitConversionFactor] PricingExpression baseUnitConversionFactor
+ * @property {number|null} [displayQuantity] PricingExpression displayQuantity
+ * @property {Array.|null} [tieredRates] PricingExpression tieredRates
+ */
+
+ /**
+ * Constructs a new PricingExpression.
+ * @memberof google.cloud.billing.v1
+ * @classdesc Represents a PricingExpression.
+ * @implements IPricingExpression
+ * @constructor
+ * @param {google.cloud.billing.v1.IPricingExpression=} [properties] Properties to set
+ */
+ function PricingExpression(properties) {
+ this.tieredRates = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * PricingExpression usageUnit.
+ * @member {string} usageUnit
+ * @memberof google.cloud.billing.v1.PricingExpression
+ * @instance
+ */
+ PricingExpression.prototype.usageUnit = "";
+
+ /**
+ * PricingExpression usageUnitDescription.
+ * @member {string} usageUnitDescription
+ * @memberof google.cloud.billing.v1.PricingExpression
+ * @instance
+ */
+ PricingExpression.prototype.usageUnitDescription = "";
+
+ /**
+ * PricingExpression baseUnit.
+ * @member {string} baseUnit
+ * @memberof google.cloud.billing.v1.PricingExpression
+ * @instance
+ */
+ PricingExpression.prototype.baseUnit = "";
+
+ /**
+ * PricingExpression baseUnitDescription.
+ * @member {string} baseUnitDescription
+ * @memberof google.cloud.billing.v1.PricingExpression
+ * @instance
+ */
+ PricingExpression.prototype.baseUnitDescription = "";
+
+ /**
+ * PricingExpression baseUnitConversionFactor.
+ * @member {number} baseUnitConversionFactor
+ * @memberof google.cloud.billing.v1.PricingExpression
+ * @instance
+ */
+ PricingExpression.prototype.baseUnitConversionFactor = 0;
+
+ /**
+ * PricingExpression displayQuantity.
+ * @member {number} displayQuantity
+ * @memberof google.cloud.billing.v1.PricingExpression
+ * @instance
+ */
+ PricingExpression.prototype.displayQuantity = 0;
+
+ /**
+ * PricingExpression tieredRates.
+ * @member {Array.} tieredRates
+ * @memberof google.cloud.billing.v1.PricingExpression
+ * @instance
+ */
+ PricingExpression.prototype.tieredRates = $util.emptyArray;
+
+ /**
+ * Creates a new PricingExpression instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.billing.v1.PricingExpression
+ * @static
+ * @param {google.cloud.billing.v1.IPricingExpression=} [properties] Properties to set
+ * @returns {google.cloud.billing.v1.PricingExpression} PricingExpression instance
+ */
+ PricingExpression.create = function create(properties) {
+ return new PricingExpression(properties);
+ };
+
+ /**
+ * Encodes the specified PricingExpression message. Does not implicitly {@link google.cloud.billing.v1.PricingExpression.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.billing.v1.PricingExpression
+ * @static
+ * @param {google.cloud.billing.v1.IPricingExpression} message PricingExpression message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ PricingExpression.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.usageUnit != null && Object.hasOwnProperty.call(message, "usageUnit"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.usageUnit);
+ if (message.displayQuantity != null && Object.hasOwnProperty.call(message, "displayQuantity"))
+ writer.uint32(/* id 2, wireType 1 =*/17).double(message.displayQuantity);
+ if (message.tieredRates != null && message.tieredRates.length)
+ for (var i = 0; i < message.tieredRates.length; ++i)
+ $root.google.cloud.billing.v1.PricingExpression.TierRate.encode(message.tieredRates[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ if (message.usageUnitDescription != null && Object.hasOwnProperty.call(message, "usageUnitDescription"))
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.usageUnitDescription);
+ if (message.baseUnit != null && Object.hasOwnProperty.call(message, "baseUnit"))
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.baseUnit);
+ if (message.baseUnitDescription != null && Object.hasOwnProperty.call(message, "baseUnitDescription"))
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.baseUnitDescription);
+ if (message.baseUnitConversionFactor != null && Object.hasOwnProperty.call(message, "baseUnitConversionFactor"))
+ writer.uint32(/* id 7, wireType 1 =*/57).double(message.baseUnitConversionFactor);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified PricingExpression message, length delimited. Does not implicitly {@link google.cloud.billing.v1.PricingExpression.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.billing.v1.PricingExpression
+ * @static
+ * @param {google.cloud.billing.v1.IPricingExpression} message PricingExpression message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ PricingExpression.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a PricingExpression message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.billing.v1.PricingExpression
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.billing.v1.PricingExpression} PricingExpression
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ PricingExpression.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.billing.v1.PricingExpression();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.usageUnit = reader.string();
+ break;
+ }
+ case 4: {
+ message.usageUnitDescription = reader.string();
+ break;
+ }
+ case 5: {
+ message.baseUnit = reader.string();
+ break;
+ }
+ case 6: {
+ message.baseUnitDescription = reader.string();
+ break;
+ }
+ case 7: {
+ message.baseUnitConversionFactor = reader.double();
+ break;
+ }
+ case 2: {
+ message.displayQuantity = reader.double();
+ break;
+ }
+ case 3: {
+ if (!(message.tieredRates && message.tieredRates.length))
+ message.tieredRates = [];
+ message.tieredRates.push($root.google.cloud.billing.v1.PricingExpression.TierRate.decode(reader, reader.uint32()));
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a PricingExpression message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.billing.v1.PricingExpression
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.billing.v1.PricingExpression} PricingExpression
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ PricingExpression.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a PricingExpression message.
+ * @function verify
+ * @memberof google.cloud.billing.v1.PricingExpression
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ PricingExpression.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.usageUnit != null && message.hasOwnProperty("usageUnit"))
+ if (!$util.isString(message.usageUnit))
+ return "usageUnit: string expected";
+ if (message.usageUnitDescription != null && message.hasOwnProperty("usageUnitDescription"))
+ if (!$util.isString(message.usageUnitDescription))
+ return "usageUnitDescription: string expected";
+ if (message.baseUnit != null && message.hasOwnProperty("baseUnit"))
+ if (!$util.isString(message.baseUnit))
+ return "baseUnit: string expected";
+ if (message.baseUnitDescription != null && message.hasOwnProperty("baseUnitDescription"))
+ if (!$util.isString(message.baseUnitDescription))
+ return "baseUnitDescription: string expected";
+ if (message.baseUnitConversionFactor != null && message.hasOwnProperty("baseUnitConversionFactor"))
+ if (typeof message.baseUnitConversionFactor !== "number")
+ return "baseUnitConversionFactor: number expected";
+ if (message.displayQuantity != null && message.hasOwnProperty("displayQuantity"))
+ if (typeof message.displayQuantity !== "number")
+ return "displayQuantity: number expected";
+ if (message.tieredRates != null && message.hasOwnProperty("tieredRates")) {
+ if (!Array.isArray(message.tieredRates))
+ return "tieredRates: array expected";
+ for (var i = 0; i < message.tieredRates.length; ++i) {
+ var error = $root.google.cloud.billing.v1.PricingExpression.TierRate.verify(message.tieredRates[i]);
+ if (error)
+ return "tieredRates." + error;
+ }
+ }
+ return null;
+ };
+
+ /**
+ * Creates a PricingExpression message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.billing.v1.PricingExpression
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.billing.v1.PricingExpression} PricingExpression
+ */
+ PricingExpression.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.billing.v1.PricingExpression)
+ return object;
+ var message = new $root.google.cloud.billing.v1.PricingExpression();
+ if (object.usageUnit != null)
+ message.usageUnit = String(object.usageUnit);
+ if (object.usageUnitDescription != null)
+ message.usageUnitDescription = String(object.usageUnitDescription);
+ if (object.baseUnit != null)
+ message.baseUnit = String(object.baseUnit);
+ if (object.baseUnitDescription != null)
+ message.baseUnitDescription = String(object.baseUnitDescription);
+ if (object.baseUnitConversionFactor != null)
+ message.baseUnitConversionFactor = Number(object.baseUnitConversionFactor);
+ if (object.displayQuantity != null)
+ message.displayQuantity = Number(object.displayQuantity);
+ if (object.tieredRates) {
+ if (!Array.isArray(object.tieredRates))
+ throw TypeError(".google.cloud.billing.v1.PricingExpression.tieredRates: array expected");
+ message.tieredRates = [];
+ for (var i = 0; i < object.tieredRates.length; ++i) {
+ if (typeof object.tieredRates[i] !== "object")
+ throw TypeError(".google.cloud.billing.v1.PricingExpression.tieredRates: object expected");
+ message.tieredRates[i] = $root.google.cloud.billing.v1.PricingExpression.TierRate.fromObject(object.tieredRates[i]);
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a PricingExpression message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.billing.v1.PricingExpression
+ * @static
+ * @param {google.cloud.billing.v1.PricingExpression} message PricingExpression
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ PricingExpression.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.tieredRates = [];
+ if (options.defaults) {
+ object.usageUnit = "";
+ object.displayQuantity = 0;
+ object.usageUnitDescription = "";
+ object.baseUnit = "";
+ object.baseUnitDescription = "";
+ object.baseUnitConversionFactor = 0;
+ }
+ if (message.usageUnit != null && message.hasOwnProperty("usageUnit"))
+ object.usageUnit = message.usageUnit;
+ if (message.displayQuantity != null && message.hasOwnProperty("displayQuantity"))
+ object.displayQuantity = options.json && !isFinite(message.displayQuantity) ? String(message.displayQuantity) : message.displayQuantity;
+ if (message.tieredRates && message.tieredRates.length) {
+ object.tieredRates = [];
+ for (var j = 0; j < message.tieredRates.length; ++j)
+ object.tieredRates[j] = $root.google.cloud.billing.v1.PricingExpression.TierRate.toObject(message.tieredRates[j], options);
+ }
+ if (message.usageUnitDescription != null && message.hasOwnProperty("usageUnitDescription"))
+ object.usageUnitDescription = message.usageUnitDescription;
+ if (message.baseUnit != null && message.hasOwnProperty("baseUnit"))
+ object.baseUnit = message.baseUnit;
+ if (message.baseUnitDescription != null && message.hasOwnProperty("baseUnitDescription"))
+ object.baseUnitDescription = message.baseUnitDescription;
+ if (message.baseUnitConversionFactor != null && message.hasOwnProperty("baseUnitConversionFactor"))
+ object.baseUnitConversionFactor = options.json && !isFinite(message.baseUnitConversionFactor) ? String(message.baseUnitConversionFactor) : message.baseUnitConversionFactor;
+ return object;
+ };
+
+ /**
+ * Converts this PricingExpression to JSON.
+ * @function toJSON
+ * @memberof google.cloud.billing.v1.PricingExpression
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ PricingExpression.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for PricingExpression
+ * @function getTypeUrl
+ * @memberof google.cloud.billing.v1.PricingExpression
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ PricingExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.billing.v1.PricingExpression";
+ };
+
+ PricingExpression.TierRate = (function() {
+
+ /**
+ * Properties of a TierRate.
+ * @memberof google.cloud.billing.v1.PricingExpression
+ * @interface ITierRate
+ * @property {number|null} [startUsageAmount] TierRate startUsageAmount
+ * @property {google.type.IMoney|null} [unitPrice] TierRate unitPrice
+ */
+
+ /**
+ * Constructs a new TierRate.
+ * @memberof google.cloud.billing.v1.PricingExpression
+ * @classdesc Represents a TierRate.
+ * @implements ITierRate
+ * @constructor
+ * @param {google.cloud.billing.v1.PricingExpression.ITierRate=} [properties] Properties to set
+ */
+ function TierRate(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * TierRate startUsageAmount.
+ * @member {number} startUsageAmount
+ * @memberof google.cloud.billing.v1.PricingExpression.TierRate
+ * @instance
+ */
+ TierRate.prototype.startUsageAmount = 0;
+
+ /**
+ * TierRate unitPrice.
+ * @member {google.type.IMoney|null|undefined} unitPrice
+ * @memberof google.cloud.billing.v1.PricingExpression.TierRate
+ * @instance
+ */
+ TierRate.prototype.unitPrice = null;
+
+ /**
+ * Creates a new TierRate instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.billing.v1.PricingExpression.TierRate
+ * @static
+ * @param {google.cloud.billing.v1.PricingExpression.ITierRate=} [properties] Properties to set
+ * @returns {google.cloud.billing.v1.PricingExpression.TierRate} TierRate instance
+ */
+ TierRate.create = function create(properties) {
+ return new TierRate(properties);
+ };
+
+ /**
+ * Encodes the specified TierRate message. Does not implicitly {@link google.cloud.billing.v1.PricingExpression.TierRate.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.billing.v1.PricingExpression.TierRate
+ * @static
+ * @param {google.cloud.billing.v1.PricingExpression.ITierRate} message TierRate message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ TierRate.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.startUsageAmount != null && Object.hasOwnProperty.call(message, "startUsageAmount"))
+ writer.uint32(/* id 1, wireType 1 =*/9).double(message.startUsageAmount);
+ if (message.unitPrice != null && Object.hasOwnProperty.call(message, "unitPrice"))
+ $root.google.type.Money.encode(message.unitPrice, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified TierRate message, length delimited. Does not implicitly {@link google.cloud.billing.v1.PricingExpression.TierRate.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.billing.v1.PricingExpression.TierRate
+ * @static
+ * @param {google.cloud.billing.v1.PricingExpression.ITierRate} message TierRate message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ TierRate.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a TierRate message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.billing.v1.PricingExpression.TierRate
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.billing.v1.PricingExpression.TierRate} TierRate
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ TierRate.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.billing.v1.PricingExpression.TierRate();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.startUsageAmount = reader.double();
+ break;
+ }
+ case 2: {
+ message.unitPrice = $root.google.type.Money.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a TierRate message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.billing.v1.PricingExpression.TierRate
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.billing.v1.PricingExpression.TierRate} TierRate
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ TierRate.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a TierRate message.
+ * @function verify
+ * @memberof google.cloud.billing.v1.PricingExpression.TierRate
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ TierRate.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.startUsageAmount != null && message.hasOwnProperty("startUsageAmount"))
+ if (typeof message.startUsageAmount !== "number")
+ return "startUsageAmount: number expected";
+ if (message.unitPrice != null && message.hasOwnProperty("unitPrice")) {
+ var error = $root.google.type.Money.verify(message.unitPrice);
+ if (error)
+ return "unitPrice." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a TierRate message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.billing.v1.PricingExpression.TierRate
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.billing.v1.PricingExpression.TierRate} TierRate
+ */
+ TierRate.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.billing.v1.PricingExpression.TierRate)
+ return object;
+ var message = new $root.google.cloud.billing.v1.PricingExpression.TierRate();
+ if (object.startUsageAmount != null)
+ message.startUsageAmount = Number(object.startUsageAmount);
+ if (object.unitPrice != null) {
+ if (typeof object.unitPrice !== "object")
+ throw TypeError(".google.cloud.billing.v1.PricingExpression.TierRate.unitPrice: object expected");
+ message.unitPrice = $root.google.type.Money.fromObject(object.unitPrice);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a TierRate message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.billing.v1.PricingExpression.TierRate
+ * @static
+ * @param {google.cloud.billing.v1.PricingExpression.TierRate} message TierRate
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ TierRate.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.startUsageAmount = 0;
+ object.unitPrice = null;
+ }
+ if (message.startUsageAmount != null && message.hasOwnProperty("startUsageAmount"))
+ object.startUsageAmount = options.json && !isFinite(message.startUsageAmount) ? String(message.startUsageAmount) : message.startUsageAmount;
+ if (message.unitPrice != null && message.hasOwnProperty("unitPrice"))
+ object.unitPrice = $root.google.type.Money.toObject(message.unitPrice, options);
+ return object;
+ };
+
+ /**
+ * Converts this TierRate to JSON.
+ * @function toJSON
+ * @memberof google.cloud.billing.v1.PricingExpression.TierRate
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ TierRate.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for TierRate
+ * @function getTypeUrl
+ * @memberof google.cloud.billing.v1.PricingExpression.TierRate
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ TierRate.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.billing.v1.PricingExpression.TierRate";
+ };
+
+ return TierRate;
+ })();
+
+ return PricingExpression;
+ })();
+
+ v1.AggregationInfo = (function() {
+
+ /**
+ * Properties of an AggregationInfo.
+ * @memberof google.cloud.billing.v1
+ * @interface IAggregationInfo
+ * @property {google.cloud.billing.v1.AggregationInfo.AggregationLevel|null} [aggregationLevel] AggregationInfo aggregationLevel
+ * @property {google.cloud.billing.v1.AggregationInfo.AggregationInterval|null} [aggregationInterval] AggregationInfo aggregationInterval
+ * @property {number|null} [aggregationCount] AggregationInfo aggregationCount
+ */
+
+ /**
+ * Constructs a new AggregationInfo.
+ * @memberof google.cloud.billing.v1
+ * @classdesc Represents an AggregationInfo.
+ * @implements IAggregationInfo
+ * @constructor
+ * @param {google.cloud.billing.v1.IAggregationInfo=} [properties] Properties to set
+ */
+ function AggregationInfo(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * AggregationInfo aggregationLevel.
+ * @member {google.cloud.billing.v1.AggregationInfo.AggregationLevel} aggregationLevel
+ * @memberof google.cloud.billing.v1.AggregationInfo
+ * @instance
+ */
+ AggregationInfo.prototype.aggregationLevel = 0;
+
+ /**
+ * AggregationInfo aggregationInterval.
+ * @member {google.cloud.billing.v1.AggregationInfo.AggregationInterval} aggregationInterval
+ * @memberof google.cloud.billing.v1.AggregationInfo
+ * @instance
+ */
+ AggregationInfo.prototype.aggregationInterval = 0;
+
+ /**
+ * AggregationInfo aggregationCount.
+ * @member {number} aggregationCount
+ * @memberof google.cloud.billing.v1.AggregationInfo
+ * @instance
+ */
+ AggregationInfo.prototype.aggregationCount = 0;
+
+ /**
+ * Creates a new AggregationInfo instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.billing.v1.AggregationInfo
+ * @static
+ * @param {google.cloud.billing.v1.IAggregationInfo=} [properties] Properties to set
+ * @returns {google.cloud.billing.v1.AggregationInfo} AggregationInfo instance
+ */
+ AggregationInfo.create = function create(properties) {
+ return new AggregationInfo(properties);
+ };
+
+ /**
+ * Encodes the specified AggregationInfo message. Does not implicitly {@link google.cloud.billing.v1.AggregationInfo.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.billing.v1.AggregationInfo
+ * @static
+ * @param {google.cloud.billing.v1.IAggregationInfo} message AggregationInfo message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ AggregationInfo.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.aggregationLevel != null && Object.hasOwnProperty.call(message, "aggregationLevel"))
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.aggregationLevel);
+ if (message.aggregationInterval != null && Object.hasOwnProperty.call(message, "aggregationInterval"))
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.aggregationInterval);
+ if (message.aggregationCount != null && Object.hasOwnProperty.call(message, "aggregationCount"))
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.aggregationCount);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified AggregationInfo message, length delimited. Does not implicitly {@link google.cloud.billing.v1.AggregationInfo.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.billing.v1.AggregationInfo
+ * @static
+ * @param {google.cloud.billing.v1.IAggregationInfo} message AggregationInfo message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ AggregationInfo.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an AggregationInfo message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.billing.v1.AggregationInfo
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.billing.v1.AggregationInfo} AggregationInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ AggregationInfo.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.billing.v1.AggregationInfo();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.aggregationLevel = reader.int32();
+ break;
+ }
+ case 2: {
+ message.aggregationInterval = reader.int32();
+ break;
+ }
+ case 3: {
+ message.aggregationCount = reader.int32();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an AggregationInfo message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.billing.v1.AggregationInfo
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.billing.v1.AggregationInfo} AggregationInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ AggregationInfo.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an AggregationInfo message.
+ * @function verify
+ * @memberof google.cloud.billing.v1.AggregationInfo
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ AggregationInfo.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.aggregationLevel != null && message.hasOwnProperty("aggregationLevel"))
+ switch (message.aggregationLevel) {
+ default:
+ return "aggregationLevel: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ break;
+ }
+ if (message.aggregationInterval != null && message.hasOwnProperty("aggregationInterval"))
+ switch (message.aggregationInterval) {
+ default:
+ return "aggregationInterval: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ break;
+ }
+ if (message.aggregationCount != null && message.hasOwnProperty("aggregationCount"))
+ if (!$util.isInteger(message.aggregationCount))
+ return "aggregationCount: integer expected";
+ return null;
+ };
+
+ /**
+ * Creates an AggregationInfo message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.billing.v1.AggregationInfo
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.billing.v1.AggregationInfo} AggregationInfo
+ */
+ AggregationInfo.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.billing.v1.AggregationInfo)
+ return object;
+ var message = new $root.google.cloud.billing.v1.AggregationInfo();
+ switch (object.aggregationLevel) {
+ default:
+ if (typeof object.aggregationLevel === "number") {
+ message.aggregationLevel = object.aggregationLevel;
+ break;
+ }
+ break;
+ case "AGGREGATION_LEVEL_UNSPECIFIED":
+ case 0:
+ message.aggregationLevel = 0;
+ break;
+ case "ACCOUNT":
+ case 1:
+ message.aggregationLevel = 1;
+ break;
+ case "PROJECT":
+ case 2:
+ message.aggregationLevel = 2;
+ break;
+ }
+ switch (object.aggregationInterval) {
+ default:
+ if (typeof object.aggregationInterval === "number") {
+ message.aggregationInterval = object.aggregationInterval;
+ break;
+ }
+ break;
+ case "AGGREGATION_INTERVAL_UNSPECIFIED":
+ case 0:
+ message.aggregationInterval = 0;
+ break;
+ case "DAILY":
+ case 1:
+ message.aggregationInterval = 1;
+ break;
+ case "MONTHLY":
+ case 2:
+ message.aggregationInterval = 2;
+ break;
+ }
+ if (object.aggregationCount != null)
+ message.aggregationCount = object.aggregationCount | 0;
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an AggregationInfo message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.billing.v1.AggregationInfo
+ * @static
+ * @param {google.cloud.billing.v1.AggregationInfo} message AggregationInfo
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ AggregationInfo.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.aggregationLevel = options.enums === String ? "AGGREGATION_LEVEL_UNSPECIFIED" : 0;
+ object.aggregationInterval = options.enums === String ? "AGGREGATION_INTERVAL_UNSPECIFIED" : 0;
+ object.aggregationCount = 0;
+ }
+ if (message.aggregationLevel != null && message.hasOwnProperty("aggregationLevel"))
+ object.aggregationLevel = options.enums === String ? $root.google.cloud.billing.v1.AggregationInfo.AggregationLevel[message.aggregationLevel] === undefined ? message.aggregationLevel : $root.google.cloud.billing.v1.AggregationInfo.AggregationLevel[message.aggregationLevel] : message.aggregationLevel;
+ if (message.aggregationInterval != null && message.hasOwnProperty("aggregationInterval"))
+ object.aggregationInterval = options.enums === String ? $root.google.cloud.billing.v1.AggregationInfo.AggregationInterval[message.aggregationInterval] === undefined ? message.aggregationInterval : $root.google.cloud.billing.v1.AggregationInfo.AggregationInterval[message.aggregationInterval] : message.aggregationInterval;
+ if (message.aggregationCount != null && message.hasOwnProperty("aggregationCount"))
+ object.aggregationCount = message.aggregationCount;
+ return object;
+ };
+
+ /**
+ * Converts this AggregationInfo to JSON.
+ * @function toJSON
+ * @memberof google.cloud.billing.v1.AggregationInfo
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ AggregationInfo.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for AggregationInfo
+ * @function getTypeUrl
+ * @memberof google.cloud.billing.v1.AggregationInfo
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ AggregationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.billing.v1.AggregationInfo";
+ };
+
+ /**
+ * AggregationLevel enum.
+ * @name google.cloud.billing.v1.AggregationInfo.AggregationLevel
+ * @enum {number}
+ * @property {number} AGGREGATION_LEVEL_UNSPECIFIED=0 AGGREGATION_LEVEL_UNSPECIFIED value
+ * @property {number} ACCOUNT=1 ACCOUNT value
+ * @property {number} PROJECT=2 PROJECT value
+ */
+ AggregationInfo.AggregationLevel = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "AGGREGATION_LEVEL_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "ACCOUNT"] = 1;
+ values[valuesById[2] = "PROJECT"] = 2;
+ return values;
+ })();
+
+ /**
+ * AggregationInterval enum.
+ * @name google.cloud.billing.v1.AggregationInfo.AggregationInterval
+ * @enum {number}
+ * @property {number} AGGREGATION_INTERVAL_UNSPECIFIED=0 AGGREGATION_INTERVAL_UNSPECIFIED value
+ * @property {number} DAILY=1 DAILY value
+ * @property {number} MONTHLY=2 MONTHLY value
+ */
+ AggregationInfo.AggregationInterval = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "AGGREGATION_INTERVAL_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "DAILY"] = 1;
+ values[valuesById[2] = "MONTHLY"] = 2;
+ return values;
+ })();
+
+ return AggregationInfo;
+ })();
+
+ v1.ListServicesRequest = (function() {
+
+ /**
+ * Properties of a ListServicesRequest.
+ * @memberof google.cloud.billing.v1
+ * @interface IListServicesRequest
+ * @property {number|null} [pageSize] ListServicesRequest pageSize
+ * @property {string|null} [pageToken] ListServicesRequest pageToken
+ */
+
+ /**
+ * Constructs a new ListServicesRequest.
+ * @memberof google.cloud.billing.v1
+ * @classdesc Represents a ListServicesRequest.
+ * @implements IListServicesRequest
+ * @constructor
+ * @param {google.cloud.billing.v1.IListServicesRequest=} [properties] Properties to set
+ */
+ function ListServicesRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ListServicesRequest pageSize.
+ * @member {number} pageSize
+ * @memberof google.cloud.billing.v1.ListServicesRequest
+ * @instance
+ */
+ ListServicesRequest.prototype.pageSize = 0;
+
+ /**
+ * ListServicesRequest pageToken.
+ * @member {string} pageToken
+ * @memberof google.cloud.billing.v1.ListServicesRequest
+ * @instance
+ */
+ ListServicesRequest.prototype.pageToken = "";
+
+ /**
+ * Creates a new ListServicesRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.billing.v1.ListServicesRequest
+ * @static
+ * @param {google.cloud.billing.v1.IListServicesRequest=} [properties] Properties to set
+ * @returns {google.cloud.billing.v1.ListServicesRequest} ListServicesRequest instance
+ */
+ ListServicesRequest.create = function create(properties) {
+ return new ListServicesRequest(properties);
+ };
+
+ /**
+ * Encodes the specified ListServicesRequest message. Does not implicitly {@link google.cloud.billing.v1.ListServicesRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.billing.v1.ListServicesRequest
+ * @static
+ * @param {google.cloud.billing.v1.IListServicesRequest} message ListServicesRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListServicesRequest.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.pageSize);
+ if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ListServicesRequest message, length delimited. Does not implicitly {@link google.cloud.billing.v1.ListServicesRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.billing.v1.ListServicesRequest
+ * @static
+ * @param {google.cloud.billing.v1.IListServicesRequest} message ListServicesRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListServicesRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ListServicesRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.billing.v1.ListServicesRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.billing.v1.ListServicesRequest} ListServicesRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListServicesRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.billing.v1.ListServicesRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.pageSize = reader.int32();
+ break;
+ }
+ case 2: {
+ message.pageToken = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ListServicesRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.billing.v1.ListServicesRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.billing.v1.ListServicesRequest} ListServicesRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListServicesRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ListServicesRequest message.
+ * @function verify
+ * @memberof google.cloud.billing.v1.ListServicesRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ListServicesRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.pageSize != null && message.hasOwnProperty("pageSize"))
+ if (!$util.isInteger(message.pageSize))
+ return "pageSize: integer expected";
+ if (message.pageToken != null && message.hasOwnProperty("pageToken"))
+ if (!$util.isString(message.pageToken))
+ return "pageToken: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a ListServicesRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.billing.v1.ListServicesRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.billing.v1.ListServicesRequest} ListServicesRequest
+ */
+ ListServicesRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.billing.v1.ListServicesRequest)
+ return object;
+ var message = new $root.google.cloud.billing.v1.ListServicesRequest();
+ if (object.pageSize != null)
+ message.pageSize = object.pageSize | 0;
+ if (object.pageToken != null)
+ message.pageToken = String(object.pageToken);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ListServicesRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.billing.v1.ListServicesRequest
+ * @static
+ * @param {google.cloud.billing.v1.ListServicesRequest} message ListServicesRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ListServicesRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.pageSize = 0;
+ object.pageToken = "";
+ }
+ if (message.pageSize != null && message.hasOwnProperty("pageSize"))
+ object.pageSize = message.pageSize;
+ if (message.pageToken != null && message.hasOwnProperty("pageToken"))
+ object.pageToken = message.pageToken;
+ return object;
+ };
+
+ /**
+ * Converts this ListServicesRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.billing.v1.ListServicesRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ListServicesRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ListServicesRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.billing.v1.ListServicesRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ListServicesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.billing.v1.ListServicesRequest";
+ };
+
+ return ListServicesRequest;
+ })();
+
+ v1.ListServicesResponse = (function() {
+
+ /**
+ * Properties of a ListServicesResponse.
+ * @memberof google.cloud.billing.v1
+ * @interface IListServicesResponse
+ * @property {Array.|null} [services] ListServicesResponse services
+ * @property {string|null} [nextPageToken] ListServicesResponse nextPageToken
+ */
+
+ /**
+ * Constructs a new ListServicesResponse.
+ * @memberof google.cloud.billing.v1
+ * @classdesc Represents a ListServicesResponse.
+ * @implements IListServicesResponse
+ * @constructor
+ * @param {google.cloud.billing.v1.IListServicesResponse=} [properties] Properties to set
+ */
+ function ListServicesResponse(properties) {
+ this.services = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ListServicesResponse services.
+ * @member {Array.} services
+ * @memberof google.cloud.billing.v1.ListServicesResponse
+ * @instance
+ */
+ ListServicesResponse.prototype.services = $util.emptyArray;
+
+ /**
+ * ListServicesResponse nextPageToken.
+ * @member {string} nextPageToken
+ * @memberof google.cloud.billing.v1.ListServicesResponse
+ * @instance
+ */
+ ListServicesResponse.prototype.nextPageToken = "";
+
+ /**
+ * Creates a new ListServicesResponse instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.billing.v1.ListServicesResponse
+ * @static
+ * @param {google.cloud.billing.v1.IListServicesResponse=} [properties] Properties to set
+ * @returns {google.cloud.billing.v1.ListServicesResponse} ListServicesResponse instance
+ */
+ ListServicesResponse.create = function create(properties) {
+ return new ListServicesResponse(properties);
+ };
+
+ /**
+ * Encodes the specified ListServicesResponse message. Does not implicitly {@link google.cloud.billing.v1.ListServicesResponse.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.billing.v1.ListServicesResponse
+ * @static
+ * @param {google.cloud.billing.v1.IListServicesResponse} message ListServicesResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListServicesResponse.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.services != null && message.services.length)
+ for (var i = 0; i < message.services.length; ++i)
+ $root.google.cloud.billing.v1.Service.encode(message.services[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ListServicesResponse message, length delimited. Does not implicitly {@link google.cloud.billing.v1.ListServicesResponse.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.billing.v1.ListServicesResponse
+ * @static
+ * @param {google.cloud.billing.v1.IListServicesResponse} message ListServicesResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListServicesResponse.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ListServicesResponse message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.billing.v1.ListServicesResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.billing.v1.ListServicesResponse} ListServicesResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListServicesResponse.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.billing.v1.ListServicesResponse();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.services && message.services.length))
+ message.services = [];
+ message.services.push($root.google.cloud.billing.v1.Service.decode(reader, reader.uint32()));
+ break;
+ }
+ case 2: {
+ message.nextPageToken = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ListServicesResponse message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.billing.v1.ListServicesResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.billing.v1.ListServicesResponse} ListServicesResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListServicesResponse.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ListServicesResponse message.
+ * @function verify
+ * @memberof google.cloud.billing.v1.ListServicesResponse
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ListServicesResponse.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.services != null && message.hasOwnProperty("services")) {
+ if (!Array.isArray(message.services))
+ return "services: array expected";
+ for (var i = 0; i < message.services.length; ++i) {
+ var error = $root.google.cloud.billing.v1.Service.verify(message.services[i]);
+ if (error)
+ return "services." + error;
+ }
+ }
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
+ if (!$util.isString(message.nextPageToken))
+ return "nextPageToken: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a ListServicesResponse message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.billing.v1.ListServicesResponse
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.billing.v1.ListServicesResponse} ListServicesResponse
+ */
+ ListServicesResponse.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.billing.v1.ListServicesResponse)
+ return object;
+ var message = new $root.google.cloud.billing.v1.ListServicesResponse();
+ if (object.services) {
+ if (!Array.isArray(object.services))
+ throw TypeError(".google.cloud.billing.v1.ListServicesResponse.services: array expected");
+ message.services = [];
+ for (var i = 0; i < object.services.length; ++i) {
+ if (typeof object.services[i] !== "object")
+ throw TypeError(".google.cloud.billing.v1.ListServicesResponse.services: object expected");
+ message.services[i] = $root.google.cloud.billing.v1.Service.fromObject(object.services[i]);
+ }
+ }
+ if (object.nextPageToken != null)
+ message.nextPageToken = String(object.nextPageToken);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ListServicesResponse message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.billing.v1.ListServicesResponse
+ * @static
+ * @param {google.cloud.billing.v1.ListServicesResponse} message ListServicesResponse
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ListServicesResponse.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.services = [];
+ if (options.defaults)
+ object.nextPageToken = "";
+ if (message.services && message.services.length) {
+ object.services = [];
+ for (var j = 0; j < message.services.length; ++j)
+ object.services[j] = $root.google.cloud.billing.v1.Service.toObject(message.services[j], options);
+ }
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
+ object.nextPageToken = message.nextPageToken;
+ return object;
+ };
+
+ /**
+ * Converts this ListServicesResponse to JSON.
+ * @function toJSON
+ * @memberof google.cloud.billing.v1.ListServicesResponse
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ListServicesResponse.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ListServicesResponse
+ * @function getTypeUrl
+ * @memberof google.cloud.billing.v1.ListServicesResponse
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ListServicesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.billing.v1.ListServicesResponse";
+ };
+
+ return ListServicesResponse;
+ })();
+
+ v1.ListSkusRequest = (function() {
+
+ /**
+ * Properties of a ListSkusRequest.
+ * @memberof google.cloud.billing.v1
+ * @interface IListSkusRequest
+ * @property {string|null} [parent] ListSkusRequest parent
+ * @property {google.protobuf.ITimestamp|null} [startTime] ListSkusRequest startTime
+ * @property {google.protobuf.ITimestamp|null} [endTime] ListSkusRequest endTime
+ * @property {string|null} [currencyCode] ListSkusRequest currencyCode
+ * @property {number|null} [pageSize] ListSkusRequest pageSize
+ * @property {string|null} [pageToken] ListSkusRequest pageToken
+ */
+
+ /**
+ * Constructs a new ListSkusRequest.
+ * @memberof google.cloud.billing.v1
+ * @classdesc Represents a ListSkusRequest.
+ * @implements IListSkusRequest
+ * @constructor
+ * @param {google.cloud.billing.v1.IListSkusRequest=} [properties] Properties to set
+ */
+ function ListSkusRequest(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ListSkusRequest parent.
+ * @member {string} parent
+ * @memberof google.cloud.billing.v1.ListSkusRequest
+ * @instance
+ */
+ ListSkusRequest.prototype.parent = "";
+
+ /**
+ * ListSkusRequest startTime.
+ * @member {google.protobuf.ITimestamp|null|undefined} startTime
+ * @memberof google.cloud.billing.v1.ListSkusRequest
+ * @instance
+ */
+ ListSkusRequest.prototype.startTime = null;
+
+ /**
+ * ListSkusRequest endTime.
+ * @member {google.protobuf.ITimestamp|null|undefined} endTime
+ * @memberof google.cloud.billing.v1.ListSkusRequest
+ * @instance
+ */
+ ListSkusRequest.prototype.endTime = null;
+
+ /**
+ * ListSkusRequest currencyCode.
+ * @member {string} currencyCode
+ * @memberof google.cloud.billing.v1.ListSkusRequest
+ * @instance
+ */
+ ListSkusRequest.prototype.currencyCode = "";
+
+ /**
+ * ListSkusRequest pageSize.
+ * @member {number} pageSize
+ * @memberof google.cloud.billing.v1.ListSkusRequest
+ * @instance
+ */
+ ListSkusRequest.prototype.pageSize = 0;
+
+ /**
+ * ListSkusRequest pageToken.
+ * @member {string} pageToken
+ * @memberof google.cloud.billing.v1.ListSkusRequest
+ * @instance
+ */
+ ListSkusRequest.prototype.pageToken = "";
+
+ /**
+ * Creates a new ListSkusRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.billing.v1.ListSkusRequest
+ * @static
+ * @param {google.cloud.billing.v1.IListSkusRequest=} [properties] Properties to set
+ * @returns {google.cloud.billing.v1.ListSkusRequest} ListSkusRequest instance
+ */
+ ListSkusRequest.create = function create(properties) {
+ return new ListSkusRequest(properties);
+ };
+
+ /**
+ * Encodes the specified ListSkusRequest message. Does not implicitly {@link google.cloud.billing.v1.ListSkusRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.billing.v1.ListSkusRequest
+ * @static
+ * @param {google.cloud.billing.v1.IListSkusRequest} message ListSkusRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListSkusRequest.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
+ if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime"))
+ $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime"))
+ $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode"))
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.currencyCode);
+ if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
+ writer.uint32(/* id 5, wireType 0 =*/40).int32(message.pageSize);
+ if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken"))
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.pageToken);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ListSkusRequest message, length delimited. Does not implicitly {@link google.cloud.billing.v1.ListSkusRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.billing.v1.ListSkusRequest
+ * @static
+ * @param {google.cloud.billing.v1.IListSkusRequest} message ListSkusRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListSkusRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ListSkusRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.billing.v1.ListSkusRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.billing.v1.ListSkusRequest} ListSkusRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListSkusRequest.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.billing.v1.ListSkusRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.parent = reader.string();
+ break;
+ }
+ case 2: {
+ message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
+ break;
+ }
+ case 3: {
+ message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
+ break;
+ }
+ case 4: {
+ message.currencyCode = reader.string();
+ break;
+ }
+ case 5: {
+ message.pageSize = reader.int32();
+ break;
+ }
+ case 6: {
+ message.pageToken = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ListSkusRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.billing.v1.ListSkusRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.billing.v1.ListSkusRequest} ListSkusRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListSkusRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ListSkusRequest message.
+ * @function verify
+ * @memberof google.cloud.billing.v1.ListSkusRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ListSkusRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ if (!$util.isString(message.parent))
+ return "parent: string expected";
+ if (message.startTime != null && message.hasOwnProperty("startTime")) {
+ var error = $root.google.protobuf.Timestamp.verify(message.startTime);
+ if (error)
+ return "startTime." + error;
+ }
+ if (message.endTime != null && message.hasOwnProperty("endTime")) {
+ var error = $root.google.protobuf.Timestamp.verify(message.endTime);
+ if (error)
+ return "endTime." + error;
+ }
+ if (message.currencyCode != null && message.hasOwnProperty("currencyCode"))
+ if (!$util.isString(message.currencyCode))
+ return "currencyCode: string expected";
+ if (message.pageSize != null && message.hasOwnProperty("pageSize"))
+ if (!$util.isInteger(message.pageSize))
+ return "pageSize: integer expected";
+ if (message.pageToken != null && message.hasOwnProperty("pageToken"))
+ if (!$util.isString(message.pageToken))
+ return "pageToken: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a ListSkusRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.billing.v1.ListSkusRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.billing.v1.ListSkusRequest} ListSkusRequest
+ */
+ ListSkusRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.billing.v1.ListSkusRequest)
+ return object;
+ var message = new $root.google.cloud.billing.v1.ListSkusRequest();
+ if (object.parent != null)
+ message.parent = String(object.parent);
+ if (object.startTime != null) {
+ if (typeof object.startTime !== "object")
+ throw TypeError(".google.cloud.billing.v1.ListSkusRequest.startTime: object expected");
+ message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime);
+ }
+ if (object.endTime != null) {
+ if (typeof object.endTime !== "object")
+ throw TypeError(".google.cloud.billing.v1.ListSkusRequest.endTime: object expected");
+ message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime);
+ }
+ if (object.currencyCode != null)
+ message.currencyCode = String(object.currencyCode);
+ if (object.pageSize != null)
+ message.pageSize = object.pageSize | 0;
+ if (object.pageToken != null)
+ message.pageToken = String(object.pageToken);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ListSkusRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.billing.v1.ListSkusRequest
+ * @static
+ * @param {google.cloud.billing.v1.ListSkusRequest} message ListSkusRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ListSkusRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.parent = "";
+ object.startTime = null;
+ object.endTime = null;
+ object.currencyCode = "";
+ object.pageSize = 0;
+ object.pageToken = "";
+ }
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ object.parent = message.parent;
+ if (message.startTime != null && message.hasOwnProperty("startTime"))
+ object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options);
+ if (message.endTime != null && message.hasOwnProperty("endTime"))
+ object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options);
+ if (message.currencyCode != null && message.hasOwnProperty("currencyCode"))
+ object.currencyCode = message.currencyCode;
+ if (message.pageSize != null && message.hasOwnProperty("pageSize"))
+ object.pageSize = message.pageSize;
+ if (message.pageToken != null && message.hasOwnProperty("pageToken"))
+ object.pageToken = message.pageToken;
+ return object;
+ };
+
+ /**
+ * Converts this ListSkusRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.billing.v1.ListSkusRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ListSkusRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ListSkusRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.billing.v1.ListSkusRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ListSkusRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.billing.v1.ListSkusRequest";
+ };
+
+ return ListSkusRequest;
+ })();
+
+ v1.ListSkusResponse = (function() {
+
+ /**
+ * Properties of a ListSkusResponse.
+ * @memberof google.cloud.billing.v1
+ * @interface IListSkusResponse
+ * @property {Array.|null} [skus] ListSkusResponse skus
+ * @property {string|null} [nextPageToken] ListSkusResponse nextPageToken
+ */
+
+ /**
+ * Constructs a new ListSkusResponse.
+ * @memberof google.cloud.billing.v1
+ * @classdesc Represents a ListSkusResponse.
+ * @implements IListSkusResponse
+ * @constructor
+ * @param {google.cloud.billing.v1.IListSkusResponse=} [properties] Properties to set
+ */
+ function ListSkusResponse(properties) {
+ this.skus = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ListSkusResponse skus.
+ * @member {Array.} skus
+ * @memberof google.cloud.billing.v1.ListSkusResponse
+ * @instance
+ */
+ ListSkusResponse.prototype.skus = $util.emptyArray;
+
+ /**
+ * ListSkusResponse nextPageToken.
+ * @member {string} nextPageToken
+ * @memberof google.cloud.billing.v1.ListSkusResponse
+ * @instance
+ */
+ ListSkusResponse.prototype.nextPageToken = "";
+
+ /**
+ * Creates a new ListSkusResponse instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.billing.v1.ListSkusResponse
+ * @static
+ * @param {google.cloud.billing.v1.IListSkusResponse=} [properties] Properties to set
+ * @returns {google.cloud.billing.v1.ListSkusResponse} ListSkusResponse instance
+ */
+ ListSkusResponse.create = function create(properties) {
+ return new ListSkusResponse(properties);
+ };
+
+ /**
+ * Encodes the specified ListSkusResponse message. Does not implicitly {@link google.cloud.billing.v1.ListSkusResponse.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.billing.v1.ListSkusResponse
+ * @static
+ * @param {google.cloud.billing.v1.IListSkusResponse} message ListSkusResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListSkusResponse.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.skus != null && message.skus.length)
+ for (var i = 0; i < message.skus.length; ++i)
+ $root.google.cloud.billing.v1.Sku.encode(message.skus[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ListSkusResponse message, length delimited. Does not implicitly {@link google.cloud.billing.v1.ListSkusResponse.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.billing.v1.ListSkusResponse
+ * @static
+ * @param {google.cloud.billing.v1.IListSkusResponse} message ListSkusResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListSkusResponse.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ListSkusResponse message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.billing.v1.ListSkusResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.billing.v1.ListSkusResponse} ListSkusResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListSkusResponse.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.billing.v1.ListSkusResponse();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.skus && message.skus.length))
+ message.skus = [];
+ message.skus.push($root.google.cloud.billing.v1.Sku.decode(reader, reader.uint32()));
+ break;
+ }
+ case 2: {
+ message.nextPageToken = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ListSkusResponse message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.billing.v1.ListSkusResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.billing.v1.ListSkusResponse} ListSkusResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListSkusResponse.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ListSkusResponse message.
+ * @function verify
+ * @memberof google.cloud.billing.v1.ListSkusResponse
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ListSkusResponse.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.skus != null && message.hasOwnProperty("skus")) {
+ if (!Array.isArray(message.skus))
+ return "skus: array expected";
+ for (var i = 0; i < message.skus.length; ++i) {
+ var error = $root.google.cloud.billing.v1.Sku.verify(message.skus[i]);
+ if (error)
+ return "skus." + error;
+ }
+ }
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
+ if (!$util.isString(message.nextPageToken))
+ return "nextPageToken: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a ListSkusResponse message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.billing.v1.ListSkusResponse
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.billing.v1.ListSkusResponse} ListSkusResponse
+ */
+ ListSkusResponse.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.billing.v1.ListSkusResponse)
+ return object;
+ var message = new $root.google.cloud.billing.v1.ListSkusResponse();
+ if (object.skus) {
+ if (!Array.isArray(object.skus))
+ throw TypeError(".google.cloud.billing.v1.ListSkusResponse.skus: array expected");
+ message.skus = [];
+ for (var i = 0; i < object.skus.length; ++i) {
+ if (typeof object.skus[i] !== "object")
+ throw TypeError(".google.cloud.billing.v1.ListSkusResponse.skus: object expected");
+ message.skus[i] = $root.google.cloud.billing.v1.Sku.fromObject(object.skus[i]);
+ }
+ }
+ if (object.nextPageToken != null)
+ message.nextPageToken = String(object.nextPageToken);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ListSkusResponse message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.billing.v1.ListSkusResponse
+ * @static
+ * @param {google.cloud.billing.v1.ListSkusResponse} message ListSkusResponse
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ListSkusResponse.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.skus = [];
+ if (options.defaults)
+ object.nextPageToken = "";
+ if (message.skus && message.skus.length) {
+ object.skus = [];
+ for (var j = 0; j < message.skus.length; ++j)
+ object.skus[j] = $root.google.cloud.billing.v1.Sku.toObject(message.skus[j], options);
+ }
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
+ object.nextPageToken = message.nextPageToken;
+ return object;
+ };
+
+ /**
+ * Converts this ListSkusResponse to JSON.
+ * @function toJSON
+ * @memberof google.cloud.billing.v1.ListSkusResponse
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ListSkusResponse.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ListSkusResponse
+ * @function getTypeUrl
+ * @memberof google.cloud.billing.v1.ListSkusResponse
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ListSkusResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.billing.v1.ListSkusResponse";
+ };
+
+ return ListSkusResponse;
+ })();
+
+ return v1;
+ })();
+
+ return billing;
+ })();
+
+ return cloud;
+ })();
+
+ google.api = (function() {
+
+ /**
+ * Namespace api.
+ * @memberof google
+ * @namespace
+ */
+ var api = {};
+
+ api.Http = (function() {
+
+ /**
+ * Properties of a Http.
+ * @memberof google.api
+ * @interface IHttp
+ * @property {Array.|null} [rules] Http rules
+ * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion
+ */
+
+ /**
+ * Constructs a new Http.
+ * @memberof google.api
+ * @classdesc Represents a Http.
+ * @implements IHttp
+ * @constructor
+ * @param {google.api.IHttp=} [properties] Properties to set
+ */
+ function Http(properties) {
+ this.rules = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * Http rules.
+ * @member {Array.} rules
+ * @memberof google.api.Http
+ * @instance
+ */
+ Http.prototype.rules = $util.emptyArray;
+
+ /**
+ * Http fullyDecodeReservedExpansion.
+ * @member {boolean} fullyDecodeReservedExpansion
+ * @memberof google.api.Http
+ * @instance
+ */
+ Http.prototype.fullyDecodeReservedExpansion = false;
+
+ /**
+ * Creates a new Http instance using the specified properties.
+ * @function create
+ * @memberof google.api.Http
+ * @static
+ * @param {google.api.IHttp=} [properties] Properties to set
+ * @returns {google.api.Http} Http instance
+ */
+ Http.create = function create(properties) {
+ return new Http(properties);
+ };
+
+ /**
+ * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages.
+ * @function encode
+ * @memberof google.api.Http
+ * @static
+ * @param {google.api.IHttp} message Http message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Http.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.rules != null && message.rules.length)
+ for (var i = 0; i < message.rules.length; ++i)
+ $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion"))
+ writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.api.Http
+ * @static
+ * @param {google.api.IHttp} message Http message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Http.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a Http message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.api.Http
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.api.Http} Http
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Http.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.rules && message.rules.length))
+ message.rules = [];
+ message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32()));
+ break;
+ }
+ case 2: {
+ message.fullyDecodeReservedExpansion = reader.bool();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a Http message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.api.Http
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.api.Http} Http
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Http.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a Http message.
+ * @function verify
+ * @memberof google.api.Http
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ Http.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.rules != null && message.hasOwnProperty("rules")) {
+ if (!Array.isArray(message.rules))
+ return "rules: array expected";
+ for (var i = 0; i < message.rules.length; ++i) {
+ var error = $root.google.api.HttpRule.verify(message.rules[i]);
+ if (error)
+ return "rules." + error;
+ }
+ }
+ if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion"))
+ if (typeof message.fullyDecodeReservedExpansion !== "boolean")
+ return "fullyDecodeReservedExpansion: boolean expected";
+ return null;
+ };
+
+ /**
+ * Creates a Http message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.api.Http
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.api.Http} Http
+ */
+ Http.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.api.Http)
+ return object;
+ var message = new $root.google.api.Http();
+ if (object.rules) {
+ if (!Array.isArray(object.rules))
+ throw TypeError(".google.api.Http.rules: array expected");
+ message.rules = [];
+ for (var i = 0; i < object.rules.length; ++i) {
+ if (typeof object.rules[i] !== "object")
+ throw TypeError(".google.api.Http.rules: object expected");
+ message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]);
+ }
+ }
+ if (object.fullyDecodeReservedExpansion != null)
+ message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a Http message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.api.Http
+ * @static
+ * @param {google.api.Http} message Http
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ Http.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.rules = [];
+ if (options.defaults)
+ object.fullyDecodeReservedExpansion = false;
+ if (message.rules && message.rules.length) {
+ object.rules = [];
+ for (var j = 0; j < message.rules.length; ++j)
+ object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options);
+ }
+ if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion"))
+ object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion;
+ return object;
+ };
+
+ /**
+ * Converts this Http to JSON.
+ * @function toJSON
+ * @memberof google.api.Http
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ Http.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for Http
+ * @function getTypeUrl
+ * @memberof google.api.Http
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.api.Http";
+ };
+
+ return Http;
+ })();
+
+ api.HttpRule = (function() {
+
+ /**
+ * Properties of a HttpRule.
+ * @memberof google.api
+ * @interface IHttpRule
+ * @property {string|null} [selector] HttpRule selector
+ * @property {string|null} [get] HttpRule get
+ * @property {string|null} [put] HttpRule put
+ * @property {string|null} [post] HttpRule post
+ * @property {string|null} ["delete"] HttpRule delete
+ * @property {string|null} [patch] HttpRule patch
+ * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom
+ * @property {string|null} [body] HttpRule body
+ * @property {string|null} [responseBody] HttpRule responseBody
+ * @property {Array.|null} [additionalBindings] HttpRule additionalBindings
+ */
+
+ /**
+ * Constructs a new HttpRule.
+ * @memberof google.api
+ * @classdesc Represents a HttpRule.
+ * @implements IHttpRule
+ * @constructor
+ * @param {google.api.IHttpRule=} [properties] Properties to set
+ */
+ function HttpRule(properties) {
+ this.additionalBindings = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * HttpRule selector.
+ * @member {string} selector
+ * @memberof google.api.HttpRule
+ * @instance
+ */
+ HttpRule.prototype.selector = "";
+
+ /**
+ * HttpRule get.
+ * @member {string|null|undefined} get
+ * @memberof google.api.HttpRule
+ * @instance
+ */
+ HttpRule.prototype.get = null;
+
+ /**
+ * HttpRule put.
+ * @member {string|null|undefined} put
+ * @memberof google.api.HttpRule
+ * @instance
+ */
+ HttpRule.prototype.put = null;
+
+ /**
+ * HttpRule post.
+ * @member {string|null|undefined} post
+ * @memberof google.api.HttpRule
+ * @instance
+ */
+ HttpRule.prototype.post = null;
+
+ /**
+ * HttpRule delete.
+ * @member {string|null|undefined} delete
+ * @memberof google.api.HttpRule
+ * @instance
+ */
+ HttpRule.prototype["delete"] = null;
+
+ /**
+ * HttpRule patch.
+ * @member {string|null|undefined} patch
+ * @memberof google.api.HttpRule
+ * @instance
+ */
+ HttpRule.prototype.patch = null;
+
+ /**
+ * HttpRule custom.
+ * @member {google.api.ICustomHttpPattern|null|undefined} custom
+ * @memberof google.api.HttpRule
+ * @instance
+ */
+ HttpRule.prototype.custom = null;
+
+ /**
+ * HttpRule body.
+ * @member {string} body
+ * @memberof google.api.HttpRule
+ * @instance
+ */
+ HttpRule.prototype.body = "";
+
+ /**
+ * HttpRule responseBody.
+ * @member {string} responseBody
+ * @memberof google.api.HttpRule
+ * @instance
+ */
+ HttpRule.prototype.responseBody = "";
+
+ /**
+ * HttpRule additionalBindings.
+ * @member {Array.} additionalBindings
+ * @memberof google.api.HttpRule
+ * @instance
+ */
+ HttpRule.prototype.additionalBindings = $util.emptyArray;
+
+ // OneOf field names bound to virtual getters and setters
+ var $oneOfFields;
+
+ /**
+ * HttpRule pattern.
+ * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern
+ * @memberof google.api.HttpRule
+ * @instance
+ */
+ Object.defineProperty(HttpRule.prototype, "pattern", {
+ get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * Creates a new HttpRule instance using the specified properties.
+ * @function create
+ * @memberof google.api.HttpRule
+ * @static
+ * @param {google.api.IHttpRule=} [properties] Properties to set
+ * @returns {google.api.HttpRule} HttpRule instance
+ */
+ HttpRule.create = function create(properties) {
+ return new HttpRule(properties);
+ };
+
+ /**
+ * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages.
+ * @function encode
+ * @memberof google.api.HttpRule
+ * @static
+ * @param {google.api.IHttpRule} message HttpRule message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ HttpRule.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.selector != null && Object.hasOwnProperty.call(message, "selector"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector);
+ if (message.get != null && Object.hasOwnProperty.call(message, "get"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.get);
+ if (message.put != null && Object.hasOwnProperty.call(message, "put"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.put);
+ if (message.post != null && Object.hasOwnProperty.call(message, "post"))
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.post);
+ if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete"))
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]);
+ if (message.patch != null && Object.hasOwnProperty.call(message, "patch"))
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch);
+ if (message.body != null && Object.hasOwnProperty.call(message, "body"))
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.body);
+ if (message.custom != null && Object.hasOwnProperty.call(message, "custom"))
+ $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
+ if (message.additionalBindings != null && message.additionalBindings.length)
+ for (var i = 0; i < message.additionalBindings.length; ++i)
+ $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
+ if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody"))
+ writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.api.HttpRule
+ * @static
+ * @param {google.api.IHttpRule} message HttpRule message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ HttpRule.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a HttpRule message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.api.HttpRule
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.api.HttpRule} HttpRule
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ HttpRule.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.selector = reader.string();
+ break;
+ }
+ case 2: {
+ message.get = reader.string();
+ break;
+ }
+ case 3: {
+ message.put = reader.string();
+ break;
+ }
+ case 4: {
+ message.post = reader.string();
+ break;
+ }
+ case 5: {
+ message["delete"] = reader.string();
+ break;
+ }
+ case 6: {
+ message.patch = reader.string();
+ break;
+ }
+ case 8: {
+ message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32());
+ break;
+ }
+ case 7: {
+ message.body = reader.string();
+ break;
+ }
+ case 12: {
+ message.responseBody = reader.string();
+ break;
+ }
+ case 11: {
+ if (!(message.additionalBindings && message.additionalBindings.length))
+ message.additionalBindings = [];
+ message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32()));
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a HttpRule message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.api.HttpRule
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.api.HttpRule} HttpRule
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ HttpRule.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a HttpRule message.
+ * @function verify
+ * @memberof google.api.HttpRule
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ HttpRule.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ var properties = {};
+ if (message.selector != null && message.hasOwnProperty("selector"))
+ if (!$util.isString(message.selector))
+ return "selector: string expected";
+ if (message.get != null && message.hasOwnProperty("get")) {
+ properties.pattern = 1;
+ if (!$util.isString(message.get))
+ return "get: string expected";
+ }
+ if (message.put != null && message.hasOwnProperty("put")) {
+ if (properties.pattern === 1)
+ return "pattern: multiple values";
+ properties.pattern = 1;
+ if (!$util.isString(message.put))
+ return "put: string expected";
+ }
+ if (message.post != null && message.hasOwnProperty("post")) {
+ if (properties.pattern === 1)
+ return "pattern: multiple values";
+ properties.pattern = 1;
+ if (!$util.isString(message.post))
+ return "post: string expected";
+ }
+ if (message["delete"] != null && message.hasOwnProperty("delete")) {
+ if (properties.pattern === 1)
+ return "pattern: multiple values";
+ properties.pattern = 1;
+ if (!$util.isString(message["delete"]))
+ return "delete: string expected";
+ }
+ if (message.patch != null && message.hasOwnProperty("patch")) {
+ if (properties.pattern === 1)
+ return "pattern: multiple values";
+ properties.pattern = 1;
+ if (!$util.isString(message.patch))
+ return "patch: string expected";
+ }
+ if (message.custom != null && message.hasOwnProperty("custom")) {
+ if (properties.pattern === 1)
+ return "pattern: multiple values";
+ properties.pattern = 1;
+ {
+ var error = $root.google.api.CustomHttpPattern.verify(message.custom);
+ if (error)
+ return "custom." + error;
+ }
+ }
+ if (message.body != null && message.hasOwnProperty("body"))
+ if (!$util.isString(message.body))
+ return "body: string expected";
+ if (message.responseBody != null && message.hasOwnProperty("responseBody"))
+ if (!$util.isString(message.responseBody))
+ return "responseBody: string expected";
+ if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) {
+ if (!Array.isArray(message.additionalBindings))
+ return "additionalBindings: array expected";
+ for (var i = 0; i < message.additionalBindings.length; ++i) {
+ var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]);
+ if (error)
+ return "additionalBindings." + error;
+ }
+ }
+ return null;
+ };
+
+ /**
+ * Creates a HttpRule message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.api.HttpRule
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.api.HttpRule} HttpRule
+ */
+ HttpRule.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.api.HttpRule)
+ return object;
+ var message = new $root.google.api.HttpRule();
+ if (object.selector != null)
+ message.selector = String(object.selector);
+ if (object.get != null)
+ message.get = String(object.get);
+ if (object.put != null)
+ message.put = String(object.put);
+ if (object.post != null)
+ message.post = String(object.post);
+ if (object["delete"] != null)
+ message["delete"] = String(object["delete"]);
+ if (object.patch != null)
+ message.patch = String(object.patch);
+ if (object.custom != null) {
+ if (typeof object.custom !== "object")
+ throw TypeError(".google.api.HttpRule.custom: object expected");
+ message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom);
+ }
+ if (object.body != null)
+ message.body = String(object.body);
+ if (object.responseBody != null)
+ message.responseBody = String(object.responseBody);
+ if (object.additionalBindings) {
+ if (!Array.isArray(object.additionalBindings))
+ throw TypeError(".google.api.HttpRule.additionalBindings: array expected");
+ message.additionalBindings = [];
+ for (var i = 0; i < object.additionalBindings.length; ++i) {
+ if (typeof object.additionalBindings[i] !== "object")
+ throw TypeError(".google.api.HttpRule.additionalBindings: object expected");
+ message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]);
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a HttpRule message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.api.HttpRule
+ * @static
+ * @param {google.api.HttpRule} message HttpRule
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ HttpRule.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.additionalBindings = [];
+ if (options.defaults) {
+ object.selector = "";
+ object.body = "";
+ object.responseBody = "";
+ }
+ if (message.selector != null && message.hasOwnProperty("selector"))
+ object.selector = message.selector;
+ if (message.get != null && message.hasOwnProperty("get")) {
+ object.get = message.get;
+ if (options.oneofs)
+ object.pattern = "get";
+ }
+ if (message.put != null && message.hasOwnProperty("put")) {
+ object.put = message.put;
+ if (options.oneofs)
+ object.pattern = "put";
+ }
+ if (message.post != null && message.hasOwnProperty("post")) {
+ object.post = message.post;
+ if (options.oneofs)
+ object.pattern = "post";
+ }
+ if (message["delete"] != null && message.hasOwnProperty("delete")) {
+ object["delete"] = message["delete"];
+ if (options.oneofs)
+ object.pattern = "delete";
+ }
+ if (message.patch != null && message.hasOwnProperty("patch")) {
+ object.patch = message.patch;
+ if (options.oneofs)
+ object.pattern = "patch";
+ }
+ if (message.body != null && message.hasOwnProperty("body"))
+ object.body = message.body;
+ if (message.custom != null && message.hasOwnProperty("custom")) {
+ object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options);
+ if (options.oneofs)
+ object.pattern = "custom";
+ }
+ if (message.additionalBindings && message.additionalBindings.length) {
+ object.additionalBindings = [];
+ for (var j = 0; j < message.additionalBindings.length; ++j)
+ object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options);
+ }
+ if (message.responseBody != null && message.hasOwnProperty("responseBody"))
+ object.responseBody = message.responseBody;
+ return object;
+ };
+
+ /**
+ * Converts this HttpRule to JSON.
+ * @function toJSON
+ * @memberof google.api.HttpRule
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ HttpRule.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for HttpRule
+ * @function getTypeUrl
+ * @memberof google.api.HttpRule
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.api.HttpRule";
+ };
+
+ return HttpRule;
+ })();
+
+ api.CustomHttpPattern = (function() {
+
+ /**
+ * Properties of a CustomHttpPattern.
+ * @memberof google.api
+ * @interface ICustomHttpPattern
+ * @property {string|null} [kind] CustomHttpPattern kind
+ * @property {string|null} [path] CustomHttpPattern path
+ */
+
+ /**
+ * Constructs a new CustomHttpPattern.
+ * @memberof google.api
+ * @classdesc Represents a CustomHttpPattern.
+ * @implements ICustomHttpPattern
+ * @constructor
+ * @param {google.api.ICustomHttpPattern=} [properties] Properties to set
+ */
+ function CustomHttpPattern(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * CustomHttpPattern kind.
+ * @member {string} kind
+ * @memberof google.api.CustomHttpPattern
+ * @instance
+ */
+ CustomHttpPattern.prototype.kind = "";
+
+ /**
+ * CustomHttpPattern path.
+ * @member {string} path
+ * @memberof google.api.CustomHttpPattern
+ * @instance
+ */
+ CustomHttpPattern.prototype.path = "";
+
+ /**
+ * Creates a new CustomHttpPattern instance using the specified properties.
+ * @function create
+ * @memberof google.api.CustomHttpPattern
+ * @static
+ * @param {google.api.ICustomHttpPattern=} [properties] Properties to set
+ * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance
+ */
+ CustomHttpPattern.create = function create(properties) {
+ return new CustomHttpPattern(properties);
+ };
+
+ /**
+ * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages.
+ * @function encode
+ * @memberof google.api.CustomHttpPattern
+ * @static
+ * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CustomHttpPattern.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.kind != null && Object.hasOwnProperty.call(message, "kind"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind);
+ if (message.path != null && Object.hasOwnProperty.call(message, "path"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.path);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.api.CustomHttpPattern
+ * @static
+ * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a CustomHttpPattern message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.api.CustomHttpPattern
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.api.CustomHttpPattern} CustomHttpPattern
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CustomHttpPattern.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.kind = reader.string();
+ break;
+ }
+ case 2: {
+ message.path = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.api.CustomHttpPattern
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.api.CustomHttpPattern} CustomHttpPattern
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a CustomHttpPattern message.
+ * @function verify
+ * @memberof google.api.CustomHttpPattern
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ CustomHttpPattern.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.kind != null && message.hasOwnProperty("kind"))
+ if (!$util.isString(message.kind))
+ return "kind: string expected";
+ if (message.path != null && message.hasOwnProperty("path"))
+ if (!$util.isString(message.path))
+ return "path: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.api.CustomHttpPattern
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.api.CustomHttpPattern} CustomHttpPattern
+ */
+ CustomHttpPattern.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.api.CustomHttpPattern)
+ return object;
+ var message = new $root.google.api.CustomHttpPattern();
+ if (object.kind != null)
+ message.kind = String(object.kind);
+ if (object.path != null)
+ message.path = String(object.path);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.api.CustomHttpPattern
+ * @static
+ * @param {google.api.CustomHttpPattern} message CustomHttpPattern
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ CustomHttpPattern.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.kind = "";
+ object.path = "";
+ }
+ if (message.kind != null && message.hasOwnProperty("kind"))
+ object.kind = message.kind;
+ if (message.path != null && message.hasOwnProperty("path"))
+ object.path = message.path;
+ return object;
+ };
+
+ /**
+ * Converts this CustomHttpPattern to JSON.
+ * @function toJSON
+ * @memberof google.api.CustomHttpPattern
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ CustomHttpPattern.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for CustomHttpPattern
+ * @function getTypeUrl
+ * @memberof google.api.CustomHttpPattern
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.api.CustomHttpPattern";
+ };
+
+ return CustomHttpPattern;
+ })();
+
+ /**
+ * 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.ResourceDescriptor = (function() {
+
+ /**
+ * Properties of a ResourceDescriptor.
+ * @memberof google.api
+ * @interface IResourceDescriptor
+ * @property {string|null} [type] ResourceDescriptor type
+ * @property {Array.|null} [pattern] ResourceDescriptor pattern
+ * @property {string|null} [nameField] ResourceDescriptor nameField
+ * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history
+ * @property {string|null} [plural] ResourceDescriptor plural
+ * @property {string|null} [singular] ResourceDescriptor singular
+ * @property {Array.|null} [style] ResourceDescriptor style
+ */
+
+ /**
+ * Constructs a new ResourceDescriptor.
+ * @memberof google.api
+ * @classdesc Represents a ResourceDescriptor.
+ * @implements IResourceDescriptor
+ * @constructor
+ * @param {google.api.IResourceDescriptor=} [properties] Properties to set
+ */
+ function ResourceDescriptor(properties) {
+ this.pattern = [];
+ this.style = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ResourceDescriptor type.
+ * @member {string} type
+ * @memberof google.api.ResourceDescriptor
+ * @instance
+ */
+ ResourceDescriptor.prototype.type = "";
+
+ /**
+ * ResourceDescriptor pattern.
+ * @member {Array.} pattern
+ * @memberof google.api.ResourceDescriptor
+ * @instance
+ */
+ ResourceDescriptor.prototype.pattern = $util.emptyArray;
+
+ /**
+ * ResourceDescriptor nameField.
+ * @member {string} nameField
+ * @memberof google.api.ResourceDescriptor
+ * @instance
+ */
+ ResourceDescriptor.prototype.nameField = "";
+
+ /**
+ * ResourceDescriptor history.
+ * @member {google.api.ResourceDescriptor.History} history
+ * @memberof google.api.ResourceDescriptor
+ * @instance
+ */
+ ResourceDescriptor.prototype.history = 0;
+
+ /**
+ * ResourceDescriptor plural.
+ * @member {string} plural
+ * @memberof google.api.ResourceDescriptor
+ * @instance
+ */
+ ResourceDescriptor.prototype.plural = "";
+
+ /**
+ * ResourceDescriptor singular.
+ * @member {string} singular
+ * @memberof google.api.ResourceDescriptor
+ * @instance
+ */
+ ResourceDescriptor.prototype.singular = "";
+
+ /**
+ * ResourceDescriptor style.
+ * @member {Array.} style
+ * @memberof google.api.ResourceDescriptor
+ * @instance
+ */
+ ResourceDescriptor.prototype.style = $util.emptyArray;
+
+ /**
+ * Creates a new ResourceDescriptor instance using the specified properties.
+ * @function create
+ * @memberof google.api.ResourceDescriptor
+ * @static
+ * @param {google.api.IResourceDescriptor=} [properties] Properties to set
+ * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance
+ */
+ ResourceDescriptor.create = function create(properties) {
+ return new ResourceDescriptor(properties);
+ };
+
+ /**
+ * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages.
+ * @function encode
+ * @memberof google.api.ResourceDescriptor
+ * @static
+ * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ResourceDescriptor.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.type != null && Object.hasOwnProperty.call(message, "type"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.type);
+ if (message.pattern != null && message.pattern.length)
+ for (var i = 0; i < message.pattern.length; ++i)
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]);
+ if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField);
+ if (message.history != null && Object.hasOwnProperty.call(message, "history"))
+ writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history);
+ if (message.plural != null && Object.hasOwnProperty.call(message, "plural"))
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural);
+ if (message.singular != null && Object.hasOwnProperty.call(message, "singular"))
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular);
+ if (message.style != null && message.style.length) {
+ writer.uint32(/* id 10, wireType 2 =*/82).fork();
+ for (var i = 0; i < message.style.length; ++i)
+ writer.int32(message.style[i]);
+ writer.ldelim();
+ }
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.api.ResourceDescriptor
+ * @static
+ * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ResourceDescriptor message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.api.ResourceDescriptor
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.api.ResourceDescriptor} ResourceDescriptor
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ResourceDescriptor.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.type = reader.string();
+ break;
+ }
+ case 2: {
+ if (!(message.pattern && message.pattern.length))
+ message.pattern = [];
+ message.pattern.push(reader.string());
+ break;
+ }
+ case 3: {
+ message.nameField = reader.string();
+ break;
+ }
+ case 4: {
+ message.history = reader.int32();
+ break;
+ }
+ case 5: {
+ message.plural = reader.string();
+ break;
+ }
+ case 6: {
+ message.singular = reader.string();
+ break;
+ }
+ case 10: {
+ if (!(message.style && message.style.length))
+ message.style = [];
+ if ((tag & 7) === 2) {
+ var end2 = reader.uint32() + reader.pos;
+ while (reader.pos < end2)
+ message.style.push(reader.int32());
+ } else
+ message.style.push(reader.int32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.api.ResourceDescriptor
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.api.ResourceDescriptor} ResourceDescriptor
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ResourceDescriptor message.
+ * @function verify
+ * @memberof google.api.ResourceDescriptor
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ResourceDescriptor.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.type != null && message.hasOwnProperty("type"))
+ if (!$util.isString(message.type))
+ return "type: string expected";
+ if (message.pattern != null && message.hasOwnProperty("pattern")) {
+ if (!Array.isArray(message.pattern))
+ return "pattern: array expected";
+ for (var i = 0; i < message.pattern.length; ++i)
+ if (!$util.isString(message.pattern[i]))
+ return "pattern: string[] expected";
+ }
+ if (message.nameField != null && message.hasOwnProperty("nameField"))
+ if (!$util.isString(message.nameField))
+ return "nameField: string expected";
+ if (message.history != null && message.hasOwnProperty("history"))
+ switch (message.history) {
+ default:
+ return "history: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ break;
+ }
+ if (message.plural != null && message.hasOwnProperty("plural"))
+ if (!$util.isString(message.plural))
+ return "plural: string expected";
+ if (message.singular != null && message.hasOwnProperty("singular"))
+ if (!$util.isString(message.singular))
+ return "singular: string expected";
+ if (message.style != null && message.hasOwnProperty("style")) {
+ if (!Array.isArray(message.style))
+ return "style: array expected";
+ for (var i = 0; i < message.style.length; ++i)
+ switch (message.style[i]) {
+ default:
+ return "style: enum value[] expected";
+ case 0:
+ case 1:
+ break;
+ }
+ }
+ return null;
+ };
+
+ /**
+ * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.api.ResourceDescriptor
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.api.ResourceDescriptor} ResourceDescriptor
+ */
+ ResourceDescriptor.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.api.ResourceDescriptor)
+ return object;
+ var message = new $root.google.api.ResourceDescriptor();
+ if (object.type != null)
+ message.type = String(object.type);
+ if (object.pattern) {
+ if (!Array.isArray(object.pattern))
+ throw TypeError(".google.api.ResourceDescriptor.pattern: array expected");
+ message.pattern = [];
+ for (var i = 0; i < object.pattern.length; ++i)
+ message.pattern[i] = String(object.pattern[i]);
+ }
+ if (object.nameField != null)
+ message.nameField = String(object.nameField);
+ switch (object.history) {
+ default:
+ if (typeof object.history === "number") {
+ message.history = object.history;
+ break;
+ }
+ break;
+ case "HISTORY_UNSPECIFIED":
+ case 0:
+ message.history = 0;
+ break;
+ case "ORIGINALLY_SINGLE_PATTERN":
+ case 1:
+ message.history = 1;
+ break;
+ case "FUTURE_MULTI_PATTERN":
+ case 2:
+ message.history = 2;
+ break;
+ }
+ if (object.plural != null)
+ message.plural = String(object.plural);
+ if (object.singular != null)
+ message.singular = String(object.singular);
+ if (object.style) {
+ if (!Array.isArray(object.style))
+ throw TypeError(".google.api.ResourceDescriptor.style: array expected");
+ message.style = [];
+ for (var i = 0; i < object.style.length; ++i)
+ switch (object.style[i]) {
+ default:
+ if (typeof object.style[i] === "number") {
+ message.style[i] = object.style[i];
+ break;
+ }
+ case "STYLE_UNSPECIFIED":
+ case 0:
+ message.style[i] = 0;
+ break;
+ case "DECLARATIVE_FRIENDLY":
+ case 1:
+ message.style[i] = 1;
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.api.ResourceDescriptor
+ * @static
+ * @param {google.api.ResourceDescriptor} message ResourceDescriptor
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ResourceDescriptor.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults) {
+ object.pattern = [];
+ object.style = [];
+ }
+ if (options.defaults) {
+ object.type = "";
+ object.nameField = "";
+ object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0;
+ object.plural = "";
+ object.singular = "";
+ }
+ if (message.type != null && message.hasOwnProperty("type"))
+ object.type = message.type;
+ if (message.pattern && message.pattern.length) {
+ object.pattern = [];
+ for (var j = 0; j < message.pattern.length; ++j)
+ object.pattern[j] = message.pattern[j];
+ }
+ if (message.nameField != null && message.hasOwnProperty("nameField"))
+ object.nameField = message.nameField;
+ if (message.history != null && message.hasOwnProperty("history"))
+ object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history;
+ if (message.plural != null && message.hasOwnProperty("plural"))
+ object.plural = message.plural;
+ if (message.singular != null && message.hasOwnProperty("singular"))
+ object.singular = message.singular;
+ if (message.style && message.style.length) {
+ object.style = [];
+ for (var j = 0; j < message.style.length; ++j)
+ object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j];
+ }
+ return object;
+ };
+
+ /**
+ * Converts this ResourceDescriptor to JSON.
+ * @function toJSON
+ * @memberof google.api.ResourceDescriptor
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ResourceDescriptor.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ResourceDescriptor
+ * @function getTypeUrl
+ * @memberof google.api.ResourceDescriptor
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.api.ResourceDescriptor";
+ };
+
+ /**
+ * History enum.
+ * @name google.api.ResourceDescriptor.History
+ * @enum {number}
+ * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value
+ * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value
+ * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value
+ */
+ ResourceDescriptor.History = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1;
+ values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2;
+ return values;
+ })();
+
+ /**
+ * Style enum.
+ * @name google.api.ResourceDescriptor.Style
+ * @enum {number}
+ * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value
+ * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value
+ */
+ ResourceDescriptor.Style = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1;
+ return values;
+ })();
+
+ return ResourceDescriptor;
+ })();
+
+ api.ResourceReference = (function() {
+
+ /**
+ * Properties of a ResourceReference.
+ * @memberof google.api
+ * @interface IResourceReference
+ * @property {string|null} [type] ResourceReference type
+ * @property {string|null} [childType] ResourceReference childType
+ */
+
+ /**
+ * Constructs a new ResourceReference.
+ * @memberof google.api
+ * @classdesc Represents a ResourceReference.
+ * @implements IResourceReference
+ * @constructor
+ * @param {google.api.IResourceReference=} [properties] Properties to set
+ */
+ function ResourceReference(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ResourceReference type.
+ * @member {string} type
+ * @memberof google.api.ResourceReference
+ * @instance
+ */
+ ResourceReference.prototype.type = "";
+
+ /**
+ * ResourceReference childType.
+ * @member {string} childType
+ * @memberof google.api.ResourceReference
+ * @instance
+ */
+ ResourceReference.prototype.childType = "";
+
+ /**
+ * Creates a new ResourceReference instance using the specified properties.
+ * @function create
+ * @memberof google.api.ResourceReference
+ * @static
+ * @param {google.api.IResourceReference=} [properties] Properties to set
+ * @returns {google.api.ResourceReference} ResourceReference instance
+ */
+ ResourceReference.create = function create(properties) {
+ return new ResourceReference(properties);
+ };
+
+ /**
+ * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages.
+ * @function encode
+ * @memberof google.api.ResourceReference
+ * @static
+ * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ResourceReference.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.type != null && Object.hasOwnProperty.call(message, "type"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.type);
+ if (message.childType != null && Object.hasOwnProperty.call(message, "childType"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.api.ResourceReference
+ * @static
+ * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ResourceReference.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ResourceReference message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.api.ResourceReference
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.api.ResourceReference} ResourceReference
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ResourceReference.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.type = reader.string();
+ break;
+ }
+ case 2: {
+ message.childType = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ResourceReference message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.api.ResourceReference
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.api.ResourceReference} ResourceReference
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ResourceReference.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ResourceReference message.
+ * @function verify
+ * @memberof google.api.ResourceReference
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ResourceReference.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.type != null && message.hasOwnProperty("type"))
+ if (!$util.isString(message.type))
+ return "type: string expected";
+ if (message.childType != null && message.hasOwnProperty("childType"))
+ if (!$util.isString(message.childType))
+ return "childType: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.api.ResourceReference
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.api.ResourceReference} ResourceReference
+ */
+ ResourceReference.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.api.ResourceReference)
+ return object;
+ var message = new $root.google.api.ResourceReference();
+ if (object.type != null)
+ message.type = String(object.type);
+ if (object.childType != null)
+ message.childType = String(object.childType);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ResourceReference message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.api.ResourceReference
+ * @static
+ * @param {google.api.ResourceReference} message ResourceReference
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ResourceReference.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.type = "";
+ object.childType = "";
+ }
+ if (message.type != null && message.hasOwnProperty("type"))
+ object.type = message.type;
+ if (message.childType != null && message.hasOwnProperty("childType"))
+ object.childType = message.childType;
+ return object;
+ };
+
+ /**
+ * Converts this ResourceReference to JSON.
+ * @function toJSON
+ * @memberof google.api.ResourceReference
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ResourceReference.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ResourceReference
+ * @function getTypeUrl
+ * @memberof google.api.ResourceReference
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.api.ResourceReference";
+ };
+
+ return ResourceReference;
+ })();
+
+ return api;
+ })();
+
+ google.protobuf = (function() {
+
+ /**
+ * Namespace protobuf.
+ * @memberof google
+ * @namespace
+ */
+ var protobuf = {};
+
+ protobuf.FileDescriptorSet = (function() {
+
+ /**
+ * Properties of a FileDescriptorSet.
+ * @memberof google.protobuf
+ * @interface IFileDescriptorSet
+ * @property {Array.|null} [file] FileDescriptorSet file
+ */
+
+ /**
+ * Constructs a new FileDescriptorSet.
+ * @memberof google.protobuf
+ * @classdesc Represents a FileDescriptorSet.
+ * @implements IFileDescriptorSet
+ * @constructor
+ * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set
+ */
+ function FileDescriptorSet(properties) {
+ this.file = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * FileDescriptorSet file.
+ * @member {Array.} file
+ * @memberof google.protobuf.FileDescriptorSet
+ * @instance
+ */
+ FileDescriptorSet.prototype.file = $util.emptyArray;
+
+ /**
+ * Creates a new FileDescriptorSet instance using the specified properties.
+ * @function create
+ * @memberof google.protobuf.FileDescriptorSet
+ * @static
+ * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set
+ * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance
+ */
+ FileDescriptorSet.create = function create(properties) {
+ return new FileDescriptorSet(properties);
+ };
+
+ /**
+ * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages.
+ * @function encode
+ * @memberof google.protobuf.FileDescriptorSet
+ * @static
+ * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ FileDescriptorSet.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.file != null && message.file.length)
+ for (var i = 0; i < message.file.length; ++i)
+ $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.protobuf.FileDescriptorSet
+ * @static
+ * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a FileDescriptorSet message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.protobuf.FileDescriptorSet
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ FileDescriptorSet.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.file && message.file.length))
+ message.file = [];
+ message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32()));
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.protobuf.FileDescriptorSet
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a FileDescriptorSet message.
+ * @function verify
+ * @memberof google.protobuf.FileDescriptorSet
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ FileDescriptorSet.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.file != null && message.hasOwnProperty("file")) {
+ if (!Array.isArray(message.file))
+ return "file: array expected";
+ for (var i = 0; i < message.file.length; ++i) {
+ var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]);
+ if (error)
+ return "file." + error;
+ }
+ }
+ return null;
+ };
+
+ /**
+ * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.protobuf.FileDescriptorSet
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet
+ */
+ FileDescriptorSet.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.protobuf.FileDescriptorSet)
+ return object;
+ var message = new $root.google.protobuf.FileDescriptorSet();
+ if (object.file) {
+ if (!Array.isArray(object.file))
+ throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected");
+ message.file = [];
+ for (var i = 0; i < object.file.length; ++i) {
+ if (typeof object.file[i] !== "object")
+ throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected");
+ message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]);
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.protobuf.FileDescriptorSet
+ * @static
+ * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ FileDescriptorSet.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.file = [];
+ if (message.file && message.file.length) {
+ object.file = [];
+ for (var j = 0; j < message.file.length; ++j)
+ object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options);
+ }
+ return object;
+ };
+
+ /**
+ * Converts this FileDescriptorSet to JSON.
+ * @function toJSON
+ * @memberof google.protobuf.FileDescriptorSet
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ FileDescriptorSet.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for FileDescriptorSet
+ * @function getTypeUrl
+ * @memberof google.protobuf.FileDescriptorSet
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.protobuf.FileDescriptorSet";
+ };
+
+ return FileDescriptorSet;
+ })();
+
+ 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) {
+ default:
+ if (typeof object.label === "number") {
+ message.label = object.label;
+ break;
+ }
+ break;
+ 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) {
+ default:
+ if (typeof object.type === "number") {
+ message.type = object.type;
+ break;
+ }
+ break;
+ case "TYPE_DOUBLE":
+ case 1:
+ message.type = 1;
+ break;
+ case "TYPE_FLOAT":
+ case 2:
+ message.type = 2;
+ break;
+ case "TYPE_INT64":
+ case 3:
+ message.type = 3;
+ break;
+ case "TYPE_UINT64":
+ case 4:
+ message.type = 4;
+ break;
+ case "TYPE_INT32":
+ case 5:
+ message.type = 5;
+ break;
+ case "TYPE_FIXED64":
+ case 6:
+ message.type = 6;
+ break;
+ case "TYPE_FIXED32":
+ case 7:
+ message.type = 7;
+ break;
+ case "TYPE_BOOL":
+ case 8:
+ message.type = 8;
+ break;
+ case "TYPE_STRING":
+ case 9:
+ message.type = 9;
+ break;
+ case "TYPE_GROUP":
+ case 10:
+ message.type = 10;
+ break;
+ case "TYPE_MESSAGE":
+ case 11:
+ message.type = 11;
+ break;
+ case "TYPE_BYTES":
+ case 12:
+ message.type = 12;
+ break;
+ case "TYPE_UINT32":
+ case 13:
+ message.type = 13;
+ break;
+ case "TYPE_ENUM":
+ case 14:
+ message.type = 14;
+ break;
+ case "TYPE_SFIXED32":
+ case 15:
+ message.type = 15;
+ break;
+ case "TYPE_SFIXED64":
+ case 16:
+ message.type = 16;
+ break;
+ case "TYPE_SINT32":
+ case 17:
+ message.type = 17;
+ break;
+ case "TYPE_SINT64":
+ case 18:
+ message.type = 18;
+ break;
+ }
+ if (object.typeName != null)
+ message.typeName = String(object.typeName);
+ if (object.extendee != null)
+ message.extendee = String(object.extendee);
+ if (object.defaultValue != null)
+ message.defaultValue = String(object.defaultValue);
+ if (object.oneofIndex != null)
+ message.oneofIndex = object.oneofIndex | 0;
+ if (object.jsonName != null)
+ message.jsonName = String(object.jsonName);
+ if (object.options != null) {
+ if (typeof object.options !== "object")
+ throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected");
+ message.options = $root.google.protobuf.FieldOptions.fromObject(object.options);
+ }
+ if (object.proto3Optional != null)
+ message.proto3Optional = Boolean(object.proto3Optional);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.protobuf.FieldDescriptorProto
+ * @static
+ * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ FieldDescriptorProto.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.name = "";
+ object.extendee = "";
+ object.number = 0;
+ object.label = options.enums === String ? "LABEL_OPTIONAL" : 1;
+ object.type = options.enums === String ? "TYPE_DOUBLE" : 1;
+ object.typeName = "";
+ object.defaultValue = "";
+ object.options = null;
+ object.oneofIndex = 0;
+ object.jsonName = "";
+ object.proto3Optional = false;
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.extendee != null && message.hasOwnProperty("extendee"))
+ object.extendee = message.extendee;
+ if (message.number != null && message.hasOwnProperty("number"))
+ object.number = message.number;
+ if (message.label != null && message.hasOwnProperty("label"))
+ object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label;
+ if (message.type != null && message.hasOwnProperty("type"))
+ object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type;
+ if (message.typeName != null && message.hasOwnProperty("typeName"))
+ object.typeName = message.typeName;
+ if (message.defaultValue != null && message.hasOwnProperty("defaultValue"))
+ object.defaultValue = message.defaultValue;
+ if (message.options != null && message.hasOwnProperty("options"))
+ object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options);
+ if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex"))
+ object.oneofIndex = message.oneofIndex;
+ if (message.jsonName != null && message.hasOwnProperty("jsonName"))
+ object.jsonName = message.jsonName;
+ if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional"))
+ object.proto3Optional = message.proto3Optional;
+ return object;
+ };
+
+ /**
+ * Converts this FieldDescriptorProto to JSON.
+ * @function toJSON
+ * @memberof google.protobuf.FieldDescriptorProto
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ FieldDescriptorProto.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for FieldDescriptorProto
+ * @function getTypeUrl
+ * @memberof google.protobuf.FieldDescriptorProto
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto";
+ };
+
+ /**
+ * Type enum.
+ * @name google.protobuf.FieldDescriptorProto.Type
+ * @enum {number}
+ * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value
+ * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value
+ * @property {number} TYPE_INT64=3 TYPE_INT64 value
+ * @property {number} TYPE_UINT64=4 TYPE_UINT64 value
+ * @property {number} TYPE_INT32=5 TYPE_INT32 value
+ * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value
+ * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value
+ * @property {number} TYPE_BOOL=8 TYPE_BOOL value
+ * @property {number} TYPE_STRING=9 TYPE_STRING value
+ * @property {number} TYPE_GROUP=10 TYPE_GROUP value
+ * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value
+ * @property {number} TYPE_BYTES=12 TYPE_BYTES value
+ * @property {number} TYPE_UINT32=13 TYPE_UINT32 value
+ * @property {number} TYPE_ENUM=14 TYPE_ENUM value
+ * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value
+ * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value
+ * @property {number} TYPE_SINT32=17 TYPE_SINT32 value
+ * @property {number} TYPE_SINT64=18 TYPE_SINT64 value
+ */
+ FieldDescriptorProto.Type = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[1] = "TYPE_DOUBLE"] = 1;
+ values[valuesById[2] = "TYPE_FLOAT"] = 2;
+ values[valuesById[3] = "TYPE_INT64"] = 3;
+ values[valuesById[4] = "TYPE_UINT64"] = 4;
+ values[valuesById[5] = "TYPE_INT32"] = 5;
+ values[valuesById[6] = "TYPE_FIXED64"] = 6;
+ values[valuesById[7] = "TYPE_FIXED32"] = 7;
+ values[valuesById[8] = "TYPE_BOOL"] = 8;
+ values[valuesById[9] = "TYPE_STRING"] = 9;
+ values[valuesById[10] = "TYPE_GROUP"] = 10;
+ values[valuesById[11] = "TYPE_MESSAGE"] = 11;
+ values[valuesById[12] = "TYPE_BYTES"] = 12;
+ values[valuesById[13] = "TYPE_UINT32"] = 13;
+ values[valuesById[14] = "TYPE_ENUM"] = 14;
+ values[valuesById[15] = "TYPE_SFIXED32"] = 15;
+ values[valuesById[16] = "TYPE_SFIXED64"] = 16;
+ values[valuesById[17] = "TYPE_SINT32"] = 17;
+ values[valuesById[18] = "TYPE_SINT64"] = 18;
+ return values;
+ })();
+
+ /**
+ * Label enum.
+ * @name google.protobuf.FieldDescriptorProto.Label
+ * @enum {number}
+ * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value
+ * @property {number} LABEL_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
+ * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition
+ */
+
+ /**
+ * Constructs a new FileOptions.
+ * @memberof google.protobuf
+ * @classdesc Represents a FileOptions.
+ * @implements IFileOptions
+ * @constructor
+ * @param {google.protobuf.IFileOptions=} [properties] Properties to set
+ */
+ function FileOptions(properties) {
+ this.uninterpretedOption = [];
+ this[".google.api.resourceDefinition"] = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * FileOptions javaPackage.
+ * @member {string} javaPackage
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.javaPackage = "";
+
+ /**
+ * FileOptions javaOuterClassname.
+ * @member {string} javaOuterClassname
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.javaOuterClassname = "";
+
+ /**
+ * FileOptions javaMultipleFiles.
+ * @member {boolean} javaMultipleFiles
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.javaMultipleFiles = false;
+
+ /**
+ * FileOptions javaGenerateEqualsAndHash.
+ * @member {boolean} javaGenerateEqualsAndHash
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.javaGenerateEqualsAndHash = false;
+
+ /**
+ * FileOptions javaStringCheckUtf8.
+ * @member {boolean} javaStringCheckUtf8
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.javaStringCheckUtf8 = false;
+
+ /**
+ * FileOptions optimizeFor.
+ * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.optimizeFor = 1;
+
+ /**
+ * FileOptions goPackage.
+ * @member {string} goPackage
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.goPackage = "";
+
+ /**
+ * FileOptions ccGenericServices.
+ * @member {boolean} ccGenericServices
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.ccGenericServices = false;
+
+ /**
+ * FileOptions javaGenericServices.
+ * @member {boolean} javaGenericServices
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.javaGenericServices = false;
+
+ /**
+ * FileOptions pyGenericServices.
+ * @member {boolean} pyGenericServices
+ * @memberof google.protobuf.FileOptions
+ * @instance
+ */
+ FileOptions.prototype.pyGenericServices = false;
+
+ /**
+ * FileOptions 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;
+
+ /**
+ * FileOptions .google.api.resourceDefinition.
+ * @member {Array.