diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 8237bd8624c..c0866bfe322 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -100,9 +100,11 @@ "packages/google-cloud-tpu": "2.3.0", "packages/google-cloud-translate": "7.0.5", "packages/google-cloud-video-livestream": "0.3.4", + "packages/google-cloud-video-stitcher": "0.3.0", "packages/google-cloud-video-transcoder": "2.3.0", "packages/google-cloud-videointelligence": "4.1.1", "packages/google-cloud-vmmigration": "2.2.1", + "packages/google-cloud-vmwareengine": "0.1.0", "packages/google-cloud-vpcaccess": "2.1.3", "packages/google-cloud-webrisk": "3.2.0", "packages/google-cloud-websecurityscanner": "2.1.3", @@ -120,6 +122,5 @@ "packages/google-monitoring-dashboard": "2.8.0", "packages/google-storagetransfer": "2.2.1", "packages/grafeas": "4.2.1", - "packages/typeless-sample-bot": "1.2.0", - "packages/google-cloud-vmwareengine": "0.1.0" + "packages/typeless-sample-bot": "1.2.0" } diff --git a/packages/google-cloud-video-stitcher/.OwlBot.yaml b/packages/google-cloud-video-stitcher/.OwlBot.yaml new file mode 100644 index 00000000000..57c7c06654c --- /dev/null +++ b/packages/google-cloud-video-stitcher/.OwlBot.yaml @@ -0,0 +1,20 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +deep-remove-regex: + - /owl-bot-staging + +deep-copy-regex: + - source: /google/cloud/video/stitcher/(.*)/.*-nodejs + dest: /owl-bot-staging/google-cloud-video-stitcher/$1 diff --git a/packages/google-cloud-video-stitcher/.eslintignore b/packages/google-cloud-video-stitcher/.eslintignore new file mode 100644 index 00000000000..ea5b04aebe6 --- /dev/null +++ b/packages/google-cloud-video-stitcher/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ +samples/generated/ diff --git a/packages/google-cloud-video-stitcher/.eslintrc.json b/packages/google-cloud-video-stitcher/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/packages/google-cloud-video-stitcher/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-cloud-video-stitcher/.gitattributes b/packages/google-cloud-video-stitcher/.gitattributes new file mode 100644 index 00000000000..33739cb74e4 --- /dev/null +++ b/packages/google-cloud-video-stitcher/.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-video-stitcher/.gitignore b/packages/google-cloud-video-stitcher/.gitignore new file mode 100644 index 00000000000..5d32b23782f --- /dev/null +++ b/packages/google-cloud-video-stitcher/.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-video-stitcher/.jsdoc.js b/packages/google-cloud-video-stitcher/.jsdoc.js new file mode 100644 index 00000000000..ab54a969ddd --- /dev/null +++ b/packages/google-cloud-video-stitcher/.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/video-stitcher', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-cloud-video-stitcher/.mocharc.js b/packages/google-cloud-video-stitcher/.mocharc.js new file mode 100644 index 00000000000..cdb7b752160 --- /dev/null +++ b/packages/google-cloud-video-stitcher/.mocharc.js @@ -0,0 +1,29 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000, + "recursive": true +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/packages/google-cloud-video-stitcher/.nycrc b/packages/google-cloud-video-stitcher/.nycrc new file mode 100644 index 00000000000..b18d5472b62 --- /dev/null +++ b/packages/google-cloud-video-stitcher/.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-video-stitcher/.prettierignore b/packages/google-cloud-video-stitcher/.prettierignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-cloud-video-stitcher/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-video-stitcher/.prettierrc.js b/packages/google-cloud-video-stitcher/.prettierrc.js new file mode 100644 index 00000000000..d546a4ad546 --- /dev/null +++ b/packages/google-cloud-video-stitcher/.prettierrc.js @@ -0,0 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/packages/google-cloud-video-stitcher/.repo-metadata.json b/packages/google-cloud-video-stitcher/.repo-metadata.json new file mode 100644 index 00000000000..74bf930a1c4 --- /dev/null +++ b/packages/google-cloud-video-stitcher/.repo-metadata.json @@ -0,0 +1,15 @@ +{ + "name": "videostitcher", + "name_pretty": "Video Stitcher API", + "product_documentation": "https://cloud.google.com/video-stitcher/", + "client_documentation": "https://googleapis.dev/nodejs/videostitcher/latest/", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "beta", + "language": "nodejs", + "repo": "googleapis/google-cloud-node", + "codeowner_team": "@googleapis/cloud-media-team", + "distribution_name": "@google-cloud/video-stitcher", + "api_id": "stitcher.googleapis.com", + "default_version": "v1", + "requires_billing": true +} diff --git a/packages/google-cloud-video-stitcher/CHANGELOG.md b/packages/google-cloud-video-stitcher/CHANGELOG.md new file mode 100644 index 00000000000..bd1ca343dfc --- /dev/null +++ b/packages/google-cloud-video-stitcher/CHANGELOG.md @@ -0,0 +1,61 @@ +# Changelog + +## [0.3.0](https://github.com/googleapis/nodejs-video-stitcher/compare/v0.2.2...v0.3.0) (2022-12-20) + + +### Features + +* Add support for Media CDN ([83f1257](https://github.com/googleapis/nodejs-video-stitcher/commit/83f1257b790abc8ef7acedb8e009ef5e94a0c710)) + + +### Bug Fixes + +* **deps:** Use google-gax v3.5.2 ([#40](https://github.com/googleapis/nodejs-video-stitcher/issues/40)) ([effa481](https://github.com/googleapis/nodejs-video-stitcher/commit/effa4814da8b7d81b6c5be6b6e580a683f02c50e)) +* Do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-video-stitcher/issues/1553)) ([#27](https://github.com/googleapis/nodejs-video-stitcher/issues/27)) ([b7fe723](https://github.com/googleapis/nodejs-video-stitcher/commit/b7fe723d1a2dfb229b69640ca749398805573e56)) +* Preserve default values in x-goog-request-params header ([#32](https://github.com/googleapis/nodejs-video-stitcher/issues/32)) ([28c3214](https://github.com/googleapis/nodejs-video-stitcher/commit/28c32148f4707550c6c6a143c7556560d6b21230)) +* Regenerated protos JS and TS definitions ([#43](https://github.com/googleapis/nodejs-video-stitcher/issues/43)) ([8f7481e](https://github.com/googleapis/nodejs-video-stitcher/commit/8f7481ed1f5fc054abe6430e43570851c39740d0)) + +## [0.2.2](https://github.com/googleapis/nodejs-video-stitcher/compare/v0.2.1...v0.2.2) (2022-09-01) + + +### Bug Fixes + +* use _gaxModule when accessing gax for bundling ([#28](https://github.com/googleapis/nodejs-video-stitcher/issues/28)) ([80ddf81](https://github.com/googleapis/nodejs-video-stitcher/commit/80ddf81c0bedc918bb37c3c24ba29a363878fc74)) + +## [0.2.1](https://github.com/googleapis/nodejs-video-stitcher/compare/v0.2.0...v0.2.1) (2022-08-23) + + +### Bug Fixes + +* better support for fallback mode ([#23](https://github.com/googleapis/nodejs-video-stitcher/issues/23)) ([0485b9e](https://github.com/googleapis/nodejs-video-stitcher/commit/0485b9e11d90f9181e38214b5b4289fc491fc7d8)) +* change import long to require ([#24](https://github.com/googleapis/nodejs-video-stitcher/issues/24)) ([9c8676a](https://github.com/googleapis/nodejs-video-stitcher/commit/9c8676aebc019cbbf7ab0aded6add6d8f5a1c9a6)) +* remove pip install statements ([#1546](https://github.com/googleapis/nodejs-video-stitcher/issues/1546)) ([#26](https://github.com/googleapis/nodejs-video-stitcher/issues/26)) ([ab5b4bf](https://github.com/googleapis/nodejs-video-stitcher/commit/ab5b4bf3c04e38e3ae76decea1e650b3f614a599)) + +## [0.2.0](https://github.com/googleapis/nodejs-video-stitcher/compare/v0.1.1...v0.2.0) (2022-07-04) + + +### Features + +* add asset_id and stream_id fields to VodSession and LiveSession responses ([194dcc2](https://github.com/googleapis/nodejs-video-stitcher/commit/194dcc247e4a6887ed204d8b188f61750a65ef43)) +* support regapic LRO ([194dcc2](https://github.com/googleapis/nodejs-video-stitcher/commit/194dcc247e4a6887ed204d8b188f61750a65ef43)) + + +### Bug Fixes + +* remove COMPLETE_POD stitching option ([194dcc2](https://github.com/googleapis/nodejs-video-stitcher/commit/194dcc247e4a6887ed204d8b188f61750a65ef43)) + +## [0.1.1](https://github.com/googleapis/nodejs-video-stitcher/compare/v0.1.0...v0.1.1) (2022-06-23) + + +### Bug Fixes + +* **deps:** update dependency google-gax to v3 ([#15](https://github.com/googleapis/nodejs-video-stitcher/issues/15)) ([345085f](https://github.com/googleapis/nodejs-video-stitcher/commit/345085f378b7ab6299a593cd8f8d200160b6106e)) + +## 0.1.0 (2022-06-09) + + +### Features + +* add initial samples ([#2](https://github.com/googleapis/nodejs-video-stitcher/issues/2)) ([ded0e2f](https://github.com/googleapis/nodejs-video-stitcher/commit/ded0e2fe6a50d94da495c8f3bf068436acbf92ba)) +* add templated files from docker image ([6027837](https://github.com/googleapis/nodejs-video-stitcher/commit/6027837bde299e4a2449bd90940d36e20bae8a58)) +* initial stub of library ([19dda15](https://github.com/googleapis/nodejs-video-stitcher/commit/19dda1541867a3e0922d57ba96bda52ee9622a46)) diff --git a/packages/google-cloud-video-stitcher/CODE_OF_CONDUCT.md b/packages/google-cloud-video-stitcher/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..2add2547a81 --- /dev/null +++ b/packages/google-cloud-video-stitcher/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-video-stitcher/CONTRIBUTING.md b/packages/google-cloud-video-stitcher/CONTRIBUTING.md new file mode 100644 index 00000000000..199556418ba --- /dev/null +++ b/packages/google-cloud-video-stitcher/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 Video Stitcher API API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + # Run unit tests. + npm test + + # Run sample integration tests. + npm run samples-test + + # Run all system tests. + npm run system-test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=stitcher.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-video-stitcher/LICENSE b/packages/google-cloud-video-stitcher/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/packages/google-cloud-video-stitcher/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-video-stitcher/README.md b/packages/google-cloud-video-stitcher/README.md new file mode 100644 index 00000000000..7a823185293 --- /dev/null +++ b/packages/google-cloud-video-stitcher/README.md @@ -0,0 +1,156 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Video Stitcher API: Node.js Client](https://github.com/googleapis/google-cloud-node) + +[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![npm version](https://img.shields.io/npm/v/@google-cloud/video-stitcher.svg)](https://www.npmjs.org/package/@google-cloud/video-stitcher) + + + + +stitcher client for Node.js + + +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-video-stitcher/CHANGELOG.md). + +* [Video Stitcher API Node.js Client API Reference][client-docs] +* [Video Stitcher API Documentation][product-docs] +* [github.com/googleapis/google-cloud-node/packages/google-cloud-video-stitcher](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-video-stitcher) + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + +* [Samples](#samples) +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Video Stitcher API API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + +### Installing the client library + +```bash +npm install @google-cloud/video-stitcher +``` + + + + +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Video_stitcher_service.create_cdn_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_cdn_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_cdn_key.js,samples/README.md) | +| Video_stitcher_service.create_live_session | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_live_session.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_live_session.js,samples/README.md) | +| Video_stitcher_service.create_slate | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_slate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_slate.js,samples/README.md) | +| Video_stitcher_service.create_vod_session | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_vod_session.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_vod_session.js,samples/README.md) | +| Video_stitcher_service.delete_cdn_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_cdn_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_cdn_key.js,samples/README.md) | +| Video_stitcher_service.delete_slate | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_slate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_slate.js,samples/README.md) | +| Video_stitcher_service.get_cdn_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_cdn_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_cdn_key.js,samples/README.md) | +| Video_stitcher_service.get_live_ad_tag_detail | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_ad_tag_detail.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_ad_tag_detail.js,samples/README.md) | +| Video_stitcher_service.get_live_session | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_session.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_session.js,samples/README.md) | +| Video_stitcher_service.get_slate | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_slate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_slate.js,samples/README.md) | +| Video_stitcher_service.get_vod_ad_tag_detail | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_ad_tag_detail.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_ad_tag_detail.js,samples/README.md) | +| Video_stitcher_service.get_vod_session | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_session.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_session.js,samples/README.md) | +| Video_stitcher_service.get_vod_stitch_detail | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_stitch_detail.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_stitch_detail.js,samples/README.md) | +| Video_stitcher_service.list_cdn_keys | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_cdn_keys.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_cdn_keys.js,samples/README.md) | +| Video_stitcher_service.list_live_ad_tag_details | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_live_ad_tag_details.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_live_ad_tag_details.js,samples/README.md) | +| Video_stitcher_service.list_slates | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_slates.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_slates.js,samples/README.md) | +| Video_stitcher_service.list_vod_ad_tag_details | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_ad_tag_details.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_ad_tag_details.js,samples/README.md) | +| Video_stitcher_service.list_vod_stitch_details | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_stitch_details.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_stitch_details.js,samples/README.md) | +| Video_stitcher_service.update_cdn_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_cdn_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_cdn_key.js,samples/README.md) | +| Video_stitcher_service.update_slate | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_slate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_slate.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/quickstart.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/test/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/test/quickstart.js,samples/README.md) | + + + +The [Video Stitcher API Node.js Client API Reference][client-docs] documentation +also contains samples. + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. + +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: + +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-cloud/video-stitcher@legacy-8` installs client libraries +for versions compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + + + + +This library is considered to be in **beta**. This means it is expected to be +mostly stable while we work toward a general availability release; however, +complete stability is not guaranteed. We will address issues and requests +against beta libraries with a high priority. + + + + + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md). + +Please note that this `README.md`, the `samples/README.md`, +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. To edit one of these files, make an edit +to its templates in +[directory](https://github.com/googleapis/synthtool). + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) + +[client-docs]: https://googleapis.dev/nodejs/videostitcher/latest/ +[product-docs]: https://cloud.google.com/video-stitcher/ +[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=stitcher.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started diff --git a/packages/google-cloud-video-stitcher/linkinator.config.json b/packages/google-cloud-video-stitcher/linkinator.config.json new file mode 100644 index 00000000000..befd23c8633 --- /dev/null +++ b/packages/google-cloud-video-stitcher/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-video-stitcher/package.json b/packages/google-cloud-video-stitcher/package.json new file mode 100644 index 00000000000..4cd7ebc299e --- /dev/null +++ b/packages/google-cloud-video-stitcher/package.json @@ -0,0 +1,71 @@ +{ + "name": "@google-cloud/video-stitcher", + "version": "0.3.0", + "description": "stitcher client for Node.js", + "repository": { + "type": "git", + "directory": "packages/google-cloud-video-stitcher", + "url": "https://github.com/googleapis/google-cloud-node.git" + }, + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google stitcher", + "stitcher", + "stitcher service" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "npm run compile && c8 mocha build/system-test", + "test": "c8 mocha build/test", + "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", + "prelint": "cd samples; npm link ../; npm i" + }, + "dependencies": { + "google-gax": "^3.5.2" + }, + "devDependencies": { + "@types/mocha": "^9.0.0", + "@types/node": "^18.0.0", + "@types/sinon": "^10.0.0", + "c8": "^7.7.2", + "gts": "^3.1.0", + "jsdoc": "^4.0.0", + "jsdoc-fresh": "^2.0.0", + "jsdoc-region-tag": "^2.0.0", + "linkinator": "^4.0.0", + "mocha": "^8.4.0", + "null-loader": "^4.0.1", + "pack-n-play": "^1.0.0-2", + "sinon": "^15.0.0", + "ts-loader": "^9.1.2", + "typescript": "^4.2.4", + "webpack": "^5.36.2", + "webpack-cli": "^5.0.0" + }, + "engines": { + "node": ">=v12.0.0" + }, + "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-video-stitcher" +} diff --git a/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/ad_tag_details.proto b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/ad_tag_details.proto new file mode 100644 index 00000000000..3c1c018b20e --- /dev/null +++ b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/ad_tag_details.proto @@ -0,0 +1,95 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.video.stitcher.v1; + +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/struct.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/video/stitcher/v1;stitcher"; +option java_multiple_files = true; +option java_outer_classname = "AdTagDetailsProto"; +option java_package = "com.google.cloud.video.stitcher.v1"; + +// Container for a live session's ad tag detail. +message LiveAdTagDetail { + option (google.api.resource) = { + type: "videostitcher.googleapis.com/LiveAdTagDetail" + pattern: "projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}" + }; + + // The resource name in the form of + // `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{id}`. + string name = 1; + + // A list of ad requests. + repeated AdRequest ad_requests = 2; +} + +// Information related to the details for one ad tag. +message VodAdTagDetail { + option (google.api.resource) = { + type: "videostitcher.googleapis.com/VodAdTagDetail" + pattern: "projects/{project}/locations/{location}/vodSessions/{vod_session}/vodAdTagDetails/{vod_ad_tag_detail}" + }; + + // The name of the ad tag detail for the specified VOD session, in the form of + // `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{id}`. + string name = 1; + + // A list of ad requests for one ad tag. + repeated AdRequest ad_requests = 2; +} + +// Details of an ad request to an ad server. +message AdRequest { + // The ad tag URI processed with integrated macros. + string uri = 1; + + // The request metadata used to make the ad request. + RequestMetadata request_metadata = 2; + + // The response metadata received from the ad request. + ResponseMetadata response_metadata = 3; +} + +// Metadata for an ad request. +message RequestMetadata { + // The HTTP headers of the ad request. + google.protobuf.Struct headers = 1; +} + +// Metadata for the response of an ad request. +message ResponseMetadata { + // Error message received when making the ad request. + string error = 1; + + // Headers from the response. + google.protobuf.Struct headers = 2; + + // Status code for the response. + string status_code = 3; + + // Size in bytes of the response. + int32 size_bytes = 4; + + // Total time elapsed for the response. + google.protobuf.Duration duration = 5; + + // The body of the response. + string body = 6; +} diff --git a/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/cdn_keys.proto b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/cdn_keys.proto new file mode 100644 index 00000000000..c4835c5a667 --- /dev/null +++ b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/cdn_keys.proto @@ -0,0 +1,79 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.video.stitcher.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/video/stitcher/v1;stitcher"; +option java_multiple_files = true; +option java_outer_classname = "CdnKeysProto"; +option java_package = "com.google.cloud.video.stitcher.v1"; + +// Configuration for a CDN key. Used by the Video Stitcher +// to sign URIs for fetching video manifests and signing +// media segments for playback. +message CdnKey { + option (google.api.resource) = { + type: "videostitcher.googleapis.com/CdnKey" + pattern: "projects/{project}/locations/{location}/cdnKeys/{cdn_key}" + }; + + // Configuration associated with the CDN key. + oneof cdn_key_config { + // The configuration for a Google Cloud CDN key. + GoogleCdnKey google_cdn_key = 5; + + // The configuration for an Akamai CDN key. + AkamaiCdnKey akamai_cdn_key = 6; + + // The configuration for a Media CDN key. + MediaCdnKey media_cdn_key = 8; + } + + // The resource name of the CDN key, in the form of + // `projects/{project}/locations/{location}/cdnKeys/{id}`. + // The name is ignored when creating a CDN key. + string name = 1; + + // The hostname this key applies to. + string hostname = 4; +} + +// Configuration for a Google Cloud CDN key. +message GoogleCdnKey { + // Input only. Secret for this Google Cloud CDN key. + bytes private_key = 1 [(google.api.field_behavior) = INPUT_ONLY]; + + // The public name of the Google Cloud CDN key. + string key_name = 2; +} + +// Configuration for an Akamai CDN key. +message AkamaiCdnKey { + // Input only. Token key for the Akamai CDN edge configuration. + bytes token_key = 1 [(google.api.field_behavior) = INPUT_ONLY]; +} + +// Configuration for a Media CDN key. +message MediaCdnKey { + // Input only. 64-byte ed25519 private key for this Media CDN key. + bytes private_key = 1 [(google.api.field_behavior) = INPUT_ONLY]; + + // The keyset name of the Media CDN key. + string key_name = 2; +} diff --git a/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/companions.proto b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/companions.proto new file mode 100644 index 00000000000..af57e92ddbb --- /dev/null +++ b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/companions.proto @@ -0,0 +1,113 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.video.stitcher.v1; + +import "google/cloud/video/stitcher/v1/events.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/video/stitcher/v1;stitcher"; +option java_multiple_files = true; +option java_outer_classname = "CompanionsProto"; +option java_package = "com.google.cloud.video.stitcher.v1"; + +// Metadata for companion ads. +message CompanionAds { + // Indicates how many of the companions should be displayed with the ad. + enum DisplayRequirement { + // Required companions are not specified. The default is ALL. + DISPLAY_REQUIREMENT_UNSPECIFIED = 0; + + // All companions are required to be displayed. + ALL = 1; + + // At least one of companions needs to be displayed. + ANY = 2; + + // All companions are optional for display. + NONE = 3; + } + + // Indicates how many of the companions should be displayed with the ad. + DisplayRequirement display_requirement = 1; + + // List of companion ads. + repeated Companion companions = 2; +} + +// Metadata for a companion. +message Companion { + // Ad resource associated with the companion ad. + oneof ad_resource { + // The IFrame ad resource associated with the companion ad. + IframeAdResource iframe_ad_resource = 10; + + // The static ad resource associated with the companion ad. + StaticAdResource static_ad_resource = 11; + + // The HTML ad resource associated with the companion ad. + HtmlAdResource html_ad_resource = 12; + } + + // The API necessary to communicate with the creative if available. + string api_framework = 1; + + // The pixel height of the placement slot for the intended creative. + int32 height_px = 2; + + // The pixel width of the placement slot for the intended creative. + int32 width_px = 3; + + // The pixel height of the creative. + int32 asset_height_px = 4; + + // The maximum pixel height of the creative in its expanded state. + int32 expanded_height_px = 5; + + // The pixel width of the creative. + int32 asset_width_px = 6; + + // The maximum pixel width of the creative in its expanded state. + int32 expanded_width_px = 7; + + // The ID used to identify the desired placement on a publisher's page. + // Values to be used should be discussed between publishers and + // advertisers. + string ad_slot_id = 8; + + // The list of tracking events for the companion. + repeated Event events = 9; +} + +// Metadata for an HTML ad resource. +message HtmlAdResource { + // The HTML to display for the ad resource. + string html_source = 1; +} + +// Metadata for an IFrame ad resource. +message IframeAdResource { + // URI source for an IFrame to display for the ad resource. + string uri = 1; +} + +// Metadata for a static ad resource. +message StaticAdResource { + // URI to the static file for the ad resource. + string uri = 1; + + // Describes the MIME type of the ad resource. + string creative_type = 2; +} diff --git a/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/events.proto b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/events.proto new file mode 100644 index 00000000000..3a5e967f528 --- /dev/null +++ b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/events.proto @@ -0,0 +1,131 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.video.stitcher.v1; + +import "google/protobuf/duration.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/video/stitcher/v1;stitcher"; +option java_multiple_files = true; +option java_outer_classname = "EventsProto"; +option java_package = "com.google.cloud.video.stitcher.v1"; + +// Describes an event and a trigger URI. +message Event { + // Describes the event that occurred. + enum EventType { + // The event type is unspecified. + EVENT_TYPE_UNSPECIFIED = 0; + + // First frame of creative ad viewed. + CREATIVE_VIEW = 1; + + // Creative ad started. + START = 2; + + // Start of an ad break. + BREAK_START = 3; + + // End of an ad break. + BREAK_END = 4; + + // Impression. + IMPRESSION = 5; + + // First quartile progress. + FIRST_QUARTILE = 6; + + // Midpoint progress. + MIDPOINT = 7; + + // Third quartile progress. + THIRD_QUARTILE = 8; + + // Ad progress completed. + COMPLETE = 9; + + // Specific progress event with an offset. + PROGRESS = 10; + + // Player muted. + MUTE = 11; + + // Player unmuted. + UNMUTE = 12; + + // Player paused. + PAUSE = 13; + + // Click event. + CLICK = 14; + + // Click-through event. + CLICK_THROUGH = 15; + + // Player rewinding. + REWIND = 16; + + // Player resumed. + RESUME = 17; + + // Error event. + ERROR = 18; + + // Ad expanded to a larger size. + EXPAND = 21; + + // Ad collapsed to a smaller size. + COLLAPSE = 22; + + // Non-linear ad closed. + CLOSE = 24; + + // Linear ad closed. + CLOSE_LINEAR = 25; + + // Ad skipped. + SKIP = 26; + + // Accept invitation event. + ACCEPT_INVITATION = 27; + } + + // Describes the event that occurred. + EventType type = 1; + + // The URI to trigger for this event. + string uri = 2; + + // The ID of the event. + string id = 3; + + // The offset in seconds if the event type is `PROGRESS`. + google.protobuf.Duration offset = 4; +} + +// Indicates a time in which a list of events should be triggered +// during media playback. +message ProgressEvent { + // The time when the following tracking events occurs. The time is in + // seconds relative to the start of the VOD asset. + google.protobuf.Duration time_offset = 1; + + // The list of progress tracking events for the ad break. These can be of + // the following IAB types: `BREAK_START`, `BREAK_END`, `IMPRESSION`, + // `CREATIVE_VIEW`, `START`, `FIRST_QUARTILE`, `MIDPOINT`, `THIRD_QUARTILE`, + // `COMPLETE`, `PROGRESS`. + repeated Event events = 2; +} diff --git a/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/sessions.proto b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/sessions.proto new file mode 100644 index 00000000000..8bbbea80696 --- /dev/null +++ b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/sessions.proto @@ -0,0 +1,246 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.video.stitcher.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/video/stitcher/v1/companions.proto"; +import "google/cloud/video/stitcher/v1/events.proto"; +import "google/protobuf/duration.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/video/stitcher/v1;stitcher"; +option java_multiple_files = true; +option java_outer_classname = "SessionsProto"; +option java_package = "com.google.cloud.video.stitcher.v1"; + +// Metadata for a VOD session. +message VodSession { + option (google.api.resource) = { + type: "videostitcher.googleapis.com/VodSession" + pattern: "projects/{project}/locations/{location}/vodSessions/{vod_session}" + }; + + // Output only. The name of the VOD session, in the form of + // `projects/{project_number}/locations/{location}/vodSessions/{id}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Metadata of what was stitched into the content. + Interstitials interstitials = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The playback URI of the stitched content. + string play_uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. URI of the media to stitch. + string source_uri = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. Ad tag URI. + string ad_tag_uri = 6 [(google.api.field_behavior) = REQUIRED]; + + // Key value pairs for ad tag macro replacement. If the + // specified ad tag URI has macros, this field provides the mapping + // to the value that will replace the macro in the ad tag URI. + // Macros are designated by square brackets. + // For example: + // + // Ad tag URI: `"https://doubleclick.google.com/ad/1?geo_id=[geoId]"` + // + // Ad tag macro map: `{"geoId": "123"}` + // + // Fully qualified ad tag: + // `"`https://doubleclick.google.com/ad/1?geo_id=123"` + map ad_tag_macro_map = 7; + + // Indicates whether client side ad tracking is enabled. If client + // side ad tracking is enabled, then the client player is expected + // to trigger playback and activity events itself. + // If this is set to false, server side ad tracking is enabled, + // causing the Video Stitcher service will trigger playback events + // on behalf of the client player. + bool client_ad_tracking = 8; + + // Additional options that affect the output of the manifest. + ManifestOptions manifest_options = 9; + + // Output only. The generated ID of the VodSession's source media. + string asset_id = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Describes what was stitched into a VOD session's manifest. +message Interstitials { + // List of ad breaks ordered by time. + repeated VodSessionAdBreak ad_breaks = 1; + + // Information related to the content of the VOD session. + VodSessionContent session_content = 2; +} + +// Metadata for an inserted ad in a VOD session. +message VodSessionAd { + // Duration in seconds of the ad. + google.protobuf.Duration duration = 1; + + // Metadata of companion ads associated with the ad. + CompanionAds companion_ads = 2; + + // The list of progress tracking events for the ad break. These can be of + // the following IAB types: `MUTE`, `UNMUTE`, `PAUSE`, `CLICK`, + // `CLICK_THROUGH`, `REWIND`, `RESUME`, `ERROR`, `FULLSCREEN`, + // `EXIT_FULLSCREEN`, `EXPAND`, `COLLAPSE`, `ACCEPT_INVITATION_LINEAR`, + // `CLOSE_LINEAR`, `SKIP`. + repeated Event activity_events = 3; +} + +// Metadata for the entire stitched content in a VOD session. +message VodSessionContent { + // The total duration in seconds of the content including the ads stitched + // in. + google.protobuf.Duration duration = 1; +} + +// Metadata for an inserted ad break. +message VodSessionAdBreak { + // List of events that are expected to be triggered, ordered by time. + repeated ProgressEvent progress_events = 1; + + // Ordered list of ads stitched into the ad break. + repeated VodSessionAd ads = 2; + + // Ad break end time in seconds relative to the start of the VOD asset. + google.protobuf.Duration end_time_offset = 3; + + // Ad break start time in seconds relative to the start of the VOD asset. + google.protobuf.Duration start_time_offset = 4; +} + +// Metadata for a live session. +message LiveSession { + option (google.api.resource) = { + type: "videostitcher.googleapis.com/LiveSession" + pattern: "projects/{project}/locations/{location}/liveSessions/{live_session}" + }; + + // Defines the stitcher behavior in case an ad does not align exactly with + // the ad break boundaries. If not specified, the default is COMPLETE_AD. + enum StitchingPolicy { + // Stitching policy is not specified. + STITCHING_POLICY_UNSPECIFIED = 0; + + // Finishes stitching the current ad before returning to content. + COMPLETE_AD = 1; + + // Cuts an ad short and returns to content in the middle of the ad. + CUT_CURRENT = 3; + } + + // Output only. The name of the live session, in the form of + // `projects/{project}/locations/{location}/liveSessions/{id}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The URI to play the live session's ad-stitched stream. + string play_uri = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The URI of the live session's source stream. + string source_uri = 3; + + // The default ad tag to use when no ad tag ids are specified in an ad break's + // SCTE-35 message. + // + // default_ad_tag_id is necessary when `adTagMap` has more than one key. Its + // value must be present in the `adTagMap`. + string default_ad_tag_id = 4; + + // Key value pairs for ad tags. Ads parsed from ad tags must be MP4 videos + // each with at least one audio track. + map ad_tag_map = 5; + + // Key value pairs for ad tag macro replacement. If the + // specified ad tag URI has macros, this field provides the mapping + // to the value that will replace the macro in the ad tag URI. + // Macros are designated by square brackets. + // + // For example: + // + // Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]" + // + // Ad tag macros: `{"geoId": "123"}` + // + // Fully qualified ad tag: + // `"https://doubleclick.google.com/ad/1?geo_id=123"` + map ad_tag_macros = 6; + + // Whether client side ad tracking is enabled. If enabled, the client player + // is expected to trigger playback and activity events itself. Otherwise, + // server side ad tracking is enabled and the Video Stitcher API will trigger + // playback events on behalf of the client player. + bool client_ad_tracking = 7; + + // The default slate to use when no slates are specified in an ad break's + // SCTE-35 message. When specified, this value must match the ID for a slate + // that has already been created via the + // [CreateSlate](projects.locations.slates/create) method. + string default_slate_id = 8; + + // Defines the stitcher behavior in case an ad does not align exactly with + // the ad break boundaries. If not specified, the default is `COMPLETE_AD`. + StitchingPolicy stitching_policy = 9; + + // Additional options that affect the output of the manifest. + ManifestOptions manifest_options = 10; + + // Output only. The generated ID of the LiveSession's source stream. + string stream_id = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Metadata of an ad tag. +message AdTag { + // Ad tag URI template. + string uri = 1; +} + +// Options for manifest generation. +message ManifestOptions { + // Defines the ordering policy during manifest generation. + enum OrderPolicy { + // Ordering policy is not specified. + ORDER_POLICY_UNSPECIFIED = 0; + + // Order by ascending. + ASCENDING = 1; + + // Order by descending. + DESCENDING = 2; + } + + // If specified, the output manifest will only return renditions matching the + // specified filters. + repeated RenditionFilter include_renditions = 1; + + // If specified, the output manifest will orders the video and muxed + // renditions by bitrate according to the ordering policy. + OrderPolicy bitrate_order = 2; +} + +// Filters for a video or muxed redition. +message RenditionFilter { + // Bitrate in bits per second for the rendition. If set, only renditions with + // the exact bitrate will match. + int32 bitrate_bps = 1; + + // Codecs for the rendition. If set, only renditions with the exact value + // will match. + string codecs = 2; +} diff --git a/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/slates.proto b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/slates.proto new file mode 100644 index 00000000000..a52de64998d --- /dev/null +++ b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/slates.proto @@ -0,0 +1,41 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.video.stitcher.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/video/stitcher/v1;stitcher"; +option java_multiple_files = true; +option java_outer_classname = "SlatesProto"; +option java_package = "com.google.cloud.video.stitcher.v1"; + +// Slate object +message Slate { + option (google.api.resource) = { + type: "videostitcher.googleapis.com/Slate" + pattern: "projects/{project}/locations/{location}/slates/{slate}" + }; + + // Output only. The name of the slate, in the form of + // `projects/{project_number}/locations/{location}/slates/{id}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The URI to fetch the source content for the slate. This URI must return an + // MP4 video with at least one audio track. + string uri = 2; +} diff --git a/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/stitch_details.proto b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/stitch_details.proto new file mode 100644 index 00000000000..e23224e3536 --- /dev/null +++ b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/stitch_details.proto @@ -0,0 +1,60 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.video.stitcher.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/struct.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/video/stitcher/v1;stitcher"; +option java_multiple_files = true; +option java_outer_classname = "StitchDetailsProto"; +option java_package = "com.google.cloud.video.stitcher.v1"; + +// Detailed information related to the interstitial of a VOD session. +message VodStitchDetail { + option (google.api.resource) = { + type: "videostitcher.googleapis.com/VodStitchDetail" + pattern: "projects/{project}/locations/{location}/vodSessions/{vod_session}/vodStitchDetails/{vod_stitch_detail}" + }; + + // The name of the stitch detail in the specified VOD session, in the form of + // `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. + string name = 1; + + // A list of ad processing details for the fetched ad playlist. + repeated AdStitchDetail ad_stitch_details = 3; +} + +// Metadata for a stitched ad. +message AdStitchDetail { + // Required. The ad break ID of the processed ad. + string ad_break_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ad ID of the processed ad. + string ad_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The time offset of the processed ad. + google.protobuf.Duration ad_time_offset = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Indicates the reason why the ad has been skipped. + string skip_reason = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The metadata of the chosen media file for the ad. + map media = 5 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/video_stitcher_service.proto b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/video_stitcher_service.proto new file mode 100644 index 00000000000..938f01c8af6 --- /dev/null +++ b/packages/google-cloud-video-stitcher/protos/google/cloud/video/stitcher/v1/video_stitcher_service.proto @@ -0,0 +1,570 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.video.stitcher.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/video/stitcher/v1/ad_tag_details.proto"; +import "google/cloud/video/stitcher/v1/cdn_keys.proto"; +import "google/cloud/video/stitcher/v1/sessions.proto"; +import "google/cloud/video/stitcher/v1/slates.proto"; +import "google/cloud/video/stitcher/v1/stitch_details.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/video/stitcher/v1;stitcher"; +option java_multiple_files = true; +option java_outer_classname = "VideoStitcherServiceProto"; +option java_package = "com.google.cloud.video.stitcher.v1"; + +// Video-On-Demand content stitching API allows you to insert ads +// into (VoD) video on demand files. You will be able to render custom +// scrubber bars with highlighted ads, enforce ad policies, allow +// seamless playback and tracking on native players and monetize +// content with any standard VMAP compliant ad server. +service VideoStitcherService { + option (google.api.default_host) = "videostitcher.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a new CDN key. + rpc CreateCdnKey(CreateCdnKeyRequest) returns (CdnKey) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/cdnKeys" + body: "cdn_key" + }; + option (google.api.method_signature) = "parent,cdn_key,cdn_key_id"; + } + + // Lists all CDN keys in the specified project and location. + rpc ListCdnKeys(ListCdnKeysRequest) returns (ListCdnKeysResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/cdnKeys" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the specified CDN key. + rpc GetCdnKey(GetCdnKeyRequest) returns (CdnKey) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/cdnKeys/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes the specified CDN key. + rpc DeleteCdnKey(DeleteCdnKeyRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/cdnKeys/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the specified CDN key. Only update fields specified + // in the call method body. + rpc UpdateCdnKey(UpdateCdnKeyRequest) returns (CdnKey) { + option (google.api.http) = { + patch: "/v1/{cdn_key.name=projects/*/locations/*/cdnKeys/*}" + body: "cdn_key" + }; + option (google.api.method_signature) = "cdn_key,update_mask"; + } + + // Creates a client side playback VOD session and returns the full + // tracking and playback metadata of the session. + rpc CreateVodSession(CreateVodSessionRequest) returns (VodSession) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/vodSessions" + body: "vod_session" + }; + option (google.api.method_signature) = "parent,vod_session"; + } + + // Returns the full tracking, playback metadata, and relevant ad-ops + // logs for the specified VOD session. + rpc GetVodSession(GetVodSessionRequest) returns (VodSession) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/vodSessions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns a list of detailed stitching information of the specified VOD + // session. + rpc ListVodStitchDetails(ListVodStitchDetailsRequest) returns (ListVodStitchDetailsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/vodSessions/*}/vodStitchDetails" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the specified stitching information for the specified VOD session. + rpc GetVodStitchDetail(GetVodStitchDetailRequest) returns (VodStitchDetail) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/vodSessions/*/vodStitchDetails/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Return the list of ad tag details for the specified VOD session. + rpc ListVodAdTagDetails(ListVodAdTagDetailsRequest) returns (ListVodAdTagDetailsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/vodSessions/*}/vodAdTagDetails" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the specified ad tag detail for the specified VOD session. + rpc GetVodAdTagDetail(GetVodAdTagDetailRequest) returns (VodAdTagDetail) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/vodSessions/*/vodAdTagDetails/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Return the list of ad tag details for the specified live session. + rpc ListLiveAdTagDetails(ListLiveAdTagDetailsRequest) returns (ListLiveAdTagDetailsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/liveSessions/*}/liveAdTagDetails" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the specified ad tag detail for the specified live session. + rpc GetLiveAdTagDetail(GetLiveAdTagDetailRequest) returns (LiveAdTagDetail) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/liveSessions/*/liveAdTagDetails/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a slate. + rpc CreateSlate(CreateSlateRequest) returns (Slate) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/slates" + body: "slate" + }; + option (google.api.method_signature) = "parent,slate,slate_id"; + } + + // Lists all slates in the specified project and location. + rpc ListSlates(ListSlatesRequest) returns (ListSlatesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/slates" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the specified slate. + rpc GetSlate(GetSlateRequest) returns (Slate) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/slates/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the specified slate. + rpc UpdateSlate(UpdateSlateRequest) returns (Slate) { + option (google.api.http) = { + patch: "/v1/{slate.name=projects/*/locations/*/slates/*}" + body: "slate" + }; + option (google.api.method_signature) = "slate,update_mask"; + } + + // Deletes the specified slate. + rpc DeleteSlate(DeleteSlateRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/slates/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new live session. + rpc CreateLiveSession(CreateLiveSessionRequest) returns (LiveSession) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/liveSessions" + body: "live_session" + }; + option (google.api.method_signature) = "parent,live_session"; + } + + // Returns the details for the specified live session. + rpc GetLiveSession(GetLiveSessionRequest) returns (LiveSession) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/liveSessions/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Request message for VideoStitcherService.createCdnKey. +message CreateCdnKeyRequest { + // Required. The project in which the CDN key should be created, in the form of + // `projects/{project_number}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "videostitcher.googleapis.com/CdnKey" + } + ]; + + // Required. The CDN key resource to create. + CdnKey cdn_key = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the CDN key, which will become the final component of + // the CDN key's resource name. + // + // This value should conform to RFC-1034, which restricts to + // lower-case letters, numbers, and hyphen, with the first character a + // letter, the last a letter or a number, and a 63 character maximum. + string cdn_key_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for VideoStitcherService.listCdnKeys. +message ListCdnKeysRequest { + // Required. The project that contains the list of CDN keys, in the form of + // `projects/{project_number}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "videostitcher.googleapis.com/CdnKey" + } + ]; + + // Requested page size. Server may return fewer items than requested. + // If unspecified, server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results the server should return. + string page_token = 3; + + // Filtering results + string filter = 4; + + // Hint for how to order the results + string order_by = 5; +} + +// Response message for VideoStitcher.ListCdnKeys. +message ListCdnKeysResponse { + // List of CDN keys. + repeated CdnKey cdn_keys = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for VideoStitcherService.getCdnKey. +message GetCdnKeyRequest { + // Required. The name of the CDN key to be retrieved, in the form of + // `projects/{project}/locations/{location}/cdnKeys/{id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "videostitcher.googleapis.com/CdnKey" + } + ]; +} + +// Request message for VideoStitcherService.deleteCdnKey. +message DeleteCdnKeyRequest { + // Required. The name of the CDN key to be deleted, in the form of + // `projects/{project_number}/locations/{location}/cdnKeys/{id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "videostitcher.googleapis.com/CdnKey" + } + ]; +} + +// Request message for VideoStitcherService.updateCdnKey. +message UpdateCdnKeyRequest { + // Required. The CDN key resource which replaces the resource on the server. + CdnKey cdn_key = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The update mask applies to the resource. + // For the `FieldMask` definition, see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for VideoStitcherService.createVodSession +message CreateVodSessionRequest { + // Required. The project and location in which the VOD session should be created, in the + // form of `projects/{project_number}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "videostitcher.googleapis.com/VodSession" + } + ]; + + // Required. Parameters for creating a session. + VodSession vod_session = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for VideoStitcherService.getVodSession +message GetVodSessionRequest { + // Required. The name of the VOD session to be retrieved, in the form of + // `projects/{project_number}/locations/{location}/vodSessions/{id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "videostitcher.googleapis.com/VodSession" + } + ]; +} + +// Request message for VideoStitcherService.listVodStitchDetails. +message ListVodStitchDetailsRequest { + // Required. The VOD session where the stitch details belong to, in the form of + // `projects/{project}/locations/{location}/vodSessions/{id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "videostitcher.googleapis.com/VodStitchDetail" + } + ]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, if any. + string page_token = 3; +} + +// Response message for VideoStitcherService.listVodStitchDetails. +message ListVodStitchDetailsResponse { + // A List of stitch Details. + repeated VodStitchDetail vod_stitch_details = 1; + + // The pagination token. + string next_page_token = 2; +} + +// Request message for VideoStitcherService.getVodStitchDetail. +message GetVodStitchDetailRequest { + // Required. The name of the stitch detail in the specified VOD session, in the form of + // `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "videostitcher.googleapis.com/VodStitchDetail" + } + ]; +} + +// Request message for VideoStitcherService.listVodAdTagDetails. +message ListVodAdTagDetailsRequest { + // Required. The VOD session which the ad tag details belong to, in the form of + // `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "videostitcher.googleapis.com/VodAdTagDetail" + } + ]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, if any. + string page_token = 3; +} + +// Response message for VideoStitcherService.listVodAdTagDetails. +message ListVodAdTagDetailsResponse { + // A List of ad tag details. + repeated VodAdTagDetail vod_ad_tag_details = 1; + + // The pagination token. + string next_page_token = 2; +} + +// Request message for VideoStitcherService.getVodAdTagDetail +message GetVodAdTagDetailRequest { + // Required. The name of the ad tag detail for the specified VOD session, in the form of + // `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "videostitcher.googleapis.com/VodAdTagDetail" + } + ]; +} + +// Request message for VideoStitcherService.listLiveAdTagDetails. +message ListLiveAdTagDetailsRequest { + // Required. The resource parent in the form of + // `projects/{project}/locations/{location}/liveSessions/{live_session}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "videostitcher.googleapis.com/LiveAdTagDetail" + } + ]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The pagination token returned from a previous List request. + string page_token = 3; +} + +// Response message for VideoStitcherService.listLiveAdTagDetails. +message ListLiveAdTagDetailsResponse { + // A list of live session ad tag details. + repeated LiveAdTagDetail live_ad_tag_details = 1; + + // The pagination token. + string next_page_token = 2; +} + +// Request message for VideoStitcherService.getLiveAdTagDetail +message GetLiveAdTagDetailRequest { + // Required. The resource name in the form of + // `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "videostitcher.googleapis.com/LiveAdTagDetail" + } + ]; +} + +// Request message for VideoStitcherService.createSlate. +message CreateSlateRequest { + // Required. The project in which the slate should be created, in the form of + // `projects/{project_number}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "videostitcher.googleapis.com/Slate" + } + ]; + + // Required. The unique identifier for the slate. + // This value should conform to RFC-1034, which restricts to + // lower-case letters, numbers, and hyphen, with the first character a + // letter, the last a letter or a number, and a 63 character maximum. + string slate_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The slate to create. + Slate slate = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for VideoStitcherService.getSlate. +message GetSlateRequest { + // Required. The name of the slate to be retrieved, of the slate, in the form of + // `projects/{project_number}/locations/{location}/slates/{id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "videostitcher.googleapis.com/Slate" + } + ]; +} + +// Request message for VideoStitcherService.listSlates. +message ListSlatesRequest { + // Required. The project to list slates, in the form of `projects/{project_number}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "videostitcher.googleapis.com/Slate" + } + ]; + + // Requested page size. Server may return fewer items than requested. + // If unspecified, server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results the server should return. + string page_token = 3; + + // Filtering results + string filter = 4; + + // Hint for how to order the results + string order_by = 5; +} + +// Response message for VideoStitcherService.listSlates. +message ListSlatesResponse { + // The list of slates + repeated Slate slates = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for VideoStitcherService.updateSlate. +message UpdateSlateRequest { + // Required. The resource with updated fields. + Slate slate = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The update mask which specifies fields which should be updated. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for VideoStitcherService.deleteSlate. +message DeleteSlateRequest { + // Required. The name of the slate to be deleted, in the form of + // `projects/{project_number}/locations/{location}/slates/{id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "videostitcher.googleapis.com/Slate" + } + ]; +} + +// Request message for VideoStitcherService.createLiveSession. +message CreateLiveSessionRequest { + // Required. The project and location in which the live session should be created, + // in the form of `projects/{project_number}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "videostitcher.googleapis.com/LiveSession" + } + ]; + + // Required. Parameters for creating a live session. + LiveSession live_session = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for VideoStitcherService.getSession. +message GetLiveSessionRequest { + // Required. The name of the live session, in the form of + // `projects/{project_number}/locations/{location}/liveSessions/{id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "videostitcher.googleapis.com/LiveSession" + } + ]; +} diff --git a/packages/google-cloud-video-stitcher/protos/protos.d.ts b/packages/google-cloud-video-stitcher/protos/protos.d.ts new file mode 100644 index 00000000000..aea1cc4cd58 --- /dev/null +++ b/packages/google-cloud-video-stitcher/protos/protos.d.ts @@ -0,0 +1,10842 @@ +// 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 video. */ + namespace video { + + /** Namespace stitcher. */ + namespace stitcher { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a LiveAdTagDetail. */ + interface ILiveAdTagDetail { + + /** LiveAdTagDetail name */ + name?: (string|null); + + /** LiveAdTagDetail adRequests */ + adRequests?: (google.cloud.video.stitcher.v1.IAdRequest[]|null); + } + + /** Represents a LiveAdTagDetail. */ + class LiveAdTagDetail implements ILiveAdTagDetail { + + /** + * Constructs a new LiveAdTagDetail. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.ILiveAdTagDetail); + + /** LiveAdTagDetail name. */ + public name: string; + + /** LiveAdTagDetail adRequests. */ + public adRequests: google.cloud.video.stitcher.v1.IAdRequest[]; + + /** + * Creates a new LiveAdTagDetail instance using the specified properties. + * @param [properties] Properties to set + * @returns LiveAdTagDetail instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.ILiveAdTagDetail): google.cloud.video.stitcher.v1.LiveAdTagDetail; + + /** + * Encodes the specified LiveAdTagDetail message. Does not implicitly {@link google.cloud.video.stitcher.v1.LiveAdTagDetail.verify|verify} messages. + * @param message LiveAdTagDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.ILiveAdTagDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LiveAdTagDetail message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.LiveAdTagDetail.verify|verify} messages. + * @param message LiveAdTagDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.ILiveAdTagDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LiveAdTagDetail message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LiveAdTagDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.LiveAdTagDetail; + + /** + * Decodes a LiveAdTagDetail message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LiveAdTagDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.LiveAdTagDetail; + + /** + * Verifies a LiveAdTagDetail message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LiveAdTagDetail message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LiveAdTagDetail + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.LiveAdTagDetail; + + /** + * Creates a plain object from a LiveAdTagDetail message. Also converts values to other types if specified. + * @param message LiveAdTagDetail + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.LiveAdTagDetail, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LiveAdTagDetail to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LiveAdTagDetail + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VodAdTagDetail. */ + interface IVodAdTagDetail { + + /** VodAdTagDetail name */ + name?: (string|null); + + /** VodAdTagDetail adRequests */ + adRequests?: (google.cloud.video.stitcher.v1.IAdRequest[]|null); + } + + /** Represents a VodAdTagDetail. */ + class VodAdTagDetail implements IVodAdTagDetail { + + /** + * Constructs a new VodAdTagDetail. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IVodAdTagDetail); + + /** VodAdTagDetail name. */ + public name: string; + + /** VodAdTagDetail adRequests. */ + public adRequests: google.cloud.video.stitcher.v1.IAdRequest[]; + + /** + * Creates a new VodAdTagDetail instance using the specified properties. + * @param [properties] Properties to set + * @returns VodAdTagDetail instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IVodAdTagDetail): google.cloud.video.stitcher.v1.VodAdTagDetail; + + /** + * Encodes the specified VodAdTagDetail message. Does not implicitly {@link google.cloud.video.stitcher.v1.VodAdTagDetail.verify|verify} messages. + * @param message VodAdTagDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IVodAdTagDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VodAdTagDetail message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.VodAdTagDetail.verify|verify} messages. + * @param message VodAdTagDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IVodAdTagDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VodAdTagDetail message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VodAdTagDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.VodAdTagDetail; + + /** + * Decodes a VodAdTagDetail message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VodAdTagDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.VodAdTagDetail; + + /** + * Verifies a VodAdTagDetail message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VodAdTagDetail message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VodAdTagDetail + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.VodAdTagDetail; + + /** + * Creates a plain object from a VodAdTagDetail message. Also converts values to other types if specified. + * @param message VodAdTagDetail + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.VodAdTagDetail, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VodAdTagDetail to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VodAdTagDetail + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AdRequest. */ + interface IAdRequest { + + /** AdRequest uri */ + uri?: (string|null); + + /** AdRequest requestMetadata */ + requestMetadata?: (google.cloud.video.stitcher.v1.IRequestMetadata|null); + + /** AdRequest responseMetadata */ + responseMetadata?: (google.cloud.video.stitcher.v1.IResponseMetadata|null); + } + + /** Represents an AdRequest. */ + class AdRequest implements IAdRequest { + + /** + * Constructs a new AdRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IAdRequest); + + /** AdRequest uri. */ + public uri: string; + + /** AdRequest requestMetadata. */ + public requestMetadata?: (google.cloud.video.stitcher.v1.IRequestMetadata|null); + + /** AdRequest responseMetadata. */ + public responseMetadata?: (google.cloud.video.stitcher.v1.IResponseMetadata|null); + + /** + * Creates a new AdRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AdRequest instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IAdRequest): google.cloud.video.stitcher.v1.AdRequest; + + /** + * Encodes the specified AdRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.AdRequest.verify|verify} messages. + * @param message AdRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IAdRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.AdRequest.verify|verify} messages. + * @param message AdRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IAdRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.AdRequest; + + /** + * Decodes an AdRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.AdRequest; + + /** + * Verifies an AdRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AdRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.AdRequest; + + /** + * Creates a plain object from an AdRequest message. Also converts values to other types if specified. + * @param message AdRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.AdRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AdRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RequestMetadata. */ + interface IRequestMetadata { + + /** RequestMetadata headers */ + headers?: (google.protobuf.IStruct|null); + } + + /** Represents a RequestMetadata. */ + class RequestMetadata implements IRequestMetadata { + + /** + * Constructs a new RequestMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IRequestMetadata); + + /** RequestMetadata headers. */ + public headers?: (google.protobuf.IStruct|null); + + /** + * Creates a new RequestMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestMetadata instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IRequestMetadata): google.cloud.video.stitcher.v1.RequestMetadata; + + /** + * Encodes the specified RequestMetadata message. Does not implicitly {@link google.cloud.video.stitcher.v1.RequestMetadata.verify|verify} messages. + * @param message RequestMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IRequestMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RequestMetadata message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.RequestMetadata.verify|verify} messages. + * @param message RequestMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IRequestMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RequestMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.RequestMetadata; + + /** + * Decodes a RequestMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RequestMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.RequestMetadata; + + /** + * Verifies a RequestMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RequestMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.RequestMetadata; + + /** + * Creates a plain object from a RequestMetadata message. Also converts values to other types if specified. + * @param message RequestMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.RequestMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RequestMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RequestMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResponseMetadata. */ + interface IResponseMetadata { + + /** ResponseMetadata error */ + error?: (string|null); + + /** ResponseMetadata headers */ + headers?: (google.protobuf.IStruct|null); + + /** ResponseMetadata statusCode */ + statusCode?: (string|null); + + /** ResponseMetadata sizeBytes */ + sizeBytes?: (number|null); + + /** ResponseMetadata duration */ + duration?: (google.protobuf.IDuration|null); + + /** ResponseMetadata body */ + body?: (string|null); + } + + /** Represents a ResponseMetadata. */ + class ResponseMetadata implements IResponseMetadata { + + /** + * Constructs a new ResponseMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IResponseMetadata); + + /** ResponseMetadata error. */ + public error: string; + + /** ResponseMetadata headers. */ + public headers?: (google.protobuf.IStruct|null); + + /** ResponseMetadata statusCode. */ + public statusCode: string; + + /** ResponseMetadata sizeBytes. */ + public sizeBytes: number; + + /** ResponseMetadata duration. */ + public duration?: (google.protobuf.IDuration|null); + + /** ResponseMetadata body. */ + public body: string; + + /** + * Creates a new ResponseMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseMetadata instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IResponseMetadata): google.cloud.video.stitcher.v1.ResponseMetadata; + + /** + * Encodes the specified ResponseMetadata message. Does not implicitly {@link google.cloud.video.stitcher.v1.ResponseMetadata.verify|verify} messages. + * @param message ResponseMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IResponseMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResponseMetadata message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ResponseMetadata.verify|verify} messages. + * @param message ResponseMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IResponseMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResponseMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.ResponseMetadata; + + /** + * Decodes a ResponseMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResponseMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.ResponseMetadata; + + /** + * Verifies a ResponseMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResponseMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.ResponseMetadata; + + /** + * Creates a plain object from a ResponseMetadata message. Also converts values to other types if specified. + * @param message ResponseMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.ResponseMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResponseMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResponseMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CdnKey. */ + interface ICdnKey { + + /** CdnKey googleCdnKey */ + googleCdnKey?: (google.cloud.video.stitcher.v1.IGoogleCdnKey|null); + + /** CdnKey akamaiCdnKey */ + akamaiCdnKey?: (google.cloud.video.stitcher.v1.IAkamaiCdnKey|null); + + /** CdnKey mediaCdnKey */ + mediaCdnKey?: (google.cloud.video.stitcher.v1.IMediaCdnKey|null); + + /** CdnKey name */ + name?: (string|null); + + /** CdnKey hostname */ + hostname?: (string|null); + } + + /** Represents a CdnKey. */ + class CdnKey implements ICdnKey { + + /** + * Constructs a new CdnKey. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.ICdnKey); + + /** CdnKey googleCdnKey. */ + public googleCdnKey?: (google.cloud.video.stitcher.v1.IGoogleCdnKey|null); + + /** CdnKey akamaiCdnKey. */ + public akamaiCdnKey?: (google.cloud.video.stitcher.v1.IAkamaiCdnKey|null); + + /** CdnKey mediaCdnKey. */ + public mediaCdnKey?: (google.cloud.video.stitcher.v1.IMediaCdnKey|null); + + /** CdnKey name. */ + public name: string; + + /** CdnKey hostname. */ + public hostname: string; + + /** CdnKey cdnKeyConfig. */ + public cdnKeyConfig?: ("googleCdnKey"|"akamaiCdnKey"|"mediaCdnKey"); + + /** + * Creates a new CdnKey instance using the specified properties. + * @param [properties] Properties to set + * @returns CdnKey instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.ICdnKey): google.cloud.video.stitcher.v1.CdnKey; + + /** + * Encodes the specified CdnKey message. Does not implicitly {@link google.cloud.video.stitcher.v1.CdnKey.verify|verify} messages. + * @param message CdnKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.ICdnKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CdnKey message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.CdnKey.verify|verify} messages. + * @param message CdnKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.ICdnKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CdnKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CdnKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.CdnKey; + + /** + * Decodes a CdnKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CdnKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.CdnKey; + + /** + * Verifies a CdnKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CdnKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CdnKey + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.CdnKey; + + /** + * Creates a plain object from a CdnKey message. Also converts values to other types if specified. + * @param message CdnKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.CdnKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CdnKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CdnKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GoogleCdnKey. */ + interface IGoogleCdnKey { + + /** GoogleCdnKey privateKey */ + privateKey?: (Uint8Array|string|null); + + /** GoogleCdnKey keyName */ + keyName?: (string|null); + } + + /** Represents a GoogleCdnKey. */ + class GoogleCdnKey implements IGoogleCdnKey { + + /** + * Constructs a new GoogleCdnKey. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IGoogleCdnKey); + + /** GoogleCdnKey privateKey. */ + public privateKey: (Uint8Array|string); + + /** GoogleCdnKey keyName. */ + public keyName: string; + + /** + * Creates a new GoogleCdnKey instance using the specified properties. + * @param [properties] Properties to set + * @returns GoogleCdnKey instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IGoogleCdnKey): google.cloud.video.stitcher.v1.GoogleCdnKey; + + /** + * Encodes the specified GoogleCdnKey message. Does not implicitly {@link google.cloud.video.stitcher.v1.GoogleCdnKey.verify|verify} messages. + * @param message GoogleCdnKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IGoogleCdnKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoogleCdnKey message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GoogleCdnKey.verify|verify} messages. + * @param message GoogleCdnKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IGoogleCdnKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoogleCdnKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoogleCdnKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.GoogleCdnKey; + + /** + * Decodes a GoogleCdnKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoogleCdnKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.GoogleCdnKey; + + /** + * Verifies a GoogleCdnKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GoogleCdnKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoogleCdnKey + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.GoogleCdnKey; + + /** + * Creates a plain object from a GoogleCdnKey message. Also converts values to other types if specified. + * @param message GoogleCdnKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.GoogleCdnKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoogleCdnKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoogleCdnKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AkamaiCdnKey. */ + interface IAkamaiCdnKey { + + /** AkamaiCdnKey tokenKey */ + tokenKey?: (Uint8Array|string|null); + } + + /** Represents an AkamaiCdnKey. */ + class AkamaiCdnKey implements IAkamaiCdnKey { + + /** + * Constructs a new AkamaiCdnKey. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IAkamaiCdnKey); + + /** AkamaiCdnKey tokenKey. */ + public tokenKey: (Uint8Array|string); + + /** + * Creates a new AkamaiCdnKey instance using the specified properties. + * @param [properties] Properties to set + * @returns AkamaiCdnKey instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IAkamaiCdnKey): google.cloud.video.stitcher.v1.AkamaiCdnKey; + + /** + * Encodes the specified AkamaiCdnKey message. Does not implicitly {@link google.cloud.video.stitcher.v1.AkamaiCdnKey.verify|verify} messages. + * @param message AkamaiCdnKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IAkamaiCdnKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AkamaiCdnKey message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.AkamaiCdnKey.verify|verify} messages. + * @param message AkamaiCdnKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IAkamaiCdnKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AkamaiCdnKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AkamaiCdnKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.AkamaiCdnKey; + + /** + * Decodes an AkamaiCdnKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AkamaiCdnKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.AkamaiCdnKey; + + /** + * Verifies an AkamaiCdnKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AkamaiCdnKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AkamaiCdnKey + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.AkamaiCdnKey; + + /** + * Creates a plain object from an AkamaiCdnKey message. Also converts values to other types if specified. + * @param message AkamaiCdnKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.AkamaiCdnKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AkamaiCdnKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AkamaiCdnKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MediaCdnKey. */ + interface IMediaCdnKey { + + /** MediaCdnKey privateKey */ + privateKey?: (Uint8Array|string|null); + + /** MediaCdnKey keyName */ + keyName?: (string|null); + } + + /** Represents a MediaCdnKey. */ + class MediaCdnKey implements IMediaCdnKey { + + /** + * Constructs a new MediaCdnKey. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IMediaCdnKey); + + /** MediaCdnKey privateKey. */ + public privateKey: (Uint8Array|string); + + /** MediaCdnKey keyName. */ + public keyName: string; + + /** + * Creates a new MediaCdnKey instance using the specified properties. + * @param [properties] Properties to set + * @returns MediaCdnKey instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IMediaCdnKey): google.cloud.video.stitcher.v1.MediaCdnKey; + + /** + * Encodes the specified MediaCdnKey message. Does not implicitly {@link google.cloud.video.stitcher.v1.MediaCdnKey.verify|verify} messages. + * @param message MediaCdnKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IMediaCdnKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MediaCdnKey message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.MediaCdnKey.verify|verify} messages. + * @param message MediaCdnKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IMediaCdnKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MediaCdnKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MediaCdnKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.MediaCdnKey; + + /** + * Decodes a MediaCdnKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MediaCdnKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.MediaCdnKey; + + /** + * Verifies a MediaCdnKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MediaCdnKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MediaCdnKey + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.MediaCdnKey; + + /** + * Creates a plain object from a MediaCdnKey message. Also converts values to other types if specified. + * @param message MediaCdnKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.MediaCdnKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MediaCdnKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MediaCdnKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CompanionAds. */ + interface ICompanionAds { + + /** CompanionAds displayRequirement */ + displayRequirement?: (google.cloud.video.stitcher.v1.CompanionAds.DisplayRequirement|keyof typeof google.cloud.video.stitcher.v1.CompanionAds.DisplayRequirement|null); + + /** CompanionAds companions */ + companions?: (google.cloud.video.stitcher.v1.ICompanion[]|null); + } + + /** Represents a CompanionAds. */ + class CompanionAds implements ICompanionAds { + + /** + * Constructs a new CompanionAds. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.ICompanionAds); + + /** CompanionAds displayRequirement. */ + public displayRequirement: (google.cloud.video.stitcher.v1.CompanionAds.DisplayRequirement|keyof typeof google.cloud.video.stitcher.v1.CompanionAds.DisplayRequirement); + + /** CompanionAds companions. */ + public companions: google.cloud.video.stitcher.v1.ICompanion[]; + + /** + * Creates a new CompanionAds instance using the specified properties. + * @param [properties] Properties to set + * @returns CompanionAds instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.ICompanionAds): google.cloud.video.stitcher.v1.CompanionAds; + + /** + * Encodes the specified CompanionAds message. Does not implicitly {@link google.cloud.video.stitcher.v1.CompanionAds.verify|verify} messages. + * @param message CompanionAds message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.ICompanionAds, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompanionAds message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.CompanionAds.verify|verify} messages. + * @param message CompanionAds message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.ICompanionAds, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompanionAds message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompanionAds + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.CompanionAds; + + /** + * Decodes a CompanionAds message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompanionAds + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.CompanionAds; + + /** + * Verifies a CompanionAds message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompanionAds message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompanionAds + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.CompanionAds; + + /** + * Creates a plain object from a CompanionAds message. Also converts values to other types if specified. + * @param message CompanionAds + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.CompanionAds, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompanionAds to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CompanionAds + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CompanionAds { + + /** DisplayRequirement enum. */ + enum DisplayRequirement { + DISPLAY_REQUIREMENT_UNSPECIFIED = 0, + ALL = 1, + ANY = 2, + NONE = 3 + } + } + + /** Properties of a Companion. */ + interface ICompanion { + + /** Companion iframeAdResource */ + iframeAdResource?: (google.cloud.video.stitcher.v1.IIframeAdResource|null); + + /** Companion staticAdResource */ + staticAdResource?: (google.cloud.video.stitcher.v1.IStaticAdResource|null); + + /** Companion htmlAdResource */ + htmlAdResource?: (google.cloud.video.stitcher.v1.IHtmlAdResource|null); + + /** Companion apiFramework */ + apiFramework?: (string|null); + + /** Companion heightPx */ + heightPx?: (number|null); + + /** Companion widthPx */ + widthPx?: (number|null); + + /** Companion assetHeightPx */ + assetHeightPx?: (number|null); + + /** Companion expandedHeightPx */ + expandedHeightPx?: (number|null); + + /** Companion assetWidthPx */ + assetWidthPx?: (number|null); + + /** Companion expandedWidthPx */ + expandedWidthPx?: (number|null); + + /** Companion adSlotId */ + adSlotId?: (string|null); + + /** Companion events */ + events?: (google.cloud.video.stitcher.v1.IEvent[]|null); + } + + /** Represents a Companion. */ + class Companion implements ICompanion { + + /** + * Constructs a new Companion. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.ICompanion); + + /** Companion iframeAdResource. */ + public iframeAdResource?: (google.cloud.video.stitcher.v1.IIframeAdResource|null); + + /** Companion staticAdResource. */ + public staticAdResource?: (google.cloud.video.stitcher.v1.IStaticAdResource|null); + + /** Companion htmlAdResource. */ + public htmlAdResource?: (google.cloud.video.stitcher.v1.IHtmlAdResource|null); + + /** Companion apiFramework. */ + public apiFramework: string; + + /** Companion heightPx. */ + public heightPx: number; + + /** Companion widthPx. */ + public widthPx: number; + + /** Companion assetHeightPx. */ + public assetHeightPx: number; + + /** Companion expandedHeightPx. */ + public expandedHeightPx: number; + + /** Companion assetWidthPx. */ + public assetWidthPx: number; + + /** Companion expandedWidthPx. */ + public expandedWidthPx: number; + + /** Companion adSlotId. */ + public adSlotId: string; + + /** Companion events. */ + public events: google.cloud.video.stitcher.v1.IEvent[]; + + /** Companion adResource. */ + public adResource?: ("iframeAdResource"|"staticAdResource"|"htmlAdResource"); + + /** + * Creates a new Companion instance using the specified properties. + * @param [properties] Properties to set + * @returns Companion instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.ICompanion): google.cloud.video.stitcher.v1.Companion; + + /** + * Encodes the specified Companion message. Does not implicitly {@link google.cloud.video.stitcher.v1.Companion.verify|verify} messages. + * @param message Companion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.ICompanion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Companion message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.Companion.verify|verify} messages. + * @param message Companion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.ICompanion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Companion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Companion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.Companion; + + /** + * Decodes a Companion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Companion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.Companion; + + /** + * Verifies a Companion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Companion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Companion + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.Companion; + + /** + * Creates a plain object from a Companion message. Also converts values to other types if specified. + * @param message Companion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.Companion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Companion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Companion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HtmlAdResource. */ + interface IHtmlAdResource { + + /** HtmlAdResource htmlSource */ + htmlSource?: (string|null); + } + + /** Represents a HtmlAdResource. */ + class HtmlAdResource implements IHtmlAdResource { + + /** + * Constructs a new HtmlAdResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IHtmlAdResource); + + /** HtmlAdResource htmlSource. */ + public htmlSource: string; + + /** + * Creates a new HtmlAdResource instance using the specified properties. + * @param [properties] Properties to set + * @returns HtmlAdResource instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IHtmlAdResource): google.cloud.video.stitcher.v1.HtmlAdResource; + + /** + * Encodes the specified HtmlAdResource message. Does not implicitly {@link google.cloud.video.stitcher.v1.HtmlAdResource.verify|verify} messages. + * @param message HtmlAdResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IHtmlAdResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HtmlAdResource message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.HtmlAdResource.verify|verify} messages. + * @param message HtmlAdResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IHtmlAdResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HtmlAdResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HtmlAdResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.HtmlAdResource; + + /** + * Decodes a HtmlAdResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HtmlAdResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.HtmlAdResource; + + /** + * Verifies a HtmlAdResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HtmlAdResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HtmlAdResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.HtmlAdResource; + + /** + * Creates a plain object from a HtmlAdResource message. Also converts values to other types if specified. + * @param message HtmlAdResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.HtmlAdResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HtmlAdResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HtmlAdResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an IframeAdResource. */ + interface IIframeAdResource { + + /** IframeAdResource uri */ + uri?: (string|null); + } + + /** Represents an IframeAdResource. */ + class IframeAdResource implements IIframeAdResource { + + /** + * Constructs a new IframeAdResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IIframeAdResource); + + /** IframeAdResource uri. */ + public uri: string; + + /** + * Creates a new IframeAdResource instance using the specified properties. + * @param [properties] Properties to set + * @returns IframeAdResource instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IIframeAdResource): google.cloud.video.stitcher.v1.IframeAdResource; + + /** + * Encodes the specified IframeAdResource message. Does not implicitly {@link google.cloud.video.stitcher.v1.IframeAdResource.verify|verify} messages. + * @param message IframeAdResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IIframeAdResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IframeAdResource message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.IframeAdResource.verify|verify} messages. + * @param message IframeAdResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IIframeAdResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IframeAdResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IframeAdResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.IframeAdResource; + + /** + * Decodes an IframeAdResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IframeAdResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.IframeAdResource; + + /** + * Verifies an IframeAdResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an IframeAdResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IframeAdResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.IframeAdResource; + + /** + * Creates a plain object from an IframeAdResource message. Also converts values to other types if specified. + * @param message IframeAdResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.IframeAdResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IframeAdResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IframeAdResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StaticAdResource. */ + interface IStaticAdResource { + + /** StaticAdResource uri */ + uri?: (string|null); + + /** StaticAdResource creativeType */ + creativeType?: (string|null); + } + + /** Represents a StaticAdResource. */ + class StaticAdResource implements IStaticAdResource { + + /** + * Constructs a new StaticAdResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IStaticAdResource); + + /** StaticAdResource uri. */ + public uri: string; + + /** StaticAdResource creativeType. */ + public creativeType: string; + + /** + * Creates a new StaticAdResource instance using the specified properties. + * @param [properties] Properties to set + * @returns StaticAdResource instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IStaticAdResource): google.cloud.video.stitcher.v1.StaticAdResource; + + /** + * Encodes the specified StaticAdResource message. Does not implicitly {@link google.cloud.video.stitcher.v1.StaticAdResource.verify|verify} messages. + * @param message StaticAdResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IStaticAdResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StaticAdResource message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.StaticAdResource.verify|verify} messages. + * @param message StaticAdResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IStaticAdResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StaticAdResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StaticAdResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.StaticAdResource; + + /** + * Decodes a StaticAdResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StaticAdResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.StaticAdResource; + + /** + * Verifies a StaticAdResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StaticAdResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StaticAdResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.StaticAdResource; + + /** + * Creates a plain object from a StaticAdResource message. Also converts values to other types if specified. + * @param message StaticAdResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.StaticAdResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StaticAdResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StaticAdResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Event. */ + interface IEvent { + + /** Event type */ + type?: (google.cloud.video.stitcher.v1.Event.EventType|keyof typeof google.cloud.video.stitcher.v1.Event.EventType|null); + + /** Event uri */ + uri?: (string|null); + + /** Event id */ + id?: (string|null); + + /** Event offset */ + offset?: (google.protobuf.IDuration|null); + } + + /** Represents an Event. */ + class Event implements IEvent { + + /** + * Constructs a new Event. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IEvent); + + /** Event type. */ + public type: (google.cloud.video.stitcher.v1.Event.EventType|keyof typeof google.cloud.video.stitcher.v1.Event.EventType); + + /** Event uri. */ + public uri: string; + + /** Event id. */ + public id: string; + + /** Event offset. */ + public offset?: (google.protobuf.IDuration|null); + + /** + * Creates a new Event instance using the specified properties. + * @param [properties] Properties to set + * @returns Event instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IEvent): google.cloud.video.stitcher.v1.Event; + + /** + * Encodes the specified Event message. Does not implicitly {@link google.cloud.video.stitcher.v1.Event.verify|verify} messages. + * @param message Event message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Event message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.Event.verify|verify} messages. + * @param message Event message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Event message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Event + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.Event; + + /** + * Decodes an Event message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Event + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.Event; + + /** + * Verifies an Event message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Event message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Event + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.Event; + + /** + * Creates a plain object from an Event message. Also converts values to other types if specified. + * @param message Event + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.Event, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Event to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Event + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Event { + + /** EventType enum. */ + enum EventType { + EVENT_TYPE_UNSPECIFIED = 0, + CREATIVE_VIEW = 1, + START = 2, + BREAK_START = 3, + BREAK_END = 4, + IMPRESSION = 5, + FIRST_QUARTILE = 6, + MIDPOINT = 7, + THIRD_QUARTILE = 8, + COMPLETE = 9, + PROGRESS = 10, + MUTE = 11, + UNMUTE = 12, + PAUSE = 13, + CLICK = 14, + CLICK_THROUGH = 15, + REWIND = 16, + RESUME = 17, + ERROR = 18, + EXPAND = 21, + COLLAPSE = 22, + CLOSE = 24, + CLOSE_LINEAR = 25, + SKIP = 26, + ACCEPT_INVITATION = 27 + } + } + + /** Properties of a ProgressEvent. */ + interface IProgressEvent { + + /** ProgressEvent timeOffset */ + timeOffset?: (google.protobuf.IDuration|null); + + /** ProgressEvent events */ + events?: (google.cloud.video.stitcher.v1.IEvent[]|null); + } + + /** Represents a ProgressEvent. */ + class ProgressEvent implements IProgressEvent { + + /** + * Constructs a new ProgressEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IProgressEvent); + + /** ProgressEvent timeOffset. */ + public timeOffset?: (google.protobuf.IDuration|null); + + /** ProgressEvent events. */ + public events: google.cloud.video.stitcher.v1.IEvent[]; + + /** + * Creates a new ProgressEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns ProgressEvent instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IProgressEvent): google.cloud.video.stitcher.v1.ProgressEvent; + + /** + * Encodes the specified ProgressEvent message. Does not implicitly {@link google.cloud.video.stitcher.v1.ProgressEvent.verify|verify} messages. + * @param message ProgressEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IProgressEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProgressEvent message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ProgressEvent.verify|verify} messages. + * @param message ProgressEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IProgressEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProgressEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProgressEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.ProgressEvent; + + /** + * Decodes a ProgressEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProgressEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.ProgressEvent; + + /** + * Verifies a ProgressEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProgressEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProgressEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.ProgressEvent; + + /** + * Creates a plain object from a ProgressEvent message. Also converts values to other types if specified. + * @param message ProgressEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.ProgressEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProgressEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProgressEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VodSession. */ + interface IVodSession { + + /** VodSession name */ + name?: (string|null); + + /** VodSession interstitials */ + interstitials?: (google.cloud.video.stitcher.v1.IInterstitials|null); + + /** VodSession playUri */ + playUri?: (string|null); + + /** VodSession sourceUri */ + sourceUri?: (string|null); + + /** VodSession adTagUri */ + adTagUri?: (string|null); + + /** VodSession adTagMacroMap */ + adTagMacroMap?: ({ [k: string]: string }|null); + + /** VodSession clientAdTracking */ + clientAdTracking?: (boolean|null); + + /** VodSession manifestOptions */ + manifestOptions?: (google.cloud.video.stitcher.v1.IManifestOptions|null); + + /** VodSession assetId */ + assetId?: (string|null); + } + + /** Represents a VodSession. */ + class VodSession implements IVodSession { + + /** + * Constructs a new VodSession. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IVodSession); + + /** VodSession name. */ + public name: string; + + /** VodSession interstitials. */ + public interstitials?: (google.cloud.video.stitcher.v1.IInterstitials|null); + + /** VodSession playUri. */ + public playUri: string; + + /** VodSession sourceUri. */ + public sourceUri: string; + + /** VodSession adTagUri. */ + public adTagUri: string; + + /** VodSession adTagMacroMap. */ + public adTagMacroMap: { [k: string]: string }; + + /** VodSession clientAdTracking. */ + public clientAdTracking: boolean; + + /** VodSession manifestOptions. */ + public manifestOptions?: (google.cloud.video.stitcher.v1.IManifestOptions|null); + + /** VodSession assetId. */ + public assetId: string; + + /** + * Creates a new VodSession instance using the specified properties. + * @param [properties] Properties to set + * @returns VodSession instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IVodSession): google.cloud.video.stitcher.v1.VodSession; + + /** + * Encodes the specified VodSession message. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSession.verify|verify} messages. + * @param message VodSession message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IVodSession, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VodSession message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSession.verify|verify} messages. + * @param message VodSession message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IVodSession, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VodSession message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VodSession + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.VodSession; + + /** + * Decodes a VodSession message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VodSession + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.VodSession; + + /** + * Verifies a VodSession message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VodSession message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VodSession + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.VodSession; + + /** + * Creates a plain object from a VodSession message. Also converts values to other types if specified. + * @param message VodSession + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.VodSession, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VodSession to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VodSession + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Interstitials. */ + interface IInterstitials { + + /** Interstitials adBreaks */ + adBreaks?: (google.cloud.video.stitcher.v1.IVodSessionAdBreak[]|null); + + /** Interstitials sessionContent */ + sessionContent?: (google.cloud.video.stitcher.v1.IVodSessionContent|null); + } + + /** Represents an Interstitials. */ + class Interstitials implements IInterstitials { + + /** + * Constructs a new Interstitials. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IInterstitials); + + /** Interstitials adBreaks. */ + public adBreaks: google.cloud.video.stitcher.v1.IVodSessionAdBreak[]; + + /** Interstitials sessionContent. */ + public sessionContent?: (google.cloud.video.stitcher.v1.IVodSessionContent|null); + + /** + * Creates a new Interstitials instance using the specified properties. + * @param [properties] Properties to set + * @returns Interstitials instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IInterstitials): google.cloud.video.stitcher.v1.Interstitials; + + /** + * Encodes the specified Interstitials message. Does not implicitly {@link google.cloud.video.stitcher.v1.Interstitials.verify|verify} messages. + * @param message Interstitials message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IInterstitials, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Interstitials message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.Interstitials.verify|verify} messages. + * @param message Interstitials message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IInterstitials, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Interstitials message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Interstitials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.Interstitials; + + /** + * Decodes an Interstitials message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Interstitials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.Interstitials; + + /** + * Verifies an Interstitials message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Interstitials message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Interstitials + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.Interstitials; + + /** + * Creates a plain object from an Interstitials message. Also converts values to other types if specified. + * @param message Interstitials + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.Interstitials, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Interstitials to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Interstitials + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VodSessionAd. */ + interface IVodSessionAd { + + /** VodSessionAd duration */ + duration?: (google.protobuf.IDuration|null); + + /** VodSessionAd companionAds */ + companionAds?: (google.cloud.video.stitcher.v1.ICompanionAds|null); + + /** VodSessionAd activityEvents */ + activityEvents?: (google.cloud.video.stitcher.v1.IEvent[]|null); + } + + /** Represents a VodSessionAd. */ + class VodSessionAd implements IVodSessionAd { + + /** + * Constructs a new VodSessionAd. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IVodSessionAd); + + /** VodSessionAd duration. */ + public duration?: (google.protobuf.IDuration|null); + + /** VodSessionAd companionAds. */ + public companionAds?: (google.cloud.video.stitcher.v1.ICompanionAds|null); + + /** VodSessionAd activityEvents. */ + public activityEvents: google.cloud.video.stitcher.v1.IEvent[]; + + /** + * Creates a new VodSessionAd instance using the specified properties. + * @param [properties] Properties to set + * @returns VodSessionAd instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IVodSessionAd): google.cloud.video.stitcher.v1.VodSessionAd; + + /** + * Encodes the specified VodSessionAd message. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSessionAd.verify|verify} messages. + * @param message VodSessionAd message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IVodSessionAd, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VodSessionAd message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSessionAd.verify|verify} messages. + * @param message VodSessionAd message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IVodSessionAd, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VodSessionAd message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VodSessionAd + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.VodSessionAd; + + /** + * Decodes a VodSessionAd message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VodSessionAd + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.VodSessionAd; + + /** + * Verifies a VodSessionAd message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VodSessionAd message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VodSessionAd + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.VodSessionAd; + + /** + * Creates a plain object from a VodSessionAd message. Also converts values to other types if specified. + * @param message VodSessionAd + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.VodSessionAd, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VodSessionAd to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VodSessionAd + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VodSessionContent. */ + interface IVodSessionContent { + + /** VodSessionContent duration */ + duration?: (google.protobuf.IDuration|null); + } + + /** Represents a VodSessionContent. */ + class VodSessionContent implements IVodSessionContent { + + /** + * Constructs a new VodSessionContent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IVodSessionContent); + + /** VodSessionContent duration. */ + public duration?: (google.protobuf.IDuration|null); + + /** + * Creates a new VodSessionContent instance using the specified properties. + * @param [properties] Properties to set + * @returns VodSessionContent instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IVodSessionContent): google.cloud.video.stitcher.v1.VodSessionContent; + + /** + * Encodes the specified VodSessionContent message. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSessionContent.verify|verify} messages. + * @param message VodSessionContent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IVodSessionContent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VodSessionContent message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSessionContent.verify|verify} messages. + * @param message VodSessionContent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IVodSessionContent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VodSessionContent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VodSessionContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.VodSessionContent; + + /** + * Decodes a VodSessionContent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VodSessionContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.VodSessionContent; + + /** + * Verifies a VodSessionContent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VodSessionContent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VodSessionContent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.VodSessionContent; + + /** + * Creates a plain object from a VodSessionContent message. Also converts values to other types if specified. + * @param message VodSessionContent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.VodSessionContent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VodSessionContent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VodSessionContent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VodSessionAdBreak. */ + interface IVodSessionAdBreak { + + /** VodSessionAdBreak progressEvents */ + progressEvents?: (google.cloud.video.stitcher.v1.IProgressEvent[]|null); + + /** VodSessionAdBreak ads */ + ads?: (google.cloud.video.stitcher.v1.IVodSessionAd[]|null); + + /** VodSessionAdBreak endTimeOffset */ + endTimeOffset?: (google.protobuf.IDuration|null); + + /** VodSessionAdBreak startTimeOffset */ + startTimeOffset?: (google.protobuf.IDuration|null); + } + + /** Represents a VodSessionAdBreak. */ + class VodSessionAdBreak implements IVodSessionAdBreak { + + /** + * Constructs a new VodSessionAdBreak. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IVodSessionAdBreak); + + /** VodSessionAdBreak progressEvents. */ + public progressEvents: google.cloud.video.stitcher.v1.IProgressEvent[]; + + /** VodSessionAdBreak ads. */ + public ads: google.cloud.video.stitcher.v1.IVodSessionAd[]; + + /** VodSessionAdBreak endTimeOffset. */ + public endTimeOffset?: (google.protobuf.IDuration|null); + + /** VodSessionAdBreak startTimeOffset. */ + public startTimeOffset?: (google.protobuf.IDuration|null); + + /** + * Creates a new VodSessionAdBreak instance using the specified properties. + * @param [properties] Properties to set + * @returns VodSessionAdBreak instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IVodSessionAdBreak): google.cloud.video.stitcher.v1.VodSessionAdBreak; + + /** + * Encodes the specified VodSessionAdBreak message. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSessionAdBreak.verify|verify} messages. + * @param message VodSessionAdBreak message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IVodSessionAdBreak, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VodSessionAdBreak message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSessionAdBreak.verify|verify} messages. + * @param message VodSessionAdBreak message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IVodSessionAdBreak, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VodSessionAdBreak message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VodSessionAdBreak + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.VodSessionAdBreak; + + /** + * Decodes a VodSessionAdBreak message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VodSessionAdBreak + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.VodSessionAdBreak; + + /** + * Verifies a VodSessionAdBreak message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VodSessionAdBreak message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VodSessionAdBreak + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.VodSessionAdBreak; + + /** + * Creates a plain object from a VodSessionAdBreak message. Also converts values to other types if specified. + * @param message VodSessionAdBreak + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.VodSessionAdBreak, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VodSessionAdBreak to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VodSessionAdBreak + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LiveSession. */ + interface ILiveSession { + + /** LiveSession name */ + name?: (string|null); + + /** LiveSession playUri */ + playUri?: (string|null); + + /** LiveSession sourceUri */ + sourceUri?: (string|null); + + /** LiveSession defaultAdTagId */ + defaultAdTagId?: (string|null); + + /** LiveSession adTagMap */ + adTagMap?: ({ [k: string]: google.cloud.video.stitcher.v1.IAdTag }|null); + + /** LiveSession adTagMacros */ + adTagMacros?: ({ [k: string]: string }|null); + + /** LiveSession clientAdTracking */ + clientAdTracking?: (boolean|null); + + /** LiveSession defaultSlateId */ + defaultSlateId?: (string|null); + + /** LiveSession stitchingPolicy */ + stitchingPolicy?: (google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy|keyof typeof google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy|null); + + /** LiveSession manifestOptions */ + manifestOptions?: (google.cloud.video.stitcher.v1.IManifestOptions|null); + + /** LiveSession streamId */ + streamId?: (string|null); + } + + /** Represents a LiveSession. */ + class LiveSession implements ILiveSession { + + /** + * Constructs a new LiveSession. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.ILiveSession); + + /** LiveSession name. */ + public name: string; + + /** LiveSession playUri. */ + public playUri: string; + + /** LiveSession sourceUri. */ + public sourceUri: string; + + /** LiveSession defaultAdTagId. */ + public defaultAdTagId: string; + + /** LiveSession adTagMap. */ + public adTagMap: { [k: string]: google.cloud.video.stitcher.v1.IAdTag }; + + /** LiveSession adTagMacros. */ + public adTagMacros: { [k: string]: string }; + + /** LiveSession clientAdTracking. */ + public clientAdTracking: boolean; + + /** LiveSession defaultSlateId. */ + public defaultSlateId: string; + + /** LiveSession stitchingPolicy. */ + public stitchingPolicy: (google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy|keyof typeof google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy); + + /** LiveSession manifestOptions. */ + public manifestOptions?: (google.cloud.video.stitcher.v1.IManifestOptions|null); + + /** LiveSession streamId. */ + public streamId: string; + + /** + * Creates a new LiveSession instance using the specified properties. + * @param [properties] Properties to set + * @returns LiveSession instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.ILiveSession): google.cloud.video.stitcher.v1.LiveSession; + + /** + * Encodes the specified LiveSession message. Does not implicitly {@link google.cloud.video.stitcher.v1.LiveSession.verify|verify} messages. + * @param message LiveSession message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.ILiveSession, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LiveSession message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.LiveSession.verify|verify} messages. + * @param message LiveSession message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.ILiveSession, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LiveSession message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LiveSession + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.LiveSession; + + /** + * Decodes a LiveSession message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LiveSession + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.LiveSession; + + /** + * Verifies a LiveSession message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LiveSession message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LiveSession + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.LiveSession; + + /** + * Creates a plain object from a LiveSession message. Also converts values to other types if specified. + * @param message LiveSession + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.LiveSession, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LiveSession to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LiveSession + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LiveSession { + + /** StitchingPolicy enum. */ + enum StitchingPolicy { + STITCHING_POLICY_UNSPECIFIED = 0, + COMPLETE_AD = 1, + CUT_CURRENT = 3 + } + } + + /** Properties of an AdTag. */ + interface IAdTag { + + /** AdTag uri */ + uri?: (string|null); + } + + /** Represents an AdTag. */ + class AdTag implements IAdTag { + + /** + * Constructs a new AdTag. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IAdTag); + + /** AdTag uri. */ + public uri: string; + + /** + * Creates a new AdTag instance using the specified properties. + * @param [properties] Properties to set + * @returns AdTag instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IAdTag): google.cloud.video.stitcher.v1.AdTag; + + /** + * Encodes the specified AdTag message. Does not implicitly {@link google.cloud.video.stitcher.v1.AdTag.verify|verify} messages. + * @param message AdTag message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IAdTag, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdTag message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.AdTag.verify|verify} messages. + * @param message AdTag message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IAdTag, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdTag message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdTag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.AdTag; + + /** + * Decodes an AdTag message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdTag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.AdTag; + + /** + * Verifies an AdTag message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AdTag message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdTag + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.AdTag; + + /** + * Creates a plain object from an AdTag message. Also converts values to other types if specified. + * @param message AdTag + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.AdTag, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdTag to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AdTag + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ManifestOptions. */ + interface IManifestOptions { + + /** ManifestOptions includeRenditions */ + includeRenditions?: (google.cloud.video.stitcher.v1.IRenditionFilter[]|null); + + /** ManifestOptions bitrateOrder */ + bitrateOrder?: (google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy|keyof typeof google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy|null); + } + + /** Represents a ManifestOptions. */ + class ManifestOptions implements IManifestOptions { + + /** + * Constructs a new ManifestOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IManifestOptions); + + /** ManifestOptions includeRenditions. */ + public includeRenditions: google.cloud.video.stitcher.v1.IRenditionFilter[]; + + /** ManifestOptions bitrateOrder. */ + public bitrateOrder: (google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy|keyof typeof google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy); + + /** + * Creates a new ManifestOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ManifestOptions instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IManifestOptions): google.cloud.video.stitcher.v1.ManifestOptions; + + /** + * Encodes the specified ManifestOptions message. Does not implicitly {@link google.cloud.video.stitcher.v1.ManifestOptions.verify|verify} messages. + * @param message ManifestOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IManifestOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ManifestOptions message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ManifestOptions.verify|verify} messages. + * @param message ManifestOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IManifestOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ManifestOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ManifestOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.ManifestOptions; + + /** + * Decodes a ManifestOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ManifestOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.ManifestOptions; + + /** + * Verifies a ManifestOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ManifestOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ManifestOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.ManifestOptions; + + /** + * Creates a plain object from a ManifestOptions message. Also converts values to other types if specified. + * @param message ManifestOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.ManifestOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ManifestOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ManifestOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ManifestOptions { + + /** OrderPolicy enum. */ + enum OrderPolicy { + ORDER_POLICY_UNSPECIFIED = 0, + ASCENDING = 1, + DESCENDING = 2 + } + } + + /** Properties of a RenditionFilter. */ + interface IRenditionFilter { + + /** RenditionFilter bitrateBps */ + bitrateBps?: (number|null); + + /** RenditionFilter codecs */ + codecs?: (string|null); + } + + /** Represents a RenditionFilter. */ + class RenditionFilter implements IRenditionFilter { + + /** + * Constructs a new RenditionFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IRenditionFilter); + + /** RenditionFilter bitrateBps. */ + public bitrateBps: number; + + /** RenditionFilter codecs. */ + public codecs: string; + + /** + * Creates a new RenditionFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns RenditionFilter instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IRenditionFilter): google.cloud.video.stitcher.v1.RenditionFilter; + + /** + * Encodes the specified RenditionFilter message. Does not implicitly {@link google.cloud.video.stitcher.v1.RenditionFilter.verify|verify} messages. + * @param message RenditionFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IRenditionFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RenditionFilter message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.RenditionFilter.verify|verify} messages. + * @param message RenditionFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IRenditionFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RenditionFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RenditionFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.RenditionFilter; + + /** + * Decodes a RenditionFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RenditionFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.RenditionFilter; + + /** + * Verifies a RenditionFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RenditionFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RenditionFilter + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.RenditionFilter; + + /** + * Creates a plain object from a RenditionFilter message. Also converts values to other types if specified. + * @param message RenditionFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.RenditionFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RenditionFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RenditionFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Slate. */ + interface ISlate { + + /** Slate name */ + name?: (string|null); + + /** Slate uri */ + uri?: (string|null); + } + + /** Represents a Slate. */ + class Slate implements ISlate { + + /** + * Constructs a new Slate. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.ISlate); + + /** Slate name. */ + public name: string; + + /** Slate uri. */ + public uri: string; + + /** + * Creates a new Slate instance using the specified properties. + * @param [properties] Properties to set + * @returns Slate instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.ISlate): google.cloud.video.stitcher.v1.Slate; + + /** + * Encodes the specified Slate message. Does not implicitly {@link google.cloud.video.stitcher.v1.Slate.verify|verify} messages. + * @param message Slate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.ISlate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Slate message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.Slate.verify|verify} messages. + * @param message Slate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.ISlate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Slate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Slate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.Slate; + + /** + * Decodes a Slate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Slate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.Slate; + + /** + * Verifies a Slate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Slate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Slate + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.Slate; + + /** + * Creates a plain object from a Slate message. Also converts values to other types if specified. + * @param message Slate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.Slate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Slate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Slate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VodStitchDetail. */ + interface IVodStitchDetail { + + /** VodStitchDetail name */ + name?: (string|null); + + /** VodStitchDetail adStitchDetails */ + adStitchDetails?: (google.cloud.video.stitcher.v1.IAdStitchDetail[]|null); + } + + /** Represents a VodStitchDetail. */ + class VodStitchDetail implements IVodStitchDetail { + + /** + * Constructs a new VodStitchDetail. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IVodStitchDetail); + + /** VodStitchDetail name. */ + public name: string; + + /** VodStitchDetail adStitchDetails. */ + public adStitchDetails: google.cloud.video.stitcher.v1.IAdStitchDetail[]; + + /** + * Creates a new VodStitchDetail instance using the specified properties. + * @param [properties] Properties to set + * @returns VodStitchDetail instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IVodStitchDetail): google.cloud.video.stitcher.v1.VodStitchDetail; + + /** + * Encodes the specified VodStitchDetail message. Does not implicitly {@link google.cloud.video.stitcher.v1.VodStitchDetail.verify|verify} messages. + * @param message VodStitchDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IVodStitchDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VodStitchDetail message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.VodStitchDetail.verify|verify} messages. + * @param message VodStitchDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IVodStitchDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VodStitchDetail message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VodStitchDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.VodStitchDetail; + + /** + * Decodes a VodStitchDetail message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VodStitchDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.VodStitchDetail; + + /** + * Verifies a VodStitchDetail message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VodStitchDetail message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VodStitchDetail + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.VodStitchDetail; + + /** + * Creates a plain object from a VodStitchDetail message. Also converts values to other types if specified. + * @param message VodStitchDetail + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.VodStitchDetail, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VodStitchDetail to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VodStitchDetail + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AdStitchDetail. */ + interface IAdStitchDetail { + + /** AdStitchDetail adBreakId */ + adBreakId?: (string|null); + + /** AdStitchDetail adId */ + adId?: (string|null); + + /** AdStitchDetail adTimeOffset */ + adTimeOffset?: (google.protobuf.IDuration|null); + + /** AdStitchDetail skipReason */ + skipReason?: (string|null); + + /** AdStitchDetail media */ + media?: ({ [k: string]: google.protobuf.IValue }|null); + } + + /** Represents an AdStitchDetail. */ + class AdStitchDetail implements IAdStitchDetail { + + /** + * Constructs a new AdStitchDetail. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IAdStitchDetail); + + /** AdStitchDetail adBreakId. */ + public adBreakId: string; + + /** AdStitchDetail adId. */ + public adId: string; + + /** AdStitchDetail adTimeOffset. */ + public adTimeOffset?: (google.protobuf.IDuration|null); + + /** AdStitchDetail skipReason. */ + public skipReason: string; + + /** AdStitchDetail media. */ + public media: { [k: string]: google.protobuf.IValue }; + + /** + * Creates a new AdStitchDetail instance using the specified properties. + * @param [properties] Properties to set + * @returns AdStitchDetail instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IAdStitchDetail): google.cloud.video.stitcher.v1.AdStitchDetail; + + /** + * Encodes the specified AdStitchDetail message. Does not implicitly {@link google.cloud.video.stitcher.v1.AdStitchDetail.verify|verify} messages. + * @param message AdStitchDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IAdStitchDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdStitchDetail message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.AdStitchDetail.verify|verify} messages. + * @param message AdStitchDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IAdStitchDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdStitchDetail message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdStitchDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.AdStitchDetail; + + /** + * Decodes an AdStitchDetail message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdStitchDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.AdStitchDetail; + + /** + * Verifies an AdStitchDetail message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AdStitchDetail message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdStitchDetail + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.AdStitchDetail; + + /** + * Creates a plain object from an AdStitchDetail message. Also converts values to other types if specified. + * @param message AdStitchDetail + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.AdStitchDetail, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdStitchDetail to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AdStitchDetail + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a VideoStitcherService */ + class VideoStitcherService extends $protobuf.rpc.Service { + + /** + * Constructs a new VideoStitcherService 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 VideoStitcherService 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): VideoStitcherService; + + /** + * Calls CreateCdnKey. + * @param request CreateCdnKeyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CdnKey + */ + public createCdnKey(request: google.cloud.video.stitcher.v1.ICreateCdnKeyRequest, callback: google.cloud.video.stitcher.v1.VideoStitcherService.CreateCdnKeyCallback): void; + + /** + * Calls CreateCdnKey. + * @param request CreateCdnKeyRequest message or plain object + * @returns Promise + */ + public createCdnKey(request: google.cloud.video.stitcher.v1.ICreateCdnKeyRequest): Promise; + + /** + * Calls ListCdnKeys. + * @param request ListCdnKeysRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListCdnKeysResponse + */ + public listCdnKeys(request: google.cloud.video.stitcher.v1.IListCdnKeysRequest, callback: google.cloud.video.stitcher.v1.VideoStitcherService.ListCdnKeysCallback): void; + + /** + * Calls ListCdnKeys. + * @param request ListCdnKeysRequest message or plain object + * @returns Promise + */ + public listCdnKeys(request: google.cloud.video.stitcher.v1.IListCdnKeysRequest): Promise; + + /** + * Calls GetCdnKey. + * @param request GetCdnKeyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CdnKey + */ + public getCdnKey(request: google.cloud.video.stitcher.v1.IGetCdnKeyRequest, callback: google.cloud.video.stitcher.v1.VideoStitcherService.GetCdnKeyCallback): void; + + /** + * Calls GetCdnKey. + * @param request GetCdnKeyRequest message or plain object + * @returns Promise + */ + public getCdnKey(request: google.cloud.video.stitcher.v1.IGetCdnKeyRequest): Promise; + + /** + * Calls DeleteCdnKey. + * @param request DeleteCdnKeyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteCdnKey(request: google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest, callback: google.cloud.video.stitcher.v1.VideoStitcherService.DeleteCdnKeyCallback): void; + + /** + * Calls DeleteCdnKey. + * @param request DeleteCdnKeyRequest message or plain object + * @returns Promise + */ + public deleteCdnKey(request: google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest): Promise; + + /** + * Calls UpdateCdnKey. + * @param request UpdateCdnKeyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CdnKey + */ + public updateCdnKey(request: google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest, callback: google.cloud.video.stitcher.v1.VideoStitcherService.UpdateCdnKeyCallback): void; + + /** + * Calls UpdateCdnKey. + * @param request UpdateCdnKeyRequest message or plain object + * @returns Promise + */ + public updateCdnKey(request: google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest): Promise; + + /** + * Calls CreateVodSession. + * @param request CreateVodSessionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and VodSession + */ + public createVodSession(request: google.cloud.video.stitcher.v1.ICreateVodSessionRequest, callback: google.cloud.video.stitcher.v1.VideoStitcherService.CreateVodSessionCallback): void; + + /** + * Calls CreateVodSession. + * @param request CreateVodSessionRequest message or plain object + * @returns Promise + */ + public createVodSession(request: google.cloud.video.stitcher.v1.ICreateVodSessionRequest): Promise; + + /** + * Calls GetVodSession. + * @param request GetVodSessionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and VodSession + */ + public getVodSession(request: google.cloud.video.stitcher.v1.IGetVodSessionRequest, callback: google.cloud.video.stitcher.v1.VideoStitcherService.GetVodSessionCallback): void; + + /** + * Calls GetVodSession. + * @param request GetVodSessionRequest message or plain object + * @returns Promise + */ + public getVodSession(request: google.cloud.video.stitcher.v1.IGetVodSessionRequest): Promise; + + /** + * Calls ListVodStitchDetails. + * @param request ListVodStitchDetailsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListVodStitchDetailsResponse + */ + public listVodStitchDetails(request: google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest, callback: google.cloud.video.stitcher.v1.VideoStitcherService.ListVodStitchDetailsCallback): void; + + /** + * Calls ListVodStitchDetails. + * @param request ListVodStitchDetailsRequest message or plain object + * @returns Promise + */ + public listVodStitchDetails(request: google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest): Promise; + + /** + * Calls GetVodStitchDetail. + * @param request GetVodStitchDetailRequest message or plain object + * @param callback Node-style callback called with the error, if any, and VodStitchDetail + */ + public getVodStitchDetail(request: google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest, callback: google.cloud.video.stitcher.v1.VideoStitcherService.GetVodStitchDetailCallback): void; + + /** + * Calls GetVodStitchDetail. + * @param request GetVodStitchDetailRequest message or plain object + * @returns Promise + */ + public getVodStitchDetail(request: google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest): Promise; + + /** + * Calls ListVodAdTagDetails. + * @param request ListVodAdTagDetailsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListVodAdTagDetailsResponse + */ + public listVodAdTagDetails(request: google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest, callback: google.cloud.video.stitcher.v1.VideoStitcherService.ListVodAdTagDetailsCallback): void; + + /** + * Calls ListVodAdTagDetails. + * @param request ListVodAdTagDetailsRequest message or plain object + * @returns Promise + */ + public listVodAdTagDetails(request: google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest): Promise; + + /** + * Calls GetVodAdTagDetail. + * @param request GetVodAdTagDetailRequest message or plain object + * @param callback Node-style callback called with the error, if any, and VodAdTagDetail + */ + public getVodAdTagDetail(request: google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest, callback: google.cloud.video.stitcher.v1.VideoStitcherService.GetVodAdTagDetailCallback): void; + + /** + * Calls GetVodAdTagDetail. + * @param request GetVodAdTagDetailRequest message or plain object + * @returns Promise + */ + public getVodAdTagDetail(request: google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest): Promise; + + /** + * Calls ListLiveAdTagDetails. + * @param request ListLiveAdTagDetailsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListLiveAdTagDetailsResponse + */ + public listLiveAdTagDetails(request: google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest, callback: google.cloud.video.stitcher.v1.VideoStitcherService.ListLiveAdTagDetailsCallback): void; + + /** + * Calls ListLiveAdTagDetails. + * @param request ListLiveAdTagDetailsRequest message or plain object + * @returns Promise + */ + public listLiveAdTagDetails(request: google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest): Promise; + + /** + * Calls GetLiveAdTagDetail. + * @param request GetLiveAdTagDetailRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LiveAdTagDetail + */ + public getLiveAdTagDetail(request: google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest, callback: google.cloud.video.stitcher.v1.VideoStitcherService.GetLiveAdTagDetailCallback): void; + + /** + * Calls GetLiveAdTagDetail. + * @param request GetLiveAdTagDetailRequest message or plain object + * @returns Promise + */ + public getLiveAdTagDetail(request: google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest): Promise; + + /** + * Calls CreateSlate. + * @param request CreateSlateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Slate + */ + public createSlate(request: google.cloud.video.stitcher.v1.ICreateSlateRequest, callback: google.cloud.video.stitcher.v1.VideoStitcherService.CreateSlateCallback): void; + + /** + * Calls CreateSlate. + * @param request CreateSlateRequest message or plain object + * @returns Promise + */ + public createSlate(request: google.cloud.video.stitcher.v1.ICreateSlateRequest): Promise; + + /** + * Calls ListSlates. + * @param request ListSlatesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListSlatesResponse + */ + public listSlates(request: google.cloud.video.stitcher.v1.IListSlatesRequest, callback: google.cloud.video.stitcher.v1.VideoStitcherService.ListSlatesCallback): void; + + /** + * Calls ListSlates. + * @param request ListSlatesRequest message or plain object + * @returns Promise + */ + public listSlates(request: google.cloud.video.stitcher.v1.IListSlatesRequest): Promise; + + /** + * Calls GetSlate. + * @param request GetSlateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Slate + */ + public getSlate(request: google.cloud.video.stitcher.v1.IGetSlateRequest, callback: google.cloud.video.stitcher.v1.VideoStitcherService.GetSlateCallback): void; + + /** + * Calls GetSlate. + * @param request GetSlateRequest message or plain object + * @returns Promise + */ + public getSlate(request: google.cloud.video.stitcher.v1.IGetSlateRequest): Promise; + + /** + * Calls UpdateSlate. + * @param request UpdateSlateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Slate + */ + public updateSlate(request: google.cloud.video.stitcher.v1.IUpdateSlateRequest, callback: google.cloud.video.stitcher.v1.VideoStitcherService.UpdateSlateCallback): void; + + /** + * Calls UpdateSlate. + * @param request UpdateSlateRequest message or plain object + * @returns Promise + */ + public updateSlate(request: google.cloud.video.stitcher.v1.IUpdateSlateRequest): Promise; + + /** + * Calls DeleteSlate. + * @param request DeleteSlateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteSlate(request: google.cloud.video.stitcher.v1.IDeleteSlateRequest, callback: google.cloud.video.stitcher.v1.VideoStitcherService.DeleteSlateCallback): void; + + /** + * Calls DeleteSlate. + * @param request DeleteSlateRequest message or plain object + * @returns Promise + */ + public deleteSlate(request: google.cloud.video.stitcher.v1.IDeleteSlateRequest): Promise; + + /** + * Calls CreateLiveSession. + * @param request CreateLiveSessionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LiveSession + */ + public createLiveSession(request: google.cloud.video.stitcher.v1.ICreateLiveSessionRequest, callback: google.cloud.video.stitcher.v1.VideoStitcherService.CreateLiveSessionCallback): void; + + /** + * Calls CreateLiveSession. + * @param request CreateLiveSessionRequest message or plain object + * @returns Promise + */ + public createLiveSession(request: google.cloud.video.stitcher.v1.ICreateLiveSessionRequest): Promise; + + /** + * Calls GetLiveSession. + * @param request GetLiveSessionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LiveSession + */ + public getLiveSession(request: google.cloud.video.stitcher.v1.IGetLiveSessionRequest, callback: google.cloud.video.stitcher.v1.VideoStitcherService.GetLiveSessionCallback): void; + + /** + * Calls GetLiveSession. + * @param request GetLiveSessionRequest message or plain object + * @returns Promise + */ + public getLiveSession(request: google.cloud.video.stitcher.v1.IGetLiveSessionRequest): Promise; + } + + namespace VideoStitcherService { + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|createCdnKey}. + * @param error Error, if any + * @param [response] CdnKey + */ + type CreateCdnKeyCallback = (error: (Error|null), response?: google.cloud.video.stitcher.v1.CdnKey) => void; + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|listCdnKeys}. + * @param error Error, if any + * @param [response] ListCdnKeysResponse + */ + type ListCdnKeysCallback = (error: (Error|null), response?: google.cloud.video.stitcher.v1.ListCdnKeysResponse) => void; + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|getCdnKey}. + * @param error Error, if any + * @param [response] CdnKey + */ + type GetCdnKeyCallback = (error: (Error|null), response?: google.cloud.video.stitcher.v1.CdnKey) => void; + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|deleteCdnKey}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteCdnKeyCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|updateCdnKey}. + * @param error Error, if any + * @param [response] CdnKey + */ + type UpdateCdnKeyCallback = (error: (Error|null), response?: google.cloud.video.stitcher.v1.CdnKey) => void; + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|createVodSession}. + * @param error Error, if any + * @param [response] VodSession + */ + type CreateVodSessionCallback = (error: (Error|null), response?: google.cloud.video.stitcher.v1.VodSession) => void; + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|getVodSession}. + * @param error Error, if any + * @param [response] VodSession + */ + type GetVodSessionCallback = (error: (Error|null), response?: google.cloud.video.stitcher.v1.VodSession) => void; + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|listVodStitchDetails}. + * @param error Error, if any + * @param [response] ListVodStitchDetailsResponse + */ + type ListVodStitchDetailsCallback = (error: (Error|null), response?: google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse) => void; + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|getVodStitchDetail}. + * @param error Error, if any + * @param [response] VodStitchDetail + */ + type GetVodStitchDetailCallback = (error: (Error|null), response?: google.cloud.video.stitcher.v1.VodStitchDetail) => void; + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|listVodAdTagDetails}. + * @param error Error, if any + * @param [response] ListVodAdTagDetailsResponse + */ + type ListVodAdTagDetailsCallback = (error: (Error|null), response?: google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse) => void; + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|getVodAdTagDetail}. + * @param error Error, if any + * @param [response] VodAdTagDetail + */ + type GetVodAdTagDetailCallback = (error: (Error|null), response?: google.cloud.video.stitcher.v1.VodAdTagDetail) => void; + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|listLiveAdTagDetails}. + * @param error Error, if any + * @param [response] ListLiveAdTagDetailsResponse + */ + type ListLiveAdTagDetailsCallback = (error: (Error|null), response?: google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse) => void; + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|getLiveAdTagDetail}. + * @param error Error, if any + * @param [response] LiveAdTagDetail + */ + type GetLiveAdTagDetailCallback = (error: (Error|null), response?: google.cloud.video.stitcher.v1.LiveAdTagDetail) => void; + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|createSlate}. + * @param error Error, if any + * @param [response] Slate + */ + type CreateSlateCallback = (error: (Error|null), response?: google.cloud.video.stitcher.v1.Slate) => void; + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|listSlates}. + * @param error Error, if any + * @param [response] ListSlatesResponse + */ + type ListSlatesCallback = (error: (Error|null), response?: google.cloud.video.stitcher.v1.ListSlatesResponse) => void; + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|getSlate}. + * @param error Error, if any + * @param [response] Slate + */ + type GetSlateCallback = (error: (Error|null), response?: google.cloud.video.stitcher.v1.Slate) => void; + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|updateSlate}. + * @param error Error, if any + * @param [response] Slate + */ + type UpdateSlateCallback = (error: (Error|null), response?: google.cloud.video.stitcher.v1.Slate) => void; + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|deleteSlate}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteSlateCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|createLiveSession}. + * @param error Error, if any + * @param [response] LiveSession + */ + type CreateLiveSessionCallback = (error: (Error|null), response?: google.cloud.video.stitcher.v1.LiveSession) => void; + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|getLiveSession}. + * @param error Error, if any + * @param [response] LiveSession + */ + type GetLiveSessionCallback = (error: (Error|null), response?: google.cloud.video.stitcher.v1.LiveSession) => void; + } + + /** Properties of a CreateCdnKeyRequest. */ + interface ICreateCdnKeyRequest { + + /** CreateCdnKeyRequest parent */ + parent?: (string|null); + + /** CreateCdnKeyRequest cdnKey */ + cdnKey?: (google.cloud.video.stitcher.v1.ICdnKey|null); + + /** CreateCdnKeyRequest cdnKeyId */ + cdnKeyId?: (string|null); + } + + /** Represents a CreateCdnKeyRequest. */ + class CreateCdnKeyRequest implements ICreateCdnKeyRequest { + + /** + * Constructs a new CreateCdnKeyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.ICreateCdnKeyRequest); + + /** CreateCdnKeyRequest parent. */ + public parent: string; + + /** CreateCdnKeyRequest cdnKey. */ + public cdnKey?: (google.cloud.video.stitcher.v1.ICdnKey|null); + + /** CreateCdnKeyRequest cdnKeyId. */ + public cdnKeyId: string; + + /** + * Creates a new CreateCdnKeyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateCdnKeyRequest instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.ICreateCdnKeyRequest): google.cloud.video.stitcher.v1.CreateCdnKeyRequest; + + /** + * Encodes the specified CreateCdnKeyRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateCdnKeyRequest.verify|verify} messages. + * @param message CreateCdnKeyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.ICreateCdnKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateCdnKeyRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateCdnKeyRequest.verify|verify} messages. + * @param message CreateCdnKeyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.ICreateCdnKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateCdnKeyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateCdnKeyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.CreateCdnKeyRequest; + + /** + * Decodes a CreateCdnKeyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateCdnKeyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.CreateCdnKeyRequest; + + /** + * Verifies a CreateCdnKeyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateCdnKeyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateCdnKeyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.CreateCdnKeyRequest; + + /** + * Creates a plain object from a CreateCdnKeyRequest message. Also converts values to other types if specified. + * @param message CreateCdnKeyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.CreateCdnKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateCdnKeyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateCdnKeyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListCdnKeysRequest. */ + interface IListCdnKeysRequest { + + /** ListCdnKeysRequest parent */ + parent?: (string|null); + + /** ListCdnKeysRequest pageSize */ + pageSize?: (number|null); + + /** ListCdnKeysRequest pageToken */ + pageToken?: (string|null); + + /** ListCdnKeysRequest filter */ + filter?: (string|null); + + /** ListCdnKeysRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListCdnKeysRequest. */ + class ListCdnKeysRequest implements IListCdnKeysRequest { + + /** + * Constructs a new ListCdnKeysRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IListCdnKeysRequest); + + /** ListCdnKeysRequest parent. */ + public parent: string; + + /** ListCdnKeysRequest pageSize. */ + public pageSize: number; + + /** ListCdnKeysRequest pageToken. */ + public pageToken: string; + + /** ListCdnKeysRequest filter. */ + public filter: string; + + /** ListCdnKeysRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListCdnKeysRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCdnKeysRequest instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IListCdnKeysRequest): google.cloud.video.stitcher.v1.ListCdnKeysRequest; + + /** + * Encodes the specified ListCdnKeysRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListCdnKeysRequest.verify|verify} messages. + * @param message ListCdnKeysRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IListCdnKeysRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCdnKeysRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListCdnKeysRequest.verify|verify} messages. + * @param message ListCdnKeysRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IListCdnKeysRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCdnKeysRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCdnKeysRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.ListCdnKeysRequest; + + /** + * Decodes a ListCdnKeysRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCdnKeysRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.ListCdnKeysRequest; + + /** + * Verifies a ListCdnKeysRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCdnKeysRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCdnKeysRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.ListCdnKeysRequest; + + /** + * Creates a plain object from a ListCdnKeysRequest message. Also converts values to other types if specified. + * @param message ListCdnKeysRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.ListCdnKeysRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCdnKeysRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCdnKeysRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListCdnKeysResponse. */ + interface IListCdnKeysResponse { + + /** ListCdnKeysResponse cdnKeys */ + cdnKeys?: (google.cloud.video.stitcher.v1.ICdnKey[]|null); + + /** ListCdnKeysResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListCdnKeysResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListCdnKeysResponse. */ + class ListCdnKeysResponse implements IListCdnKeysResponse { + + /** + * Constructs a new ListCdnKeysResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IListCdnKeysResponse); + + /** ListCdnKeysResponse cdnKeys. */ + public cdnKeys: google.cloud.video.stitcher.v1.ICdnKey[]; + + /** ListCdnKeysResponse nextPageToken. */ + public nextPageToken: string; + + /** ListCdnKeysResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListCdnKeysResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCdnKeysResponse instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IListCdnKeysResponse): google.cloud.video.stitcher.v1.ListCdnKeysResponse; + + /** + * Encodes the specified ListCdnKeysResponse message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListCdnKeysResponse.verify|verify} messages. + * @param message ListCdnKeysResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IListCdnKeysResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCdnKeysResponse message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListCdnKeysResponse.verify|verify} messages. + * @param message ListCdnKeysResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IListCdnKeysResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCdnKeysResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCdnKeysResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.ListCdnKeysResponse; + + /** + * Decodes a ListCdnKeysResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCdnKeysResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.ListCdnKeysResponse; + + /** + * Verifies a ListCdnKeysResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCdnKeysResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCdnKeysResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.ListCdnKeysResponse; + + /** + * Creates a plain object from a ListCdnKeysResponse message. Also converts values to other types if specified. + * @param message ListCdnKeysResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.ListCdnKeysResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCdnKeysResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCdnKeysResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetCdnKeyRequest. */ + interface IGetCdnKeyRequest { + + /** GetCdnKeyRequest name */ + name?: (string|null); + } + + /** Represents a GetCdnKeyRequest. */ + class GetCdnKeyRequest implements IGetCdnKeyRequest { + + /** + * Constructs a new GetCdnKeyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IGetCdnKeyRequest); + + /** GetCdnKeyRequest name. */ + public name: string; + + /** + * Creates a new GetCdnKeyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetCdnKeyRequest instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IGetCdnKeyRequest): google.cloud.video.stitcher.v1.GetCdnKeyRequest; + + /** + * Encodes the specified GetCdnKeyRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.GetCdnKeyRequest.verify|verify} messages. + * @param message GetCdnKeyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IGetCdnKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetCdnKeyRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GetCdnKeyRequest.verify|verify} messages. + * @param message GetCdnKeyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IGetCdnKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetCdnKeyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetCdnKeyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.GetCdnKeyRequest; + + /** + * Decodes a GetCdnKeyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetCdnKeyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.GetCdnKeyRequest; + + /** + * Verifies a GetCdnKeyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetCdnKeyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetCdnKeyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.GetCdnKeyRequest; + + /** + * Creates a plain object from a GetCdnKeyRequest message. Also converts values to other types if specified. + * @param message GetCdnKeyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.GetCdnKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetCdnKeyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetCdnKeyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteCdnKeyRequest. */ + interface IDeleteCdnKeyRequest { + + /** DeleteCdnKeyRequest name */ + name?: (string|null); + } + + /** Represents a DeleteCdnKeyRequest. */ + class DeleteCdnKeyRequest implements IDeleteCdnKeyRequest { + + /** + * Constructs a new DeleteCdnKeyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest); + + /** DeleteCdnKeyRequest name. */ + public name: string; + + /** + * Creates a new DeleteCdnKeyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteCdnKeyRequest instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest): google.cloud.video.stitcher.v1.DeleteCdnKeyRequest; + + /** + * Encodes the specified DeleteCdnKeyRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.DeleteCdnKeyRequest.verify|verify} messages. + * @param message DeleteCdnKeyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteCdnKeyRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.DeleteCdnKeyRequest.verify|verify} messages. + * @param message DeleteCdnKeyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteCdnKeyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteCdnKeyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.DeleteCdnKeyRequest; + + /** + * Decodes a DeleteCdnKeyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteCdnKeyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.DeleteCdnKeyRequest; + + /** + * Verifies a DeleteCdnKeyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteCdnKeyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteCdnKeyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.DeleteCdnKeyRequest; + + /** + * Creates a plain object from a DeleteCdnKeyRequest message. Also converts values to other types if specified. + * @param message DeleteCdnKeyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.DeleteCdnKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteCdnKeyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteCdnKeyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateCdnKeyRequest. */ + interface IUpdateCdnKeyRequest { + + /** UpdateCdnKeyRequest cdnKey */ + cdnKey?: (google.cloud.video.stitcher.v1.ICdnKey|null); + + /** UpdateCdnKeyRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateCdnKeyRequest. */ + class UpdateCdnKeyRequest implements IUpdateCdnKeyRequest { + + /** + * Constructs a new UpdateCdnKeyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest); + + /** UpdateCdnKeyRequest cdnKey. */ + public cdnKey?: (google.cloud.video.stitcher.v1.ICdnKey|null); + + /** UpdateCdnKeyRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateCdnKeyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateCdnKeyRequest instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest): google.cloud.video.stitcher.v1.UpdateCdnKeyRequest; + + /** + * Encodes the specified UpdateCdnKeyRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.UpdateCdnKeyRequest.verify|verify} messages. + * @param message UpdateCdnKeyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateCdnKeyRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.UpdateCdnKeyRequest.verify|verify} messages. + * @param message UpdateCdnKeyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateCdnKeyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateCdnKeyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.UpdateCdnKeyRequest; + + /** + * Decodes an UpdateCdnKeyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateCdnKeyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.UpdateCdnKeyRequest; + + /** + * Verifies an UpdateCdnKeyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateCdnKeyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateCdnKeyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.UpdateCdnKeyRequest; + + /** + * Creates a plain object from an UpdateCdnKeyRequest message. Also converts values to other types if specified. + * @param message UpdateCdnKeyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.UpdateCdnKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateCdnKeyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateCdnKeyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateVodSessionRequest. */ + interface ICreateVodSessionRequest { + + /** CreateVodSessionRequest parent */ + parent?: (string|null); + + /** CreateVodSessionRequest vodSession */ + vodSession?: (google.cloud.video.stitcher.v1.IVodSession|null); + } + + /** Represents a CreateVodSessionRequest. */ + class CreateVodSessionRequest implements ICreateVodSessionRequest { + + /** + * Constructs a new CreateVodSessionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.ICreateVodSessionRequest); + + /** CreateVodSessionRequest parent. */ + public parent: string; + + /** CreateVodSessionRequest vodSession. */ + public vodSession?: (google.cloud.video.stitcher.v1.IVodSession|null); + + /** + * Creates a new CreateVodSessionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateVodSessionRequest instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.ICreateVodSessionRequest): google.cloud.video.stitcher.v1.CreateVodSessionRequest; + + /** + * Encodes the specified CreateVodSessionRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateVodSessionRequest.verify|verify} messages. + * @param message CreateVodSessionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.ICreateVodSessionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateVodSessionRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateVodSessionRequest.verify|verify} messages. + * @param message CreateVodSessionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.ICreateVodSessionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateVodSessionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateVodSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.CreateVodSessionRequest; + + /** + * Decodes a CreateVodSessionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateVodSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.CreateVodSessionRequest; + + /** + * Verifies a CreateVodSessionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateVodSessionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateVodSessionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.CreateVodSessionRequest; + + /** + * Creates a plain object from a CreateVodSessionRequest message. Also converts values to other types if specified. + * @param message CreateVodSessionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.CreateVodSessionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateVodSessionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateVodSessionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetVodSessionRequest. */ + interface IGetVodSessionRequest { + + /** GetVodSessionRequest name */ + name?: (string|null); + } + + /** Represents a GetVodSessionRequest. */ + class GetVodSessionRequest implements IGetVodSessionRequest { + + /** + * Constructs a new GetVodSessionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IGetVodSessionRequest); + + /** GetVodSessionRequest name. */ + public name: string; + + /** + * Creates a new GetVodSessionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetVodSessionRequest instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IGetVodSessionRequest): google.cloud.video.stitcher.v1.GetVodSessionRequest; + + /** + * Encodes the specified GetVodSessionRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.GetVodSessionRequest.verify|verify} messages. + * @param message GetVodSessionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IGetVodSessionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetVodSessionRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GetVodSessionRequest.verify|verify} messages. + * @param message GetVodSessionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IGetVodSessionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetVodSessionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetVodSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.GetVodSessionRequest; + + /** + * Decodes a GetVodSessionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetVodSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.GetVodSessionRequest; + + /** + * Verifies a GetVodSessionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetVodSessionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetVodSessionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.GetVodSessionRequest; + + /** + * Creates a plain object from a GetVodSessionRequest message. Also converts values to other types if specified. + * @param message GetVodSessionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.GetVodSessionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetVodSessionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetVodSessionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListVodStitchDetailsRequest. */ + interface IListVodStitchDetailsRequest { + + /** ListVodStitchDetailsRequest parent */ + parent?: (string|null); + + /** ListVodStitchDetailsRequest pageSize */ + pageSize?: (number|null); + + /** ListVodStitchDetailsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListVodStitchDetailsRequest. */ + class ListVodStitchDetailsRequest implements IListVodStitchDetailsRequest { + + /** + * Constructs a new ListVodStitchDetailsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest); + + /** ListVodStitchDetailsRequest parent. */ + public parent: string; + + /** ListVodStitchDetailsRequest pageSize. */ + public pageSize: number; + + /** ListVodStitchDetailsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListVodStitchDetailsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListVodStitchDetailsRequest instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest): google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest; + + /** + * Encodes the specified ListVodStitchDetailsRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest.verify|verify} messages. + * @param message ListVodStitchDetailsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListVodStitchDetailsRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest.verify|verify} messages. + * @param message ListVodStitchDetailsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListVodStitchDetailsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListVodStitchDetailsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest; + + /** + * Decodes a ListVodStitchDetailsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListVodStitchDetailsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest; + + /** + * Verifies a ListVodStitchDetailsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListVodStitchDetailsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListVodStitchDetailsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest; + + /** + * Creates a plain object from a ListVodStitchDetailsRequest message. Also converts values to other types if specified. + * @param message ListVodStitchDetailsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListVodStitchDetailsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListVodStitchDetailsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListVodStitchDetailsResponse. */ + interface IListVodStitchDetailsResponse { + + /** ListVodStitchDetailsResponse vodStitchDetails */ + vodStitchDetails?: (google.cloud.video.stitcher.v1.IVodStitchDetail[]|null); + + /** ListVodStitchDetailsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListVodStitchDetailsResponse. */ + class ListVodStitchDetailsResponse implements IListVodStitchDetailsResponse { + + /** + * Constructs a new ListVodStitchDetailsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IListVodStitchDetailsResponse); + + /** ListVodStitchDetailsResponse vodStitchDetails. */ + public vodStitchDetails: google.cloud.video.stitcher.v1.IVodStitchDetail[]; + + /** ListVodStitchDetailsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListVodStitchDetailsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListVodStitchDetailsResponse instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IListVodStitchDetailsResponse): google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse; + + /** + * Encodes the specified ListVodStitchDetailsResponse message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse.verify|verify} messages. + * @param message ListVodStitchDetailsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IListVodStitchDetailsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListVodStitchDetailsResponse message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse.verify|verify} messages. + * @param message ListVodStitchDetailsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IListVodStitchDetailsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListVodStitchDetailsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListVodStitchDetailsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse; + + /** + * Decodes a ListVodStitchDetailsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListVodStitchDetailsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse; + + /** + * Verifies a ListVodStitchDetailsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListVodStitchDetailsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListVodStitchDetailsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse; + + /** + * Creates a plain object from a ListVodStitchDetailsResponse message. Also converts values to other types if specified. + * @param message ListVodStitchDetailsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListVodStitchDetailsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListVodStitchDetailsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetVodStitchDetailRequest. */ + interface IGetVodStitchDetailRequest { + + /** GetVodStitchDetailRequest name */ + name?: (string|null); + } + + /** Represents a GetVodStitchDetailRequest. */ + class GetVodStitchDetailRequest implements IGetVodStitchDetailRequest { + + /** + * Constructs a new GetVodStitchDetailRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest); + + /** GetVodStitchDetailRequest name. */ + public name: string; + + /** + * Creates a new GetVodStitchDetailRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetVodStitchDetailRequest instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest): google.cloud.video.stitcher.v1.GetVodStitchDetailRequest; + + /** + * Encodes the specified GetVodStitchDetailRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.GetVodStitchDetailRequest.verify|verify} messages. + * @param message GetVodStitchDetailRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetVodStitchDetailRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GetVodStitchDetailRequest.verify|verify} messages. + * @param message GetVodStitchDetailRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetVodStitchDetailRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetVodStitchDetailRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.GetVodStitchDetailRequest; + + /** + * Decodes a GetVodStitchDetailRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetVodStitchDetailRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.GetVodStitchDetailRequest; + + /** + * Verifies a GetVodStitchDetailRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetVodStitchDetailRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetVodStitchDetailRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.GetVodStitchDetailRequest; + + /** + * Creates a plain object from a GetVodStitchDetailRequest message. Also converts values to other types if specified. + * @param message GetVodStitchDetailRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.GetVodStitchDetailRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetVodStitchDetailRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetVodStitchDetailRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListVodAdTagDetailsRequest. */ + interface IListVodAdTagDetailsRequest { + + /** ListVodAdTagDetailsRequest parent */ + parent?: (string|null); + + /** ListVodAdTagDetailsRequest pageSize */ + pageSize?: (number|null); + + /** ListVodAdTagDetailsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListVodAdTagDetailsRequest. */ + class ListVodAdTagDetailsRequest implements IListVodAdTagDetailsRequest { + + /** + * Constructs a new ListVodAdTagDetailsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest); + + /** ListVodAdTagDetailsRequest parent. */ + public parent: string; + + /** ListVodAdTagDetailsRequest pageSize. */ + public pageSize: number; + + /** ListVodAdTagDetailsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListVodAdTagDetailsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListVodAdTagDetailsRequest instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest): google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest; + + /** + * Encodes the specified ListVodAdTagDetailsRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest.verify|verify} messages. + * @param message ListVodAdTagDetailsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListVodAdTagDetailsRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest.verify|verify} messages. + * @param message ListVodAdTagDetailsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListVodAdTagDetailsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListVodAdTagDetailsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest; + + /** + * Decodes a ListVodAdTagDetailsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListVodAdTagDetailsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest; + + /** + * Verifies a ListVodAdTagDetailsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListVodAdTagDetailsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListVodAdTagDetailsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest; + + /** + * Creates a plain object from a ListVodAdTagDetailsRequest message. Also converts values to other types if specified. + * @param message ListVodAdTagDetailsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListVodAdTagDetailsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListVodAdTagDetailsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListVodAdTagDetailsResponse. */ + interface IListVodAdTagDetailsResponse { + + /** ListVodAdTagDetailsResponse vodAdTagDetails */ + vodAdTagDetails?: (google.cloud.video.stitcher.v1.IVodAdTagDetail[]|null); + + /** ListVodAdTagDetailsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListVodAdTagDetailsResponse. */ + class ListVodAdTagDetailsResponse implements IListVodAdTagDetailsResponse { + + /** + * Constructs a new ListVodAdTagDetailsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IListVodAdTagDetailsResponse); + + /** ListVodAdTagDetailsResponse vodAdTagDetails. */ + public vodAdTagDetails: google.cloud.video.stitcher.v1.IVodAdTagDetail[]; + + /** ListVodAdTagDetailsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListVodAdTagDetailsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListVodAdTagDetailsResponse instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IListVodAdTagDetailsResponse): google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse; + + /** + * Encodes the specified ListVodAdTagDetailsResponse message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse.verify|verify} messages. + * @param message ListVodAdTagDetailsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IListVodAdTagDetailsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListVodAdTagDetailsResponse message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse.verify|verify} messages. + * @param message ListVodAdTagDetailsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IListVodAdTagDetailsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListVodAdTagDetailsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListVodAdTagDetailsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse; + + /** + * Decodes a ListVodAdTagDetailsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListVodAdTagDetailsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse; + + /** + * Verifies a ListVodAdTagDetailsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListVodAdTagDetailsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListVodAdTagDetailsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse; + + /** + * Creates a plain object from a ListVodAdTagDetailsResponse message. Also converts values to other types if specified. + * @param message ListVodAdTagDetailsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListVodAdTagDetailsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListVodAdTagDetailsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetVodAdTagDetailRequest. */ + interface IGetVodAdTagDetailRequest { + + /** GetVodAdTagDetailRequest name */ + name?: (string|null); + } + + /** Represents a GetVodAdTagDetailRequest. */ + class GetVodAdTagDetailRequest implements IGetVodAdTagDetailRequest { + + /** + * Constructs a new GetVodAdTagDetailRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest); + + /** GetVodAdTagDetailRequest name. */ + public name: string; + + /** + * Creates a new GetVodAdTagDetailRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetVodAdTagDetailRequest instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest): google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest; + + /** + * Encodes the specified GetVodAdTagDetailRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest.verify|verify} messages. + * @param message GetVodAdTagDetailRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetVodAdTagDetailRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest.verify|verify} messages. + * @param message GetVodAdTagDetailRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetVodAdTagDetailRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetVodAdTagDetailRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest; + + /** + * Decodes a GetVodAdTagDetailRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetVodAdTagDetailRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest; + + /** + * Verifies a GetVodAdTagDetailRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetVodAdTagDetailRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetVodAdTagDetailRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest; + + /** + * Creates a plain object from a GetVodAdTagDetailRequest message. Also converts values to other types if specified. + * @param message GetVodAdTagDetailRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetVodAdTagDetailRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetVodAdTagDetailRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListLiveAdTagDetailsRequest. */ + interface IListLiveAdTagDetailsRequest { + + /** ListLiveAdTagDetailsRequest parent */ + parent?: (string|null); + + /** ListLiveAdTagDetailsRequest pageSize */ + pageSize?: (number|null); + + /** ListLiveAdTagDetailsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListLiveAdTagDetailsRequest. */ + class ListLiveAdTagDetailsRequest implements IListLiveAdTagDetailsRequest { + + /** + * Constructs a new ListLiveAdTagDetailsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest); + + /** ListLiveAdTagDetailsRequest parent. */ + public parent: string; + + /** ListLiveAdTagDetailsRequest pageSize. */ + public pageSize: number; + + /** ListLiveAdTagDetailsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListLiveAdTagDetailsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLiveAdTagDetailsRequest instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest): google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest; + + /** + * Encodes the specified ListLiveAdTagDetailsRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest.verify|verify} messages. + * @param message ListLiveAdTagDetailsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListLiveAdTagDetailsRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest.verify|verify} messages. + * @param message ListLiveAdTagDetailsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListLiveAdTagDetailsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLiveAdTagDetailsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest; + + /** + * Decodes a ListLiveAdTagDetailsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLiveAdTagDetailsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest; + + /** + * Verifies a ListLiveAdTagDetailsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListLiveAdTagDetailsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLiveAdTagDetailsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest; + + /** + * Creates a plain object from a ListLiveAdTagDetailsRequest message. Also converts values to other types if specified. + * @param message ListLiveAdTagDetailsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListLiveAdTagDetailsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListLiveAdTagDetailsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListLiveAdTagDetailsResponse. */ + interface IListLiveAdTagDetailsResponse { + + /** ListLiveAdTagDetailsResponse liveAdTagDetails */ + liveAdTagDetails?: (google.cloud.video.stitcher.v1.ILiveAdTagDetail[]|null); + + /** ListLiveAdTagDetailsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListLiveAdTagDetailsResponse. */ + class ListLiveAdTagDetailsResponse implements IListLiveAdTagDetailsResponse { + + /** + * Constructs a new ListLiveAdTagDetailsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IListLiveAdTagDetailsResponse); + + /** ListLiveAdTagDetailsResponse liveAdTagDetails. */ + public liveAdTagDetails: google.cloud.video.stitcher.v1.ILiveAdTagDetail[]; + + /** ListLiveAdTagDetailsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListLiveAdTagDetailsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLiveAdTagDetailsResponse instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IListLiveAdTagDetailsResponse): google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse; + + /** + * Encodes the specified ListLiveAdTagDetailsResponse message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse.verify|verify} messages. + * @param message ListLiveAdTagDetailsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IListLiveAdTagDetailsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListLiveAdTagDetailsResponse message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse.verify|verify} messages. + * @param message ListLiveAdTagDetailsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IListLiveAdTagDetailsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListLiveAdTagDetailsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLiveAdTagDetailsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse; + + /** + * Decodes a ListLiveAdTagDetailsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLiveAdTagDetailsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse; + + /** + * Verifies a ListLiveAdTagDetailsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListLiveAdTagDetailsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLiveAdTagDetailsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse; + + /** + * Creates a plain object from a ListLiveAdTagDetailsResponse message. Also converts values to other types if specified. + * @param message ListLiveAdTagDetailsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListLiveAdTagDetailsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListLiveAdTagDetailsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetLiveAdTagDetailRequest. */ + interface IGetLiveAdTagDetailRequest { + + /** GetLiveAdTagDetailRequest name */ + name?: (string|null); + } + + /** Represents a GetLiveAdTagDetailRequest. */ + class GetLiveAdTagDetailRequest implements IGetLiveAdTagDetailRequest { + + /** + * Constructs a new GetLiveAdTagDetailRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest); + + /** GetLiveAdTagDetailRequest name. */ + public name: string; + + /** + * Creates a new GetLiveAdTagDetailRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetLiveAdTagDetailRequest instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest): google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest; + + /** + * Encodes the specified GetLiveAdTagDetailRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest.verify|verify} messages. + * @param message GetLiveAdTagDetailRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetLiveAdTagDetailRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest.verify|verify} messages. + * @param message GetLiveAdTagDetailRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetLiveAdTagDetailRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetLiveAdTagDetailRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest; + + /** + * Decodes a GetLiveAdTagDetailRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetLiveAdTagDetailRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest; + + /** + * Verifies a GetLiveAdTagDetailRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetLiveAdTagDetailRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetLiveAdTagDetailRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest; + + /** + * Creates a plain object from a GetLiveAdTagDetailRequest message. Also converts values to other types if specified. + * @param message GetLiveAdTagDetailRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetLiveAdTagDetailRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetLiveAdTagDetailRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateSlateRequest. */ + interface ICreateSlateRequest { + + /** CreateSlateRequest parent */ + parent?: (string|null); + + /** CreateSlateRequest slateId */ + slateId?: (string|null); + + /** CreateSlateRequest slate */ + slate?: (google.cloud.video.stitcher.v1.ISlate|null); + } + + /** Represents a CreateSlateRequest. */ + class CreateSlateRequest implements ICreateSlateRequest { + + /** + * Constructs a new CreateSlateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.ICreateSlateRequest); + + /** CreateSlateRequest parent. */ + public parent: string; + + /** CreateSlateRequest slateId. */ + public slateId: string; + + /** CreateSlateRequest slate. */ + public slate?: (google.cloud.video.stitcher.v1.ISlate|null); + + /** + * Creates a new CreateSlateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateSlateRequest instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.ICreateSlateRequest): google.cloud.video.stitcher.v1.CreateSlateRequest; + + /** + * Encodes the specified CreateSlateRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateSlateRequest.verify|verify} messages. + * @param message CreateSlateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.ICreateSlateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateSlateRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateSlateRequest.verify|verify} messages. + * @param message CreateSlateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.ICreateSlateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateSlateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateSlateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.CreateSlateRequest; + + /** + * Decodes a CreateSlateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateSlateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.CreateSlateRequest; + + /** + * Verifies a CreateSlateRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateSlateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateSlateRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.CreateSlateRequest; + + /** + * Creates a plain object from a CreateSlateRequest message. Also converts values to other types if specified. + * @param message CreateSlateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.CreateSlateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateSlateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateSlateRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetSlateRequest. */ + interface IGetSlateRequest { + + /** GetSlateRequest name */ + name?: (string|null); + } + + /** Represents a GetSlateRequest. */ + class GetSlateRequest implements IGetSlateRequest { + + /** + * Constructs a new GetSlateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IGetSlateRequest); + + /** GetSlateRequest name. */ + public name: string; + + /** + * Creates a new GetSlateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetSlateRequest instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IGetSlateRequest): google.cloud.video.stitcher.v1.GetSlateRequest; + + /** + * Encodes the specified GetSlateRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.GetSlateRequest.verify|verify} messages. + * @param message GetSlateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IGetSlateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetSlateRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GetSlateRequest.verify|verify} messages. + * @param message GetSlateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IGetSlateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetSlateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetSlateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.GetSlateRequest; + + /** + * Decodes a GetSlateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetSlateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.GetSlateRequest; + + /** + * Verifies a GetSlateRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetSlateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetSlateRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.GetSlateRequest; + + /** + * Creates a plain object from a GetSlateRequest message. Also converts values to other types if specified. + * @param message GetSlateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.GetSlateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetSlateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetSlateRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListSlatesRequest. */ + interface IListSlatesRequest { + + /** ListSlatesRequest parent */ + parent?: (string|null); + + /** ListSlatesRequest pageSize */ + pageSize?: (number|null); + + /** ListSlatesRequest pageToken */ + pageToken?: (string|null); + + /** ListSlatesRequest filter */ + filter?: (string|null); + + /** ListSlatesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListSlatesRequest. */ + class ListSlatesRequest implements IListSlatesRequest { + + /** + * Constructs a new ListSlatesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IListSlatesRequest); + + /** ListSlatesRequest parent. */ + public parent: string; + + /** ListSlatesRequest pageSize. */ + public pageSize: number; + + /** ListSlatesRequest pageToken. */ + public pageToken: string; + + /** ListSlatesRequest filter. */ + public filter: string; + + /** ListSlatesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListSlatesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSlatesRequest instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IListSlatesRequest): google.cloud.video.stitcher.v1.ListSlatesRequest; + + /** + * Encodes the specified ListSlatesRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListSlatesRequest.verify|verify} messages. + * @param message ListSlatesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IListSlatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSlatesRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListSlatesRequest.verify|verify} messages. + * @param message ListSlatesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IListSlatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSlatesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSlatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.ListSlatesRequest; + + /** + * Decodes a ListSlatesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSlatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.ListSlatesRequest; + + /** + * Verifies a ListSlatesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListSlatesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSlatesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.ListSlatesRequest; + + /** + * Creates a plain object from a ListSlatesRequest message. Also converts values to other types if specified. + * @param message ListSlatesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.ListSlatesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSlatesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListSlatesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListSlatesResponse. */ + interface IListSlatesResponse { + + /** ListSlatesResponse slates */ + slates?: (google.cloud.video.stitcher.v1.ISlate[]|null); + + /** ListSlatesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListSlatesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListSlatesResponse. */ + class ListSlatesResponse implements IListSlatesResponse { + + /** + * Constructs a new ListSlatesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IListSlatesResponse); + + /** ListSlatesResponse slates. */ + public slates: google.cloud.video.stitcher.v1.ISlate[]; + + /** ListSlatesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListSlatesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListSlatesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSlatesResponse instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IListSlatesResponse): google.cloud.video.stitcher.v1.ListSlatesResponse; + + /** + * Encodes the specified ListSlatesResponse message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListSlatesResponse.verify|verify} messages. + * @param message ListSlatesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IListSlatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSlatesResponse message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListSlatesResponse.verify|verify} messages. + * @param message ListSlatesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IListSlatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSlatesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSlatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.ListSlatesResponse; + + /** + * Decodes a ListSlatesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSlatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.ListSlatesResponse; + + /** + * Verifies a ListSlatesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListSlatesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSlatesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.ListSlatesResponse; + + /** + * Creates a plain object from a ListSlatesResponse message. Also converts values to other types if specified. + * @param message ListSlatesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.ListSlatesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSlatesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListSlatesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateSlateRequest. */ + interface IUpdateSlateRequest { + + /** UpdateSlateRequest slate */ + slate?: (google.cloud.video.stitcher.v1.ISlate|null); + + /** UpdateSlateRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateSlateRequest. */ + class UpdateSlateRequest implements IUpdateSlateRequest { + + /** + * Constructs a new UpdateSlateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IUpdateSlateRequest); + + /** UpdateSlateRequest slate. */ + public slate?: (google.cloud.video.stitcher.v1.ISlate|null); + + /** UpdateSlateRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateSlateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateSlateRequest instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IUpdateSlateRequest): google.cloud.video.stitcher.v1.UpdateSlateRequest; + + /** + * Encodes the specified UpdateSlateRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.UpdateSlateRequest.verify|verify} messages. + * @param message UpdateSlateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IUpdateSlateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateSlateRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.UpdateSlateRequest.verify|verify} messages. + * @param message UpdateSlateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IUpdateSlateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateSlateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateSlateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.UpdateSlateRequest; + + /** + * Decodes an UpdateSlateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateSlateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.UpdateSlateRequest; + + /** + * Verifies an UpdateSlateRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateSlateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateSlateRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.UpdateSlateRequest; + + /** + * Creates a plain object from an UpdateSlateRequest message. Also converts values to other types if specified. + * @param message UpdateSlateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.UpdateSlateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateSlateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateSlateRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteSlateRequest. */ + interface IDeleteSlateRequest { + + /** DeleteSlateRequest name */ + name?: (string|null); + } + + /** Represents a DeleteSlateRequest. */ + class DeleteSlateRequest implements IDeleteSlateRequest { + + /** + * Constructs a new DeleteSlateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IDeleteSlateRequest); + + /** DeleteSlateRequest name. */ + public name: string; + + /** + * Creates a new DeleteSlateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteSlateRequest instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IDeleteSlateRequest): google.cloud.video.stitcher.v1.DeleteSlateRequest; + + /** + * Encodes the specified DeleteSlateRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.DeleteSlateRequest.verify|verify} messages. + * @param message DeleteSlateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IDeleteSlateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteSlateRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.DeleteSlateRequest.verify|verify} messages. + * @param message DeleteSlateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IDeleteSlateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteSlateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteSlateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.DeleteSlateRequest; + + /** + * Decodes a DeleteSlateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteSlateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.DeleteSlateRequest; + + /** + * Verifies a DeleteSlateRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteSlateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteSlateRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.DeleteSlateRequest; + + /** + * Creates a plain object from a DeleteSlateRequest message. Also converts values to other types if specified. + * @param message DeleteSlateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.DeleteSlateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteSlateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteSlateRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateLiveSessionRequest. */ + interface ICreateLiveSessionRequest { + + /** CreateLiveSessionRequest parent */ + parent?: (string|null); + + /** CreateLiveSessionRequest liveSession */ + liveSession?: (google.cloud.video.stitcher.v1.ILiveSession|null); + } + + /** Represents a CreateLiveSessionRequest. */ + class CreateLiveSessionRequest implements ICreateLiveSessionRequest { + + /** + * Constructs a new CreateLiveSessionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.ICreateLiveSessionRequest); + + /** CreateLiveSessionRequest parent. */ + public parent: string; + + /** CreateLiveSessionRequest liveSession. */ + public liveSession?: (google.cloud.video.stitcher.v1.ILiveSession|null); + + /** + * Creates a new CreateLiveSessionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateLiveSessionRequest instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.ICreateLiveSessionRequest): google.cloud.video.stitcher.v1.CreateLiveSessionRequest; + + /** + * Encodes the specified CreateLiveSessionRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateLiveSessionRequest.verify|verify} messages. + * @param message CreateLiveSessionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.ICreateLiveSessionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateLiveSessionRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateLiveSessionRequest.verify|verify} messages. + * @param message CreateLiveSessionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.ICreateLiveSessionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateLiveSessionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateLiveSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.CreateLiveSessionRequest; + + /** + * Decodes a CreateLiveSessionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateLiveSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.CreateLiveSessionRequest; + + /** + * Verifies a CreateLiveSessionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateLiveSessionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateLiveSessionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.CreateLiveSessionRequest; + + /** + * Creates a plain object from a CreateLiveSessionRequest message. Also converts values to other types if specified. + * @param message CreateLiveSessionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.CreateLiveSessionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateLiveSessionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateLiveSessionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetLiveSessionRequest. */ + interface IGetLiveSessionRequest { + + /** GetLiveSessionRequest name */ + name?: (string|null); + } + + /** Represents a GetLiveSessionRequest. */ + class GetLiveSessionRequest implements IGetLiveSessionRequest { + + /** + * Constructs a new GetLiveSessionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.stitcher.v1.IGetLiveSessionRequest); + + /** GetLiveSessionRequest name. */ + public name: string; + + /** + * Creates a new GetLiveSessionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetLiveSessionRequest instance + */ + public static create(properties?: google.cloud.video.stitcher.v1.IGetLiveSessionRequest): google.cloud.video.stitcher.v1.GetLiveSessionRequest; + + /** + * Encodes the specified GetLiveSessionRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.GetLiveSessionRequest.verify|verify} messages. + * @param message GetLiveSessionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.stitcher.v1.IGetLiveSessionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetLiveSessionRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GetLiveSessionRequest.verify|verify} messages. + * @param message GetLiveSessionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.stitcher.v1.IGetLiveSessionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetLiveSessionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetLiveSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.video.stitcher.v1.GetLiveSessionRequest; + + /** + * Decodes a GetLiveSessionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetLiveSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.video.stitcher.v1.GetLiveSessionRequest; + + /** + * Verifies a GetLiveSessionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetLiveSessionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetLiveSessionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.stitcher.v1.GetLiveSessionRequest; + + /** + * Creates a plain object from a GetLiveSessionRequest message. Also converts values to other types if specified. + * @param message GetLiveSessionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.stitcher.v1.GetLiveSessionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetLiveSessionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetLiveSessionRequest + * @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 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; + } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7 + } + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (string|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** 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.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Struct. */ + interface IStruct { + + /** Struct fields */ + fields?: ({ [k: string]: google.protobuf.IValue }|null); + } + + /** Represents a Struct. */ + class Struct implements IStruct { + + /** + * Constructs a new Struct. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStruct); + + /** Struct fields. */ + public fields: { [k: string]: google.protobuf.IValue }; + + /** + * Creates a new Struct instance using the specified properties. + * @param [properties] Properties to set + * @returns Struct instance + */ + public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; + + /** + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Struct message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Struct; + + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Struct; + + /** + * Verifies a Struct message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Struct + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; + + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @param message Struct + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Struct to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Struct + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Value. */ + interface IValue { + + /** Value nullValue */ + nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); + + /** Value numberValue */ + numberValue?: (number|null); + + /** Value stringValue */ + stringValue?: (string|null); + + /** Value boolValue */ + boolValue?: (boolean|null); + + /** Value structValue */ + structValue?: (google.protobuf.IStruct|null); + + /** Value listValue */ + listValue?: (google.protobuf.IListValue|null); + } + + /** Represents a Value. */ + class Value implements IValue { + + /** + * Constructs a new Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IValue); + + /** Value nullValue. */ + public nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); + + /** Value numberValue. */ + public numberValue?: (number|null); + + /** Value stringValue. */ + public stringValue?: (string|null); + + /** Value boolValue. */ + public boolValue?: (boolean|null); + + /** Value structValue. */ + public structValue?: (google.protobuf.IStruct|null); + + /** Value listValue. */ + public listValue?: (google.protobuf.IListValue|null); + + /** Value kind. */ + public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); + + /** + * Creates a new Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Value instance + */ + public static create(properties?: google.protobuf.IValue): google.protobuf.Value; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Value; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Value; + + /** + * Verifies a Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Value; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @param message Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** NullValue enum. */ + enum NullValue { + NULL_VALUE = 0 + } + + /** Properties of a ListValue. */ + interface IListValue { + + /** ListValue values */ + values?: (google.protobuf.IValue[]|null); + } + + /** Represents a ListValue. */ + class ListValue implements IListValue { + + /** + * Constructs a new ListValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IListValue); + + /** ListValue values. */ + public values: google.protobuf.IValue[]; + + /** + * Creates a new ListValue instance using the specified properties. + * @param [properties] Properties to set + * @returns ListValue instance + */ + public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; + + /** + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ListValue; + + /** + * Decodes a ListValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ListValue; + + /** + * Verifies a ListValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; + + /** + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @param message ListValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/packages/google-cloud-video-stitcher/protos/protos.js b/packages/google-cloud-video-stitcher/protos/protos.js new file mode 100644 index 00000000000..ac5b6798fd1 --- /dev/null +++ b/packages/google-cloud-video-stitcher/protos/protos.js @@ -0,0 +1,27404 @@ +// 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_video_stitcher_protos || ($protobuf.roots._google_cloud_video_stitcher_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.video = (function() { + + /** + * Namespace video. + * @memberof google.cloud + * @namespace + */ + var video = {}; + + video.stitcher = (function() { + + /** + * Namespace stitcher. + * @memberof google.cloud.video + * @namespace + */ + var stitcher = {}; + + stitcher.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.video.stitcher + * @namespace + */ + var v1 = {}; + + v1.LiveAdTagDetail = (function() { + + /** + * Properties of a LiveAdTagDetail. + * @memberof google.cloud.video.stitcher.v1 + * @interface ILiveAdTagDetail + * @property {string|null} [name] LiveAdTagDetail name + * @property {Array.|null} [adRequests] LiveAdTagDetail adRequests + */ + + /** + * Constructs a new LiveAdTagDetail. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a LiveAdTagDetail. + * @implements ILiveAdTagDetail + * @constructor + * @param {google.cloud.video.stitcher.v1.ILiveAdTagDetail=} [properties] Properties to set + */ + function LiveAdTagDetail(properties) { + this.adRequests = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LiveAdTagDetail name. + * @member {string} name + * @memberof google.cloud.video.stitcher.v1.LiveAdTagDetail + * @instance + */ + LiveAdTagDetail.prototype.name = ""; + + /** + * LiveAdTagDetail adRequests. + * @member {Array.} adRequests + * @memberof google.cloud.video.stitcher.v1.LiveAdTagDetail + * @instance + */ + LiveAdTagDetail.prototype.adRequests = $util.emptyArray; + + /** + * Creates a new LiveAdTagDetail instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.LiveAdTagDetail + * @static + * @param {google.cloud.video.stitcher.v1.ILiveAdTagDetail=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.LiveAdTagDetail} LiveAdTagDetail instance + */ + LiveAdTagDetail.create = function create(properties) { + return new LiveAdTagDetail(properties); + }; + + /** + * Encodes the specified LiveAdTagDetail message. Does not implicitly {@link google.cloud.video.stitcher.v1.LiveAdTagDetail.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.LiveAdTagDetail + * @static + * @param {google.cloud.video.stitcher.v1.ILiveAdTagDetail} message LiveAdTagDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LiveAdTagDetail.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.adRequests != null && message.adRequests.length) + for (var i = 0; i < message.adRequests.length; ++i) + $root.google.cloud.video.stitcher.v1.AdRequest.encode(message.adRequests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LiveAdTagDetail message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.LiveAdTagDetail.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.LiveAdTagDetail + * @static + * @param {google.cloud.video.stitcher.v1.ILiveAdTagDetail} message LiveAdTagDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LiveAdTagDetail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LiveAdTagDetail message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.LiveAdTagDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.LiveAdTagDetail} LiveAdTagDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LiveAdTagDetail.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.LiveAdTagDetail(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.adRequests && message.adRequests.length)) + message.adRequests = []; + message.adRequests.push($root.google.cloud.video.stitcher.v1.AdRequest.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LiveAdTagDetail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.LiveAdTagDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.LiveAdTagDetail} LiveAdTagDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LiveAdTagDetail.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LiveAdTagDetail message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.LiveAdTagDetail + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LiveAdTagDetail.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.adRequests != null && message.hasOwnProperty("adRequests")) { + if (!Array.isArray(message.adRequests)) + return "adRequests: array expected"; + for (var i = 0; i < message.adRequests.length; ++i) { + var error = $root.google.cloud.video.stitcher.v1.AdRequest.verify(message.adRequests[i]); + if (error) + return "adRequests." + error; + } + } + return null; + }; + + /** + * Creates a LiveAdTagDetail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.LiveAdTagDetail + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.LiveAdTagDetail} LiveAdTagDetail + */ + LiveAdTagDetail.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.LiveAdTagDetail) + return object; + var message = new $root.google.cloud.video.stitcher.v1.LiveAdTagDetail(); + if (object.name != null) + message.name = String(object.name); + if (object.adRequests) { + if (!Array.isArray(object.adRequests)) + throw TypeError(".google.cloud.video.stitcher.v1.LiveAdTagDetail.adRequests: array expected"); + message.adRequests = []; + for (var i = 0; i < object.adRequests.length; ++i) { + if (typeof object.adRequests[i] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.LiveAdTagDetail.adRequests: object expected"); + message.adRequests[i] = $root.google.cloud.video.stitcher.v1.AdRequest.fromObject(object.adRequests[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LiveAdTagDetail message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.LiveAdTagDetail + * @static + * @param {google.cloud.video.stitcher.v1.LiveAdTagDetail} message LiveAdTagDetail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LiveAdTagDetail.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.adRequests = []; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.adRequests && message.adRequests.length) { + object.adRequests = []; + for (var j = 0; j < message.adRequests.length; ++j) + object.adRequests[j] = $root.google.cloud.video.stitcher.v1.AdRequest.toObject(message.adRequests[j], options); + } + return object; + }; + + /** + * Converts this LiveAdTagDetail to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.LiveAdTagDetail + * @instance + * @returns {Object.} JSON object + */ + LiveAdTagDetail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LiveAdTagDetail + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.LiveAdTagDetail + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LiveAdTagDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.LiveAdTagDetail"; + }; + + return LiveAdTagDetail; + })(); + + v1.VodAdTagDetail = (function() { + + /** + * Properties of a VodAdTagDetail. + * @memberof google.cloud.video.stitcher.v1 + * @interface IVodAdTagDetail + * @property {string|null} [name] VodAdTagDetail name + * @property {Array.|null} [adRequests] VodAdTagDetail adRequests + */ + + /** + * Constructs a new VodAdTagDetail. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a VodAdTagDetail. + * @implements IVodAdTagDetail + * @constructor + * @param {google.cloud.video.stitcher.v1.IVodAdTagDetail=} [properties] Properties to set + */ + function VodAdTagDetail(properties) { + this.adRequests = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VodAdTagDetail name. + * @member {string} name + * @memberof google.cloud.video.stitcher.v1.VodAdTagDetail + * @instance + */ + VodAdTagDetail.prototype.name = ""; + + /** + * VodAdTagDetail adRequests. + * @member {Array.} adRequests + * @memberof google.cloud.video.stitcher.v1.VodAdTagDetail + * @instance + */ + VodAdTagDetail.prototype.adRequests = $util.emptyArray; + + /** + * Creates a new VodAdTagDetail instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.VodAdTagDetail + * @static + * @param {google.cloud.video.stitcher.v1.IVodAdTagDetail=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.VodAdTagDetail} VodAdTagDetail instance + */ + VodAdTagDetail.create = function create(properties) { + return new VodAdTagDetail(properties); + }; + + /** + * Encodes the specified VodAdTagDetail message. Does not implicitly {@link google.cloud.video.stitcher.v1.VodAdTagDetail.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.VodAdTagDetail + * @static + * @param {google.cloud.video.stitcher.v1.IVodAdTagDetail} message VodAdTagDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VodAdTagDetail.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.adRequests != null && message.adRequests.length) + for (var i = 0; i < message.adRequests.length; ++i) + $root.google.cloud.video.stitcher.v1.AdRequest.encode(message.adRequests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified VodAdTagDetail message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.VodAdTagDetail.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.VodAdTagDetail + * @static + * @param {google.cloud.video.stitcher.v1.IVodAdTagDetail} message VodAdTagDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VodAdTagDetail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VodAdTagDetail message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.VodAdTagDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.VodAdTagDetail} VodAdTagDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VodAdTagDetail.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.VodAdTagDetail(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.adRequests && message.adRequests.length)) + message.adRequests = []; + message.adRequests.push($root.google.cloud.video.stitcher.v1.AdRequest.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VodAdTagDetail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.VodAdTagDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.VodAdTagDetail} VodAdTagDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VodAdTagDetail.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VodAdTagDetail message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.VodAdTagDetail + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VodAdTagDetail.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.adRequests != null && message.hasOwnProperty("adRequests")) { + if (!Array.isArray(message.adRequests)) + return "adRequests: array expected"; + for (var i = 0; i < message.adRequests.length; ++i) { + var error = $root.google.cloud.video.stitcher.v1.AdRequest.verify(message.adRequests[i]); + if (error) + return "adRequests." + error; + } + } + return null; + }; + + /** + * Creates a VodAdTagDetail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.VodAdTagDetail + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.VodAdTagDetail} VodAdTagDetail + */ + VodAdTagDetail.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.VodAdTagDetail) + return object; + var message = new $root.google.cloud.video.stitcher.v1.VodAdTagDetail(); + if (object.name != null) + message.name = String(object.name); + if (object.adRequests) { + if (!Array.isArray(object.adRequests)) + throw TypeError(".google.cloud.video.stitcher.v1.VodAdTagDetail.adRequests: array expected"); + message.adRequests = []; + for (var i = 0; i < object.adRequests.length; ++i) { + if (typeof object.adRequests[i] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.VodAdTagDetail.adRequests: object expected"); + message.adRequests[i] = $root.google.cloud.video.stitcher.v1.AdRequest.fromObject(object.adRequests[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a VodAdTagDetail message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.VodAdTagDetail + * @static + * @param {google.cloud.video.stitcher.v1.VodAdTagDetail} message VodAdTagDetail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VodAdTagDetail.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.adRequests = []; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.adRequests && message.adRequests.length) { + object.adRequests = []; + for (var j = 0; j < message.adRequests.length; ++j) + object.adRequests[j] = $root.google.cloud.video.stitcher.v1.AdRequest.toObject(message.adRequests[j], options); + } + return object; + }; + + /** + * Converts this VodAdTagDetail to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.VodAdTagDetail + * @instance + * @returns {Object.} JSON object + */ + VodAdTagDetail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VodAdTagDetail + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.VodAdTagDetail + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VodAdTagDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.VodAdTagDetail"; + }; + + return VodAdTagDetail; + })(); + + v1.AdRequest = (function() { + + /** + * Properties of an AdRequest. + * @memberof google.cloud.video.stitcher.v1 + * @interface IAdRequest + * @property {string|null} [uri] AdRequest uri + * @property {google.cloud.video.stitcher.v1.IRequestMetadata|null} [requestMetadata] AdRequest requestMetadata + * @property {google.cloud.video.stitcher.v1.IResponseMetadata|null} [responseMetadata] AdRequest responseMetadata + */ + + /** + * Constructs a new AdRequest. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents an AdRequest. + * @implements IAdRequest + * @constructor + * @param {google.cloud.video.stitcher.v1.IAdRequest=} [properties] Properties to set + */ + function AdRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AdRequest uri. + * @member {string} uri + * @memberof google.cloud.video.stitcher.v1.AdRequest + * @instance + */ + AdRequest.prototype.uri = ""; + + /** + * AdRequest requestMetadata. + * @member {google.cloud.video.stitcher.v1.IRequestMetadata|null|undefined} requestMetadata + * @memberof google.cloud.video.stitcher.v1.AdRequest + * @instance + */ + AdRequest.prototype.requestMetadata = null; + + /** + * AdRequest responseMetadata. + * @member {google.cloud.video.stitcher.v1.IResponseMetadata|null|undefined} responseMetadata + * @memberof google.cloud.video.stitcher.v1.AdRequest + * @instance + */ + AdRequest.prototype.responseMetadata = null; + + /** + * Creates a new AdRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.AdRequest + * @static + * @param {google.cloud.video.stitcher.v1.IAdRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.AdRequest} AdRequest instance + */ + AdRequest.create = function create(properties) { + return new AdRequest(properties); + }; + + /** + * Encodes the specified AdRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.AdRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.AdRequest + * @static + * @param {google.cloud.video.stitcher.v1.IAdRequest} message AdRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + if (message.requestMetadata != null && Object.hasOwnProperty.call(message, "requestMetadata")) + $root.google.cloud.video.stitcher.v1.RequestMetadata.encode(message.requestMetadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.responseMetadata != null && Object.hasOwnProperty.call(message, "responseMetadata")) + $root.google.cloud.video.stitcher.v1.ResponseMetadata.encode(message.responseMetadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AdRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.AdRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.AdRequest + * @static + * @param {google.cloud.video.stitcher.v1.IAdRequest} message AdRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AdRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.AdRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.AdRequest} AdRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.AdRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + case 2: { + message.requestMetadata = $root.google.cloud.video.stitcher.v1.RequestMetadata.decode(reader, reader.uint32()); + break; + } + case 3: { + message.responseMetadata = $root.google.cloud.video.stitcher.v1.ResponseMetadata.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AdRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.AdRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.AdRequest} AdRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AdRequest message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.AdRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AdRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.requestMetadata != null && message.hasOwnProperty("requestMetadata")) { + var error = $root.google.cloud.video.stitcher.v1.RequestMetadata.verify(message.requestMetadata); + if (error) + return "requestMetadata." + error; + } + if (message.responseMetadata != null && message.hasOwnProperty("responseMetadata")) { + var error = $root.google.cloud.video.stitcher.v1.ResponseMetadata.verify(message.responseMetadata); + if (error) + return "responseMetadata." + error; + } + return null; + }; + + /** + * Creates an AdRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.AdRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.AdRequest} AdRequest + */ + AdRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.AdRequest) + return object; + var message = new $root.google.cloud.video.stitcher.v1.AdRequest(); + if (object.uri != null) + message.uri = String(object.uri); + if (object.requestMetadata != null) { + if (typeof object.requestMetadata !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.AdRequest.requestMetadata: object expected"); + message.requestMetadata = $root.google.cloud.video.stitcher.v1.RequestMetadata.fromObject(object.requestMetadata); + } + if (object.responseMetadata != null) { + if (typeof object.responseMetadata !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.AdRequest.responseMetadata: object expected"); + message.responseMetadata = $root.google.cloud.video.stitcher.v1.ResponseMetadata.fromObject(object.responseMetadata); + } + return message; + }; + + /** + * Creates a plain object from an AdRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.AdRequest + * @static + * @param {google.cloud.video.stitcher.v1.AdRequest} message AdRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AdRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.uri = ""; + object.requestMetadata = null; + object.responseMetadata = null; + } + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.requestMetadata != null && message.hasOwnProperty("requestMetadata")) + object.requestMetadata = $root.google.cloud.video.stitcher.v1.RequestMetadata.toObject(message.requestMetadata, options); + if (message.responseMetadata != null && message.hasOwnProperty("responseMetadata")) + object.responseMetadata = $root.google.cloud.video.stitcher.v1.ResponseMetadata.toObject(message.responseMetadata, options); + return object; + }; + + /** + * Converts this AdRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.AdRequest + * @instance + * @returns {Object.} JSON object + */ + AdRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AdRequest + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.AdRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AdRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.AdRequest"; + }; + + return AdRequest; + })(); + + v1.RequestMetadata = (function() { + + /** + * Properties of a RequestMetadata. + * @memberof google.cloud.video.stitcher.v1 + * @interface IRequestMetadata + * @property {google.protobuf.IStruct|null} [headers] RequestMetadata headers + */ + + /** + * Constructs a new RequestMetadata. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a RequestMetadata. + * @implements IRequestMetadata + * @constructor + * @param {google.cloud.video.stitcher.v1.IRequestMetadata=} [properties] Properties to set + */ + function RequestMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestMetadata headers. + * @member {google.protobuf.IStruct|null|undefined} headers + * @memberof google.cloud.video.stitcher.v1.RequestMetadata + * @instance + */ + RequestMetadata.prototype.headers = null; + + /** + * Creates a new RequestMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.RequestMetadata + * @static + * @param {google.cloud.video.stitcher.v1.IRequestMetadata=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.RequestMetadata} RequestMetadata instance + */ + RequestMetadata.create = function create(properties) { + return new RequestMetadata(properties); + }; + + /** + * Encodes the specified RequestMetadata message. Does not implicitly {@link google.cloud.video.stitcher.v1.RequestMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.RequestMetadata + * @static + * @param {google.cloud.video.stitcher.v1.IRequestMetadata} message RequestMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.headers != null && Object.hasOwnProperty.call(message, "headers")) + $root.google.protobuf.Struct.encode(message.headers, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RequestMetadata message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.RequestMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.RequestMetadata + * @static + * @param {google.cloud.video.stitcher.v1.IRequestMetadata} message RequestMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.RequestMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.RequestMetadata} RequestMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.RequestMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.headers = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.RequestMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.RequestMetadata} RequestMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestMetadata message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.RequestMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.headers != null && message.hasOwnProperty("headers")) { + var error = $root.google.protobuf.Struct.verify(message.headers); + if (error) + return "headers." + error; + } + return null; + }; + + /** + * Creates a RequestMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.RequestMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.RequestMetadata} RequestMetadata + */ + RequestMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.RequestMetadata) + return object; + var message = new $root.google.cloud.video.stitcher.v1.RequestMetadata(); + if (object.headers != null) { + if (typeof object.headers !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.RequestMetadata.headers: object expected"); + message.headers = $root.google.protobuf.Struct.fromObject(object.headers); + } + return message; + }; + + /** + * Creates a plain object from a RequestMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.RequestMetadata + * @static + * @param {google.cloud.video.stitcher.v1.RequestMetadata} message RequestMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.headers = null; + if (message.headers != null && message.hasOwnProperty("headers")) + object.headers = $root.google.protobuf.Struct.toObject(message.headers, options); + return object; + }; + + /** + * Converts this RequestMetadata to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.RequestMetadata + * @instance + * @returns {Object.} JSON object + */ + RequestMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RequestMetadata + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.RequestMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RequestMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.RequestMetadata"; + }; + + return RequestMetadata; + })(); + + v1.ResponseMetadata = (function() { + + /** + * Properties of a ResponseMetadata. + * @memberof google.cloud.video.stitcher.v1 + * @interface IResponseMetadata + * @property {string|null} [error] ResponseMetadata error + * @property {google.protobuf.IStruct|null} [headers] ResponseMetadata headers + * @property {string|null} [statusCode] ResponseMetadata statusCode + * @property {number|null} [sizeBytes] ResponseMetadata sizeBytes + * @property {google.protobuf.IDuration|null} [duration] ResponseMetadata duration + * @property {string|null} [body] ResponseMetadata body + */ + + /** + * Constructs a new ResponseMetadata. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a ResponseMetadata. + * @implements IResponseMetadata + * @constructor + * @param {google.cloud.video.stitcher.v1.IResponseMetadata=} [properties] Properties to set + */ + function ResponseMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseMetadata error. + * @member {string} error + * @memberof google.cloud.video.stitcher.v1.ResponseMetadata + * @instance + */ + ResponseMetadata.prototype.error = ""; + + /** + * ResponseMetadata headers. + * @member {google.protobuf.IStruct|null|undefined} headers + * @memberof google.cloud.video.stitcher.v1.ResponseMetadata + * @instance + */ + ResponseMetadata.prototype.headers = null; + + /** + * ResponseMetadata statusCode. + * @member {string} statusCode + * @memberof google.cloud.video.stitcher.v1.ResponseMetadata + * @instance + */ + ResponseMetadata.prototype.statusCode = ""; + + /** + * ResponseMetadata sizeBytes. + * @member {number} sizeBytes + * @memberof google.cloud.video.stitcher.v1.ResponseMetadata + * @instance + */ + ResponseMetadata.prototype.sizeBytes = 0; + + /** + * ResponseMetadata duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.video.stitcher.v1.ResponseMetadata + * @instance + */ + ResponseMetadata.prototype.duration = null; + + /** + * ResponseMetadata body. + * @member {string} body + * @memberof google.cloud.video.stitcher.v1.ResponseMetadata + * @instance + */ + ResponseMetadata.prototype.body = ""; + + /** + * Creates a new ResponseMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.ResponseMetadata + * @static + * @param {google.cloud.video.stitcher.v1.IResponseMetadata=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.ResponseMetadata} ResponseMetadata instance + */ + ResponseMetadata.create = function create(properties) { + return new ResponseMetadata(properties); + }; + + /** + * Encodes the specified ResponseMetadata message. Does not implicitly {@link google.cloud.video.stitcher.v1.ResponseMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.ResponseMetadata + * @static + * @param {google.cloud.video.stitcher.v1.IResponseMetadata} message ResponseMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.error); + if (message.headers != null && Object.hasOwnProperty.call(message, "headers")) + $root.google.protobuf.Struct.encode(message.headers, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.statusCode != null && Object.hasOwnProperty.call(message, "statusCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.statusCode); + if (message.sizeBytes != null && Object.hasOwnProperty.call(message, "sizeBytes")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.sizeBytes); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.body); + return writer; + }; + + /** + * Encodes the specified ResponseMetadata message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ResponseMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.ResponseMetadata + * @static + * @param {google.cloud.video.stitcher.v1.IResponseMetadata} message ResponseMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.ResponseMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.ResponseMetadata} ResponseMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.ResponseMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.error = reader.string(); + break; + } + case 2: { + message.headers = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 3: { + message.statusCode = reader.string(); + break; + } + case 4: { + message.sizeBytes = reader.int32(); + break; + } + case 5: { + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 6: { + message.body = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.ResponseMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.ResponseMetadata} ResponseMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseMetadata message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.ResponseMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.error != null && message.hasOwnProperty("error")) + if (!$util.isString(message.error)) + return "error: string expected"; + if (message.headers != null && message.hasOwnProperty("headers")) { + var error = $root.google.protobuf.Struct.verify(message.headers); + if (error) + return "headers." + error; + } + if (message.statusCode != null && message.hasOwnProperty("statusCode")) + if (!$util.isString(message.statusCode)) + return "statusCode: string expected"; + if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) + if (!$util.isInteger(message.sizeBytes)) + return "sizeBytes: integer expected"; + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + return null; + }; + + /** + * Creates a ResponseMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.ResponseMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.ResponseMetadata} ResponseMetadata + */ + ResponseMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.ResponseMetadata) + return object; + var message = new $root.google.cloud.video.stitcher.v1.ResponseMetadata(); + if (object.error != null) + message.error = String(object.error); + if (object.headers != null) { + if (typeof object.headers !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.ResponseMetadata.headers: object expected"); + message.headers = $root.google.protobuf.Struct.fromObject(object.headers); + } + if (object.statusCode != null) + message.statusCode = String(object.statusCode); + if (object.sizeBytes != null) + message.sizeBytes = object.sizeBytes | 0; + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.ResponseMetadata.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } + if (object.body != null) + message.body = String(object.body); + return message; + }; + + /** + * Creates a plain object from a ResponseMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.ResponseMetadata + * @static + * @param {google.cloud.video.stitcher.v1.ResponseMetadata} message ResponseMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.error = ""; + object.headers = null; + object.statusCode = ""; + object.sizeBytes = 0; + object.duration = null; + object.body = ""; + } + if (message.error != null && message.hasOwnProperty("error")) + object.error = message.error; + if (message.headers != null && message.hasOwnProperty("headers")) + object.headers = $root.google.protobuf.Struct.toObject(message.headers, options); + if (message.statusCode != null && message.hasOwnProperty("statusCode")) + object.statusCode = message.statusCode; + if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) + object.sizeBytes = message.sizeBytes; + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + return object; + }; + + /** + * Converts this ResponseMetadata to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.ResponseMetadata + * @instance + * @returns {Object.} JSON object + */ + ResponseMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResponseMetadata + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.ResponseMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResponseMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ResponseMetadata"; + }; + + return ResponseMetadata; + })(); + + v1.CdnKey = (function() { + + /** + * Properties of a CdnKey. + * @memberof google.cloud.video.stitcher.v1 + * @interface ICdnKey + * @property {google.cloud.video.stitcher.v1.IGoogleCdnKey|null} [googleCdnKey] CdnKey googleCdnKey + * @property {google.cloud.video.stitcher.v1.IAkamaiCdnKey|null} [akamaiCdnKey] CdnKey akamaiCdnKey + * @property {google.cloud.video.stitcher.v1.IMediaCdnKey|null} [mediaCdnKey] CdnKey mediaCdnKey + * @property {string|null} [name] CdnKey name + * @property {string|null} [hostname] CdnKey hostname + */ + + /** + * Constructs a new CdnKey. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a CdnKey. + * @implements ICdnKey + * @constructor + * @param {google.cloud.video.stitcher.v1.ICdnKey=} [properties] Properties to set + */ + function CdnKey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CdnKey googleCdnKey. + * @member {google.cloud.video.stitcher.v1.IGoogleCdnKey|null|undefined} googleCdnKey + * @memberof google.cloud.video.stitcher.v1.CdnKey + * @instance + */ + CdnKey.prototype.googleCdnKey = null; + + /** + * CdnKey akamaiCdnKey. + * @member {google.cloud.video.stitcher.v1.IAkamaiCdnKey|null|undefined} akamaiCdnKey + * @memberof google.cloud.video.stitcher.v1.CdnKey + * @instance + */ + CdnKey.prototype.akamaiCdnKey = null; + + /** + * CdnKey mediaCdnKey. + * @member {google.cloud.video.stitcher.v1.IMediaCdnKey|null|undefined} mediaCdnKey + * @memberof google.cloud.video.stitcher.v1.CdnKey + * @instance + */ + CdnKey.prototype.mediaCdnKey = null; + + /** + * CdnKey name. + * @member {string} name + * @memberof google.cloud.video.stitcher.v1.CdnKey + * @instance + */ + CdnKey.prototype.name = ""; + + /** + * CdnKey hostname. + * @member {string} hostname + * @memberof google.cloud.video.stitcher.v1.CdnKey + * @instance + */ + CdnKey.prototype.hostname = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CdnKey cdnKeyConfig. + * @member {"googleCdnKey"|"akamaiCdnKey"|"mediaCdnKey"|undefined} cdnKeyConfig + * @memberof google.cloud.video.stitcher.v1.CdnKey + * @instance + */ + Object.defineProperty(CdnKey.prototype, "cdnKeyConfig", { + get: $util.oneOfGetter($oneOfFields = ["googleCdnKey", "akamaiCdnKey", "mediaCdnKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CdnKey instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.CdnKey + * @static + * @param {google.cloud.video.stitcher.v1.ICdnKey=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.CdnKey} CdnKey instance + */ + CdnKey.create = function create(properties) { + return new CdnKey(properties); + }; + + /** + * Encodes the specified CdnKey message. Does not implicitly {@link google.cloud.video.stitcher.v1.CdnKey.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.CdnKey + * @static + * @param {google.cloud.video.stitcher.v1.ICdnKey} message CdnKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CdnKey.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.hostname != null && Object.hasOwnProperty.call(message, "hostname")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.hostname); + if (message.googleCdnKey != null && Object.hasOwnProperty.call(message, "googleCdnKey")) + $root.google.cloud.video.stitcher.v1.GoogleCdnKey.encode(message.googleCdnKey, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.akamaiCdnKey != null && Object.hasOwnProperty.call(message, "akamaiCdnKey")) + $root.google.cloud.video.stitcher.v1.AkamaiCdnKey.encode(message.akamaiCdnKey, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.mediaCdnKey != null && Object.hasOwnProperty.call(message, "mediaCdnKey")) + $root.google.cloud.video.stitcher.v1.MediaCdnKey.encode(message.mediaCdnKey, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CdnKey message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.CdnKey.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.CdnKey + * @static + * @param {google.cloud.video.stitcher.v1.ICdnKey} message CdnKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CdnKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CdnKey message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.CdnKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.CdnKey} CdnKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CdnKey.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.CdnKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: { + message.googleCdnKey = $root.google.cloud.video.stitcher.v1.GoogleCdnKey.decode(reader, reader.uint32()); + break; + } + case 6: { + message.akamaiCdnKey = $root.google.cloud.video.stitcher.v1.AkamaiCdnKey.decode(reader, reader.uint32()); + break; + } + case 8: { + message.mediaCdnKey = $root.google.cloud.video.stitcher.v1.MediaCdnKey.decode(reader, reader.uint32()); + break; + } + case 1: { + message.name = reader.string(); + break; + } + case 4: { + message.hostname = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CdnKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.CdnKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.CdnKey} CdnKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CdnKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CdnKey message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.CdnKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CdnKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.googleCdnKey != null && message.hasOwnProperty("googleCdnKey")) { + properties.cdnKeyConfig = 1; + { + var error = $root.google.cloud.video.stitcher.v1.GoogleCdnKey.verify(message.googleCdnKey); + if (error) + return "googleCdnKey." + error; + } + } + if (message.akamaiCdnKey != null && message.hasOwnProperty("akamaiCdnKey")) { + if (properties.cdnKeyConfig === 1) + return "cdnKeyConfig: multiple values"; + properties.cdnKeyConfig = 1; + { + var error = $root.google.cloud.video.stitcher.v1.AkamaiCdnKey.verify(message.akamaiCdnKey); + if (error) + return "akamaiCdnKey." + error; + } + } + if (message.mediaCdnKey != null && message.hasOwnProperty("mediaCdnKey")) { + if (properties.cdnKeyConfig === 1) + return "cdnKeyConfig: multiple values"; + properties.cdnKeyConfig = 1; + { + var error = $root.google.cloud.video.stitcher.v1.MediaCdnKey.verify(message.mediaCdnKey); + if (error) + return "mediaCdnKey." + error; + } + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.hostname != null && message.hasOwnProperty("hostname")) + if (!$util.isString(message.hostname)) + return "hostname: string expected"; + return null; + }; + + /** + * Creates a CdnKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.CdnKey + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.CdnKey} CdnKey + */ + CdnKey.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.CdnKey) + return object; + var message = new $root.google.cloud.video.stitcher.v1.CdnKey(); + if (object.googleCdnKey != null) { + if (typeof object.googleCdnKey !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.CdnKey.googleCdnKey: object expected"); + message.googleCdnKey = $root.google.cloud.video.stitcher.v1.GoogleCdnKey.fromObject(object.googleCdnKey); + } + if (object.akamaiCdnKey != null) { + if (typeof object.akamaiCdnKey !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.CdnKey.akamaiCdnKey: object expected"); + message.akamaiCdnKey = $root.google.cloud.video.stitcher.v1.AkamaiCdnKey.fromObject(object.akamaiCdnKey); + } + if (object.mediaCdnKey != null) { + if (typeof object.mediaCdnKey !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.CdnKey.mediaCdnKey: object expected"); + message.mediaCdnKey = $root.google.cloud.video.stitcher.v1.MediaCdnKey.fromObject(object.mediaCdnKey); + } + if (object.name != null) + message.name = String(object.name); + if (object.hostname != null) + message.hostname = String(object.hostname); + return message; + }; + + /** + * Creates a plain object from a CdnKey message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.CdnKey + * @static + * @param {google.cloud.video.stitcher.v1.CdnKey} message CdnKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CdnKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.hostname = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.hostname != null && message.hasOwnProperty("hostname")) + object.hostname = message.hostname; + if (message.googleCdnKey != null && message.hasOwnProperty("googleCdnKey")) { + object.googleCdnKey = $root.google.cloud.video.stitcher.v1.GoogleCdnKey.toObject(message.googleCdnKey, options); + if (options.oneofs) + object.cdnKeyConfig = "googleCdnKey"; + } + if (message.akamaiCdnKey != null && message.hasOwnProperty("akamaiCdnKey")) { + object.akamaiCdnKey = $root.google.cloud.video.stitcher.v1.AkamaiCdnKey.toObject(message.akamaiCdnKey, options); + if (options.oneofs) + object.cdnKeyConfig = "akamaiCdnKey"; + } + if (message.mediaCdnKey != null && message.hasOwnProperty("mediaCdnKey")) { + object.mediaCdnKey = $root.google.cloud.video.stitcher.v1.MediaCdnKey.toObject(message.mediaCdnKey, options); + if (options.oneofs) + object.cdnKeyConfig = "mediaCdnKey"; + } + return object; + }; + + /** + * Converts this CdnKey to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.CdnKey + * @instance + * @returns {Object.} JSON object + */ + CdnKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CdnKey + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.CdnKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CdnKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.CdnKey"; + }; + + return CdnKey; + })(); + + v1.GoogleCdnKey = (function() { + + /** + * Properties of a GoogleCdnKey. + * @memberof google.cloud.video.stitcher.v1 + * @interface IGoogleCdnKey + * @property {Uint8Array|null} [privateKey] GoogleCdnKey privateKey + * @property {string|null} [keyName] GoogleCdnKey keyName + */ + + /** + * Constructs a new GoogleCdnKey. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a GoogleCdnKey. + * @implements IGoogleCdnKey + * @constructor + * @param {google.cloud.video.stitcher.v1.IGoogleCdnKey=} [properties] Properties to set + */ + function GoogleCdnKey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GoogleCdnKey privateKey. + * @member {Uint8Array} privateKey + * @memberof google.cloud.video.stitcher.v1.GoogleCdnKey + * @instance + */ + GoogleCdnKey.prototype.privateKey = $util.newBuffer([]); + + /** + * GoogleCdnKey keyName. + * @member {string} keyName + * @memberof google.cloud.video.stitcher.v1.GoogleCdnKey + * @instance + */ + GoogleCdnKey.prototype.keyName = ""; + + /** + * Creates a new GoogleCdnKey instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.GoogleCdnKey + * @static + * @param {google.cloud.video.stitcher.v1.IGoogleCdnKey=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.GoogleCdnKey} GoogleCdnKey instance + */ + GoogleCdnKey.create = function create(properties) { + return new GoogleCdnKey(properties); + }; + + /** + * Encodes the specified GoogleCdnKey message. Does not implicitly {@link google.cloud.video.stitcher.v1.GoogleCdnKey.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.GoogleCdnKey + * @static + * @param {google.cloud.video.stitcher.v1.IGoogleCdnKey} message GoogleCdnKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoogleCdnKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.privateKey); + if (message.keyName != null && Object.hasOwnProperty.call(message, "keyName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.keyName); + return writer; + }; + + /** + * Encodes the specified GoogleCdnKey message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GoogleCdnKey.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.GoogleCdnKey + * @static + * @param {google.cloud.video.stitcher.v1.IGoogleCdnKey} message GoogleCdnKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoogleCdnKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoogleCdnKey message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.GoogleCdnKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.GoogleCdnKey} GoogleCdnKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoogleCdnKey.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.GoogleCdnKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.privateKey = reader.bytes(); + break; + } + case 2: { + message.keyName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoogleCdnKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.GoogleCdnKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.GoogleCdnKey} GoogleCdnKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoogleCdnKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoogleCdnKey message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.GoogleCdnKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoogleCdnKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.privateKey != null && message.hasOwnProperty("privateKey")) + if (!(message.privateKey && typeof message.privateKey.length === "number" || $util.isString(message.privateKey))) + return "privateKey: buffer expected"; + if (message.keyName != null && message.hasOwnProperty("keyName")) + if (!$util.isString(message.keyName)) + return "keyName: string expected"; + return null; + }; + + /** + * Creates a GoogleCdnKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.GoogleCdnKey + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.GoogleCdnKey} GoogleCdnKey + */ + GoogleCdnKey.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.GoogleCdnKey) + return object; + var message = new $root.google.cloud.video.stitcher.v1.GoogleCdnKey(); + if (object.privateKey != null) + if (typeof object.privateKey === "string") + $util.base64.decode(object.privateKey, message.privateKey = $util.newBuffer($util.base64.length(object.privateKey)), 0); + else if (object.privateKey.length >= 0) + message.privateKey = object.privateKey; + if (object.keyName != null) + message.keyName = String(object.keyName); + return message; + }; + + /** + * Creates a plain object from a GoogleCdnKey message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.GoogleCdnKey + * @static + * @param {google.cloud.video.stitcher.v1.GoogleCdnKey} message GoogleCdnKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoogleCdnKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.privateKey = ""; + else { + object.privateKey = []; + if (options.bytes !== Array) + object.privateKey = $util.newBuffer(object.privateKey); + } + object.keyName = ""; + } + if (message.privateKey != null && message.hasOwnProperty("privateKey")) + object.privateKey = options.bytes === String ? $util.base64.encode(message.privateKey, 0, message.privateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.privateKey) : message.privateKey; + if (message.keyName != null && message.hasOwnProperty("keyName")) + object.keyName = message.keyName; + return object; + }; + + /** + * Converts this GoogleCdnKey to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.GoogleCdnKey + * @instance + * @returns {Object.} JSON object + */ + GoogleCdnKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoogleCdnKey + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.GoogleCdnKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoogleCdnKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.GoogleCdnKey"; + }; + + return GoogleCdnKey; + })(); + + v1.AkamaiCdnKey = (function() { + + /** + * Properties of an AkamaiCdnKey. + * @memberof google.cloud.video.stitcher.v1 + * @interface IAkamaiCdnKey + * @property {Uint8Array|null} [tokenKey] AkamaiCdnKey tokenKey + */ + + /** + * Constructs a new AkamaiCdnKey. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents an AkamaiCdnKey. + * @implements IAkamaiCdnKey + * @constructor + * @param {google.cloud.video.stitcher.v1.IAkamaiCdnKey=} [properties] Properties to set + */ + function AkamaiCdnKey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AkamaiCdnKey tokenKey. + * @member {Uint8Array} tokenKey + * @memberof google.cloud.video.stitcher.v1.AkamaiCdnKey + * @instance + */ + AkamaiCdnKey.prototype.tokenKey = $util.newBuffer([]); + + /** + * Creates a new AkamaiCdnKey instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.AkamaiCdnKey + * @static + * @param {google.cloud.video.stitcher.v1.IAkamaiCdnKey=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.AkamaiCdnKey} AkamaiCdnKey instance + */ + AkamaiCdnKey.create = function create(properties) { + return new AkamaiCdnKey(properties); + }; + + /** + * Encodes the specified AkamaiCdnKey message. Does not implicitly {@link google.cloud.video.stitcher.v1.AkamaiCdnKey.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.AkamaiCdnKey + * @static + * @param {google.cloud.video.stitcher.v1.IAkamaiCdnKey} message AkamaiCdnKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AkamaiCdnKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokenKey != null && Object.hasOwnProperty.call(message, "tokenKey")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.tokenKey); + return writer; + }; + + /** + * Encodes the specified AkamaiCdnKey message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.AkamaiCdnKey.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.AkamaiCdnKey + * @static + * @param {google.cloud.video.stitcher.v1.IAkamaiCdnKey} message AkamaiCdnKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AkamaiCdnKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AkamaiCdnKey message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.AkamaiCdnKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.AkamaiCdnKey} AkamaiCdnKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AkamaiCdnKey.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.AkamaiCdnKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tokenKey = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AkamaiCdnKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.AkamaiCdnKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.AkamaiCdnKey} AkamaiCdnKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AkamaiCdnKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AkamaiCdnKey message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.AkamaiCdnKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AkamaiCdnKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tokenKey != null && message.hasOwnProperty("tokenKey")) + if (!(message.tokenKey && typeof message.tokenKey.length === "number" || $util.isString(message.tokenKey))) + return "tokenKey: buffer expected"; + return null; + }; + + /** + * Creates an AkamaiCdnKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.AkamaiCdnKey + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.AkamaiCdnKey} AkamaiCdnKey + */ + AkamaiCdnKey.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.AkamaiCdnKey) + return object; + var message = new $root.google.cloud.video.stitcher.v1.AkamaiCdnKey(); + if (object.tokenKey != null) + if (typeof object.tokenKey === "string") + $util.base64.decode(object.tokenKey, message.tokenKey = $util.newBuffer($util.base64.length(object.tokenKey)), 0); + else if (object.tokenKey.length >= 0) + message.tokenKey = object.tokenKey; + return message; + }; + + /** + * Creates a plain object from an AkamaiCdnKey message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.AkamaiCdnKey + * @static + * @param {google.cloud.video.stitcher.v1.AkamaiCdnKey} message AkamaiCdnKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AkamaiCdnKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.tokenKey = ""; + else { + object.tokenKey = []; + if (options.bytes !== Array) + object.tokenKey = $util.newBuffer(object.tokenKey); + } + if (message.tokenKey != null && message.hasOwnProperty("tokenKey")) + object.tokenKey = options.bytes === String ? $util.base64.encode(message.tokenKey, 0, message.tokenKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.tokenKey) : message.tokenKey; + return object; + }; + + /** + * Converts this AkamaiCdnKey to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.AkamaiCdnKey + * @instance + * @returns {Object.} JSON object + */ + AkamaiCdnKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AkamaiCdnKey + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.AkamaiCdnKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AkamaiCdnKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.AkamaiCdnKey"; + }; + + return AkamaiCdnKey; + })(); + + v1.MediaCdnKey = (function() { + + /** + * Properties of a MediaCdnKey. + * @memberof google.cloud.video.stitcher.v1 + * @interface IMediaCdnKey + * @property {Uint8Array|null} [privateKey] MediaCdnKey privateKey + * @property {string|null} [keyName] MediaCdnKey keyName + */ + + /** + * Constructs a new MediaCdnKey. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a MediaCdnKey. + * @implements IMediaCdnKey + * @constructor + * @param {google.cloud.video.stitcher.v1.IMediaCdnKey=} [properties] Properties to set + */ + function MediaCdnKey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MediaCdnKey privateKey. + * @member {Uint8Array} privateKey + * @memberof google.cloud.video.stitcher.v1.MediaCdnKey + * @instance + */ + MediaCdnKey.prototype.privateKey = $util.newBuffer([]); + + /** + * MediaCdnKey keyName. + * @member {string} keyName + * @memberof google.cloud.video.stitcher.v1.MediaCdnKey + * @instance + */ + MediaCdnKey.prototype.keyName = ""; + + /** + * Creates a new MediaCdnKey instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.MediaCdnKey + * @static + * @param {google.cloud.video.stitcher.v1.IMediaCdnKey=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.MediaCdnKey} MediaCdnKey instance + */ + MediaCdnKey.create = function create(properties) { + return new MediaCdnKey(properties); + }; + + /** + * Encodes the specified MediaCdnKey message. Does not implicitly {@link google.cloud.video.stitcher.v1.MediaCdnKey.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.MediaCdnKey + * @static + * @param {google.cloud.video.stitcher.v1.IMediaCdnKey} message MediaCdnKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MediaCdnKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.privateKey); + if (message.keyName != null && Object.hasOwnProperty.call(message, "keyName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.keyName); + return writer; + }; + + /** + * Encodes the specified MediaCdnKey message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.MediaCdnKey.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.MediaCdnKey + * @static + * @param {google.cloud.video.stitcher.v1.IMediaCdnKey} message MediaCdnKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MediaCdnKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MediaCdnKey message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.MediaCdnKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.MediaCdnKey} MediaCdnKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MediaCdnKey.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.MediaCdnKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.privateKey = reader.bytes(); + break; + } + case 2: { + message.keyName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MediaCdnKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.MediaCdnKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.MediaCdnKey} MediaCdnKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MediaCdnKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MediaCdnKey message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.MediaCdnKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MediaCdnKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.privateKey != null && message.hasOwnProperty("privateKey")) + if (!(message.privateKey && typeof message.privateKey.length === "number" || $util.isString(message.privateKey))) + return "privateKey: buffer expected"; + if (message.keyName != null && message.hasOwnProperty("keyName")) + if (!$util.isString(message.keyName)) + return "keyName: string expected"; + return null; + }; + + /** + * Creates a MediaCdnKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.MediaCdnKey + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.MediaCdnKey} MediaCdnKey + */ + MediaCdnKey.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.MediaCdnKey) + return object; + var message = new $root.google.cloud.video.stitcher.v1.MediaCdnKey(); + if (object.privateKey != null) + if (typeof object.privateKey === "string") + $util.base64.decode(object.privateKey, message.privateKey = $util.newBuffer($util.base64.length(object.privateKey)), 0); + else if (object.privateKey.length >= 0) + message.privateKey = object.privateKey; + if (object.keyName != null) + message.keyName = String(object.keyName); + return message; + }; + + /** + * Creates a plain object from a MediaCdnKey message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.MediaCdnKey + * @static + * @param {google.cloud.video.stitcher.v1.MediaCdnKey} message MediaCdnKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MediaCdnKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.privateKey = ""; + else { + object.privateKey = []; + if (options.bytes !== Array) + object.privateKey = $util.newBuffer(object.privateKey); + } + object.keyName = ""; + } + if (message.privateKey != null && message.hasOwnProperty("privateKey")) + object.privateKey = options.bytes === String ? $util.base64.encode(message.privateKey, 0, message.privateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.privateKey) : message.privateKey; + if (message.keyName != null && message.hasOwnProperty("keyName")) + object.keyName = message.keyName; + return object; + }; + + /** + * Converts this MediaCdnKey to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.MediaCdnKey + * @instance + * @returns {Object.} JSON object + */ + MediaCdnKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MediaCdnKey + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.MediaCdnKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MediaCdnKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.MediaCdnKey"; + }; + + return MediaCdnKey; + })(); + + v1.CompanionAds = (function() { + + /** + * Properties of a CompanionAds. + * @memberof google.cloud.video.stitcher.v1 + * @interface ICompanionAds + * @property {google.cloud.video.stitcher.v1.CompanionAds.DisplayRequirement|null} [displayRequirement] CompanionAds displayRequirement + * @property {Array.|null} [companions] CompanionAds companions + */ + + /** + * Constructs a new CompanionAds. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a CompanionAds. + * @implements ICompanionAds + * @constructor + * @param {google.cloud.video.stitcher.v1.ICompanionAds=} [properties] Properties to set + */ + function CompanionAds(properties) { + this.companions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompanionAds displayRequirement. + * @member {google.cloud.video.stitcher.v1.CompanionAds.DisplayRequirement} displayRequirement + * @memberof google.cloud.video.stitcher.v1.CompanionAds + * @instance + */ + CompanionAds.prototype.displayRequirement = 0; + + /** + * CompanionAds companions. + * @member {Array.} companions + * @memberof google.cloud.video.stitcher.v1.CompanionAds + * @instance + */ + CompanionAds.prototype.companions = $util.emptyArray; + + /** + * Creates a new CompanionAds instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.CompanionAds + * @static + * @param {google.cloud.video.stitcher.v1.ICompanionAds=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.CompanionAds} CompanionAds instance + */ + CompanionAds.create = function create(properties) { + return new CompanionAds(properties); + }; + + /** + * Encodes the specified CompanionAds message. Does not implicitly {@link google.cloud.video.stitcher.v1.CompanionAds.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.CompanionAds + * @static + * @param {google.cloud.video.stitcher.v1.ICompanionAds} message CompanionAds message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompanionAds.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayRequirement != null && Object.hasOwnProperty.call(message, "displayRequirement")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.displayRequirement); + if (message.companions != null && message.companions.length) + for (var i = 0; i < message.companions.length; ++i) + $root.google.cloud.video.stitcher.v1.Companion.encode(message.companions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CompanionAds message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.CompanionAds.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.CompanionAds + * @static + * @param {google.cloud.video.stitcher.v1.ICompanionAds} message CompanionAds message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompanionAds.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompanionAds message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.CompanionAds + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.CompanionAds} CompanionAds + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompanionAds.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.CompanionAds(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayRequirement = reader.int32(); + break; + } + case 2: { + if (!(message.companions && message.companions.length)) + message.companions = []; + message.companions.push($root.google.cloud.video.stitcher.v1.Companion.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompanionAds message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.CompanionAds + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.CompanionAds} CompanionAds + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompanionAds.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompanionAds message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.CompanionAds + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompanionAds.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayRequirement != null && message.hasOwnProperty("displayRequirement")) + switch (message.displayRequirement) { + default: + return "displayRequirement: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.companions != null && message.hasOwnProperty("companions")) { + if (!Array.isArray(message.companions)) + return "companions: array expected"; + for (var i = 0; i < message.companions.length; ++i) { + var error = $root.google.cloud.video.stitcher.v1.Companion.verify(message.companions[i]); + if (error) + return "companions." + error; + } + } + return null; + }; + + /** + * Creates a CompanionAds message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.CompanionAds + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.CompanionAds} CompanionAds + */ + CompanionAds.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.CompanionAds) + return object; + var message = new $root.google.cloud.video.stitcher.v1.CompanionAds(); + switch (object.displayRequirement) { + default: + if (typeof object.displayRequirement === "number") { + message.displayRequirement = object.displayRequirement; + break; + } + break; + case "DISPLAY_REQUIREMENT_UNSPECIFIED": + case 0: + message.displayRequirement = 0; + break; + case "ALL": + case 1: + message.displayRequirement = 1; + break; + case "ANY": + case 2: + message.displayRequirement = 2; + break; + case "NONE": + case 3: + message.displayRequirement = 3; + break; + } + if (object.companions) { + if (!Array.isArray(object.companions)) + throw TypeError(".google.cloud.video.stitcher.v1.CompanionAds.companions: array expected"); + message.companions = []; + for (var i = 0; i < object.companions.length; ++i) { + if (typeof object.companions[i] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.CompanionAds.companions: object expected"); + message.companions[i] = $root.google.cloud.video.stitcher.v1.Companion.fromObject(object.companions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CompanionAds message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.CompanionAds + * @static + * @param {google.cloud.video.stitcher.v1.CompanionAds} message CompanionAds + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompanionAds.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.companions = []; + if (options.defaults) + object.displayRequirement = options.enums === String ? "DISPLAY_REQUIREMENT_UNSPECIFIED" : 0; + if (message.displayRequirement != null && message.hasOwnProperty("displayRequirement")) + object.displayRequirement = options.enums === String ? $root.google.cloud.video.stitcher.v1.CompanionAds.DisplayRequirement[message.displayRequirement] === undefined ? message.displayRequirement : $root.google.cloud.video.stitcher.v1.CompanionAds.DisplayRequirement[message.displayRequirement] : message.displayRequirement; + if (message.companions && message.companions.length) { + object.companions = []; + for (var j = 0; j < message.companions.length; ++j) + object.companions[j] = $root.google.cloud.video.stitcher.v1.Companion.toObject(message.companions[j], options); + } + return object; + }; + + /** + * Converts this CompanionAds to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.CompanionAds + * @instance + * @returns {Object.} JSON object + */ + CompanionAds.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CompanionAds + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.CompanionAds + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompanionAds.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.CompanionAds"; + }; + + /** + * DisplayRequirement enum. + * @name google.cloud.video.stitcher.v1.CompanionAds.DisplayRequirement + * @enum {number} + * @property {number} DISPLAY_REQUIREMENT_UNSPECIFIED=0 DISPLAY_REQUIREMENT_UNSPECIFIED value + * @property {number} ALL=1 ALL value + * @property {number} ANY=2 ANY value + * @property {number} NONE=3 NONE value + */ + CompanionAds.DisplayRequirement = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DISPLAY_REQUIREMENT_UNSPECIFIED"] = 0; + values[valuesById[1] = "ALL"] = 1; + values[valuesById[2] = "ANY"] = 2; + values[valuesById[3] = "NONE"] = 3; + return values; + })(); + + return CompanionAds; + })(); + + v1.Companion = (function() { + + /** + * Properties of a Companion. + * @memberof google.cloud.video.stitcher.v1 + * @interface ICompanion + * @property {google.cloud.video.stitcher.v1.IIframeAdResource|null} [iframeAdResource] Companion iframeAdResource + * @property {google.cloud.video.stitcher.v1.IStaticAdResource|null} [staticAdResource] Companion staticAdResource + * @property {google.cloud.video.stitcher.v1.IHtmlAdResource|null} [htmlAdResource] Companion htmlAdResource + * @property {string|null} [apiFramework] Companion apiFramework + * @property {number|null} [heightPx] Companion heightPx + * @property {number|null} [widthPx] Companion widthPx + * @property {number|null} [assetHeightPx] Companion assetHeightPx + * @property {number|null} [expandedHeightPx] Companion expandedHeightPx + * @property {number|null} [assetWidthPx] Companion assetWidthPx + * @property {number|null} [expandedWidthPx] Companion expandedWidthPx + * @property {string|null} [adSlotId] Companion adSlotId + * @property {Array.|null} [events] Companion events + */ + + /** + * Constructs a new Companion. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a Companion. + * @implements ICompanion + * @constructor + * @param {google.cloud.video.stitcher.v1.ICompanion=} [properties] Properties to set + */ + function Companion(properties) { + this.events = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Companion iframeAdResource. + * @member {google.cloud.video.stitcher.v1.IIframeAdResource|null|undefined} iframeAdResource + * @memberof google.cloud.video.stitcher.v1.Companion + * @instance + */ + Companion.prototype.iframeAdResource = null; + + /** + * Companion staticAdResource. + * @member {google.cloud.video.stitcher.v1.IStaticAdResource|null|undefined} staticAdResource + * @memberof google.cloud.video.stitcher.v1.Companion + * @instance + */ + Companion.prototype.staticAdResource = null; + + /** + * Companion htmlAdResource. + * @member {google.cloud.video.stitcher.v1.IHtmlAdResource|null|undefined} htmlAdResource + * @memberof google.cloud.video.stitcher.v1.Companion + * @instance + */ + Companion.prototype.htmlAdResource = null; + + /** + * Companion apiFramework. + * @member {string} apiFramework + * @memberof google.cloud.video.stitcher.v1.Companion + * @instance + */ + Companion.prototype.apiFramework = ""; + + /** + * Companion heightPx. + * @member {number} heightPx + * @memberof google.cloud.video.stitcher.v1.Companion + * @instance + */ + Companion.prototype.heightPx = 0; + + /** + * Companion widthPx. + * @member {number} widthPx + * @memberof google.cloud.video.stitcher.v1.Companion + * @instance + */ + Companion.prototype.widthPx = 0; + + /** + * Companion assetHeightPx. + * @member {number} assetHeightPx + * @memberof google.cloud.video.stitcher.v1.Companion + * @instance + */ + Companion.prototype.assetHeightPx = 0; + + /** + * Companion expandedHeightPx. + * @member {number} expandedHeightPx + * @memberof google.cloud.video.stitcher.v1.Companion + * @instance + */ + Companion.prototype.expandedHeightPx = 0; + + /** + * Companion assetWidthPx. + * @member {number} assetWidthPx + * @memberof google.cloud.video.stitcher.v1.Companion + * @instance + */ + Companion.prototype.assetWidthPx = 0; + + /** + * Companion expandedWidthPx. + * @member {number} expandedWidthPx + * @memberof google.cloud.video.stitcher.v1.Companion + * @instance + */ + Companion.prototype.expandedWidthPx = 0; + + /** + * Companion adSlotId. + * @member {string} adSlotId + * @memberof google.cloud.video.stitcher.v1.Companion + * @instance + */ + Companion.prototype.adSlotId = ""; + + /** + * Companion events. + * @member {Array.} events + * @memberof google.cloud.video.stitcher.v1.Companion + * @instance + */ + Companion.prototype.events = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Companion adResource. + * @member {"iframeAdResource"|"staticAdResource"|"htmlAdResource"|undefined} adResource + * @memberof google.cloud.video.stitcher.v1.Companion + * @instance + */ + Object.defineProperty(Companion.prototype, "adResource", { + get: $util.oneOfGetter($oneOfFields = ["iframeAdResource", "staticAdResource", "htmlAdResource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Companion instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.Companion + * @static + * @param {google.cloud.video.stitcher.v1.ICompanion=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.Companion} Companion instance + */ + Companion.create = function create(properties) { + return new Companion(properties); + }; + + /** + * Encodes the specified Companion message. Does not implicitly {@link google.cloud.video.stitcher.v1.Companion.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.Companion + * @static + * @param {google.cloud.video.stitcher.v1.ICompanion} message Companion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Companion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.apiFramework != null && Object.hasOwnProperty.call(message, "apiFramework")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.apiFramework); + if (message.heightPx != null && Object.hasOwnProperty.call(message, "heightPx")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.heightPx); + if (message.widthPx != null && Object.hasOwnProperty.call(message, "widthPx")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.widthPx); + if (message.assetHeightPx != null && Object.hasOwnProperty.call(message, "assetHeightPx")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.assetHeightPx); + if (message.expandedHeightPx != null && Object.hasOwnProperty.call(message, "expandedHeightPx")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.expandedHeightPx); + if (message.assetWidthPx != null && Object.hasOwnProperty.call(message, "assetWidthPx")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.assetWidthPx); + if (message.expandedWidthPx != null && Object.hasOwnProperty.call(message, "expandedWidthPx")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.expandedWidthPx); + if (message.adSlotId != null && Object.hasOwnProperty.call(message, "adSlotId")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.adSlotId); + if (message.events != null && message.events.length) + for (var i = 0; i < message.events.length; ++i) + $root.google.cloud.video.stitcher.v1.Event.encode(message.events[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.iframeAdResource != null && Object.hasOwnProperty.call(message, "iframeAdResource")) + $root.google.cloud.video.stitcher.v1.IframeAdResource.encode(message.iframeAdResource, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.staticAdResource != null && Object.hasOwnProperty.call(message, "staticAdResource")) + $root.google.cloud.video.stitcher.v1.StaticAdResource.encode(message.staticAdResource, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.htmlAdResource != null && Object.hasOwnProperty.call(message, "htmlAdResource")) + $root.google.cloud.video.stitcher.v1.HtmlAdResource.encode(message.htmlAdResource, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Companion message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.Companion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.Companion + * @static + * @param {google.cloud.video.stitcher.v1.ICompanion} message Companion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Companion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Companion message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.Companion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.Companion} Companion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Companion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.Companion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 10: { + message.iframeAdResource = $root.google.cloud.video.stitcher.v1.IframeAdResource.decode(reader, reader.uint32()); + break; + } + case 11: { + message.staticAdResource = $root.google.cloud.video.stitcher.v1.StaticAdResource.decode(reader, reader.uint32()); + break; + } + case 12: { + message.htmlAdResource = $root.google.cloud.video.stitcher.v1.HtmlAdResource.decode(reader, reader.uint32()); + break; + } + case 1: { + message.apiFramework = reader.string(); + break; + } + case 2: { + message.heightPx = reader.int32(); + break; + } + case 3: { + message.widthPx = reader.int32(); + break; + } + case 4: { + message.assetHeightPx = reader.int32(); + break; + } + case 5: { + message.expandedHeightPx = reader.int32(); + break; + } + case 6: { + message.assetWidthPx = reader.int32(); + break; + } + case 7: { + message.expandedWidthPx = reader.int32(); + break; + } + case 8: { + message.adSlotId = reader.string(); + break; + } + case 9: { + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.google.cloud.video.stitcher.v1.Event.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Companion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.Companion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.Companion} Companion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Companion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Companion message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.Companion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Companion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.iframeAdResource != null && message.hasOwnProperty("iframeAdResource")) { + properties.adResource = 1; + { + var error = $root.google.cloud.video.stitcher.v1.IframeAdResource.verify(message.iframeAdResource); + if (error) + return "iframeAdResource." + error; + } + } + if (message.staticAdResource != null && message.hasOwnProperty("staticAdResource")) { + if (properties.adResource === 1) + return "adResource: multiple values"; + properties.adResource = 1; + { + var error = $root.google.cloud.video.stitcher.v1.StaticAdResource.verify(message.staticAdResource); + if (error) + return "staticAdResource." + error; + } + } + if (message.htmlAdResource != null && message.hasOwnProperty("htmlAdResource")) { + if (properties.adResource === 1) + return "adResource: multiple values"; + properties.adResource = 1; + { + var error = $root.google.cloud.video.stitcher.v1.HtmlAdResource.verify(message.htmlAdResource); + if (error) + return "htmlAdResource." + error; + } + } + if (message.apiFramework != null && message.hasOwnProperty("apiFramework")) + if (!$util.isString(message.apiFramework)) + return "apiFramework: string expected"; + if (message.heightPx != null && message.hasOwnProperty("heightPx")) + if (!$util.isInteger(message.heightPx)) + return "heightPx: integer expected"; + if (message.widthPx != null && message.hasOwnProperty("widthPx")) + if (!$util.isInteger(message.widthPx)) + return "widthPx: integer expected"; + if (message.assetHeightPx != null && message.hasOwnProperty("assetHeightPx")) + if (!$util.isInteger(message.assetHeightPx)) + return "assetHeightPx: integer expected"; + if (message.expandedHeightPx != null && message.hasOwnProperty("expandedHeightPx")) + if (!$util.isInteger(message.expandedHeightPx)) + return "expandedHeightPx: integer expected"; + if (message.assetWidthPx != null && message.hasOwnProperty("assetWidthPx")) + if (!$util.isInteger(message.assetWidthPx)) + return "assetWidthPx: integer expected"; + if (message.expandedWidthPx != null && message.hasOwnProperty("expandedWidthPx")) + if (!$util.isInteger(message.expandedWidthPx)) + return "expandedWidthPx: integer expected"; + if (message.adSlotId != null && message.hasOwnProperty("adSlotId")) + if (!$util.isString(message.adSlotId)) + return "adSlotId: string expected"; + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (var i = 0; i < message.events.length; ++i) { + var error = $root.google.cloud.video.stitcher.v1.Event.verify(message.events[i]); + if (error) + return "events." + error; + } + } + return null; + }; + + /** + * Creates a Companion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.Companion + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.Companion} Companion + */ + Companion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.Companion) + return object; + var message = new $root.google.cloud.video.stitcher.v1.Companion(); + if (object.iframeAdResource != null) { + if (typeof object.iframeAdResource !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.Companion.iframeAdResource: object expected"); + message.iframeAdResource = $root.google.cloud.video.stitcher.v1.IframeAdResource.fromObject(object.iframeAdResource); + } + if (object.staticAdResource != null) { + if (typeof object.staticAdResource !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.Companion.staticAdResource: object expected"); + message.staticAdResource = $root.google.cloud.video.stitcher.v1.StaticAdResource.fromObject(object.staticAdResource); + } + if (object.htmlAdResource != null) { + if (typeof object.htmlAdResource !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.Companion.htmlAdResource: object expected"); + message.htmlAdResource = $root.google.cloud.video.stitcher.v1.HtmlAdResource.fromObject(object.htmlAdResource); + } + if (object.apiFramework != null) + message.apiFramework = String(object.apiFramework); + if (object.heightPx != null) + message.heightPx = object.heightPx | 0; + if (object.widthPx != null) + message.widthPx = object.widthPx | 0; + if (object.assetHeightPx != null) + message.assetHeightPx = object.assetHeightPx | 0; + if (object.expandedHeightPx != null) + message.expandedHeightPx = object.expandedHeightPx | 0; + if (object.assetWidthPx != null) + message.assetWidthPx = object.assetWidthPx | 0; + if (object.expandedWidthPx != null) + message.expandedWidthPx = object.expandedWidthPx | 0; + if (object.adSlotId != null) + message.adSlotId = String(object.adSlotId); + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".google.cloud.video.stitcher.v1.Companion.events: array expected"); + message.events = []; + for (var i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.Companion.events: object expected"); + message.events[i] = $root.google.cloud.video.stitcher.v1.Event.fromObject(object.events[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Companion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.Companion + * @static + * @param {google.cloud.video.stitcher.v1.Companion} message Companion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Companion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.events = []; + if (options.defaults) { + object.apiFramework = ""; + object.heightPx = 0; + object.widthPx = 0; + object.assetHeightPx = 0; + object.expandedHeightPx = 0; + object.assetWidthPx = 0; + object.expandedWidthPx = 0; + object.adSlotId = ""; + } + if (message.apiFramework != null && message.hasOwnProperty("apiFramework")) + object.apiFramework = message.apiFramework; + if (message.heightPx != null && message.hasOwnProperty("heightPx")) + object.heightPx = message.heightPx; + if (message.widthPx != null && message.hasOwnProperty("widthPx")) + object.widthPx = message.widthPx; + if (message.assetHeightPx != null && message.hasOwnProperty("assetHeightPx")) + object.assetHeightPx = message.assetHeightPx; + if (message.expandedHeightPx != null && message.hasOwnProperty("expandedHeightPx")) + object.expandedHeightPx = message.expandedHeightPx; + if (message.assetWidthPx != null && message.hasOwnProperty("assetWidthPx")) + object.assetWidthPx = message.assetWidthPx; + if (message.expandedWidthPx != null && message.hasOwnProperty("expandedWidthPx")) + object.expandedWidthPx = message.expandedWidthPx; + if (message.adSlotId != null && message.hasOwnProperty("adSlotId")) + object.adSlotId = message.adSlotId; + if (message.events && message.events.length) { + object.events = []; + for (var j = 0; j < message.events.length; ++j) + object.events[j] = $root.google.cloud.video.stitcher.v1.Event.toObject(message.events[j], options); + } + if (message.iframeAdResource != null && message.hasOwnProperty("iframeAdResource")) { + object.iframeAdResource = $root.google.cloud.video.stitcher.v1.IframeAdResource.toObject(message.iframeAdResource, options); + if (options.oneofs) + object.adResource = "iframeAdResource"; + } + if (message.staticAdResource != null && message.hasOwnProperty("staticAdResource")) { + object.staticAdResource = $root.google.cloud.video.stitcher.v1.StaticAdResource.toObject(message.staticAdResource, options); + if (options.oneofs) + object.adResource = "staticAdResource"; + } + if (message.htmlAdResource != null && message.hasOwnProperty("htmlAdResource")) { + object.htmlAdResource = $root.google.cloud.video.stitcher.v1.HtmlAdResource.toObject(message.htmlAdResource, options); + if (options.oneofs) + object.adResource = "htmlAdResource"; + } + return object; + }; + + /** + * Converts this Companion to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.Companion + * @instance + * @returns {Object.} JSON object + */ + Companion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Companion + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.Companion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Companion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.Companion"; + }; + + return Companion; + })(); + + v1.HtmlAdResource = (function() { + + /** + * Properties of a HtmlAdResource. + * @memberof google.cloud.video.stitcher.v1 + * @interface IHtmlAdResource + * @property {string|null} [htmlSource] HtmlAdResource htmlSource + */ + + /** + * Constructs a new HtmlAdResource. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a HtmlAdResource. + * @implements IHtmlAdResource + * @constructor + * @param {google.cloud.video.stitcher.v1.IHtmlAdResource=} [properties] Properties to set + */ + function HtmlAdResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HtmlAdResource htmlSource. + * @member {string} htmlSource + * @memberof google.cloud.video.stitcher.v1.HtmlAdResource + * @instance + */ + HtmlAdResource.prototype.htmlSource = ""; + + /** + * Creates a new HtmlAdResource instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.HtmlAdResource + * @static + * @param {google.cloud.video.stitcher.v1.IHtmlAdResource=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.HtmlAdResource} HtmlAdResource instance + */ + HtmlAdResource.create = function create(properties) { + return new HtmlAdResource(properties); + }; + + /** + * Encodes the specified HtmlAdResource message. Does not implicitly {@link google.cloud.video.stitcher.v1.HtmlAdResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.HtmlAdResource + * @static + * @param {google.cloud.video.stitcher.v1.IHtmlAdResource} message HtmlAdResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HtmlAdResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.htmlSource != null && Object.hasOwnProperty.call(message, "htmlSource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.htmlSource); + return writer; + }; + + /** + * Encodes the specified HtmlAdResource message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.HtmlAdResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.HtmlAdResource + * @static + * @param {google.cloud.video.stitcher.v1.IHtmlAdResource} message HtmlAdResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HtmlAdResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HtmlAdResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.HtmlAdResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.HtmlAdResource} HtmlAdResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HtmlAdResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.HtmlAdResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.htmlSource = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HtmlAdResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.HtmlAdResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.HtmlAdResource} HtmlAdResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HtmlAdResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HtmlAdResource message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.HtmlAdResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HtmlAdResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.htmlSource != null && message.hasOwnProperty("htmlSource")) + if (!$util.isString(message.htmlSource)) + return "htmlSource: string expected"; + return null; + }; + + /** + * Creates a HtmlAdResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.HtmlAdResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.HtmlAdResource} HtmlAdResource + */ + HtmlAdResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.HtmlAdResource) + return object; + var message = new $root.google.cloud.video.stitcher.v1.HtmlAdResource(); + if (object.htmlSource != null) + message.htmlSource = String(object.htmlSource); + return message; + }; + + /** + * Creates a plain object from a HtmlAdResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.HtmlAdResource + * @static + * @param {google.cloud.video.stitcher.v1.HtmlAdResource} message HtmlAdResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HtmlAdResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.htmlSource = ""; + if (message.htmlSource != null && message.hasOwnProperty("htmlSource")) + object.htmlSource = message.htmlSource; + return object; + }; + + /** + * Converts this HtmlAdResource to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.HtmlAdResource + * @instance + * @returns {Object.} JSON object + */ + HtmlAdResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HtmlAdResource + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.HtmlAdResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HtmlAdResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.HtmlAdResource"; + }; + + return HtmlAdResource; + })(); + + v1.IframeAdResource = (function() { + + /** + * Properties of an IframeAdResource. + * @memberof google.cloud.video.stitcher.v1 + * @interface IIframeAdResource + * @property {string|null} [uri] IframeAdResource uri + */ + + /** + * Constructs a new IframeAdResource. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents an IframeAdResource. + * @implements IIframeAdResource + * @constructor + * @param {google.cloud.video.stitcher.v1.IIframeAdResource=} [properties] Properties to set + */ + function IframeAdResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IframeAdResource uri. + * @member {string} uri + * @memberof google.cloud.video.stitcher.v1.IframeAdResource + * @instance + */ + IframeAdResource.prototype.uri = ""; + + /** + * Creates a new IframeAdResource instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.IframeAdResource + * @static + * @param {google.cloud.video.stitcher.v1.IIframeAdResource=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.IframeAdResource} IframeAdResource instance + */ + IframeAdResource.create = function create(properties) { + return new IframeAdResource(properties); + }; + + /** + * Encodes the specified IframeAdResource message. Does not implicitly {@link google.cloud.video.stitcher.v1.IframeAdResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.IframeAdResource + * @static + * @param {google.cloud.video.stitcher.v1.IIframeAdResource} message IframeAdResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IframeAdResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + return writer; + }; + + /** + * Encodes the specified IframeAdResource message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.IframeAdResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.IframeAdResource + * @static + * @param {google.cloud.video.stitcher.v1.IIframeAdResource} message IframeAdResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IframeAdResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IframeAdResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.IframeAdResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.IframeAdResource} IframeAdResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IframeAdResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.IframeAdResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IframeAdResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.IframeAdResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.IframeAdResource} IframeAdResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IframeAdResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IframeAdResource message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.IframeAdResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IframeAdResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + return null; + }; + + /** + * Creates an IframeAdResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.IframeAdResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.IframeAdResource} IframeAdResource + */ + IframeAdResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.IframeAdResource) + return object; + var message = new $root.google.cloud.video.stitcher.v1.IframeAdResource(); + if (object.uri != null) + message.uri = String(object.uri); + return message; + }; + + /** + * Creates a plain object from an IframeAdResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.IframeAdResource + * @static + * @param {google.cloud.video.stitcher.v1.IframeAdResource} message IframeAdResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IframeAdResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + return object; + }; + + /** + * Converts this IframeAdResource to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.IframeAdResource + * @instance + * @returns {Object.} JSON object + */ + IframeAdResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IframeAdResource + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.IframeAdResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IframeAdResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.IframeAdResource"; + }; + + return IframeAdResource; + })(); + + v1.StaticAdResource = (function() { + + /** + * Properties of a StaticAdResource. + * @memberof google.cloud.video.stitcher.v1 + * @interface IStaticAdResource + * @property {string|null} [uri] StaticAdResource uri + * @property {string|null} [creativeType] StaticAdResource creativeType + */ + + /** + * Constructs a new StaticAdResource. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a StaticAdResource. + * @implements IStaticAdResource + * @constructor + * @param {google.cloud.video.stitcher.v1.IStaticAdResource=} [properties] Properties to set + */ + function StaticAdResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StaticAdResource uri. + * @member {string} uri + * @memberof google.cloud.video.stitcher.v1.StaticAdResource + * @instance + */ + StaticAdResource.prototype.uri = ""; + + /** + * StaticAdResource creativeType. + * @member {string} creativeType + * @memberof google.cloud.video.stitcher.v1.StaticAdResource + * @instance + */ + StaticAdResource.prototype.creativeType = ""; + + /** + * Creates a new StaticAdResource instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.StaticAdResource + * @static + * @param {google.cloud.video.stitcher.v1.IStaticAdResource=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.StaticAdResource} StaticAdResource instance + */ + StaticAdResource.create = function create(properties) { + return new StaticAdResource(properties); + }; + + /** + * Encodes the specified StaticAdResource message. Does not implicitly {@link google.cloud.video.stitcher.v1.StaticAdResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.StaticAdResource + * @static + * @param {google.cloud.video.stitcher.v1.IStaticAdResource} message StaticAdResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StaticAdResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + if (message.creativeType != null && Object.hasOwnProperty.call(message, "creativeType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.creativeType); + return writer; + }; + + /** + * Encodes the specified StaticAdResource message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.StaticAdResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.StaticAdResource + * @static + * @param {google.cloud.video.stitcher.v1.IStaticAdResource} message StaticAdResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StaticAdResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StaticAdResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.StaticAdResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.StaticAdResource} StaticAdResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StaticAdResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.StaticAdResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + case 2: { + message.creativeType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StaticAdResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.StaticAdResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.StaticAdResource} StaticAdResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StaticAdResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StaticAdResource message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.StaticAdResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StaticAdResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.creativeType != null && message.hasOwnProperty("creativeType")) + if (!$util.isString(message.creativeType)) + return "creativeType: string expected"; + return null; + }; + + /** + * Creates a StaticAdResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.StaticAdResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.StaticAdResource} StaticAdResource + */ + StaticAdResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.StaticAdResource) + return object; + var message = new $root.google.cloud.video.stitcher.v1.StaticAdResource(); + if (object.uri != null) + message.uri = String(object.uri); + if (object.creativeType != null) + message.creativeType = String(object.creativeType); + return message; + }; + + /** + * Creates a plain object from a StaticAdResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.StaticAdResource + * @static + * @param {google.cloud.video.stitcher.v1.StaticAdResource} message StaticAdResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StaticAdResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.uri = ""; + object.creativeType = ""; + } + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.creativeType != null && message.hasOwnProperty("creativeType")) + object.creativeType = message.creativeType; + return object; + }; + + /** + * Converts this StaticAdResource to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.StaticAdResource + * @instance + * @returns {Object.} JSON object + */ + StaticAdResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StaticAdResource + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.StaticAdResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StaticAdResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.StaticAdResource"; + }; + + return StaticAdResource; + })(); + + v1.Event = (function() { + + /** + * Properties of an Event. + * @memberof google.cloud.video.stitcher.v1 + * @interface IEvent + * @property {google.cloud.video.stitcher.v1.Event.EventType|null} [type] Event type + * @property {string|null} [uri] Event uri + * @property {string|null} [id] Event id + * @property {google.protobuf.IDuration|null} [offset] Event offset + */ + + /** + * Constructs a new Event. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents an Event. + * @implements IEvent + * @constructor + * @param {google.cloud.video.stitcher.v1.IEvent=} [properties] Properties to set + */ + function Event(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Event type. + * @member {google.cloud.video.stitcher.v1.Event.EventType} type + * @memberof google.cloud.video.stitcher.v1.Event + * @instance + */ + Event.prototype.type = 0; + + /** + * Event uri. + * @member {string} uri + * @memberof google.cloud.video.stitcher.v1.Event + * @instance + */ + Event.prototype.uri = ""; + + /** + * Event id. + * @member {string} id + * @memberof google.cloud.video.stitcher.v1.Event + * @instance + */ + Event.prototype.id = ""; + + /** + * Event offset. + * @member {google.protobuf.IDuration|null|undefined} offset + * @memberof google.cloud.video.stitcher.v1.Event + * @instance + */ + Event.prototype.offset = null; + + /** + * Creates a new Event instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.Event + * @static + * @param {google.cloud.video.stitcher.v1.IEvent=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.Event} Event instance + */ + Event.create = function create(properties) { + return new Event(properties); + }; + + /** + * Encodes the specified Event message. Does not implicitly {@link google.cloud.video.stitcher.v1.Event.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.Event + * @static + * @param {google.cloud.video.stitcher.v1.IEvent} message Event message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Event.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.id); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + $root.google.protobuf.Duration.encode(message.offset, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Event message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.Event.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.Event + * @static + * @param {google.cloud.video.stitcher.v1.IEvent} message Event message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Event.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Event message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.Event + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.Event} Event + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Event.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.Event(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.id = reader.string(); + break; + } + case 4: { + message.offset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Event message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.Event + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.Event} Event + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Event.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Event message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.Event + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Event.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 21: + case 22: + case 24: + case 25: + case 26: + case 27: + break; + } + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.offset != null && message.hasOwnProperty("offset")) { + var error = $root.google.protobuf.Duration.verify(message.offset); + if (error) + return "offset." + error; + } + return null; + }; + + /** + * Creates an Event message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.Event + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.Event} Event + */ + Event.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.Event) + return object; + var message = new $root.google.cloud.video.stitcher.v1.Event(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "EVENT_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "CREATIVE_VIEW": + case 1: + message.type = 1; + break; + case "START": + case 2: + message.type = 2; + break; + case "BREAK_START": + case 3: + message.type = 3; + break; + case "BREAK_END": + case 4: + message.type = 4; + break; + case "IMPRESSION": + case 5: + message.type = 5; + break; + case "FIRST_QUARTILE": + case 6: + message.type = 6; + break; + case "MIDPOINT": + case 7: + message.type = 7; + break; + case "THIRD_QUARTILE": + case 8: + message.type = 8; + break; + case "COMPLETE": + case 9: + message.type = 9; + break; + case "PROGRESS": + case 10: + message.type = 10; + break; + case "MUTE": + case 11: + message.type = 11; + break; + case "UNMUTE": + case 12: + message.type = 12; + break; + case "PAUSE": + case 13: + message.type = 13; + break; + case "CLICK": + case 14: + message.type = 14; + break; + case "CLICK_THROUGH": + case 15: + message.type = 15; + break; + case "REWIND": + case 16: + message.type = 16; + break; + case "RESUME": + case 17: + message.type = 17; + break; + case "ERROR": + case 18: + message.type = 18; + break; + case "EXPAND": + case 21: + message.type = 21; + break; + case "COLLAPSE": + case 22: + message.type = 22; + break; + case "CLOSE": + case 24: + message.type = 24; + break; + case "CLOSE_LINEAR": + case 25: + message.type = 25; + break; + case "SKIP": + case 26: + message.type = 26; + break; + case "ACCEPT_INVITATION": + case 27: + message.type = 27; + break; + } + if (object.uri != null) + message.uri = String(object.uri); + if (object.id != null) + message.id = String(object.id); + if (object.offset != null) { + if (typeof object.offset !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.Event.offset: object expected"); + message.offset = $root.google.protobuf.Duration.fromObject(object.offset); + } + return message; + }; + + /** + * Creates a plain object from an Event message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.Event + * @static + * @param {google.cloud.video.stitcher.v1.Event} message Event + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Event.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "EVENT_TYPE_UNSPECIFIED" : 0; + object.uri = ""; + object.id = ""; + object.offset = null; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.video.stitcher.v1.Event.EventType[message.type] === undefined ? message.type : $root.google.cloud.video.stitcher.v1.Event.EventType[message.type] : message.type; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.offset != null && message.hasOwnProperty("offset")) + object.offset = $root.google.protobuf.Duration.toObject(message.offset, options); + return object; + }; + + /** + * Converts this Event to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.Event + * @instance + * @returns {Object.} JSON object + */ + Event.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Event + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.Event + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Event.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.Event"; + }; + + /** + * EventType enum. + * @name google.cloud.video.stitcher.v1.Event.EventType + * @enum {number} + * @property {number} EVENT_TYPE_UNSPECIFIED=0 EVENT_TYPE_UNSPECIFIED value + * @property {number} CREATIVE_VIEW=1 CREATIVE_VIEW value + * @property {number} START=2 START value + * @property {number} BREAK_START=3 BREAK_START value + * @property {number} BREAK_END=4 BREAK_END value + * @property {number} IMPRESSION=5 IMPRESSION value + * @property {number} FIRST_QUARTILE=6 FIRST_QUARTILE value + * @property {number} MIDPOINT=7 MIDPOINT value + * @property {number} THIRD_QUARTILE=8 THIRD_QUARTILE value + * @property {number} COMPLETE=9 COMPLETE value + * @property {number} PROGRESS=10 PROGRESS value + * @property {number} MUTE=11 MUTE value + * @property {number} UNMUTE=12 UNMUTE value + * @property {number} PAUSE=13 PAUSE value + * @property {number} CLICK=14 CLICK value + * @property {number} CLICK_THROUGH=15 CLICK_THROUGH value + * @property {number} REWIND=16 REWIND value + * @property {number} RESUME=17 RESUME value + * @property {number} ERROR=18 ERROR value + * @property {number} EXPAND=21 EXPAND value + * @property {number} COLLAPSE=22 COLLAPSE value + * @property {number} CLOSE=24 CLOSE value + * @property {number} CLOSE_LINEAR=25 CLOSE_LINEAR value + * @property {number} SKIP=26 SKIP value + * @property {number} ACCEPT_INVITATION=27 ACCEPT_INVITATION value + */ + Event.EventType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVENT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATIVE_VIEW"] = 1; + values[valuesById[2] = "START"] = 2; + values[valuesById[3] = "BREAK_START"] = 3; + values[valuesById[4] = "BREAK_END"] = 4; + values[valuesById[5] = "IMPRESSION"] = 5; + values[valuesById[6] = "FIRST_QUARTILE"] = 6; + values[valuesById[7] = "MIDPOINT"] = 7; + values[valuesById[8] = "THIRD_QUARTILE"] = 8; + values[valuesById[9] = "COMPLETE"] = 9; + values[valuesById[10] = "PROGRESS"] = 10; + values[valuesById[11] = "MUTE"] = 11; + values[valuesById[12] = "UNMUTE"] = 12; + values[valuesById[13] = "PAUSE"] = 13; + values[valuesById[14] = "CLICK"] = 14; + values[valuesById[15] = "CLICK_THROUGH"] = 15; + values[valuesById[16] = "REWIND"] = 16; + values[valuesById[17] = "RESUME"] = 17; + values[valuesById[18] = "ERROR"] = 18; + values[valuesById[21] = "EXPAND"] = 21; + values[valuesById[22] = "COLLAPSE"] = 22; + values[valuesById[24] = "CLOSE"] = 24; + values[valuesById[25] = "CLOSE_LINEAR"] = 25; + values[valuesById[26] = "SKIP"] = 26; + values[valuesById[27] = "ACCEPT_INVITATION"] = 27; + return values; + })(); + + return Event; + })(); + + v1.ProgressEvent = (function() { + + /** + * Properties of a ProgressEvent. + * @memberof google.cloud.video.stitcher.v1 + * @interface IProgressEvent + * @property {google.protobuf.IDuration|null} [timeOffset] ProgressEvent timeOffset + * @property {Array.|null} [events] ProgressEvent events + */ + + /** + * Constructs a new ProgressEvent. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a ProgressEvent. + * @implements IProgressEvent + * @constructor + * @param {google.cloud.video.stitcher.v1.IProgressEvent=} [properties] Properties to set + */ + function ProgressEvent(properties) { + this.events = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProgressEvent timeOffset. + * @member {google.protobuf.IDuration|null|undefined} timeOffset + * @memberof google.cloud.video.stitcher.v1.ProgressEvent + * @instance + */ + ProgressEvent.prototype.timeOffset = null; + + /** + * ProgressEvent events. + * @member {Array.} events + * @memberof google.cloud.video.stitcher.v1.ProgressEvent + * @instance + */ + ProgressEvent.prototype.events = $util.emptyArray; + + /** + * Creates a new ProgressEvent instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.ProgressEvent + * @static + * @param {google.cloud.video.stitcher.v1.IProgressEvent=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.ProgressEvent} ProgressEvent instance + */ + ProgressEvent.create = function create(properties) { + return new ProgressEvent(properties); + }; + + /** + * Encodes the specified ProgressEvent message. Does not implicitly {@link google.cloud.video.stitcher.v1.ProgressEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.ProgressEvent + * @static + * @param {google.cloud.video.stitcher.v1.IProgressEvent} message ProgressEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProgressEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timeOffset != null && Object.hasOwnProperty.call(message, "timeOffset")) + $root.google.protobuf.Duration.encode(message.timeOffset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.events != null && message.events.length) + for (var i = 0; i < message.events.length; ++i) + $root.google.cloud.video.stitcher.v1.Event.encode(message.events[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ProgressEvent message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ProgressEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.ProgressEvent + * @static + * @param {google.cloud.video.stitcher.v1.IProgressEvent} message ProgressEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProgressEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProgressEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.ProgressEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.ProgressEvent} ProgressEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProgressEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.ProgressEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.timeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.google.cloud.video.stitcher.v1.Event.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProgressEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.ProgressEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.ProgressEvent} ProgressEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProgressEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProgressEvent message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.ProgressEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProgressEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.timeOffset); + if (error) + return "timeOffset." + error; + } + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (var i = 0; i < message.events.length; ++i) { + var error = $root.google.cloud.video.stitcher.v1.Event.verify(message.events[i]); + if (error) + return "events." + error; + } + } + return null; + }; + + /** + * Creates a ProgressEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.ProgressEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.ProgressEvent} ProgressEvent + */ + ProgressEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.ProgressEvent) + return object; + var message = new $root.google.cloud.video.stitcher.v1.ProgressEvent(); + if (object.timeOffset != null) { + if (typeof object.timeOffset !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.ProgressEvent.timeOffset: object expected"); + message.timeOffset = $root.google.protobuf.Duration.fromObject(object.timeOffset); + } + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".google.cloud.video.stitcher.v1.ProgressEvent.events: array expected"); + message.events = []; + for (var i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.ProgressEvent.events: object expected"); + message.events[i] = $root.google.cloud.video.stitcher.v1.Event.fromObject(object.events[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ProgressEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.ProgressEvent + * @static + * @param {google.cloud.video.stitcher.v1.ProgressEvent} message ProgressEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProgressEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.events = []; + if (options.defaults) + object.timeOffset = null; + if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) + object.timeOffset = $root.google.protobuf.Duration.toObject(message.timeOffset, options); + if (message.events && message.events.length) { + object.events = []; + for (var j = 0; j < message.events.length; ++j) + object.events[j] = $root.google.cloud.video.stitcher.v1.Event.toObject(message.events[j], options); + } + return object; + }; + + /** + * Converts this ProgressEvent to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.ProgressEvent + * @instance + * @returns {Object.} JSON object + */ + ProgressEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProgressEvent + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.ProgressEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProgressEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ProgressEvent"; + }; + + return ProgressEvent; + })(); + + v1.VodSession = (function() { + + /** + * Properties of a VodSession. + * @memberof google.cloud.video.stitcher.v1 + * @interface IVodSession + * @property {string|null} [name] VodSession name + * @property {google.cloud.video.stitcher.v1.IInterstitials|null} [interstitials] VodSession interstitials + * @property {string|null} [playUri] VodSession playUri + * @property {string|null} [sourceUri] VodSession sourceUri + * @property {string|null} [adTagUri] VodSession adTagUri + * @property {Object.|null} [adTagMacroMap] VodSession adTagMacroMap + * @property {boolean|null} [clientAdTracking] VodSession clientAdTracking + * @property {google.cloud.video.stitcher.v1.IManifestOptions|null} [manifestOptions] VodSession manifestOptions + * @property {string|null} [assetId] VodSession assetId + */ + + /** + * Constructs a new VodSession. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a VodSession. + * @implements IVodSession + * @constructor + * @param {google.cloud.video.stitcher.v1.IVodSession=} [properties] Properties to set + */ + function VodSession(properties) { + this.adTagMacroMap = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VodSession name. + * @member {string} name + * @memberof google.cloud.video.stitcher.v1.VodSession + * @instance + */ + VodSession.prototype.name = ""; + + /** + * VodSession interstitials. + * @member {google.cloud.video.stitcher.v1.IInterstitials|null|undefined} interstitials + * @memberof google.cloud.video.stitcher.v1.VodSession + * @instance + */ + VodSession.prototype.interstitials = null; + + /** + * VodSession playUri. + * @member {string} playUri + * @memberof google.cloud.video.stitcher.v1.VodSession + * @instance + */ + VodSession.prototype.playUri = ""; + + /** + * VodSession sourceUri. + * @member {string} sourceUri + * @memberof google.cloud.video.stitcher.v1.VodSession + * @instance + */ + VodSession.prototype.sourceUri = ""; + + /** + * VodSession adTagUri. + * @member {string} adTagUri + * @memberof google.cloud.video.stitcher.v1.VodSession + * @instance + */ + VodSession.prototype.adTagUri = ""; + + /** + * VodSession adTagMacroMap. + * @member {Object.} adTagMacroMap + * @memberof google.cloud.video.stitcher.v1.VodSession + * @instance + */ + VodSession.prototype.adTagMacroMap = $util.emptyObject; + + /** + * VodSession clientAdTracking. + * @member {boolean} clientAdTracking + * @memberof google.cloud.video.stitcher.v1.VodSession + * @instance + */ + VodSession.prototype.clientAdTracking = false; + + /** + * VodSession manifestOptions. + * @member {google.cloud.video.stitcher.v1.IManifestOptions|null|undefined} manifestOptions + * @memberof google.cloud.video.stitcher.v1.VodSession + * @instance + */ + VodSession.prototype.manifestOptions = null; + + /** + * VodSession assetId. + * @member {string} assetId + * @memberof google.cloud.video.stitcher.v1.VodSession + * @instance + */ + VodSession.prototype.assetId = ""; + + /** + * Creates a new VodSession instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.VodSession + * @static + * @param {google.cloud.video.stitcher.v1.IVodSession=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.VodSession} VodSession instance + */ + VodSession.create = function create(properties) { + return new VodSession(properties); + }; + + /** + * Encodes the specified VodSession message. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSession.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.VodSession + * @static + * @param {google.cloud.video.stitcher.v1.IVodSession} message VodSession message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VodSession.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.interstitials != null && Object.hasOwnProperty.call(message, "interstitials")) + $root.google.cloud.video.stitcher.v1.Interstitials.encode(message.interstitials, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.playUri != null && Object.hasOwnProperty.call(message, "playUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.playUri); + if (message.sourceUri != null && Object.hasOwnProperty.call(message, "sourceUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.sourceUri); + if (message.adTagUri != null && Object.hasOwnProperty.call(message, "adTagUri")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.adTagUri); + if (message.adTagMacroMap != null && Object.hasOwnProperty.call(message, "adTagMacroMap")) + for (var keys = Object.keys(message.adTagMacroMap), i = 0; i < keys.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.adTagMacroMap[keys[i]]).ldelim(); + if (message.clientAdTracking != null && Object.hasOwnProperty.call(message, "clientAdTracking")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.clientAdTracking); + if (message.manifestOptions != null && Object.hasOwnProperty.call(message, "manifestOptions")) + $root.google.cloud.video.stitcher.v1.ManifestOptions.encode(message.manifestOptions, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.assetId != null && Object.hasOwnProperty.call(message, "assetId")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.assetId); + return writer; + }; + + /** + * Encodes the specified VodSession message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSession.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.VodSession + * @static + * @param {google.cloud.video.stitcher.v1.IVodSession} message VodSession message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VodSession.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VodSession message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.VodSession + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.VodSession} VodSession + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VodSession.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.VodSession(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.interstitials = $root.google.cloud.video.stitcher.v1.Interstitials.decode(reader, reader.uint32()); + break; + } + case 4: { + message.playUri = reader.string(); + break; + } + case 5: { + message.sourceUri = reader.string(); + break; + } + case 6: { + message.adTagUri = reader.string(); + break; + } + case 7: { + if (message.adTagMacroMap === $util.emptyObject) + message.adTagMacroMap = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.adTagMacroMap[key] = value; + break; + } + case 8: { + message.clientAdTracking = reader.bool(); + break; + } + case 9: { + message.manifestOptions = $root.google.cloud.video.stitcher.v1.ManifestOptions.decode(reader, reader.uint32()); + break; + } + case 10: { + message.assetId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VodSession message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.VodSession + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.VodSession} VodSession + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VodSession.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VodSession message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.VodSession + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VodSession.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.interstitials != null && message.hasOwnProperty("interstitials")) { + var error = $root.google.cloud.video.stitcher.v1.Interstitials.verify(message.interstitials); + if (error) + return "interstitials." + error; + } + if (message.playUri != null && message.hasOwnProperty("playUri")) + if (!$util.isString(message.playUri)) + return "playUri: string expected"; + if (message.sourceUri != null && message.hasOwnProperty("sourceUri")) + if (!$util.isString(message.sourceUri)) + return "sourceUri: string expected"; + if (message.adTagUri != null && message.hasOwnProperty("adTagUri")) + if (!$util.isString(message.adTagUri)) + return "adTagUri: string expected"; + if (message.adTagMacroMap != null && message.hasOwnProperty("adTagMacroMap")) { + if (!$util.isObject(message.adTagMacroMap)) + return "adTagMacroMap: object expected"; + var key = Object.keys(message.adTagMacroMap); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.adTagMacroMap[key[i]])) + return "adTagMacroMap: string{k:string} expected"; + } + if (message.clientAdTracking != null && message.hasOwnProperty("clientAdTracking")) + if (typeof message.clientAdTracking !== "boolean") + return "clientAdTracking: boolean expected"; + if (message.manifestOptions != null && message.hasOwnProperty("manifestOptions")) { + var error = $root.google.cloud.video.stitcher.v1.ManifestOptions.verify(message.manifestOptions); + if (error) + return "manifestOptions." + error; + } + if (message.assetId != null && message.hasOwnProperty("assetId")) + if (!$util.isString(message.assetId)) + return "assetId: string expected"; + return null; + }; + + /** + * Creates a VodSession message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.VodSession + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.VodSession} VodSession + */ + VodSession.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.VodSession) + return object; + var message = new $root.google.cloud.video.stitcher.v1.VodSession(); + if (object.name != null) + message.name = String(object.name); + if (object.interstitials != null) { + if (typeof object.interstitials !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.VodSession.interstitials: object expected"); + message.interstitials = $root.google.cloud.video.stitcher.v1.Interstitials.fromObject(object.interstitials); + } + if (object.playUri != null) + message.playUri = String(object.playUri); + if (object.sourceUri != null) + message.sourceUri = String(object.sourceUri); + if (object.adTagUri != null) + message.adTagUri = String(object.adTagUri); + if (object.adTagMacroMap) { + if (typeof object.adTagMacroMap !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.VodSession.adTagMacroMap: object expected"); + message.adTagMacroMap = {}; + for (var keys = Object.keys(object.adTagMacroMap), i = 0; i < keys.length; ++i) + message.adTagMacroMap[keys[i]] = String(object.adTagMacroMap[keys[i]]); + } + if (object.clientAdTracking != null) + message.clientAdTracking = Boolean(object.clientAdTracking); + if (object.manifestOptions != null) { + if (typeof object.manifestOptions !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.VodSession.manifestOptions: object expected"); + message.manifestOptions = $root.google.cloud.video.stitcher.v1.ManifestOptions.fromObject(object.manifestOptions); + } + if (object.assetId != null) + message.assetId = String(object.assetId); + return message; + }; + + /** + * Creates a plain object from a VodSession message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.VodSession + * @static + * @param {google.cloud.video.stitcher.v1.VodSession} message VodSession + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VodSession.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.adTagMacroMap = {}; + if (options.defaults) { + object.name = ""; + object.interstitials = null; + object.playUri = ""; + object.sourceUri = ""; + object.adTagUri = ""; + object.clientAdTracking = false; + object.manifestOptions = null; + object.assetId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.interstitials != null && message.hasOwnProperty("interstitials")) + object.interstitials = $root.google.cloud.video.stitcher.v1.Interstitials.toObject(message.interstitials, options); + if (message.playUri != null && message.hasOwnProperty("playUri")) + object.playUri = message.playUri; + if (message.sourceUri != null && message.hasOwnProperty("sourceUri")) + object.sourceUri = message.sourceUri; + if (message.adTagUri != null && message.hasOwnProperty("adTagUri")) + object.adTagUri = message.adTagUri; + var keys2; + if (message.adTagMacroMap && (keys2 = Object.keys(message.adTagMacroMap)).length) { + object.adTagMacroMap = {}; + for (var j = 0; j < keys2.length; ++j) + object.adTagMacroMap[keys2[j]] = message.adTagMacroMap[keys2[j]]; + } + if (message.clientAdTracking != null && message.hasOwnProperty("clientAdTracking")) + object.clientAdTracking = message.clientAdTracking; + if (message.manifestOptions != null && message.hasOwnProperty("manifestOptions")) + object.manifestOptions = $root.google.cloud.video.stitcher.v1.ManifestOptions.toObject(message.manifestOptions, options); + if (message.assetId != null && message.hasOwnProperty("assetId")) + object.assetId = message.assetId; + return object; + }; + + /** + * Converts this VodSession to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.VodSession + * @instance + * @returns {Object.} JSON object + */ + VodSession.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VodSession + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.VodSession + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VodSession.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.VodSession"; + }; + + return VodSession; + })(); + + v1.Interstitials = (function() { + + /** + * Properties of an Interstitials. + * @memberof google.cloud.video.stitcher.v1 + * @interface IInterstitials + * @property {Array.|null} [adBreaks] Interstitials adBreaks + * @property {google.cloud.video.stitcher.v1.IVodSessionContent|null} [sessionContent] Interstitials sessionContent + */ + + /** + * Constructs a new Interstitials. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents an Interstitials. + * @implements IInterstitials + * @constructor + * @param {google.cloud.video.stitcher.v1.IInterstitials=} [properties] Properties to set + */ + function Interstitials(properties) { + this.adBreaks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Interstitials adBreaks. + * @member {Array.} adBreaks + * @memberof google.cloud.video.stitcher.v1.Interstitials + * @instance + */ + Interstitials.prototype.adBreaks = $util.emptyArray; + + /** + * Interstitials sessionContent. + * @member {google.cloud.video.stitcher.v1.IVodSessionContent|null|undefined} sessionContent + * @memberof google.cloud.video.stitcher.v1.Interstitials + * @instance + */ + Interstitials.prototype.sessionContent = null; + + /** + * Creates a new Interstitials instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.Interstitials + * @static + * @param {google.cloud.video.stitcher.v1.IInterstitials=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.Interstitials} Interstitials instance + */ + Interstitials.create = function create(properties) { + return new Interstitials(properties); + }; + + /** + * Encodes the specified Interstitials message. Does not implicitly {@link google.cloud.video.stitcher.v1.Interstitials.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.Interstitials + * @static + * @param {google.cloud.video.stitcher.v1.IInterstitials} message Interstitials message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Interstitials.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.adBreaks != null && message.adBreaks.length) + for (var i = 0; i < message.adBreaks.length; ++i) + $root.google.cloud.video.stitcher.v1.VodSessionAdBreak.encode(message.adBreaks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.sessionContent != null && Object.hasOwnProperty.call(message, "sessionContent")) + $root.google.cloud.video.stitcher.v1.VodSessionContent.encode(message.sessionContent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Interstitials message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.Interstitials.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.Interstitials + * @static + * @param {google.cloud.video.stitcher.v1.IInterstitials} message Interstitials message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Interstitials.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Interstitials message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.Interstitials + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.Interstitials} Interstitials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Interstitials.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.Interstitials(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.adBreaks && message.adBreaks.length)) + message.adBreaks = []; + message.adBreaks.push($root.google.cloud.video.stitcher.v1.VodSessionAdBreak.decode(reader, reader.uint32())); + break; + } + case 2: { + message.sessionContent = $root.google.cloud.video.stitcher.v1.VodSessionContent.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Interstitials message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.Interstitials + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.Interstitials} Interstitials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Interstitials.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Interstitials message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.Interstitials + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Interstitials.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.adBreaks != null && message.hasOwnProperty("adBreaks")) { + if (!Array.isArray(message.adBreaks)) + return "adBreaks: array expected"; + for (var i = 0; i < message.adBreaks.length; ++i) { + var error = $root.google.cloud.video.stitcher.v1.VodSessionAdBreak.verify(message.adBreaks[i]); + if (error) + return "adBreaks." + error; + } + } + if (message.sessionContent != null && message.hasOwnProperty("sessionContent")) { + var error = $root.google.cloud.video.stitcher.v1.VodSessionContent.verify(message.sessionContent); + if (error) + return "sessionContent." + error; + } + return null; + }; + + /** + * Creates an Interstitials message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.Interstitials + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.Interstitials} Interstitials + */ + Interstitials.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.Interstitials) + return object; + var message = new $root.google.cloud.video.stitcher.v1.Interstitials(); + if (object.adBreaks) { + if (!Array.isArray(object.adBreaks)) + throw TypeError(".google.cloud.video.stitcher.v1.Interstitials.adBreaks: array expected"); + message.adBreaks = []; + for (var i = 0; i < object.adBreaks.length; ++i) { + if (typeof object.adBreaks[i] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.Interstitials.adBreaks: object expected"); + message.adBreaks[i] = $root.google.cloud.video.stitcher.v1.VodSessionAdBreak.fromObject(object.adBreaks[i]); + } + } + if (object.sessionContent != null) { + if (typeof object.sessionContent !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.Interstitials.sessionContent: object expected"); + message.sessionContent = $root.google.cloud.video.stitcher.v1.VodSessionContent.fromObject(object.sessionContent); + } + return message; + }; + + /** + * Creates a plain object from an Interstitials message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.Interstitials + * @static + * @param {google.cloud.video.stitcher.v1.Interstitials} message Interstitials + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Interstitials.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.adBreaks = []; + if (options.defaults) + object.sessionContent = null; + if (message.adBreaks && message.adBreaks.length) { + object.adBreaks = []; + for (var j = 0; j < message.adBreaks.length; ++j) + object.adBreaks[j] = $root.google.cloud.video.stitcher.v1.VodSessionAdBreak.toObject(message.adBreaks[j], options); + } + if (message.sessionContent != null && message.hasOwnProperty("sessionContent")) + object.sessionContent = $root.google.cloud.video.stitcher.v1.VodSessionContent.toObject(message.sessionContent, options); + return object; + }; + + /** + * Converts this Interstitials to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.Interstitials + * @instance + * @returns {Object.} JSON object + */ + Interstitials.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Interstitials + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.Interstitials + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Interstitials.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.Interstitials"; + }; + + return Interstitials; + })(); + + v1.VodSessionAd = (function() { + + /** + * Properties of a VodSessionAd. + * @memberof google.cloud.video.stitcher.v1 + * @interface IVodSessionAd + * @property {google.protobuf.IDuration|null} [duration] VodSessionAd duration + * @property {google.cloud.video.stitcher.v1.ICompanionAds|null} [companionAds] VodSessionAd companionAds + * @property {Array.|null} [activityEvents] VodSessionAd activityEvents + */ + + /** + * Constructs a new VodSessionAd. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a VodSessionAd. + * @implements IVodSessionAd + * @constructor + * @param {google.cloud.video.stitcher.v1.IVodSessionAd=} [properties] Properties to set + */ + function VodSessionAd(properties) { + this.activityEvents = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VodSessionAd duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.video.stitcher.v1.VodSessionAd + * @instance + */ + VodSessionAd.prototype.duration = null; + + /** + * VodSessionAd companionAds. + * @member {google.cloud.video.stitcher.v1.ICompanionAds|null|undefined} companionAds + * @memberof google.cloud.video.stitcher.v1.VodSessionAd + * @instance + */ + VodSessionAd.prototype.companionAds = null; + + /** + * VodSessionAd activityEvents. + * @member {Array.} activityEvents + * @memberof google.cloud.video.stitcher.v1.VodSessionAd + * @instance + */ + VodSessionAd.prototype.activityEvents = $util.emptyArray; + + /** + * Creates a new VodSessionAd instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.VodSessionAd + * @static + * @param {google.cloud.video.stitcher.v1.IVodSessionAd=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.VodSessionAd} VodSessionAd instance + */ + VodSessionAd.create = function create(properties) { + return new VodSessionAd(properties); + }; + + /** + * Encodes the specified VodSessionAd message. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSessionAd.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.VodSessionAd + * @static + * @param {google.cloud.video.stitcher.v1.IVodSessionAd} message VodSessionAd message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VodSessionAd.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.companionAds != null && Object.hasOwnProperty.call(message, "companionAds")) + $root.google.cloud.video.stitcher.v1.CompanionAds.encode(message.companionAds, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.activityEvents != null && message.activityEvents.length) + for (var i = 0; i < message.activityEvents.length; ++i) + $root.google.cloud.video.stitcher.v1.Event.encode(message.activityEvents[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified VodSessionAd message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSessionAd.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.VodSessionAd + * @static + * @param {google.cloud.video.stitcher.v1.IVodSessionAd} message VodSessionAd message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VodSessionAd.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VodSessionAd message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.VodSessionAd + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.VodSessionAd} VodSessionAd + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VodSessionAd.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.VodSessionAd(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.companionAds = $root.google.cloud.video.stitcher.v1.CompanionAds.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.activityEvents && message.activityEvents.length)) + message.activityEvents = []; + message.activityEvents.push($root.google.cloud.video.stitcher.v1.Event.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VodSessionAd message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.VodSessionAd + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.VodSessionAd} VodSessionAd + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VodSessionAd.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VodSessionAd message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.VodSessionAd + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VodSessionAd.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + if (message.companionAds != null && message.hasOwnProperty("companionAds")) { + var error = $root.google.cloud.video.stitcher.v1.CompanionAds.verify(message.companionAds); + if (error) + return "companionAds." + error; + } + if (message.activityEvents != null && message.hasOwnProperty("activityEvents")) { + if (!Array.isArray(message.activityEvents)) + return "activityEvents: array expected"; + for (var i = 0; i < message.activityEvents.length; ++i) { + var error = $root.google.cloud.video.stitcher.v1.Event.verify(message.activityEvents[i]); + if (error) + return "activityEvents." + error; + } + } + return null; + }; + + /** + * Creates a VodSessionAd message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.VodSessionAd + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.VodSessionAd} VodSessionAd + */ + VodSessionAd.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.VodSessionAd) + return object; + var message = new $root.google.cloud.video.stitcher.v1.VodSessionAd(); + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.VodSessionAd.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } + if (object.companionAds != null) { + if (typeof object.companionAds !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.VodSessionAd.companionAds: object expected"); + message.companionAds = $root.google.cloud.video.stitcher.v1.CompanionAds.fromObject(object.companionAds); + } + if (object.activityEvents) { + if (!Array.isArray(object.activityEvents)) + throw TypeError(".google.cloud.video.stitcher.v1.VodSessionAd.activityEvents: array expected"); + message.activityEvents = []; + for (var i = 0; i < object.activityEvents.length; ++i) { + if (typeof object.activityEvents[i] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.VodSessionAd.activityEvents: object expected"); + message.activityEvents[i] = $root.google.cloud.video.stitcher.v1.Event.fromObject(object.activityEvents[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a VodSessionAd message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.VodSessionAd + * @static + * @param {google.cloud.video.stitcher.v1.VodSessionAd} message VodSessionAd + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VodSessionAd.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.activityEvents = []; + if (options.defaults) { + object.duration = null; + object.companionAds = null; + } + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (message.companionAds != null && message.hasOwnProperty("companionAds")) + object.companionAds = $root.google.cloud.video.stitcher.v1.CompanionAds.toObject(message.companionAds, options); + if (message.activityEvents && message.activityEvents.length) { + object.activityEvents = []; + for (var j = 0; j < message.activityEvents.length; ++j) + object.activityEvents[j] = $root.google.cloud.video.stitcher.v1.Event.toObject(message.activityEvents[j], options); + } + return object; + }; + + /** + * Converts this VodSessionAd to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.VodSessionAd + * @instance + * @returns {Object.} JSON object + */ + VodSessionAd.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VodSessionAd + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.VodSessionAd + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VodSessionAd.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.VodSessionAd"; + }; + + return VodSessionAd; + })(); + + v1.VodSessionContent = (function() { + + /** + * Properties of a VodSessionContent. + * @memberof google.cloud.video.stitcher.v1 + * @interface IVodSessionContent + * @property {google.protobuf.IDuration|null} [duration] VodSessionContent duration + */ + + /** + * Constructs a new VodSessionContent. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a VodSessionContent. + * @implements IVodSessionContent + * @constructor + * @param {google.cloud.video.stitcher.v1.IVodSessionContent=} [properties] Properties to set + */ + function VodSessionContent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VodSessionContent duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.video.stitcher.v1.VodSessionContent + * @instance + */ + VodSessionContent.prototype.duration = null; + + /** + * Creates a new VodSessionContent instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.VodSessionContent + * @static + * @param {google.cloud.video.stitcher.v1.IVodSessionContent=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.VodSessionContent} VodSessionContent instance + */ + VodSessionContent.create = function create(properties) { + return new VodSessionContent(properties); + }; + + /** + * Encodes the specified VodSessionContent message. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSessionContent.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.VodSessionContent + * @static + * @param {google.cloud.video.stitcher.v1.IVodSessionContent} message VodSessionContent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VodSessionContent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified VodSessionContent message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSessionContent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.VodSessionContent + * @static + * @param {google.cloud.video.stitcher.v1.IVodSessionContent} message VodSessionContent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VodSessionContent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VodSessionContent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.VodSessionContent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.VodSessionContent} VodSessionContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VodSessionContent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.VodSessionContent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VodSessionContent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.VodSessionContent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.VodSessionContent} VodSessionContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VodSessionContent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VodSessionContent message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.VodSessionContent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VodSessionContent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + return null; + }; + + /** + * Creates a VodSessionContent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.VodSessionContent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.VodSessionContent} VodSessionContent + */ + VodSessionContent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.VodSessionContent) + return object; + var message = new $root.google.cloud.video.stitcher.v1.VodSessionContent(); + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.VodSessionContent.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } + return message; + }; + + /** + * Creates a plain object from a VodSessionContent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.VodSessionContent + * @static + * @param {google.cloud.video.stitcher.v1.VodSessionContent} message VodSessionContent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VodSessionContent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.duration = null; + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + return object; + }; + + /** + * Converts this VodSessionContent to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.VodSessionContent + * @instance + * @returns {Object.} JSON object + */ + VodSessionContent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VodSessionContent + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.VodSessionContent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VodSessionContent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.VodSessionContent"; + }; + + return VodSessionContent; + })(); + + v1.VodSessionAdBreak = (function() { + + /** + * Properties of a VodSessionAdBreak. + * @memberof google.cloud.video.stitcher.v1 + * @interface IVodSessionAdBreak + * @property {Array.|null} [progressEvents] VodSessionAdBreak progressEvents + * @property {Array.|null} [ads] VodSessionAdBreak ads + * @property {google.protobuf.IDuration|null} [endTimeOffset] VodSessionAdBreak endTimeOffset + * @property {google.protobuf.IDuration|null} [startTimeOffset] VodSessionAdBreak startTimeOffset + */ + + /** + * Constructs a new VodSessionAdBreak. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a VodSessionAdBreak. + * @implements IVodSessionAdBreak + * @constructor + * @param {google.cloud.video.stitcher.v1.IVodSessionAdBreak=} [properties] Properties to set + */ + function VodSessionAdBreak(properties) { + this.progressEvents = []; + this.ads = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VodSessionAdBreak progressEvents. + * @member {Array.} progressEvents + * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak + * @instance + */ + VodSessionAdBreak.prototype.progressEvents = $util.emptyArray; + + /** + * VodSessionAdBreak ads. + * @member {Array.} ads + * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak + * @instance + */ + VodSessionAdBreak.prototype.ads = $util.emptyArray; + + /** + * VodSessionAdBreak endTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} endTimeOffset + * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak + * @instance + */ + VodSessionAdBreak.prototype.endTimeOffset = null; + + /** + * VodSessionAdBreak startTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} startTimeOffset + * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak + * @instance + */ + VodSessionAdBreak.prototype.startTimeOffset = null; + + /** + * Creates a new VodSessionAdBreak instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak + * @static + * @param {google.cloud.video.stitcher.v1.IVodSessionAdBreak=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.VodSessionAdBreak} VodSessionAdBreak instance + */ + VodSessionAdBreak.create = function create(properties) { + return new VodSessionAdBreak(properties); + }; + + /** + * Encodes the specified VodSessionAdBreak message. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSessionAdBreak.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak + * @static + * @param {google.cloud.video.stitcher.v1.IVodSessionAdBreak} message VodSessionAdBreak message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VodSessionAdBreak.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.progressEvents != null && message.progressEvents.length) + for (var i = 0; i < message.progressEvents.length; ++i) + $root.google.cloud.video.stitcher.v1.ProgressEvent.encode(message.progressEvents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.ads != null && message.ads.length) + for (var i = 0; i < message.ads.length; ++i) + $root.google.cloud.video.stitcher.v1.VodSessionAd.encode(message.ads[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.endTimeOffset != null && Object.hasOwnProperty.call(message, "endTimeOffset")) + $root.google.protobuf.Duration.encode(message.endTimeOffset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.startTimeOffset != null && Object.hasOwnProperty.call(message, "startTimeOffset")) + $root.google.protobuf.Duration.encode(message.startTimeOffset, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified VodSessionAdBreak message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.VodSessionAdBreak.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak + * @static + * @param {google.cloud.video.stitcher.v1.IVodSessionAdBreak} message VodSessionAdBreak message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VodSessionAdBreak.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VodSessionAdBreak message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.VodSessionAdBreak} VodSessionAdBreak + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VodSessionAdBreak.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.VodSessionAdBreak(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.progressEvents && message.progressEvents.length)) + message.progressEvents = []; + message.progressEvents.push($root.google.cloud.video.stitcher.v1.ProgressEvent.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.ads && message.ads.length)) + message.ads = []; + message.ads.push($root.google.cloud.video.stitcher.v1.VodSessionAd.decode(reader, reader.uint32())); + break; + } + case 3: { + message.endTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VodSessionAdBreak message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.VodSessionAdBreak} VodSessionAdBreak + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VodSessionAdBreak.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VodSessionAdBreak message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VodSessionAdBreak.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.progressEvents != null && message.hasOwnProperty("progressEvents")) { + if (!Array.isArray(message.progressEvents)) + return "progressEvents: array expected"; + for (var i = 0; i < message.progressEvents.length; ++i) { + var error = $root.google.cloud.video.stitcher.v1.ProgressEvent.verify(message.progressEvents[i]); + if (error) + return "progressEvents." + error; + } + } + if (message.ads != null && message.hasOwnProperty("ads")) { + if (!Array.isArray(message.ads)) + return "ads: array expected"; + for (var i = 0; i < message.ads.length; ++i) { + var error = $root.google.cloud.video.stitcher.v1.VodSessionAd.verify(message.ads[i]); + if (error) + return "ads." + error; + } + } + if (message.endTimeOffset != null && message.hasOwnProperty("endTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.endTimeOffset); + if (error) + return "endTimeOffset." + error; + } + if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.startTimeOffset); + if (error) + return "startTimeOffset." + error; + } + return null; + }; + + /** + * Creates a VodSessionAdBreak message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.VodSessionAdBreak} VodSessionAdBreak + */ + VodSessionAdBreak.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.VodSessionAdBreak) + return object; + var message = new $root.google.cloud.video.stitcher.v1.VodSessionAdBreak(); + if (object.progressEvents) { + if (!Array.isArray(object.progressEvents)) + throw TypeError(".google.cloud.video.stitcher.v1.VodSessionAdBreak.progressEvents: array expected"); + message.progressEvents = []; + for (var i = 0; i < object.progressEvents.length; ++i) { + if (typeof object.progressEvents[i] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.VodSessionAdBreak.progressEvents: object expected"); + message.progressEvents[i] = $root.google.cloud.video.stitcher.v1.ProgressEvent.fromObject(object.progressEvents[i]); + } + } + if (object.ads) { + if (!Array.isArray(object.ads)) + throw TypeError(".google.cloud.video.stitcher.v1.VodSessionAdBreak.ads: array expected"); + message.ads = []; + for (var i = 0; i < object.ads.length; ++i) { + if (typeof object.ads[i] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.VodSessionAdBreak.ads: object expected"); + message.ads[i] = $root.google.cloud.video.stitcher.v1.VodSessionAd.fromObject(object.ads[i]); + } + } + if (object.endTimeOffset != null) { + if (typeof object.endTimeOffset !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.VodSessionAdBreak.endTimeOffset: object expected"); + message.endTimeOffset = $root.google.protobuf.Duration.fromObject(object.endTimeOffset); + } + if (object.startTimeOffset != null) { + if (typeof object.startTimeOffset !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.VodSessionAdBreak.startTimeOffset: object expected"); + message.startTimeOffset = $root.google.protobuf.Duration.fromObject(object.startTimeOffset); + } + return message; + }; + + /** + * Creates a plain object from a VodSessionAdBreak message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak + * @static + * @param {google.cloud.video.stitcher.v1.VodSessionAdBreak} message VodSessionAdBreak + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VodSessionAdBreak.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.progressEvents = []; + object.ads = []; + } + if (options.defaults) { + object.endTimeOffset = null; + object.startTimeOffset = null; + } + if (message.progressEvents && message.progressEvents.length) { + object.progressEvents = []; + for (var j = 0; j < message.progressEvents.length; ++j) + object.progressEvents[j] = $root.google.cloud.video.stitcher.v1.ProgressEvent.toObject(message.progressEvents[j], options); + } + if (message.ads && message.ads.length) { + object.ads = []; + for (var j = 0; j < message.ads.length; ++j) + object.ads[j] = $root.google.cloud.video.stitcher.v1.VodSessionAd.toObject(message.ads[j], options); + } + if (message.endTimeOffset != null && message.hasOwnProperty("endTimeOffset")) + object.endTimeOffset = $root.google.protobuf.Duration.toObject(message.endTimeOffset, options); + if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) + object.startTimeOffset = $root.google.protobuf.Duration.toObject(message.startTimeOffset, options); + return object; + }; + + /** + * Converts this VodSessionAdBreak to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak + * @instance + * @returns {Object.} JSON object + */ + VodSessionAdBreak.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VodSessionAdBreak + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.VodSessionAdBreak + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VodSessionAdBreak.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.VodSessionAdBreak"; + }; + + return VodSessionAdBreak; + })(); + + v1.LiveSession = (function() { + + /** + * Properties of a LiveSession. + * @memberof google.cloud.video.stitcher.v1 + * @interface ILiveSession + * @property {string|null} [name] LiveSession name + * @property {string|null} [playUri] LiveSession playUri + * @property {string|null} [sourceUri] LiveSession sourceUri + * @property {string|null} [defaultAdTagId] LiveSession defaultAdTagId + * @property {Object.|null} [adTagMap] LiveSession adTagMap + * @property {Object.|null} [adTagMacros] LiveSession adTagMacros + * @property {boolean|null} [clientAdTracking] LiveSession clientAdTracking + * @property {string|null} [defaultSlateId] LiveSession defaultSlateId + * @property {google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy|null} [stitchingPolicy] LiveSession stitchingPolicy + * @property {google.cloud.video.stitcher.v1.IManifestOptions|null} [manifestOptions] LiveSession manifestOptions + * @property {string|null} [streamId] LiveSession streamId + */ + + /** + * Constructs a new LiveSession. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a LiveSession. + * @implements ILiveSession + * @constructor + * @param {google.cloud.video.stitcher.v1.ILiveSession=} [properties] Properties to set + */ + function LiveSession(properties) { + this.adTagMap = {}; + this.adTagMacros = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LiveSession name. + * @member {string} name + * @memberof google.cloud.video.stitcher.v1.LiveSession + * @instance + */ + LiveSession.prototype.name = ""; + + /** + * LiveSession playUri. + * @member {string} playUri + * @memberof google.cloud.video.stitcher.v1.LiveSession + * @instance + */ + LiveSession.prototype.playUri = ""; + + /** + * LiveSession sourceUri. + * @member {string} sourceUri + * @memberof google.cloud.video.stitcher.v1.LiveSession + * @instance + */ + LiveSession.prototype.sourceUri = ""; + + /** + * LiveSession defaultAdTagId. + * @member {string} defaultAdTagId + * @memberof google.cloud.video.stitcher.v1.LiveSession + * @instance + */ + LiveSession.prototype.defaultAdTagId = ""; + + /** + * LiveSession adTagMap. + * @member {Object.} adTagMap + * @memberof google.cloud.video.stitcher.v1.LiveSession + * @instance + */ + LiveSession.prototype.adTagMap = $util.emptyObject; + + /** + * LiveSession adTagMacros. + * @member {Object.} adTagMacros + * @memberof google.cloud.video.stitcher.v1.LiveSession + * @instance + */ + LiveSession.prototype.adTagMacros = $util.emptyObject; + + /** + * LiveSession clientAdTracking. + * @member {boolean} clientAdTracking + * @memberof google.cloud.video.stitcher.v1.LiveSession + * @instance + */ + LiveSession.prototype.clientAdTracking = false; + + /** + * LiveSession defaultSlateId. + * @member {string} defaultSlateId + * @memberof google.cloud.video.stitcher.v1.LiveSession + * @instance + */ + LiveSession.prototype.defaultSlateId = ""; + + /** + * LiveSession stitchingPolicy. + * @member {google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy} stitchingPolicy + * @memberof google.cloud.video.stitcher.v1.LiveSession + * @instance + */ + LiveSession.prototype.stitchingPolicy = 0; + + /** + * LiveSession manifestOptions. + * @member {google.cloud.video.stitcher.v1.IManifestOptions|null|undefined} manifestOptions + * @memberof google.cloud.video.stitcher.v1.LiveSession + * @instance + */ + LiveSession.prototype.manifestOptions = null; + + /** + * LiveSession streamId. + * @member {string} streamId + * @memberof google.cloud.video.stitcher.v1.LiveSession + * @instance + */ + LiveSession.prototype.streamId = ""; + + /** + * Creates a new LiveSession instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.LiveSession + * @static + * @param {google.cloud.video.stitcher.v1.ILiveSession=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.LiveSession} LiveSession instance + */ + LiveSession.create = function create(properties) { + return new LiveSession(properties); + }; + + /** + * Encodes the specified LiveSession message. Does not implicitly {@link google.cloud.video.stitcher.v1.LiveSession.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.LiveSession + * @static + * @param {google.cloud.video.stitcher.v1.ILiveSession} message LiveSession message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LiveSession.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.playUri != null && Object.hasOwnProperty.call(message, "playUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.playUri); + if (message.sourceUri != null && Object.hasOwnProperty.call(message, "sourceUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceUri); + if (message.defaultAdTagId != null && Object.hasOwnProperty.call(message, "defaultAdTagId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.defaultAdTagId); + if (message.adTagMap != null && Object.hasOwnProperty.call(message, "adTagMap")) + for (var keys = Object.keys(message.adTagMap), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.video.stitcher.v1.AdTag.encode(message.adTagMap[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.adTagMacros != null && Object.hasOwnProperty.call(message, "adTagMacros")) + for (var keys = Object.keys(message.adTagMacros), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.adTagMacros[keys[i]]).ldelim(); + if (message.clientAdTracking != null && Object.hasOwnProperty.call(message, "clientAdTracking")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.clientAdTracking); + if (message.defaultSlateId != null && Object.hasOwnProperty.call(message, "defaultSlateId")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.defaultSlateId); + if (message.stitchingPolicy != null && Object.hasOwnProperty.call(message, "stitchingPolicy")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.stitchingPolicy); + if (message.manifestOptions != null && Object.hasOwnProperty.call(message, "manifestOptions")) + $root.google.cloud.video.stitcher.v1.ManifestOptions.encode(message.manifestOptions, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.streamId != null && Object.hasOwnProperty.call(message, "streamId")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.streamId); + return writer; + }; + + /** + * Encodes the specified LiveSession message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.LiveSession.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.LiveSession + * @static + * @param {google.cloud.video.stitcher.v1.ILiveSession} message LiveSession message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LiveSession.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LiveSession message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.LiveSession + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.LiveSession} LiveSession + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LiveSession.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.LiveSession(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.playUri = reader.string(); + break; + } + case 3: { + message.sourceUri = reader.string(); + break; + } + case 4: { + message.defaultAdTagId = reader.string(); + break; + } + case 5: { + if (message.adTagMap === $util.emptyObject) + message.adTagMap = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.video.stitcher.v1.AdTag.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.adTagMap[key] = value; + break; + } + case 6: { + if (message.adTagMacros === $util.emptyObject) + message.adTagMacros = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.adTagMacros[key] = value; + break; + } + case 7: { + message.clientAdTracking = reader.bool(); + break; + } + case 8: { + message.defaultSlateId = reader.string(); + break; + } + case 9: { + message.stitchingPolicy = reader.int32(); + break; + } + case 10: { + message.manifestOptions = $root.google.cloud.video.stitcher.v1.ManifestOptions.decode(reader, reader.uint32()); + break; + } + case 11: { + message.streamId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LiveSession message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.LiveSession + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.LiveSession} LiveSession + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LiveSession.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LiveSession message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.LiveSession + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LiveSession.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.playUri != null && message.hasOwnProperty("playUri")) + if (!$util.isString(message.playUri)) + return "playUri: string expected"; + if (message.sourceUri != null && message.hasOwnProperty("sourceUri")) + if (!$util.isString(message.sourceUri)) + return "sourceUri: string expected"; + if (message.defaultAdTagId != null && message.hasOwnProperty("defaultAdTagId")) + if (!$util.isString(message.defaultAdTagId)) + return "defaultAdTagId: string expected"; + if (message.adTagMap != null && message.hasOwnProperty("adTagMap")) { + if (!$util.isObject(message.adTagMap)) + return "adTagMap: object expected"; + var key = Object.keys(message.adTagMap); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.video.stitcher.v1.AdTag.verify(message.adTagMap[key[i]]); + if (error) + return "adTagMap." + error; + } + } + if (message.adTagMacros != null && message.hasOwnProperty("adTagMacros")) { + if (!$util.isObject(message.adTagMacros)) + return "adTagMacros: object expected"; + var key = Object.keys(message.adTagMacros); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.adTagMacros[key[i]])) + return "adTagMacros: string{k:string} expected"; + } + if (message.clientAdTracking != null && message.hasOwnProperty("clientAdTracking")) + if (typeof message.clientAdTracking !== "boolean") + return "clientAdTracking: boolean expected"; + if (message.defaultSlateId != null && message.hasOwnProperty("defaultSlateId")) + if (!$util.isString(message.defaultSlateId)) + return "defaultSlateId: string expected"; + if (message.stitchingPolicy != null && message.hasOwnProperty("stitchingPolicy")) + switch (message.stitchingPolicy) { + default: + return "stitchingPolicy: enum value expected"; + case 0: + case 1: + case 3: + break; + } + if (message.manifestOptions != null && message.hasOwnProperty("manifestOptions")) { + var error = $root.google.cloud.video.stitcher.v1.ManifestOptions.verify(message.manifestOptions); + if (error) + return "manifestOptions." + error; + } + if (message.streamId != null && message.hasOwnProperty("streamId")) + if (!$util.isString(message.streamId)) + return "streamId: string expected"; + return null; + }; + + /** + * Creates a LiveSession message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.LiveSession + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.LiveSession} LiveSession + */ + LiveSession.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.LiveSession) + return object; + var message = new $root.google.cloud.video.stitcher.v1.LiveSession(); + if (object.name != null) + message.name = String(object.name); + if (object.playUri != null) + message.playUri = String(object.playUri); + if (object.sourceUri != null) + message.sourceUri = String(object.sourceUri); + if (object.defaultAdTagId != null) + message.defaultAdTagId = String(object.defaultAdTagId); + if (object.adTagMap) { + if (typeof object.adTagMap !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.LiveSession.adTagMap: object expected"); + message.adTagMap = {}; + for (var keys = Object.keys(object.adTagMap), i = 0; i < keys.length; ++i) { + if (typeof object.adTagMap[keys[i]] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.LiveSession.adTagMap: object expected"); + message.adTagMap[keys[i]] = $root.google.cloud.video.stitcher.v1.AdTag.fromObject(object.adTagMap[keys[i]]); + } + } + if (object.adTagMacros) { + if (typeof object.adTagMacros !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.LiveSession.adTagMacros: object expected"); + message.adTagMacros = {}; + for (var keys = Object.keys(object.adTagMacros), i = 0; i < keys.length; ++i) + message.adTagMacros[keys[i]] = String(object.adTagMacros[keys[i]]); + } + if (object.clientAdTracking != null) + message.clientAdTracking = Boolean(object.clientAdTracking); + if (object.defaultSlateId != null) + message.defaultSlateId = String(object.defaultSlateId); + switch (object.stitchingPolicy) { + default: + if (typeof object.stitchingPolicy === "number") { + message.stitchingPolicy = object.stitchingPolicy; + break; + } + break; + case "STITCHING_POLICY_UNSPECIFIED": + case 0: + message.stitchingPolicy = 0; + break; + case "COMPLETE_AD": + case 1: + message.stitchingPolicy = 1; + break; + case "CUT_CURRENT": + case 3: + message.stitchingPolicy = 3; + break; + } + if (object.manifestOptions != null) { + if (typeof object.manifestOptions !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.LiveSession.manifestOptions: object expected"); + message.manifestOptions = $root.google.cloud.video.stitcher.v1.ManifestOptions.fromObject(object.manifestOptions); + } + if (object.streamId != null) + message.streamId = String(object.streamId); + return message; + }; + + /** + * Creates a plain object from a LiveSession message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.LiveSession + * @static + * @param {google.cloud.video.stitcher.v1.LiveSession} message LiveSession + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LiveSession.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) { + object.adTagMap = {}; + object.adTagMacros = {}; + } + if (options.defaults) { + object.name = ""; + object.playUri = ""; + object.sourceUri = ""; + object.defaultAdTagId = ""; + object.clientAdTracking = false; + object.defaultSlateId = ""; + object.stitchingPolicy = options.enums === String ? "STITCHING_POLICY_UNSPECIFIED" : 0; + object.manifestOptions = null; + object.streamId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.playUri != null && message.hasOwnProperty("playUri")) + object.playUri = message.playUri; + if (message.sourceUri != null && message.hasOwnProperty("sourceUri")) + object.sourceUri = message.sourceUri; + if (message.defaultAdTagId != null && message.hasOwnProperty("defaultAdTagId")) + object.defaultAdTagId = message.defaultAdTagId; + var keys2; + if (message.adTagMap && (keys2 = Object.keys(message.adTagMap)).length) { + object.adTagMap = {}; + for (var j = 0; j < keys2.length; ++j) + object.adTagMap[keys2[j]] = $root.google.cloud.video.stitcher.v1.AdTag.toObject(message.adTagMap[keys2[j]], options); + } + if (message.adTagMacros && (keys2 = Object.keys(message.adTagMacros)).length) { + object.adTagMacros = {}; + for (var j = 0; j < keys2.length; ++j) + object.adTagMacros[keys2[j]] = message.adTagMacros[keys2[j]]; + } + if (message.clientAdTracking != null && message.hasOwnProperty("clientAdTracking")) + object.clientAdTracking = message.clientAdTracking; + if (message.defaultSlateId != null && message.hasOwnProperty("defaultSlateId")) + object.defaultSlateId = message.defaultSlateId; + if (message.stitchingPolicy != null && message.hasOwnProperty("stitchingPolicy")) + object.stitchingPolicy = options.enums === String ? $root.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy[message.stitchingPolicy] === undefined ? message.stitchingPolicy : $root.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy[message.stitchingPolicy] : message.stitchingPolicy; + if (message.manifestOptions != null && message.hasOwnProperty("manifestOptions")) + object.manifestOptions = $root.google.cloud.video.stitcher.v1.ManifestOptions.toObject(message.manifestOptions, options); + if (message.streamId != null && message.hasOwnProperty("streamId")) + object.streamId = message.streamId; + return object; + }; + + /** + * Converts this LiveSession to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.LiveSession + * @instance + * @returns {Object.} JSON object + */ + LiveSession.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LiveSession + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.LiveSession + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LiveSession.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.LiveSession"; + }; + + /** + * StitchingPolicy enum. + * @name google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy + * @enum {number} + * @property {number} STITCHING_POLICY_UNSPECIFIED=0 STITCHING_POLICY_UNSPECIFIED value + * @property {number} COMPLETE_AD=1 COMPLETE_AD value + * @property {number} CUT_CURRENT=3 CUT_CURRENT value + */ + LiveSession.StitchingPolicy = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STITCHING_POLICY_UNSPECIFIED"] = 0; + values[valuesById[1] = "COMPLETE_AD"] = 1; + values[valuesById[3] = "CUT_CURRENT"] = 3; + return values; + })(); + + return LiveSession; + })(); + + v1.AdTag = (function() { + + /** + * Properties of an AdTag. + * @memberof google.cloud.video.stitcher.v1 + * @interface IAdTag + * @property {string|null} [uri] AdTag uri + */ + + /** + * Constructs a new AdTag. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents an AdTag. + * @implements IAdTag + * @constructor + * @param {google.cloud.video.stitcher.v1.IAdTag=} [properties] Properties to set + */ + function AdTag(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AdTag uri. + * @member {string} uri + * @memberof google.cloud.video.stitcher.v1.AdTag + * @instance + */ + AdTag.prototype.uri = ""; + + /** + * Creates a new AdTag instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.AdTag + * @static + * @param {google.cloud.video.stitcher.v1.IAdTag=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.AdTag} AdTag instance + */ + AdTag.create = function create(properties) { + return new AdTag(properties); + }; + + /** + * Encodes the specified AdTag message. Does not implicitly {@link google.cloud.video.stitcher.v1.AdTag.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.AdTag + * @static + * @param {google.cloud.video.stitcher.v1.IAdTag} message AdTag message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdTag.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + return writer; + }; + + /** + * Encodes the specified AdTag message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.AdTag.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.AdTag + * @static + * @param {google.cloud.video.stitcher.v1.IAdTag} message AdTag message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdTag.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AdTag message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.AdTag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.AdTag} AdTag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdTag.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.AdTag(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AdTag message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.AdTag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.AdTag} AdTag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdTag.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AdTag message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.AdTag + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AdTag.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + return null; + }; + + /** + * Creates an AdTag message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.AdTag + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.AdTag} AdTag + */ + AdTag.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.AdTag) + return object; + var message = new $root.google.cloud.video.stitcher.v1.AdTag(); + if (object.uri != null) + message.uri = String(object.uri); + return message; + }; + + /** + * Creates a plain object from an AdTag message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.AdTag + * @static + * @param {google.cloud.video.stitcher.v1.AdTag} message AdTag + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AdTag.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + return object; + }; + + /** + * Converts this AdTag to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.AdTag + * @instance + * @returns {Object.} JSON object + */ + AdTag.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AdTag + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.AdTag + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AdTag.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.AdTag"; + }; + + return AdTag; + })(); + + v1.ManifestOptions = (function() { + + /** + * Properties of a ManifestOptions. + * @memberof google.cloud.video.stitcher.v1 + * @interface IManifestOptions + * @property {Array.|null} [includeRenditions] ManifestOptions includeRenditions + * @property {google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy|null} [bitrateOrder] ManifestOptions bitrateOrder + */ + + /** + * Constructs a new ManifestOptions. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a ManifestOptions. + * @implements IManifestOptions + * @constructor + * @param {google.cloud.video.stitcher.v1.IManifestOptions=} [properties] Properties to set + */ + function ManifestOptions(properties) { + this.includeRenditions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ManifestOptions includeRenditions. + * @member {Array.} includeRenditions + * @memberof google.cloud.video.stitcher.v1.ManifestOptions + * @instance + */ + ManifestOptions.prototype.includeRenditions = $util.emptyArray; + + /** + * ManifestOptions bitrateOrder. + * @member {google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy} bitrateOrder + * @memberof google.cloud.video.stitcher.v1.ManifestOptions + * @instance + */ + ManifestOptions.prototype.bitrateOrder = 0; + + /** + * Creates a new ManifestOptions instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.ManifestOptions + * @static + * @param {google.cloud.video.stitcher.v1.IManifestOptions=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.ManifestOptions} ManifestOptions instance + */ + ManifestOptions.create = function create(properties) { + return new ManifestOptions(properties); + }; + + /** + * Encodes the specified ManifestOptions message. Does not implicitly {@link google.cloud.video.stitcher.v1.ManifestOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.ManifestOptions + * @static + * @param {google.cloud.video.stitcher.v1.IManifestOptions} message ManifestOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManifestOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.includeRenditions != null && message.includeRenditions.length) + for (var i = 0; i < message.includeRenditions.length; ++i) + $root.google.cloud.video.stitcher.v1.RenditionFilter.encode(message.includeRenditions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.bitrateOrder != null && Object.hasOwnProperty.call(message, "bitrateOrder")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.bitrateOrder); + return writer; + }; + + /** + * Encodes the specified ManifestOptions message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ManifestOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.ManifestOptions + * @static + * @param {google.cloud.video.stitcher.v1.IManifestOptions} message ManifestOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManifestOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ManifestOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.ManifestOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.ManifestOptions} ManifestOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManifestOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.ManifestOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.includeRenditions && message.includeRenditions.length)) + message.includeRenditions = []; + message.includeRenditions.push($root.google.cloud.video.stitcher.v1.RenditionFilter.decode(reader, reader.uint32())); + break; + } + case 2: { + message.bitrateOrder = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ManifestOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.ManifestOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.ManifestOptions} ManifestOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManifestOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ManifestOptions message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.ManifestOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ManifestOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.includeRenditions != null && message.hasOwnProperty("includeRenditions")) { + if (!Array.isArray(message.includeRenditions)) + return "includeRenditions: array expected"; + for (var i = 0; i < message.includeRenditions.length; ++i) { + var error = $root.google.cloud.video.stitcher.v1.RenditionFilter.verify(message.includeRenditions[i]); + if (error) + return "includeRenditions." + error; + } + } + if (message.bitrateOrder != null && message.hasOwnProperty("bitrateOrder")) + switch (message.bitrateOrder) { + default: + return "bitrateOrder: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a ManifestOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.ManifestOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.ManifestOptions} ManifestOptions + */ + ManifestOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.ManifestOptions) + return object; + var message = new $root.google.cloud.video.stitcher.v1.ManifestOptions(); + if (object.includeRenditions) { + if (!Array.isArray(object.includeRenditions)) + throw TypeError(".google.cloud.video.stitcher.v1.ManifestOptions.includeRenditions: array expected"); + message.includeRenditions = []; + for (var i = 0; i < object.includeRenditions.length; ++i) { + if (typeof object.includeRenditions[i] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.ManifestOptions.includeRenditions: object expected"); + message.includeRenditions[i] = $root.google.cloud.video.stitcher.v1.RenditionFilter.fromObject(object.includeRenditions[i]); + } + } + switch (object.bitrateOrder) { + default: + if (typeof object.bitrateOrder === "number") { + message.bitrateOrder = object.bitrateOrder; + break; + } + break; + case "ORDER_POLICY_UNSPECIFIED": + case 0: + message.bitrateOrder = 0; + break; + case "ASCENDING": + case 1: + message.bitrateOrder = 1; + break; + case "DESCENDING": + case 2: + message.bitrateOrder = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a ManifestOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.ManifestOptions + * @static + * @param {google.cloud.video.stitcher.v1.ManifestOptions} message ManifestOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ManifestOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.includeRenditions = []; + if (options.defaults) + object.bitrateOrder = options.enums === String ? "ORDER_POLICY_UNSPECIFIED" : 0; + if (message.includeRenditions && message.includeRenditions.length) { + object.includeRenditions = []; + for (var j = 0; j < message.includeRenditions.length; ++j) + object.includeRenditions[j] = $root.google.cloud.video.stitcher.v1.RenditionFilter.toObject(message.includeRenditions[j], options); + } + if (message.bitrateOrder != null && message.hasOwnProperty("bitrateOrder")) + object.bitrateOrder = options.enums === String ? $root.google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy[message.bitrateOrder] === undefined ? message.bitrateOrder : $root.google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy[message.bitrateOrder] : message.bitrateOrder; + return object; + }; + + /** + * Converts this ManifestOptions to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.ManifestOptions + * @instance + * @returns {Object.} JSON object + */ + ManifestOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ManifestOptions + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.ManifestOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ManifestOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ManifestOptions"; + }; + + /** + * OrderPolicy enum. + * @name google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy + * @enum {number} + * @property {number} ORDER_POLICY_UNSPECIFIED=0 ORDER_POLICY_UNSPECIFIED value + * @property {number} ASCENDING=1 ASCENDING value + * @property {number} DESCENDING=2 DESCENDING value + */ + ManifestOptions.OrderPolicy = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ORDER_POLICY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ASCENDING"] = 1; + values[valuesById[2] = "DESCENDING"] = 2; + return values; + })(); + + return ManifestOptions; + })(); + + v1.RenditionFilter = (function() { + + /** + * Properties of a RenditionFilter. + * @memberof google.cloud.video.stitcher.v1 + * @interface IRenditionFilter + * @property {number|null} [bitrateBps] RenditionFilter bitrateBps + * @property {string|null} [codecs] RenditionFilter codecs + */ + + /** + * Constructs a new RenditionFilter. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a RenditionFilter. + * @implements IRenditionFilter + * @constructor + * @param {google.cloud.video.stitcher.v1.IRenditionFilter=} [properties] Properties to set + */ + function RenditionFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RenditionFilter bitrateBps. + * @member {number} bitrateBps + * @memberof google.cloud.video.stitcher.v1.RenditionFilter + * @instance + */ + RenditionFilter.prototype.bitrateBps = 0; + + /** + * RenditionFilter codecs. + * @member {string} codecs + * @memberof google.cloud.video.stitcher.v1.RenditionFilter + * @instance + */ + RenditionFilter.prototype.codecs = ""; + + /** + * Creates a new RenditionFilter instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.RenditionFilter + * @static + * @param {google.cloud.video.stitcher.v1.IRenditionFilter=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.RenditionFilter} RenditionFilter instance + */ + RenditionFilter.create = function create(properties) { + return new RenditionFilter(properties); + }; + + /** + * Encodes the specified RenditionFilter message. Does not implicitly {@link google.cloud.video.stitcher.v1.RenditionFilter.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.RenditionFilter + * @static + * @param {google.cloud.video.stitcher.v1.IRenditionFilter} message RenditionFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RenditionFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bitrateBps != null && Object.hasOwnProperty.call(message, "bitrateBps")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.bitrateBps); + if (message.codecs != null && Object.hasOwnProperty.call(message, "codecs")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.codecs); + return writer; + }; + + /** + * Encodes the specified RenditionFilter message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.RenditionFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.RenditionFilter + * @static + * @param {google.cloud.video.stitcher.v1.IRenditionFilter} message RenditionFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RenditionFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RenditionFilter message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.RenditionFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.RenditionFilter} RenditionFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RenditionFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.RenditionFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.bitrateBps = reader.int32(); + break; + } + case 2: { + message.codecs = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RenditionFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.RenditionFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.RenditionFilter} RenditionFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RenditionFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RenditionFilter message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.RenditionFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RenditionFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bitrateBps != null && message.hasOwnProperty("bitrateBps")) + if (!$util.isInteger(message.bitrateBps)) + return "bitrateBps: integer expected"; + if (message.codecs != null && message.hasOwnProperty("codecs")) + if (!$util.isString(message.codecs)) + return "codecs: string expected"; + return null; + }; + + /** + * Creates a RenditionFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.RenditionFilter + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.RenditionFilter} RenditionFilter + */ + RenditionFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.RenditionFilter) + return object; + var message = new $root.google.cloud.video.stitcher.v1.RenditionFilter(); + if (object.bitrateBps != null) + message.bitrateBps = object.bitrateBps | 0; + if (object.codecs != null) + message.codecs = String(object.codecs); + return message; + }; + + /** + * Creates a plain object from a RenditionFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.RenditionFilter + * @static + * @param {google.cloud.video.stitcher.v1.RenditionFilter} message RenditionFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RenditionFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.bitrateBps = 0; + object.codecs = ""; + } + if (message.bitrateBps != null && message.hasOwnProperty("bitrateBps")) + object.bitrateBps = message.bitrateBps; + if (message.codecs != null && message.hasOwnProperty("codecs")) + object.codecs = message.codecs; + return object; + }; + + /** + * Converts this RenditionFilter to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.RenditionFilter + * @instance + * @returns {Object.} JSON object + */ + RenditionFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RenditionFilter + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.RenditionFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RenditionFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.RenditionFilter"; + }; + + return RenditionFilter; + })(); + + v1.Slate = (function() { + + /** + * Properties of a Slate. + * @memberof google.cloud.video.stitcher.v1 + * @interface ISlate + * @property {string|null} [name] Slate name + * @property {string|null} [uri] Slate uri + */ + + /** + * Constructs a new Slate. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a Slate. + * @implements ISlate + * @constructor + * @param {google.cloud.video.stitcher.v1.ISlate=} [properties] Properties to set + */ + function Slate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Slate name. + * @member {string} name + * @memberof google.cloud.video.stitcher.v1.Slate + * @instance + */ + Slate.prototype.name = ""; + + /** + * Slate uri. + * @member {string} uri + * @memberof google.cloud.video.stitcher.v1.Slate + * @instance + */ + Slate.prototype.uri = ""; + + /** + * Creates a new Slate instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.Slate + * @static + * @param {google.cloud.video.stitcher.v1.ISlate=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.Slate} Slate instance + */ + Slate.create = function create(properties) { + return new Slate(properties); + }; + + /** + * Encodes the specified Slate message. Does not implicitly {@link google.cloud.video.stitcher.v1.Slate.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.Slate + * @static + * @param {google.cloud.video.stitcher.v1.ISlate} message Slate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Slate.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.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + return writer; + }; + + /** + * Encodes the specified Slate message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.Slate.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.Slate + * @static + * @param {google.cloud.video.stitcher.v1.ISlate} message Slate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Slate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Slate message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.Slate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.Slate} Slate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Slate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.Slate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Slate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.Slate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.Slate} Slate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Slate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Slate message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.Slate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Slate.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.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + return null; + }; + + /** + * Creates a Slate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.Slate + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.Slate} Slate + */ + Slate.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.Slate) + return object; + var message = new $root.google.cloud.video.stitcher.v1.Slate(); + if (object.name != null) + message.name = String(object.name); + if (object.uri != null) + message.uri = String(object.uri); + return message; + }; + + /** + * Creates a plain object from a Slate message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.Slate + * @static + * @param {google.cloud.video.stitcher.v1.Slate} message Slate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Slate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.uri = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + return object; + }; + + /** + * Converts this Slate to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.Slate + * @instance + * @returns {Object.} JSON object + */ + Slate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Slate + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.Slate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Slate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.Slate"; + }; + + return Slate; + })(); + + v1.VodStitchDetail = (function() { + + /** + * Properties of a VodStitchDetail. + * @memberof google.cloud.video.stitcher.v1 + * @interface IVodStitchDetail + * @property {string|null} [name] VodStitchDetail name + * @property {Array.|null} [adStitchDetails] VodStitchDetail adStitchDetails + */ + + /** + * Constructs a new VodStitchDetail. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a VodStitchDetail. + * @implements IVodStitchDetail + * @constructor + * @param {google.cloud.video.stitcher.v1.IVodStitchDetail=} [properties] Properties to set + */ + function VodStitchDetail(properties) { + this.adStitchDetails = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VodStitchDetail name. + * @member {string} name + * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @instance + */ + VodStitchDetail.prototype.name = ""; + + /** + * VodStitchDetail adStitchDetails. + * @member {Array.} adStitchDetails + * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @instance + */ + VodStitchDetail.prototype.adStitchDetails = $util.emptyArray; + + /** + * Creates a new VodStitchDetail instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @static + * @param {google.cloud.video.stitcher.v1.IVodStitchDetail=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.VodStitchDetail} VodStitchDetail instance + */ + VodStitchDetail.create = function create(properties) { + return new VodStitchDetail(properties); + }; + + /** + * Encodes the specified VodStitchDetail message. Does not implicitly {@link google.cloud.video.stitcher.v1.VodStitchDetail.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @static + * @param {google.cloud.video.stitcher.v1.IVodStitchDetail} message VodStitchDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VodStitchDetail.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.adStitchDetails != null && message.adStitchDetails.length) + for (var i = 0; i < message.adStitchDetails.length; ++i) + $root.google.cloud.video.stitcher.v1.AdStitchDetail.encode(message.adStitchDetails[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified VodStitchDetail message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.VodStitchDetail.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @static + * @param {google.cloud.video.stitcher.v1.IVodStitchDetail} message VodStitchDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VodStitchDetail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VodStitchDetail message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.VodStitchDetail} VodStitchDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VodStitchDetail.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.VodStitchDetail(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + if (!(message.adStitchDetails && message.adStitchDetails.length)) + message.adStitchDetails = []; + message.adStitchDetails.push($root.google.cloud.video.stitcher.v1.AdStitchDetail.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VodStitchDetail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.VodStitchDetail} VodStitchDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VodStitchDetail.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VodStitchDetail message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VodStitchDetail.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.adStitchDetails != null && message.hasOwnProperty("adStitchDetails")) { + if (!Array.isArray(message.adStitchDetails)) + return "adStitchDetails: array expected"; + for (var i = 0; i < message.adStitchDetails.length; ++i) { + var error = $root.google.cloud.video.stitcher.v1.AdStitchDetail.verify(message.adStitchDetails[i]); + if (error) + return "adStitchDetails." + error; + } + } + return null; + }; + + /** + * Creates a VodStitchDetail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.VodStitchDetail} VodStitchDetail + */ + VodStitchDetail.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.VodStitchDetail) + return object; + var message = new $root.google.cloud.video.stitcher.v1.VodStitchDetail(); + if (object.name != null) + message.name = String(object.name); + if (object.adStitchDetails) { + if (!Array.isArray(object.adStitchDetails)) + throw TypeError(".google.cloud.video.stitcher.v1.VodStitchDetail.adStitchDetails: array expected"); + message.adStitchDetails = []; + for (var i = 0; i < object.adStitchDetails.length; ++i) { + if (typeof object.adStitchDetails[i] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.VodStitchDetail.adStitchDetails: object expected"); + message.adStitchDetails[i] = $root.google.cloud.video.stitcher.v1.AdStitchDetail.fromObject(object.adStitchDetails[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a VodStitchDetail message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @static + * @param {google.cloud.video.stitcher.v1.VodStitchDetail} message VodStitchDetail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VodStitchDetail.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.adStitchDetails = []; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.adStitchDetails && message.adStitchDetails.length) { + object.adStitchDetails = []; + for (var j = 0; j < message.adStitchDetails.length; ++j) + object.adStitchDetails[j] = $root.google.cloud.video.stitcher.v1.AdStitchDetail.toObject(message.adStitchDetails[j], options); + } + return object; + }; + + /** + * Converts this VodStitchDetail to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @instance + * @returns {Object.} JSON object + */ + VodStitchDetail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VodStitchDetail + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.VodStitchDetail + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VodStitchDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.VodStitchDetail"; + }; + + return VodStitchDetail; + })(); + + v1.AdStitchDetail = (function() { + + /** + * Properties of an AdStitchDetail. + * @memberof google.cloud.video.stitcher.v1 + * @interface IAdStitchDetail + * @property {string|null} [adBreakId] AdStitchDetail adBreakId + * @property {string|null} [adId] AdStitchDetail adId + * @property {google.protobuf.IDuration|null} [adTimeOffset] AdStitchDetail adTimeOffset + * @property {string|null} [skipReason] AdStitchDetail skipReason + * @property {Object.|null} [media] AdStitchDetail media + */ + + /** + * Constructs a new AdStitchDetail. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents an AdStitchDetail. + * @implements IAdStitchDetail + * @constructor + * @param {google.cloud.video.stitcher.v1.IAdStitchDetail=} [properties] Properties to set + */ + function AdStitchDetail(properties) { + this.media = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AdStitchDetail adBreakId. + * @member {string} adBreakId + * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @instance + */ + AdStitchDetail.prototype.adBreakId = ""; + + /** + * AdStitchDetail adId. + * @member {string} adId + * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @instance + */ + AdStitchDetail.prototype.adId = ""; + + /** + * AdStitchDetail adTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} adTimeOffset + * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @instance + */ + AdStitchDetail.prototype.adTimeOffset = null; + + /** + * AdStitchDetail skipReason. + * @member {string} skipReason + * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @instance + */ + AdStitchDetail.prototype.skipReason = ""; + + /** + * AdStitchDetail media. + * @member {Object.} media + * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @instance + */ + AdStitchDetail.prototype.media = $util.emptyObject; + + /** + * Creates a new AdStitchDetail instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @static + * @param {google.cloud.video.stitcher.v1.IAdStitchDetail=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.AdStitchDetail} AdStitchDetail instance + */ + AdStitchDetail.create = function create(properties) { + return new AdStitchDetail(properties); + }; + + /** + * Encodes the specified AdStitchDetail message. Does not implicitly {@link google.cloud.video.stitcher.v1.AdStitchDetail.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @static + * @param {google.cloud.video.stitcher.v1.IAdStitchDetail} message AdStitchDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdStitchDetail.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.adBreakId != null && Object.hasOwnProperty.call(message, "adBreakId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.adBreakId); + if (message.adId != null && Object.hasOwnProperty.call(message, "adId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.adId); + if (message.adTimeOffset != null && Object.hasOwnProperty.call(message, "adTimeOffset")) + $root.google.protobuf.Duration.encode(message.adTimeOffset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.skipReason != null && Object.hasOwnProperty.call(message, "skipReason")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.skipReason); + if (message.media != null && Object.hasOwnProperty.call(message, "media")) + for (var keys = Object.keys(message.media), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.media[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified AdStitchDetail message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.AdStitchDetail.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @static + * @param {google.cloud.video.stitcher.v1.IAdStitchDetail} message AdStitchDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdStitchDetail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AdStitchDetail message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.AdStitchDetail} AdStitchDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdStitchDetail.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.AdStitchDetail(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.adBreakId = reader.string(); + break; + } + case 2: { + message.adId = reader.string(); + break; + } + case 3: { + message.adTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.skipReason = reader.string(); + break; + } + case 5: { + if (message.media === $util.emptyObject) + message.media = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.media[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AdStitchDetail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.AdStitchDetail} AdStitchDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdStitchDetail.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AdStitchDetail message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AdStitchDetail.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.adBreakId != null && message.hasOwnProperty("adBreakId")) + if (!$util.isString(message.adBreakId)) + return "adBreakId: string expected"; + if (message.adId != null && message.hasOwnProperty("adId")) + if (!$util.isString(message.adId)) + return "adId: string expected"; + if (message.adTimeOffset != null && message.hasOwnProperty("adTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.adTimeOffset); + if (error) + return "adTimeOffset." + error; + } + if (message.skipReason != null && message.hasOwnProperty("skipReason")) + if (!$util.isString(message.skipReason)) + return "skipReason: string expected"; + if (message.media != null && message.hasOwnProperty("media")) { + if (!$util.isObject(message.media)) + return "media: object expected"; + var key = Object.keys(message.media); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.media[key[i]]); + if (error) + return "media." + error; + } + } + return null; + }; + + /** + * Creates an AdStitchDetail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.AdStitchDetail} AdStitchDetail + */ + AdStitchDetail.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.AdStitchDetail) + return object; + var message = new $root.google.cloud.video.stitcher.v1.AdStitchDetail(); + if (object.adBreakId != null) + message.adBreakId = String(object.adBreakId); + if (object.adId != null) + message.adId = String(object.adId); + if (object.adTimeOffset != null) { + if (typeof object.adTimeOffset !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.AdStitchDetail.adTimeOffset: object expected"); + message.adTimeOffset = $root.google.protobuf.Duration.fromObject(object.adTimeOffset); + } + if (object.skipReason != null) + message.skipReason = String(object.skipReason); + if (object.media) { + if (typeof object.media !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.AdStitchDetail.media: object expected"); + message.media = {}; + for (var keys = Object.keys(object.media), i = 0; i < keys.length; ++i) { + if (typeof object.media[keys[i]] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.AdStitchDetail.media: object expected"); + message.media[keys[i]] = $root.google.protobuf.Value.fromObject(object.media[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from an AdStitchDetail message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @static + * @param {google.cloud.video.stitcher.v1.AdStitchDetail} message AdStitchDetail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AdStitchDetail.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.media = {}; + if (options.defaults) { + object.adBreakId = ""; + object.adId = ""; + object.adTimeOffset = null; + object.skipReason = ""; + } + if (message.adBreakId != null && message.hasOwnProperty("adBreakId")) + object.adBreakId = message.adBreakId; + if (message.adId != null && message.hasOwnProperty("adId")) + object.adId = message.adId; + if (message.adTimeOffset != null && message.hasOwnProperty("adTimeOffset")) + object.adTimeOffset = $root.google.protobuf.Duration.toObject(message.adTimeOffset, options); + if (message.skipReason != null && message.hasOwnProperty("skipReason")) + object.skipReason = message.skipReason; + var keys2; + if (message.media && (keys2 = Object.keys(message.media)).length) { + object.media = {}; + for (var j = 0; j < keys2.length; ++j) + object.media[keys2[j]] = $root.google.protobuf.Value.toObject(message.media[keys2[j]], options); + } + return object; + }; + + /** + * Converts this AdStitchDetail to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @instance + * @returns {Object.} JSON object + */ + AdStitchDetail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AdStitchDetail + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.AdStitchDetail + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AdStitchDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.AdStitchDetail"; + }; + + return AdStitchDetail; + })(); + + v1.VideoStitcherService = (function() { + + /** + * Constructs a new VideoStitcherService service. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a VideoStitcherService + * @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 VideoStitcherService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (VideoStitcherService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = VideoStitcherService; + + /** + * Creates new VideoStitcherService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @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 {VideoStitcherService} RPC service. Useful where requests and/or responses are streamed. + */ + VideoStitcherService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|createCdnKey}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef CreateCdnKeyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.stitcher.v1.CdnKey} [response] CdnKey + */ + + /** + * Calls CreateCdnKey. + * @function createCdnKey + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.ICreateCdnKeyRequest} request CreateCdnKeyRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.CreateCdnKeyCallback} callback Node-style callback called with the error, if any, and CdnKey + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VideoStitcherService.prototype.createCdnKey = function createCdnKey(request, callback) { + return this.rpcCall(createCdnKey, $root.google.cloud.video.stitcher.v1.CreateCdnKeyRequest, $root.google.cloud.video.stitcher.v1.CdnKey, request, callback); + }, "name", { value: "CreateCdnKey" }); + + /** + * Calls CreateCdnKey. + * @function createCdnKey + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.ICreateCdnKeyRequest} request CreateCdnKeyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|listCdnKeys}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef ListCdnKeysCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.stitcher.v1.ListCdnKeysResponse} [response] ListCdnKeysResponse + */ + + /** + * Calls ListCdnKeys. + * @function listCdnKeys + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IListCdnKeysRequest} request ListCdnKeysRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.ListCdnKeysCallback} callback Node-style callback called with the error, if any, and ListCdnKeysResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VideoStitcherService.prototype.listCdnKeys = function listCdnKeys(request, callback) { + return this.rpcCall(listCdnKeys, $root.google.cloud.video.stitcher.v1.ListCdnKeysRequest, $root.google.cloud.video.stitcher.v1.ListCdnKeysResponse, request, callback); + }, "name", { value: "ListCdnKeys" }); + + /** + * Calls ListCdnKeys. + * @function listCdnKeys + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IListCdnKeysRequest} request ListCdnKeysRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|getCdnKey}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef GetCdnKeyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.stitcher.v1.CdnKey} [response] CdnKey + */ + + /** + * Calls GetCdnKey. + * @function getCdnKey + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IGetCdnKeyRequest} request GetCdnKeyRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.GetCdnKeyCallback} callback Node-style callback called with the error, if any, and CdnKey + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VideoStitcherService.prototype.getCdnKey = function getCdnKey(request, callback) { + return this.rpcCall(getCdnKey, $root.google.cloud.video.stitcher.v1.GetCdnKeyRequest, $root.google.cloud.video.stitcher.v1.CdnKey, request, callback); + }, "name", { value: "GetCdnKey" }); + + /** + * Calls GetCdnKey. + * @function getCdnKey + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IGetCdnKeyRequest} request GetCdnKeyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|deleteCdnKey}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef DeleteCdnKeyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteCdnKey. + * @function deleteCdnKey + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest} request DeleteCdnKeyRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.DeleteCdnKeyCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VideoStitcherService.prototype.deleteCdnKey = function deleteCdnKey(request, callback) { + return this.rpcCall(deleteCdnKey, $root.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteCdnKey" }); + + /** + * Calls DeleteCdnKey. + * @function deleteCdnKey + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest} request DeleteCdnKeyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|updateCdnKey}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef UpdateCdnKeyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.stitcher.v1.CdnKey} [response] CdnKey + */ + + /** + * Calls UpdateCdnKey. + * @function updateCdnKey + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest} request UpdateCdnKeyRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.UpdateCdnKeyCallback} callback Node-style callback called with the error, if any, and CdnKey + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VideoStitcherService.prototype.updateCdnKey = function updateCdnKey(request, callback) { + return this.rpcCall(updateCdnKey, $root.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest, $root.google.cloud.video.stitcher.v1.CdnKey, request, callback); + }, "name", { value: "UpdateCdnKey" }); + + /** + * Calls UpdateCdnKey. + * @function updateCdnKey + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest} request UpdateCdnKeyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|createVodSession}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef CreateVodSessionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.stitcher.v1.VodSession} [response] VodSession + */ + + /** + * Calls CreateVodSession. + * @function createVodSession + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.ICreateVodSessionRequest} request CreateVodSessionRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.CreateVodSessionCallback} callback Node-style callback called with the error, if any, and VodSession + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VideoStitcherService.prototype.createVodSession = function createVodSession(request, callback) { + return this.rpcCall(createVodSession, $root.google.cloud.video.stitcher.v1.CreateVodSessionRequest, $root.google.cloud.video.stitcher.v1.VodSession, request, callback); + }, "name", { value: "CreateVodSession" }); + + /** + * Calls CreateVodSession. + * @function createVodSession + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.ICreateVodSessionRequest} request CreateVodSessionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|getVodSession}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef GetVodSessionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.stitcher.v1.VodSession} [response] VodSession + */ + + /** + * Calls GetVodSession. + * @function getVodSession + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IGetVodSessionRequest} request GetVodSessionRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.GetVodSessionCallback} callback Node-style callback called with the error, if any, and VodSession + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VideoStitcherService.prototype.getVodSession = function getVodSession(request, callback) { + return this.rpcCall(getVodSession, $root.google.cloud.video.stitcher.v1.GetVodSessionRequest, $root.google.cloud.video.stitcher.v1.VodSession, request, callback); + }, "name", { value: "GetVodSession" }); + + /** + * Calls GetVodSession. + * @function getVodSession + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IGetVodSessionRequest} request GetVodSessionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|listVodStitchDetails}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef ListVodStitchDetailsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse} [response] ListVodStitchDetailsResponse + */ + + /** + * Calls ListVodStitchDetails. + * @function listVodStitchDetails + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest} request ListVodStitchDetailsRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.ListVodStitchDetailsCallback} callback Node-style callback called with the error, if any, and ListVodStitchDetailsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VideoStitcherService.prototype.listVodStitchDetails = function listVodStitchDetails(request, callback) { + return this.rpcCall(listVodStitchDetails, $root.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest, $root.google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse, request, callback); + }, "name", { value: "ListVodStitchDetails" }); + + /** + * Calls ListVodStitchDetails. + * @function listVodStitchDetails + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest} request ListVodStitchDetailsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|getVodStitchDetail}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef GetVodStitchDetailCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.stitcher.v1.VodStitchDetail} [response] VodStitchDetail + */ + + /** + * Calls GetVodStitchDetail. + * @function getVodStitchDetail + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest} request GetVodStitchDetailRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.GetVodStitchDetailCallback} callback Node-style callback called with the error, if any, and VodStitchDetail + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VideoStitcherService.prototype.getVodStitchDetail = function getVodStitchDetail(request, callback) { + return this.rpcCall(getVodStitchDetail, $root.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest, $root.google.cloud.video.stitcher.v1.VodStitchDetail, request, callback); + }, "name", { value: "GetVodStitchDetail" }); + + /** + * Calls GetVodStitchDetail. + * @function getVodStitchDetail + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest} request GetVodStitchDetailRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|listVodAdTagDetails}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef ListVodAdTagDetailsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse} [response] ListVodAdTagDetailsResponse + */ + + /** + * Calls ListVodAdTagDetails. + * @function listVodAdTagDetails + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest} request ListVodAdTagDetailsRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.ListVodAdTagDetailsCallback} callback Node-style callback called with the error, if any, and ListVodAdTagDetailsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VideoStitcherService.prototype.listVodAdTagDetails = function listVodAdTagDetails(request, callback) { + return this.rpcCall(listVodAdTagDetails, $root.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest, $root.google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse, request, callback); + }, "name", { value: "ListVodAdTagDetails" }); + + /** + * Calls ListVodAdTagDetails. + * @function listVodAdTagDetails + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest} request ListVodAdTagDetailsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|getVodAdTagDetail}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef GetVodAdTagDetailCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.stitcher.v1.VodAdTagDetail} [response] VodAdTagDetail + */ + + /** + * Calls GetVodAdTagDetail. + * @function getVodAdTagDetail + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest} request GetVodAdTagDetailRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.GetVodAdTagDetailCallback} callback Node-style callback called with the error, if any, and VodAdTagDetail + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VideoStitcherService.prototype.getVodAdTagDetail = function getVodAdTagDetail(request, callback) { + return this.rpcCall(getVodAdTagDetail, $root.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest, $root.google.cloud.video.stitcher.v1.VodAdTagDetail, request, callback); + }, "name", { value: "GetVodAdTagDetail" }); + + /** + * Calls GetVodAdTagDetail. + * @function getVodAdTagDetail + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest} request GetVodAdTagDetailRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|listLiveAdTagDetails}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef ListLiveAdTagDetailsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse} [response] ListLiveAdTagDetailsResponse + */ + + /** + * Calls ListLiveAdTagDetails. + * @function listLiveAdTagDetails + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest} request ListLiveAdTagDetailsRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.ListLiveAdTagDetailsCallback} callback Node-style callback called with the error, if any, and ListLiveAdTagDetailsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VideoStitcherService.prototype.listLiveAdTagDetails = function listLiveAdTagDetails(request, callback) { + return this.rpcCall(listLiveAdTagDetails, $root.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest, $root.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse, request, callback); + }, "name", { value: "ListLiveAdTagDetails" }); + + /** + * Calls ListLiveAdTagDetails. + * @function listLiveAdTagDetails + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest} request ListLiveAdTagDetailsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|getLiveAdTagDetail}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef GetLiveAdTagDetailCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.stitcher.v1.LiveAdTagDetail} [response] LiveAdTagDetail + */ + + /** + * Calls GetLiveAdTagDetail. + * @function getLiveAdTagDetail + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest} request GetLiveAdTagDetailRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.GetLiveAdTagDetailCallback} callback Node-style callback called with the error, if any, and LiveAdTagDetail + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VideoStitcherService.prototype.getLiveAdTagDetail = function getLiveAdTagDetail(request, callback) { + return this.rpcCall(getLiveAdTagDetail, $root.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest, $root.google.cloud.video.stitcher.v1.LiveAdTagDetail, request, callback); + }, "name", { value: "GetLiveAdTagDetail" }); + + /** + * Calls GetLiveAdTagDetail. + * @function getLiveAdTagDetail + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest} request GetLiveAdTagDetailRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|createSlate}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef CreateSlateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.stitcher.v1.Slate} [response] Slate + */ + + /** + * Calls CreateSlate. + * @function createSlate + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.ICreateSlateRequest} request CreateSlateRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.CreateSlateCallback} callback Node-style callback called with the error, if any, and Slate + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VideoStitcherService.prototype.createSlate = function createSlate(request, callback) { + return this.rpcCall(createSlate, $root.google.cloud.video.stitcher.v1.CreateSlateRequest, $root.google.cloud.video.stitcher.v1.Slate, request, callback); + }, "name", { value: "CreateSlate" }); + + /** + * Calls CreateSlate. + * @function createSlate + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.ICreateSlateRequest} request CreateSlateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|listSlates}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef ListSlatesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.stitcher.v1.ListSlatesResponse} [response] ListSlatesResponse + */ + + /** + * Calls ListSlates. + * @function listSlates + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IListSlatesRequest} request ListSlatesRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.ListSlatesCallback} callback Node-style callback called with the error, if any, and ListSlatesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VideoStitcherService.prototype.listSlates = function listSlates(request, callback) { + return this.rpcCall(listSlates, $root.google.cloud.video.stitcher.v1.ListSlatesRequest, $root.google.cloud.video.stitcher.v1.ListSlatesResponse, request, callback); + }, "name", { value: "ListSlates" }); + + /** + * Calls ListSlates. + * @function listSlates + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IListSlatesRequest} request ListSlatesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|getSlate}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef GetSlateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.stitcher.v1.Slate} [response] Slate + */ + + /** + * Calls GetSlate. + * @function getSlate + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IGetSlateRequest} request GetSlateRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.GetSlateCallback} callback Node-style callback called with the error, if any, and Slate + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VideoStitcherService.prototype.getSlate = function getSlate(request, callback) { + return this.rpcCall(getSlate, $root.google.cloud.video.stitcher.v1.GetSlateRequest, $root.google.cloud.video.stitcher.v1.Slate, request, callback); + }, "name", { value: "GetSlate" }); + + /** + * Calls GetSlate. + * @function getSlate + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IGetSlateRequest} request GetSlateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|updateSlate}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef UpdateSlateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.stitcher.v1.Slate} [response] Slate + */ + + /** + * Calls UpdateSlate. + * @function updateSlate + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IUpdateSlateRequest} request UpdateSlateRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.UpdateSlateCallback} callback Node-style callback called with the error, if any, and Slate + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VideoStitcherService.prototype.updateSlate = function updateSlate(request, callback) { + return this.rpcCall(updateSlate, $root.google.cloud.video.stitcher.v1.UpdateSlateRequest, $root.google.cloud.video.stitcher.v1.Slate, request, callback); + }, "name", { value: "UpdateSlate" }); + + /** + * Calls UpdateSlate. + * @function updateSlate + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IUpdateSlateRequest} request UpdateSlateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|deleteSlate}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef DeleteSlateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteSlate. + * @function deleteSlate + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IDeleteSlateRequest} request DeleteSlateRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.DeleteSlateCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VideoStitcherService.prototype.deleteSlate = function deleteSlate(request, callback) { + return this.rpcCall(deleteSlate, $root.google.cloud.video.stitcher.v1.DeleteSlateRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteSlate" }); + + /** + * Calls DeleteSlate. + * @function deleteSlate + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IDeleteSlateRequest} request DeleteSlateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|createLiveSession}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef CreateLiveSessionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.stitcher.v1.LiveSession} [response] LiveSession + */ + + /** + * Calls CreateLiveSession. + * @function createLiveSession + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.ICreateLiveSessionRequest} request CreateLiveSessionRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.CreateLiveSessionCallback} callback Node-style callback called with the error, if any, and LiveSession + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VideoStitcherService.prototype.createLiveSession = function createLiveSession(request, callback) { + return this.rpcCall(createLiveSession, $root.google.cloud.video.stitcher.v1.CreateLiveSessionRequest, $root.google.cloud.video.stitcher.v1.LiveSession, request, callback); + }, "name", { value: "CreateLiveSession" }); + + /** + * Calls CreateLiveSession. + * @function createLiveSession + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.ICreateLiveSessionRequest} request CreateLiveSessionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.stitcher.v1.VideoStitcherService|getLiveSession}. + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @typedef GetLiveSessionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.stitcher.v1.LiveSession} [response] LiveSession + */ + + /** + * Calls GetLiveSession. + * @function getLiveSession + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IGetLiveSessionRequest} request GetLiveSessionRequest message or plain object + * @param {google.cloud.video.stitcher.v1.VideoStitcherService.GetLiveSessionCallback} callback Node-style callback called with the error, if any, and LiveSession + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VideoStitcherService.prototype.getLiveSession = function getLiveSession(request, callback) { + return this.rpcCall(getLiveSession, $root.google.cloud.video.stitcher.v1.GetLiveSessionRequest, $root.google.cloud.video.stitcher.v1.LiveSession, request, callback); + }, "name", { value: "GetLiveSession" }); + + /** + * Calls GetLiveSession. + * @function getLiveSession + * @memberof google.cloud.video.stitcher.v1.VideoStitcherService + * @instance + * @param {google.cloud.video.stitcher.v1.IGetLiveSessionRequest} request GetLiveSessionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return VideoStitcherService; + })(); + + v1.CreateCdnKeyRequest = (function() { + + /** + * Properties of a CreateCdnKeyRequest. + * @memberof google.cloud.video.stitcher.v1 + * @interface ICreateCdnKeyRequest + * @property {string|null} [parent] CreateCdnKeyRequest parent + * @property {google.cloud.video.stitcher.v1.ICdnKey|null} [cdnKey] CreateCdnKeyRequest cdnKey + * @property {string|null} [cdnKeyId] CreateCdnKeyRequest cdnKeyId + */ + + /** + * Constructs a new CreateCdnKeyRequest. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a CreateCdnKeyRequest. + * @implements ICreateCdnKeyRequest + * @constructor + * @param {google.cloud.video.stitcher.v1.ICreateCdnKeyRequest=} [properties] Properties to set + */ + function CreateCdnKeyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateCdnKeyRequest parent. + * @member {string} parent + * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest + * @instance + */ + CreateCdnKeyRequest.prototype.parent = ""; + + /** + * CreateCdnKeyRequest cdnKey. + * @member {google.cloud.video.stitcher.v1.ICdnKey|null|undefined} cdnKey + * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest + * @instance + */ + CreateCdnKeyRequest.prototype.cdnKey = null; + + /** + * CreateCdnKeyRequest cdnKeyId. + * @member {string} cdnKeyId + * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest + * @instance + */ + CreateCdnKeyRequest.prototype.cdnKeyId = ""; + + /** + * Creates a new CreateCdnKeyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest + * @static + * @param {google.cloud.video.stitcher.v1.ICreateCdnKeyRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.CreateCdnKeyRequest} CreateCdnKeyRequest instance + */ + CreateCdnKeyRequest.create = function create(properties) { + return new CreateCdnKeyRequest(properties); + }; + + /** + * Encodes the specified CreateCdnKeyRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateCdnKeyRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest + * @static + * @param {google.cloud.video.stitcher.v1.ICreateCdnKeyRequest} message CreateCdnKeyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCdnKeyRequest.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.cdnKey != null && Object.hasOwnProperty.call(message, "cdnKey")) + $root.google.cloud.video.stitcher.v1.CdnKey.encode(message.cdnKey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.cdnKeyId != null && Object.hasOwnProperty.call(message, "cdnKeyId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.cdnKeyId); + return writer; + }; + + /** + * Encodes the specified CreateCdnKeyRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateCdnKeyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest + * @static + * @param {google.cloud.video.stitcher.v1.ICreateCdnKeyRequest} message CreateCdnKeyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCdnKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateCdnKeyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.CreateCdnKeyRequest} CreateCdnKeyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCdnKeyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.CreateCdnKeyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.cdnKey = $root.google.cloud.video.stitcher.v1.CdnKey.decode(reader, reader.uint32()); + break; + } + case 3: { + message.cdnKeyId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateCdnKeyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.CreateCdnKeyRequest} CreateCdnKeyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCdnKeyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateCdnKeyRequest message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateCdnKeyRequest.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.cdnKey != null && message.hasOwnProperty("cdnKey")) { + var error = $root.google.cloud.video.stitcher.v1.CdnKey.verify(message.cdnKey); + if (error) + return "cdnKey." + error; + } + if (message.cdnKeyId != null && message.hasOwnProperty("cdnKeyId")) + if (!$util.isString(message.cdnKeyId)) + return "cdnKeyId: string expected"; + return null; + }; + + /** + * Creates a CreateCdnKeyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.CreateCdnKeyRequest} CreateCdnKeyRequest + */ + CreateCdnKeyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.CreateCdnKeyRequest) + return object; + var message = new $root.google.cloud.video.stitcher.v1.CreateCdnKeyRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.cdnKey != null) { + if (typeof object.cdnKey !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.CreateCdnKeyRequest.cdnKey: object expected"); + message.cdnKey = $root.google.cloud.video.stitcher.v1.CdnKey.fromObject(object.cdnKey); + } + if (object.cdnKeyId != null) + message.cdnKeyId = String(object.cdnKeyId); + return message; + }; + + /** + * Creates a plain object from a CreateCdnKeyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest + * @static + * @param {google.cloud.video.stitcher.v1.CreateCdnKeyRequest} message CreateCdnKeyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateCdnKeyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.cdnKey = null; + object.cdnKeyId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.cdnKey != null && message.hasOwnProperty("cdnKey")) + object.cdnKey = $root.google.cloud.video.stitcher.v1.CdnKey.toObject(message.cdnKey, options); + if (message.cdnKeyId != null && message.hasOwnProperty("cdnKeyId")) + object.cdnKeyId = message.cdnKeyId; + return object; + }; + + /** + * Converts this CreateCdnKeyRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest + * @instance + * @returns {Object.} JSON object + */ + CreateCdnKeyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateCdnKeyRequest + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.CreateCdnKeyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateCdnKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.CreateCdnKeyRequest"; + }; + + return CreateCdnKeyRequest; + })(); + + v1.ListCdnKeysRequest = (function() { + + /** + * Properties of a ListCdnKeysRequest. + * @memberof google.cloud.video.stitcher.v1 + * @interface IListCdnKeysRequest + * @property {string|null} [parent] ListCdnKeysRequest parent + * @property {number|null} [pageSize] ListCdnKeysRequest pageSize + * @property {string|null} [pageToken] ListCdnKeysRequest pageToken + * @property {string|null} [filter] ListCdnKeysRequest filter + * @property {string|null} [orderBy] ListCdnKeysRequest orderBy + */ + + /** + * Constructs a new ListCdnKeysRequest. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a ListCdnKeysRequest. + * @implements IListCdnKeysRequest + * @constructor + * @param {google.cloud.video.stitcher.v1.IListCdnKeysRequest=} [properties] Properties to set + */ + function ListCdnKeysRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCdnKeysRequest parent. + * @member {string} parent + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest + * @instance + */ + ListCdnKeysRequest.prototype.parent = ""; + + /** + * ListCdnKeysRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest + * @instance + */ + ListCdnKeysRequest.prototype.pageSize = 0; + + /** + * ListCdnKeysRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest + * @instance + */ + ListCdnKeysRequest.prototype.pageToken = ""; + + /** + * ListCdnKeysRequest filter. + * @member {string} filter + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest + * @instance + */ + ListCdnKeysRequest.prototype.filter = ""; + + /** + * ListCdnKeysRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest + * @instance + */ + ListCdnKeysRequest.prototype.orderBy = ""; + + /** + * Creates a new ListCdnKeysRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest + * @static + * @param {google.cloud.video.stitcher.v1.IListCdnKeysRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.ListCdnKeysRequest} ListCdnKeysRequest instance + */ + ListCdnKeysRequest.create = function create(properties) { + return new ListCdnKeysRequest(properties); + }; + + /** + * Encodes the specified ListCdnKeysRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListCdnKeysRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest + * @static + * @param {google.cloud.video.stitcher.v1.IListCdnKeysRequest} message ListCdnKeysRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCdnKeysRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListCdnKeysRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListCdnKeysRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest + * @static + * @param {google.cloud.video.stitcher.v1.IListCdnKeysRequest} message ListCdnKeysRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCdnKeysRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCdnKeysRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.ListCdnKeysRequest} ListCdnKeysRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCdnKeysRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.ListCdnKeysRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListCdnKeysRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.ListCdnKeysRequest} ListCdnKeysRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCdnKeysRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCdnKeysRequest message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCdnKeysRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListCdnKeysRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.ListCdnKeysRequest} ListCdnKeysRequest + */ + ListCdnKeysRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.ListCdnKeysRequest) + return object; + var message = new $root.google.cloud.video.stitcher.v1.ListCdnKeysRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListCdnKeysRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest + * @static + * @param {google.cloud.video.stitcher.v1.ListCdnKeysRequest} message ListCdnKeysRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCdnKeysRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListCdnKeysRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest + * @instance + * @returns {Object.} JSON object + */ + ListCdnKeysRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListCdnKeysRequest + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCdnKeysRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListCdnKeysRequest"; + }; + + return ListCdnKeysRequest; + })(); + + v1.ListCdnKeysResponse = (function() { + + /** + * Properties of a ListCdnKeysResponse. + * @memberof google.cloud.video.stitcher.v1 + * @interface IListCdnKeysResponse + * @property {Array.|null} [cdnKeys] ListCdnKeysResponse cdnKeys + * @property {string|null} [nextPageToken] ListCdnKeysResponse nextPageToken + * @property {Array.|null} [unreachable] ListCdnKeysResponse unreachable + */ + + /** + * Constructs a new ListCdnKeysResponse. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a ListCdnKeysResponse. + * @implements IListCdnKeysResponse + * @constructor + * @param {google.cloud.video.stitcher.v1.IListCdnKeysResponse=} [properties] Properties to set + */ + function ListCdnKeysResponse(properties) { + this.cdnKeys = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCdnKeysResponse cdnKeys. + * @member {Array.} cdnKeys + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse + * @instance + */ + ListCdnKeysResponse.prototype.cdnKeys = $util.emptyArray; + + /** + * ListCdnKeysResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse + * @instance + */ + ListCdnKeysResponse.prototype.nextPageToken = ""; + + /** + * ListCdnKeysResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse + * @instance + */ + ListCdnKeysResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListCdnKeysResponse instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse + * @static + * @param {google.cloud.video.stitcher.v1.IListCdnKeysResponse=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.ListCdnKeysResponse} ListCdnKeysResponse instance + */ + ListCdnKeysResponse.create = function create(properties) { + return new ListCdnKeysResponse(properties); + }; + + /** + * Encodes the specified ListCdnKeysResponse message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListCdnKeysResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse + * @static + * @param {google.cloud.video.stitcher.v1.IListCdnKeysResponse} message ListCdnKeysResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCdnKeysResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cdnKeys != null && message.cdnKeys.length) + for (var i = 0; i < message.cdnKeys.length; ++i) + $root.google.cloud.video.stitcher.v1.CdnKey.encode(message.cdnKeys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListCdnKeysResponse message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListCdnKeysResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse + * @static + * @param {google.cloud.video.stitcher.v1.IListCdnKeysResponse} message ListCdnKeysResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCdnKeysResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCdnKeysResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.ListCdnKeysResponse} ListCdnKeysResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCdnKeysResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.ListCdnKeysResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.cdnKeys && message.cdnKeys.length)) + message.cdnKeys = []; + message.cdnKeys.push($root.google.cloud.video.stitcher.v1.CdnKey.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListCdnKeysResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.ListCdnKeysResponse} ListCdnKeysResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCdnKeysResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCdnKeysResponse message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCdnKeysResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cdnKeys != null && message.hasOwnProperty("cdnKeys")) { + if (!Array.isArray(message.cdnKeys)) + return "cdnKeys: array expected"; + for (var i = 0; i < message.cdnKeys.length; ++i) { + var error = $root.google.cloud.video.stitcher.v1.CdnKey.verify(message.cdnKeys[i]); + if (error) + return "cdnKeys." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListCdnKeysResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.ListCdnKeysResponse} ListCdnKeysResponse + */ + ListCdnKeysResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.ListCdnKeysResponse) + return object; + var message = new $root.google.cloud.video.stitcher.v1.ListCdnKeysResponse(); + if (object.cdnKeys) { + if (!Array.isArray(object.cdnKeys)) + throw TypeError(".google.cloud.video.stitcher.v1.ListCdnKeysResponse.cdnKeys: array expected"); + message.cdnKeys = []; + for (var i = 0; i < object.cdnKeys.length; ++i) { + if (typeof object.cdnKeys[i] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.ListCdnKeysResponse.cdnKeys: object expected"); + message.cdnKeys[i] = $root.google.cloud.video.stitcher.v1.CdnKey.fromObject(object.cdnKeys[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.video.stitcher.v1.ListCdnKeysResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListCdnKeysResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse + * @static + * @param {google.cloud.video.stitcher.v1.ListCdnKeysResponse} message ListCdnKeysResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCdnKeysResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.cdnKeys = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.cdnKeys && message.cdnKeys.length) { + object.cdnKeys = []; + for (var j = 0; j < message.cdnKeys.length; ++j) + object.cdnKeys[j] = $root.google.cloud.video.stitcher.v1.CdnKey.toObject(message.cdnKeys[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListCdnKeysResponse to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse + * @instance + * @returns {Object.} JSON object + */ + ListCdnKeysResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListCdnKeysResponse + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.ListCdnKeysResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCdnKeysResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListCdnKeysResponse"; + }; + + return ListCdnKeysResponse; + })(); + + v1.GetCdnKeyRequest = (function() { + + /** + * Properties of a GetCdnKeyRequest. + * @memberof google.cloud.video.stitcher.v1 + * @interface IGetCdnKeyRequest + * @property {string|null} [name] GetCdnKeyRequest name + */ + + /** + * Constructs a new GetCdnKeyRequest. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a GetCdnKeyRequest. + * @implements IGetCdnKeyRequest + * @constructor + * @param {google.cloud.video.stitcher.v1.IGetCdnKeyRequest=} [properties] Properties to set + */ + function GetCdnKeyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetCdnKeyRequest name. + * @member {string} name + * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest + * @instance + */ + GetCdnKeyRequest.prototype.name = ""; + + /** + * Creates a new GetCdnKeyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest + * @static + * @param {google.cloud.video.stitcher.v1.IGetCdnKeyRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.GetCdnKeyRequest} GetCdnKeyRequest instance + */ + GetCdnKeyRequest.create = function create(properties) { + return new GetCdnKeyRequest(properties); + }; + + /** + * Encodes the specified GetCdnKeyRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.GetCdnKeyRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest + * @static + * @param {google.cloud.video.stitcher.v1.IGetCdnKeyRequest} message GetCdnKeyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCdnKeyRequest.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 GetCdnKeyRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GetCdnKeyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest + * @static + * @param {google.cloud.video.stitcher.v1.IGetCdnKeyRequest} message GetCdnKeyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCdnKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetCdnKeyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.GetCdnKeyRequest} GetCdnKeyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCdnKeyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.GetCdnKeyRequest(); + 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 GetCdnKeyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.GetCdnKeyRequest} GetCdnKeyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCdnKeyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetCdnKeyRequest message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetCdnKeyRequest.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 GetCdnKeyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.GetCdnKeyRequest} GetCdnKeyRequest + */ + GetCdnKeyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.GetCdnKeyRequest) + return object; + var message = new $root.google.cloud.video.stitcher.v1.GetCdnKeyRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetCdnKeyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest + * @static + * @param {google.cloud.video.stitcher.v1.GetCdnKeyRequest} message GetCdnKeyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetCdnKeyRequest.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 GetCdnKeyRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest + * @instance + * @returns {Object.} JSON object + */ + GetCdnKeyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetCdnKeyRequest + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.GetCdnKeyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetCdnKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.GetCdnKeyRequest"; + }; + + return GetCdnKeyRequest; + })(); + + v1.DeleteCdnKeyRequest = (function() { + + /** + * Properties of a DeleteCdnKeyRequest. + * @memberof google.cloud.video.stitcher.v1 + * @interface IDeleteCdnKeyRequest + * @property {string|null} [name] DeleteCdnKeyRequest name + */ + + /** + * Constructs a new DeleteCdnKeyRequest. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a DeleteCdnKeyRequest. + * @implements IDeleteCdnKeyRequest + * @constructor + * @param {google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest=} [properties] Properties to set + */ + function DeleteCdnKeyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteCdnKeyRequest name. + * @member {string} name + * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest + * @instance + */ + DeleteCdnKeyRequest.prototype.name = ""; + + /** + * Creates a new DeleteCdnKeyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest + * @static + * @param {google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.DeleteCdnKeyRequest} DeleteCdnKeyRequest instance + */ + DeleteCdnKeyRequest.create = function create(properties) { + return new DeleteCdnKeyRequest(properties); + }; + + /** + * Encodes the specified DeleteCdnKeyRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.DeleteCdnKeyRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest + * @static + * @param {google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest} message DeleteCdnKeyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteCdnKeyRequest.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 DeleteCdnKeyRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.DeleteCdnKeyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest + * @static + * @param {google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest} message DeleteCdnKeyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteCdnKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteCdnKeyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.DeleteCdnKeyRequest} DeleteCdnKeyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteCdnKeyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest(); + 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 DeleteCdnKeyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.DeleteCdnKeyRequest} DeleteCdnKeyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteCdnKeyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteCdnKeyRequest message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteCdnKeyRequest.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 DeleteCdnKeyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.DeleteCdnKeyRequest} DeleteCdnKeyRequest + */ + DeleteCdnKeyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest) + return object; + var message = new $root.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteCdnKeyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest + * @static + * @param {google.cloud.video.stitcher.v1.DeleteCdnKeyRequest} message DeleteCdnKeyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteCdnKeyRequest.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 DeleteCdnKeyRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteCdnKeyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteCdnKeyRequest + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.DeleteCdnKeyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteCdnKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.DeleteCdnKeyRequest"; + }; + + return DeleteCdnKeyRequest; + })(); + + v1.UpdateCdnKeyRequest = (function() { + + /** + * Properties of an UpdateCdnKeyRequest. + * @memberof google.cloud.video.stitcher.v1 + * @interface IUpdateCdnKeyRequest + * @property {google.cloud.video.stitcher.v1.ICdnKey|null} [cdnKey] UpdateCdnKeyRequest cdnKey + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateCdnKeyRequest updateMask + */ + + /** + * Constructs a new UpdateCdnKeyRequest. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents an UpdateCdnKeyRequest. + * @implements IUpdateCdnKeyRequest + * @constructor + * @param {google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest=} [properties] Properties to set + */ + function UpdateCdnKeyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateCdnKeyRequest cdnKey. + * @member {google.cloud.video.stitcher.v1.ICdnKey|null|undefined} cdnKey + * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest + * @instance + */ + UpdateCdnKeyRequest.prototype.cdnKey = null; + + /** + * UpdateCdnKeyRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest + * @instance + */ + UpdateCdnKeyRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateCdnKeyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest + * @static + * @param {google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.UpdateCdnKeyRequest} UpdateCdnKeyRequest instance + */ + UpdateCdnKeyRequest.create = function create(properties) { + return new UpdateCdnKeyRequest(properties); + }; + + /** + * Encodes the specified UpdateCdnKeyRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.UpdateCdnKeyRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest + * @static + * @param {google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest} message UpdateCdnKeyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCdnKeyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cdnKey != null && Object.hasOwnProperty.call(message, "cdnKey")) + $root.google.cloud.video.stitcher.v1.CdnKey.encode(message.cdnKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateCdnKeyRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.UpdateCdnKeyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest + * @static + * @param {google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest} message UpdateCdnKeyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCdnKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateCdnKeyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.UpdateCdnKeyRequest} UpdateCdnKeyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCdnKeyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cdnKey = $root.google.cloud.video.stitcher.v1.CdnKey.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateCdnKeyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.UpdateCdnKeyRequest} UpdateCdnKeyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCdnKeyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateCdnKeyRequest message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateCdnKeyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cdnKey != null && message.hasOwnProperty("cdnKey")) { + var error = $root.google.cloud.video.stitcher.v1.CdnKey.verify(message.cdnKey); + if (error) + return "cdnKey." + 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 UpdateCdnKeyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.UpdateCdnKeyRequest} UpdateCdnKeyRequest + */ + UpdateCdnKeyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest) + return object; + var message = new $root.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest(); + if (object.cdnKey != null) { + if (typeof object.cdnKey !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.UpdateCdnKeyRequest.cdnKey: object expected"); + message.cdnKey = $root.google.cloud.video.stitcher.v1.CdnKey.fromObject(object.cdnKey); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.UpdateCdnKeyRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateCdnKeyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest + * @static + * @param {google.cloud.video.stitcher.v1.UpdateCdnKeyRequest} message UpdateCdnKeyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateCdnKeyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cdnKey = null; + object.updateMask = null; + } + if (message.cdnKey != null && message.hasOwnProperty("cdnKey")) + object.cdnKey = $root.google.cloud.video.stitcher.v1.CdnKey.toObject(message.cdnKey, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateCdnKeyRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateCdnKeyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateCdnKeyRequest + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.UpdateCdnKeyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateCdnKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.UpdateCdnKeyRequest"; + }; + + return UpdateCdnKeyRequest; + })(); + + v1.CreateVodSessionRequest = (function() { + + /** + * Properties of a CreateVodSessionRequest. + * @memberof google.cloud.video.stitcher.v1 + * @interface ICreateVodSessionRequest + * @property {string|null} [parent] CreateVodSessionRequest parent + * @property {google.cloud.video.stitcher.v1.IVodSession|null} [vodSession] CreateVodSessionRequest vodSession + */ + + /** + * Constructs a new CreateVodSessionRequest. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a CreateVodSessionRequest. + * @implements ICreateVodSessionRequest + * @constructor + * @param {google.cloud.video.stitcher.v1.ICreateVodSessionRequest=} [properties] Properties to set + */ + function CreateVodSessionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateVodSessionRequest parent. + * @member {string} parent + * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest + * @instance + */ + CreateVodSessionRequest.prototype.parent = ""; + + /** + * CreateVodSessionRequest vodSession. + * @member {google.cloud.video.stitcher.v1.IVodSession|null|undefined} vodSession + * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest + * @instance + */ + CreateVodSessionRequest.prototype.vodSession = null; + + /** + * Creates a new CreateVodSessionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest + * @static + * @param {google.cloud.video.stitcher.v1.ICreateVodSessionRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.CreateVodSessionRequest} CreateVodSessionRequest instance + */ + CreateVodSessionRequest.create = function create(properties) { + return new CreateVodSessionRequest(properties); + }; + + /** + * Encodes the specified CreateVodSessionRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateVodSessionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest + * @static + * @param {google.cloud.video.stitcher.v1.ICreateVodSessionRequest} message CreateVodSessionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateVodSessionRequest.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.vodSession != null && Object.hasOwnProperty.call(message, "vodSession")) + $root.google.cloud.video.stitcher.v1.VodSession.encode(message.vodSession, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateVodSessionRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateVodSessionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest + * @static + * @param {google.cloud.video.stitcher.v1.ICreateVodSessionRequest} message CreateVodSessionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateVodSessionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateVodSessionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.CreateVodSessionRequest} CreateVodSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateVodSessionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.CreateVodSessionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.vodSession = $root.google.cloud.video.stitcher.v1.VodSession.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateVodSessionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.CreateVodSessionRequest} CreateVodSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateVodSessionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateVodSessionRequest message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateVodSessionRequest.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.vodSession != null && message.hasOwnProperty("vodSession")) { + var error = $root.google.cloud.video.stitcher.v1.VodSession.verify(message.vodSession); + if (error) + return "vodSession." + error; + } + return null; + }; + + /** + * Creates a CreateVodSessionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.CreateVodSessionRequest} CreateVodSessionRequest + */ + CreateVodSessionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.CreateVodSessionRequest) + return object; + var message = new $root.google.cloud.video.stitcher.v1.CreateVodSessionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.vodSession != null) { + if (typeof object.vodSession !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.CreateVodSessionRequest.vodSession: object expected"); + message.vodSession = $root.google.cloud.video.stitcher.v1.VodSession.fromObject(object.vodSession); + } + return message; + }; + + /** + * Creates a plain object from a CreateVodSessionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest + * @static + * @param {google.cloud.video.stitcher.v1.CreateVodSessionRequest} message CreateVodSessionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateVodSessionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.vodSession = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.vodSession != null && message.hasOwnProperty("vodSession")) + object.vodSession = $root.google.cloud.video.stitcher.v1.VodSession.toObject(message.vodSession, options); + return object; + }; + + /** + * Converts this CreateVodSessionRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest + * @instance + * @returns {Object.} JSON object + */ + CreateVodSessionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateVodSessionRequest + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.CreateVodSessionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateVodSessionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.CreateVodSessionRequest"; + }; + + return CreateVodSessionRequest; + })(); + + v1.GetVodSessionRequest = (function() { + + /** + * Properties of a GetVodSessionRequest. + * @memberof google.cloud.video.stitcher.v1 + * @interface IGetVodSessionRequest + * @property {string|null} [name] GetVodSessionRequest name + */ + + /** + * Constructs a new GetVodSessionRequest. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a GetVodSessionRequest. + * @implements IGetVodSessionRequest + * @constructor + * @param {google.cloud.video.stitcher.v1.IGetVodSessionRequest=} [properties] Properties to set + */ + function GetVodSessionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetVodSessionRequest name. + * @member {string} name + * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest + * @instance + */ + GetVodSessionRequest.prototype.name = ""; + + /** + * Creates a new GetVodSessionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest + * @static + * @param {google.cloud.video.stitcher.v1.IGetVodSessionRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.GetVodSessionRequest} GetVodSessionRequest instance + */ + GetVodSessionRequest.create = function create(properties) { + return new GetVodSessionRequest(properties); + }; + + /** + * Encodes the specified GetVodSessionRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.GetVodSessionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest + * @static + * @param {google.cloud.video.stitcher.v1.IGetVodSessionRequest} message GetVodSessionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVodSessionRequest.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 GetVodSessionRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GetVodSessionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest + * @static + * @param {google.cloud.video.stitcher.v1.IGetVodSessionRequest} message GetVodSessionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVodSessionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetVodSessionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.GetVodSessionRequest} GetVodSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVodSessionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.GetVodSessionRequest(); + 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 GetVodSessionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.GetVodSessionRequest} GetVodSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVodSessionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetVodSessionRequest message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetVodSessionRequest.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 GetVodSessionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.GetVodSessionRequest} GetVodSessionRequest + */ + GetVodSessionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.GetVodSessionRequest) + return object; + var message = new $root.google.cloud.video.stitcher.v1.GetVodSessionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetVodSessionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest + * @static + * @param {google.cloud.video.stitcher.v1.GetVodSessionRequest} message GetVodSessionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetVodSessionRequest.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 GetVodSessionRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest + * @instance + * @returns {Object.} JSON object + */ + GetVodSessionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetVodSessionRequest + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.GetVodSessionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetVodSessionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.GetVodSessionRequest"; + }; + + return GetVodSessionRequest; + })(); + + v1.ListVodStitchDetailsRequest = (function() { + + /** + * Properties of a ListVodStitchDetailsRequest. + * @memberof google.cloud.video.stitcher.v1 + * @interface IListVodStitchDetailsRequest + * @property {string|null} [parent] ListVodStitchDetailsRequest parent + * @property {number|null} [pageSize] ListVodStitchDetailsRequest pageSize + * @property {string|null} [pageToken] ListVodStitchDetailsRequest pageToken + */ + + /** + * Constructs a new ListVodStitchDetailsRequest. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a ListVodStitchDetailsRequest. + * @implements IListVodStitchDetailsRequest + * @constructor + * @param {google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest=} [properties] Properties to set + */ + function ListVodStitchDetailsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListVodStitchDetailsRequest parent. + * @member {string} parent + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest + * @instance + */ + ListVodStitchDetailsRequest.prototype.parent = ""; + + /** + * ListVodStitchDetailsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest + * @instance + */ + ListVodStitchDetailsRequest.prototype.pageSize = 0; + + /** + * ListVodStitchDetailsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest + * @instance + */ + ListVodStitchDetailsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListVodStitchDetailsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest + * @static + * @param {google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest} ListVodStitchDetailsRequest instance + */ + ListVodStitchDetailsRequest.create = function create(properties) { + return new ListVodStitchDetailsRequest(properties); + }; + + /** + * Encodes the specified ListVodStitchDetailsRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest + * @static + * @param {google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest} message ListVodStitchDetailsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVodStitchDetailsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListVodStitchDetailsRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest + * @static + * @param {google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest} message ListVodStitchDetailsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVodStitchDetailsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListVodStitchDetailsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest} ListVodStitchDetailsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVodStitchDetailsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListVodStitchDetailsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest} ListVodStitchDetailsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVodStitchDetailsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListVodStitchDetailsRequest message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListVodStitchDetailsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListVodStitchDetailsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest} ListVodStitchDetailsRequest + */ + ListVodStitchDetailsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest) + return object; + var message = new $root.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListVodStitchDetailsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest + * @static + * @param {google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest} message ListVodStitchDetailsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListVodStitchDetailsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListVodStitchDetailsRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest + * @instance + * @returns {Object.} JSON object + */ + ListVodStitchDetailsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListVodStitchDetailsRequest + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListVodStitchDetailsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest"; + }; + + return ListVodStitchDetailsRequest; + })(); + + v1.ListVodStitchDetailsResponse = (function() { + + /** + * Properties of a ListVodStitchDetailsResponse. + * @memberof google.cloud.video.stitcher.v1 + * @interface IListVodStitchDetailsResponse + * @property {Array.|null} [vodStitchDetails] ListVodStitchDetailsResponse vodStitchDetails + * @property {string|null} [nextPageToken] ListVodStitchDetailsResponse nextPageToken + */ + + /** + * Constructs a new ListVodStitchDetailsResponse. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a ListVodStitchDetailsResponse. + * @implements IListVodStitchDetailsResponse + * @constructor + * @param {google.cloud.video.stitcher.v1.IListVodStitchDetailsResponse=} [properties] Properties to set + */ + function ListVodStitchDetailsResponse(properties) { + this.vodStitchDetails = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListVodStitchDetailsResponse vodStitchDetails. + * @member {Array.} vodStitchDetails + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse + * @instance + */ + ListVodStitchDetailsResponse.prototype.vodStitchDetails = $util.emptyArray; + + /** + * ListVodStitchDetailsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse + * @instance + */ + ListVodStitchDetailsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListVodStitchDetailsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse + * @static + * @param {google.cloud.video.stitcher.v1.IListVodStitchDetailsResponse=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse} ListVodStitchDetailsResponse instance + */ + ListVodStitchDetailsResponse.create = function create(properties) { + return new ListVodStitchDetailsResponse(properties); + }; + + /** + * Encodes the specified ListVodStitchDetailsResponse message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse + * @static + * @param {google.cloud.video.stitcher.v1.IListVodStitchDetailsResponse} message ListVodStitchDetailsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVodStitchDetailsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.vodStitchDetails != null && message.vodStitchDetails.length) + for (var i = 0; i < message.vodStitchDetails.length; ++i) + $root.google.cloud.video.stitcher.v1.VodStitchDetail.encode(message.vodStitchDetails[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 ListVodStitchDetailsResponse message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse + * @static + * @param {google.cloud.video.stitcher.v1.IListVodStitchDetailsResponse} message ListVodStitchDetailsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVodStitchDetailsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListVodStitchDetailsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse} ListVodStitchDetailsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVodStitchDetailsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.vodStitchDetails && message.vodStitchDetails.length)) + message.vodStitchDetails = []; + message.vodStitchDetails.push($root.google.cloud.video.stitcher.v1.VodStitchDetail.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListVodStitchDetailsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse} ListVodStitchDetailsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVodStitchDetailsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListVodStitchDetailsResponse message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListVodStitchDetailsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.vodStitchDetails != null && message.hasOwnProperty("vodStitchDetails")) { + if (!Array.isArray(message.vodStitchDetails)) + return "vodStitchDetails: array expected"; + for (var i = 0; i < message.vodStitchDetails.length; ++i) { + var error = $root.google.cloud.video.stitcher.v1.VodStitchDetail.verify(message.vodStitchDetails[i]); + if (error) + return "vodStitchDetails." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListVodStitchDetailsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse} ListVodStitchDetailsResponse + */ + ListVodStitchDetailsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse) + return object; + var message = new $root.google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse(); + if (object.vodStitchDetails) { + if (!Array.isArray(object.vodStitchDetails)) + throw TypeError(".google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse.vodStitchDetails: array expected"); + message.vodStitchDetails = []; + for (var i = 0; i < object.vodStitchDetails.length; ++i) { + if (typeof object.vodStitchDetails[i] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse.vodStitchDetails: object expected"); + message.vodStitchDetails[i] = $root.google.cloud.video.stitcher.v1.VodStitchDetail.fromObject(object.vodStitchDetails[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListVodStitchDetailsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse + * @static + * @param {google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse} message ListVodStitchDetailsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListVodStitchDetailsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.vodStitchDetails = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.vodStitchDetails && message.vodStitchDetails.length) { + object.vodStitchDetails = []; + for (var j = 0; j < message.vodStitchDetails.length; ++j) + object.vodStitchDetails[j] = $root.google.cloud.video.stitcher.v1.VodStitchDetail.toObject(message.vodStitchDetails[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListVodStitchDetailsResponse to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse + * @instance + * @returns {Object.} JSON object + */ + ListVodStitchDetailsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListVodStitchDetailsResponse + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListVodStitchDetailsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse"; + }; + + return ListVodStitchDetailsResponse; + })(); + + v1.GetVodStitchDetailRequest = (function() { + + /** + * Properties of a GetVodStitchDetailRequest. + * @memberof google.cloud.video.stitcher.v1 + * @interface IGetVodStitchDetailRequest + * @property {string|null} [name] GetVodStitchDetailRequest name + */ + + /** + * Constructs a new GetVodStitchDetailRequest. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a GetVodStitchDetailRequest. + * @implements IGetVodStitchDetailRequest + * @constructor + * @param {google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest=} [properties] Properties to set + */ + function GetVodStitchDetailRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetVodStitchDetailRequest name. + * @member {string} name + * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest + * @instance + */ + GetVodStitchDetailRequest.prototype.name = ""; + + /** + * Creates a new GetVodStitchDetailRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest + * @static + * @param {google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.GetVodStitchDetailRequest} GetVodStitchDetailRequest instance + */ + GetVodStitchDetailRequest.create = function create(properties) { + return new GetVodStitchDetailRequest(properties); + }; + + /** + * Encodes the specified GetVodStitchDetailRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.GetVodStitchDetailRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest + * @static + * @param {google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest} message GetVodStitchDetailRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVodStitchDetailRequest.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 GetVodStitchDetailRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GetVodStitchDetailRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest + * @static + * @param {google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest} message GetVodStitchDetailRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVodStitchDetailRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetVodStitchDetailRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.GetVodStitchDetailRequest} GetVodStitchDetailRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVodStitchDetailRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest(); + 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 GetVodStitchDetailRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.GetVodStitchDetailRequest} GetVodStitchDetailRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVodStitchDetailRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetVodStitchDetailRequest message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetVodStitchDetailRequest.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 GetVodStitchDetailRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.GetVodStitchDetailRequest} GetVodStitchDetailRequest + */ + GetVodStitchDetailRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest) + return object; + var message = new $root.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetVodStitchDetailRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest + * @static + * @param {google.cloud.video.stitcher.v1.GetVodStitchDetailRequest} message GetVodStitchDetailRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetVodStitchDetailRequest.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 GetVodStitchDetailRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest + * @instance + * @returns {Object.} JSON object + */ + GetVodStitchDetailRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetVodStitchDetailRequest + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.GetVodStitchDetailRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetVodStitchDetailRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.GetVodStitchDetailRequest"; + }; + + return GetVodStitchDetailRequest; + })(); + + v1.ListVodAdTagDetailsRequest = (function() { + + /** + * Properties of a ListVodAdTagDetailsRequest. + * @memberof google.cloud.video.stitcher.v1 + * @interface IListVodAdTagDetailsRequest + * @property {string|null} [parent] ListVodAdTagDetailsRequest parent + * @property {number|null} [pageSize] ListVodAdTagDetailsRequest pageSize + * @property {string|null} [pageToken] ListVodAdTagDetailsRequest pageToken + */ + + /** + * Constructs a new ListVodAdTagDetailsRequest. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a ListVodAdTagDetailsRequest. + * @implements IListVodAdTagDetailsRequest + * @constructor + * @param {google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest=} [properties] Properties to set + */ + function ListVodAdTagDetailsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListVodAdTagDetailsRequest parent. + * @member {string} parent + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest + * @instance + */ + ListVodAdTagDetailsRequest.prototype.parent = ""; + + /** + * ListVodAdTagDetailsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest + * @instance + */ + ListVodAdTagDetailsRequest.prototype.pageSize = 0; + + /** + * ListVodAdTagDetailsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest + * @instance + */ + ListVodAdTagDetailsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListVodAdTagDetailsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest + * @static + * @param {google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest} ListVodAdTagDetailsRequest instance + */ + ListVodAdTagDetailsRequest.create = function create(properties) { + return new ListVodAdTagDetailsRequest(properties); + }; + + /** + * Encodes the specified ListVodAdTagDetailsRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest + * @static + * @param {google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest} message ListVodAdTagDetailsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVodAdTagDetailsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListVodAdTagDetailsRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest + * @static + * @param {google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest} message ListVodAdTagDetailsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVodAdTagDetailsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListVodAdTagDetailsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest} ListVodAdTagDetailsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVodAdTagDetailsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListVodAdTagDetailsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest} ListVodAdTagDetailsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVodAdTagDetailsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListVodAdTagDetailsRequest message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListVodAdTagDetailsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListVodAdTagDetailsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest} ListVodAdTagDetailsRequest + */ + ListVodAdTagDetailsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest) + return object; + var message = new $root.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListVodAdTagDetailsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest + * @static + * @param {google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest} message ListVodAdTagDetailsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListVodAdTagDetailsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListVodAdTagDetailsRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest + * @instance + * @returns {Object.} JSON object + */ + ListVodAdTagDetailsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListVodAdTagDetailsRequest + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListVodAdTagDetailsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest"; + }; + + return ListVodAdTagDetailsRequest; + })(); + + v1.ListVodAdTagDetailsResponse = (function() { + + /** + * Properties of a ListVodAdTagDetailsResponse. + * @memberof google.cloud.video.stitcher.v1 + * @interface IListVodAdTagDetailsResponse + * @property {Array.|null} [vodAdTagDetails] ListVodAdTagDetailsResponse vodAdTagDetails + * @property {string|null} [nextPageToken] ListVodAdTagDetailsResponse nextPageToken + */ + + /** + * Constructs a new ListVodAdTagDetailsResponse. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a ListVodAdTagDetailsResponse. + * @implements IListVodAdTagDetailsResponse + * @constructor + * @param {google.cloud.video.stitcher.v1.IListVodAdTagDetailsResponse=} [properties] Properties to set + */ + function ListVodAdTagDetailsResponse(properties) { + this.vodAdTagDetails = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListVodAdTagDetailsResponse vodAdTagDetails. + * @member {Array.} vodAdTagDetails + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse + * @instance + */ + ListVodAdTagDetailsResponse.prototype.vodAdTagDetails = $util.emptyArray; + + /** + * ListVodAdTagDetailsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse + * @instance + */ + ListVodAdTagDetailsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListVodAdTagDetailsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse + * @static + * @param {google.cloud.video.stitcher.v1.IListVodAdTagDetailsResponse=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse} ListVodAdTagDetailsResponse instance + */ + ListVodAdTagDetailsResponse.create = function create(properties) { + return new ListVodAdTagDetailsResponse(properties); + }; + + /** + * Encodes the specified ListVodAdTagDetailsResponse message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse + * @static + * @param {google.cloud.video.stitcher.v1.IListVodAdTagDetailsResponse} message ListVodAdTagDetailsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVodAdTagDetailsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.vodAdTagDetails != null && message.vodAdTagDetails.length) + for (var i = 0; i < message.vodAdTagDetails.length; ++i) + $root.google.cloud.video.stitcher.v1.VodAdTagDetail.encode(message.vodAdTagDetails[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 ListVodAdTagDetailsResponse message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse + * @static + * @param {google.cloud.video.stitcher.v1.IListVodAdTagDetailsResponse} message ListVodAdTagDetailsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVodAdTagDetailsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListVodAdTagDetailsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse} ListVodAdTagDetailsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVodAdTagDetailsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.vodAdTagDetails && message.vodAdTagDetails.length)) + message.vodAdTagDetails = []; + message.vodAdTagDetails.push($root.google.cloud.video.stitcher.v1.VodAdTagDetail.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListVodAdTagDetailsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse} ListVodAdTagDetailsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVodAdTagDetailsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListVodAdTagDetailsResponse message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListVodAdTagDetailsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.vodAdTagDetails != null && message.hasOwnProperty("vodAdTagDetails")) { + if (!Array.isArray(message.vodAdTagDetails)) + return "vodAdTagDetails: array expected"; + for (var i = 0; i < message.vodAdTagDetails.length; ++i) { + var error = $root.google.cloud.video.stitcher.v1.VodAdTagDetail.verify(message.vodAdTagDetails[i]); + if (error) + return "vodAdTagDetails." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListVodAdTagDetailsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse} ListVodAdTagDetailsResponse + */ + ListVodAdTagDetailsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse) + return object; + var message = new $root.google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse(); + if (object.vodAdTagDetails) { + if (!Array.isArray(object.vodAdTagDetails)) + throw TypeError(".google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse.vodAdTagDetails: array expected"); + message.vodAdTagDetails = []; + for (var i = 0; i < object.vodAdTagDetails.length; ++i) { + if (typeof object.vodAdTagDetails[i] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse.vodAdTagDetails: object expected"); + message.vodAdTagDetails[i] = $root.google.cloud.video.stitcher.v1.VodAdTagDetail.fromObject(object.vodAdTagDetails[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListVodAdTagDetailsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse + * @static + * @param {google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse} message ListVodAdTagDetailsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListVodAdTagDetailsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.vodAdTagDetails = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.vodAdTagDetails && message.vodAdTagDetails.length) { + object.vodAdTagDetails = []; + for (var j = 0; j < message.vodAdTagDetails.length; ++j) + object.vodAdTagDetails[j] = $root.google.cloud.video.stitcher.v1.VodAdTagDetail.toObject(message.vodAdTagDetails[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListVodAdTagDetailsResponse to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse + * @instance + * @returns {Object.} JSON object + */ + ListVodAdTagDetailsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListVodAdTagDetailsResponse + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListVodAdTagDetailsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse"; + }; + + return ListVodAdTagDetailsResponse; + })(); + + v1.GetVodAdTagDetailRequest = (function() { + + /** + * Properties of a GetVodAdTagDetailRequest. + * @memberof google.cloud.video.stitcher.v1 + * @interface IGetVodAdTagDetailRequest + * @property {string|null} [name] GetVodAdTagDetailRequest name + */ + + /** + * Constructs a new GetVodAdTagDetailRequest. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a GetVodAdTagDetailRequest. + * @implements IGetVodAdTagDetailRequest + * @constructor + * @param {google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest=} [properties] Properties to set + */ + function GetVodAdTagDetailRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetVodAdTagDetailRequest name. + * @member {string} name + * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest + * @instance + */ + GetVodAdTagDetailRequest.prototype.name = ""; + + /** + * Creates a new GetVodAdTagDetailRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest + * @static + * @param {google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest} GetVodAdTagDetailRequest instance + */ + GetVodAdTagDetailRequest.create = function create(properties) { + return new GetVodAdTagDetailRequest(properties); + }; + + /** + * Encodes the specified GetVodAdTagDetailRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest + * @static + * @param {google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest} message GetVodAdTagDetailRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVodAdTagDetailRequest.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 GetVodAdTagDetailRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest + * @static + * @param {google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest} message GetVodAdTagDetailRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVodAdTagDetailRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetVodAdTagDetailRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest} GetVodAdTagDetailRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVodAdTagDetailRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest(); + 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 GetVodAdTagDetailRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest} GetVodAdTagDetailRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVodAdTagDetailRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetVodAdTagDetailRequest message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetVodAdTagDetailRequest.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 GetVodAdTagDetailRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest} GetVodAdTagDetailRequest + */ + GetVodAdTagDetailRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest) + return object; + var message = new $root.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetVodAdTagDetailRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest + * @static + * @param {google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest} message GetVodAdTagDetailRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetVodAdTagDetailRequest.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 GetVodAdTagDetailRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest + * @instance + * @returns {Object.} JSON object + */ + GetVodAdTagDetailRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetVodAdTagDetailRequest + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetVodAdTagDetailRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest"; + }; + + return GetVodAdTagDetailRequest; + })(); + + v1.ListLiveAdTagDetailsRequest = (function() { + + /** + * Properties of a ListLiveAdTagDetailsRequest. + * @memberof google.cloud.video.stitcher.v1 + * @interface IListLiveAdTagDetailsRequest + * @property {string|null} [parent] ListLiveAdTagDetailsRequest parent + * @property {number|null} [pageSize] ListLiveAdTagDetailsRequest pageSize + * @property {string|null} [pageToken] ListLiveAdTagDetailsRequest pageToken + */ + + /** + * Constructs a new ListLiveAdTagDetailsRequest. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a ListLiveAdTagDetailsRequest. + * @implements IListLiveAdTagDetailsRequest + * @constructor + * @param {google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest=} [properties] Properties to set + */ + function ListLiveAdTagDetailsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListLiveAdTagDetailsRequest parent. + * @member {string} parent + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest + * @instance + */ + ListLiveAdTagDetailsRequest.prototype.parent = ""; + + /** + * ListLiveAdTagDetailsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest + * @instance + */ + ListLiveAdTagDetailsRequest.prototype.pageSize = 0; + + /** + * ListLiveAdTagDetailsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest + * @instance + */ + ListLiveAdTagDetailsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListLiveAdTagDetailsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest + * @static + * @param {google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest} ListLiveAdTagDetailsRequest instance + */ + ListLiveAdTagDetailsRequest.create = function create(properties) { + return new ListLiveAdTagDetailsRequest(properties); + }; + + /** + * Encodes the specified ListLiveAdTagDetailsRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest + * @static + * @param {google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest} message ListLiveAdTagDetailsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLiveAdTagDetailsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListLiveAdTagDetailsRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest + * @static + * @param {google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest} message ListLiveAdTagDetailsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLiveAdTagDetailsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListLiveAdTagDetailsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest} ListLiveAdTagDetailsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLiveAdTagDetailsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListLiveAdTagDetailsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest} ListLiveAdTagDetailsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLiveAdTagDetailsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListLiveAdTagDetailsRequest message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListLiveAdTagDetailsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListLiveAdTagDetailsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest} ListLiveAdTagDetailsRequest + */ + ListLiveAdTagDetailsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest) + return object; + var message = new $root.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListLiveAdTagDetailsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest + * @static + * @param {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest} message ListLiveAdTagDetailsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListLiveAdTagDetailsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListLiveAdTagDetailsRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest + * @instance + * @returns {Object.} JSON object + */ + ListLiveAdTagDetailsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListLiveAdTagDetailsRequest + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListLiveAdTagDetailsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest"; + }; + + return ListLiveAdTagDetailsRequest; + })(); + + v1.ListLiveAdTagDetailsResponse = (function() { + + /** + * Properties of a ListLiveAdTagDetailsResponse. + * @memberof google.cloud.video.stitcher.v1 + * @interface IListLiveAdTagDetailsResponse + * @property {Array.|null} [liveAdTagDetails] ListLiveAdTagDetailsResponse liveAdTagDetails + * @property {string|null} [nextPageToken] ListLiveAdTagDetailsResponse nextPageToken + */ + + /** + * Constructs a new ListLiveAdTagDetailsResponse. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a ListLiveAdTagDetailsResponse. + * @implements IListLiveAdTagDetailsResponse + * @constructor + * @param {google.cloud.video.stitcher.v1.IListLiveAdTagDetailsResponse=} [properties] Properties to set + */ + function ListLiveAdTagDetailsResponse(properties) { + this.liveAdTagDetails = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListLiveAdTagDetailsResponse liveAdTagDetails. + * @member {Array.} liveAdTagDetails + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse + * @instance + */ + ListLiveAdTagDetailsResponse.prototype.liveAdTagDetails = $util.emptyArray; + + /** + * ListLiveAdTagDetailsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse + * @instance + */ + ListLiveAdTagDetailsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListLiveAdTagDetailsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse + * @static + * @param {google.cloud.video.stitcher.v1.IListLiveAdTagDetailsResponse=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse} ListLiveAdTagDetailsResponse instance + */ + ListLiveAdTagDetailsResponse.create = function create(properties) { + return new ListLiveAdTagDetailsResponse(properties); + }; + + /** + * Encodes the specified ListLiveAdTagDetailsResponse message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse + * @static + * @param {google.cloud.video.stitcher.v1.IListLiveAdTagDetailsResponse} message ListLiveAdTagDetailsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLiveAdTagDetailsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.liveAdTagDetails != null && message.liveAdTagDetails.length) + for (var i = 0; i < message.liveAdTagDetails.length; ++i) + $root.google.cloud.video.stitcher.v1.LiveAdTagDetail.encode(message.liveAdTagDetails[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 ListLiveAdTagDetailsResponse message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse + * @static + * @param {google.cloud.video.stitcher.v1.IListLiveAdTagDetailsResponse} message ListLiveAdTagDetailsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLiveAdTagDetailsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListLiveAdTagDetailsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse} ListLiveAdTagDetailsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLiveAdTagDetailsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.liveAdTagDetails && message.liveAdTagDetails.length)) + message.liveAdTagDetails = []; + message.liveAdTagDetails.push($root.google.cloud.video.stitcher.v1.LiveAdTagDetail.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListLiveAdTagDetailsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse} ListLiveAdTagDetailsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLiveAdTagDetailsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListLiveAdTagDetailsResponse message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListLiveAdTagDetailsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.liveAdTagDetails != null && message.hasOwnProperty("liveAdTagDetails")) { + if (!Array.isArray(message.liveAdTagDetails)) + return "liveAdTagDetails: array expected"; + for (var i = 0; i < message.liveAdTagDetails.length; ++i) { + var error = $root.google.cloud.video.stitcher.v1.LiveAdTagDetail.verify(message.liveAdTagDetails[i]); + if (error) + return "liveAdTagDetails." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListLiveAdTagDetailsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse} ListLiveAdTagDetailsResponse + */ + ListLiveAdTagDetailsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse) + return object; + var message = new $root.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse(); + if (object.liveAdTagDetails) { + if (!Array.isArray(object.liveAdTagDetails)) + throw TypeError(".google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse.liveAdTagDetails: array expected"); + message.liveAdTagDetails = []; + for (var i = 0; i < object.liveAdTagDetails.length; ++i) { + if (typeof object.liveAdTagDetails[i] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse.liveAdTagDetails: object expected"); + message.liveAdTagDetails[i] = $root.google.cloud.video.stitcher.v1.LiveAdTagDetail.fromObject(object.liveAdTagDetails[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListLiveAdTagDetailsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse + * @static + * @param {google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse} message ListLiveAdTagDetailsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListLiveAdTagDetailsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.liveAdTagDetails = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.liveAdTagDetails && message.liveAdTagDetails.length) { + object.liveAdTagDetails = []; + for (var j = 0; j < message.liveAdTagDetails.length; ++j) + object.liveAdTagDetails[j] = $root.google.cloud.video.stitcher.v1.LiveAdTagDetail.toObject(message.liveAdTagDetails[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListLiveAdTagDetailsResponse to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse + * @instance + * @returns {Object.} JSON object + */ + ListLiveAdTagDetailsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListLiveAdTagDetailsResponse + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListLiveAdTagDetailsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse"; + }; + + return ListLiveAdTagDetailsResponse; + })(); + + v1.GetLiveAdTagDetailRequest = (function() { + + /** + * Properties of a GetLiveAdTagDetailRequest. + * @memberof google.cloud.video.stitcher.v1 + * @interface IGetLiveAdTagDetailRequest + * @property {string|null} [name] GetLiveAdTagDetailRequest name + */ + + /** + * Constructs a new GetLiveAdTagDetailRequest. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a GetLiveAdTagDetailRequest. + * @implements IGetLiveAdTagDetailRequest + * @constructor + * @param {google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest=} [properties] Properties to set + */ + function GetLiveAdTagDetailRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetLiveAdTagDetailRequest name. + * @member {string} name + * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest + * @instance + */ + GetLiveAdTagDetailRequest.prototype.name = ""; + + /** + * Creates a new GetLiveAdTagDetailRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest + * @static + * @param {google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest} GetLiveAdTagDetailRequest instance + */ + GetLiveAdTagDetailRequest.create = function create(properties) { + return new GetLiveAdTagDetailRequest(properties); + }; + + /** + * Encodes the specified GetLiveAdTagDetailRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest + * @static + * @param {google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest} message GetLiveAdTagDetailRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLiveAdTagDetailRequest.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 GetLiveAdTagDetailRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest + * @static + * @param {google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest} message GetLiveAdTagDetailRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLiveAdTagDetailRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetLiveAdTagDetailRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest} GetLiveAdTagDetailRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetLiveAdTagDetailRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest(); + 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 GetLiveAdTagDetailRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest} GetLiveAdTagDetailRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetLiveAdTagDetailRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetLiveAdTagDetailRequest message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetLiveAdTagDetailRequest.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 GetLiveAdTagDetailRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest} GetLiveAdTagDetailRequest + */ + GetLiveAdTagDetailRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest) + return object; + var message = new $root.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetLiveAdTagDetailRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest + * @static + * @param {google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest} message GetLiveAdTagDetailRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetLiveAdTagDetailRequest.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 GetLiveAdTagDetailRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest + * @instance + * @returns {Object.} JSON object + */ + GetLiveAdTagDetailRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetLiveAdTagDetailRequest + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetLiveAdTagDetailRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest"; + }; + + return GetLiveAdTagDetailRequest; + })(); + + v1.CreateSlateRequest = (function() { + + /** + * Properties of a CreateSlateRequest. + * @memberof google.cloud.video.stitcher.v1 + * @interface ICreateSlateRequest + * @property {string|null} [parent] CreateSlateRequest parent + * @property {string|null} [slateId] CreateSlateRequest slateId + * @property {google.cloud.video.stitcher.v1.ISlate|null} [slate] CreateSlateRequest slate + */ + + /** + * Constructs a new CreateSlateRequest. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a CreateSlateRequest. + * @implements ICreateSlateRequest + * @constructor + * @param {google.cloud.video.stitcher.v1.ICreateSlateRequest=} [properties] Properties to set + */ + function CreateSlateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateSlateRequest parent. + * @member {string} parent + * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest + * @instance + */ + CreateSlateRequest.prototype.parent = ""; + + /** + * CreateSlateRequest slateId. + * @member {string} slateId + * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest + * @instance + */ + CreateSlateRequest.prototype.slateId = ""; + + /** + * CreateSlateRequest slate. + * @member {google.cloud.video.stitcher.v1.ISlate|null|undefined} slate + * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest + * @instance + */ + CreateSlateRequest.prototype.slate = null; + + /** + * Creates a new CreateSlateRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest + * @static + * @param {google.cloud.video.stitcher.v1.ICreateSlateRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.CreateSlateRequest} CreateSlateRequest instance + */ + CreateSlateRequest.create = function create(properties) { + return new CreateSlateRequest(properties); + }; + + /** + * Encodes the specified CreateSlateRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateSlateRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest + * @static + * @param {google.cloud.video.stitcher.v1.ICreateSlateRequest} message CreateSlateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSlateRequest.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.slateId != null && Object.hasOwnProperty.call(message, "slateId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.slateId); + if (message.slate != null && Object.hasOwnProperty.call(message, "slate")) + $root.google.cloud.video.stitcher.v1.Slate.encode(message.slate, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateSlateRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateSlateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest + * @static + * @param {google.cloud.video.stitcher.v1.ICreateSlateRequest} message CreateSlateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSlateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateSlateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.CreateSlateRequest} CreateSlateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateSlateRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.CreateSlateRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.slateId = reader.string(); + break; + } + case 3: { + message.slate = $root.google.cloud.video.stitcher.v1.Slate.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateSlateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.CreateSlateRequest} CreateSlateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateSlateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateSlateRequest message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateSlateRequest.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.slateId != null && message.hasOwnProperty("slateId")) + if (!$util.isString(message.slateId)) + return "slateId: string expected"; + if (message.slate != null && message.hasOwnProperty("slate")) { + var error = $root.google.cloud.video.stitcher.v1.Slate.verify(message.slate); + if (error) + return "slate." + error; + } + return null; + }; + + /** + * Creates a CreateSlateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.CreateSlateRequest} CreateSlateRequest + */ + CreateSlateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.CreateSlateRequest) + return object; + var message = new $root.google.cloud.video.stitcher.v1.CreateSlateRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.slateId != null) + message.slateId = String(object.slateId); + if (object.slate != null) { + if (typeof object.slate !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.CreateSlateRequest.slate: object expected"); + message.slate = $root.google.cloud.video.stitcher.v1.Slate.fromObject(object.slate); + } + return message; + }; + + /** + * Creates a plain object from a CreateSlateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest + * @static + * @param {google.cloud.video.stitcher.v1.CreateSlateRequest} message CreateSlateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateSlateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.slateId = ""; + object.slate = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.slateId != null && message.hasOwnProperty("slateId")) + object.slateId = message.slateId; + if (message.slate != null && message.hasOwnProperty("slate")) + object.slate = $root.google.cloud.video.stitcher.v1.Slate.toObject(message.slate, options); + return object; + }; + + /** + * Converts this CreateSlateRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest + * @instance + * @returns {Object.} JSON object + */ + CreateSlateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateSlateRequest + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.CreateSlateRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateSlateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.CreateSlateRequest"; + }; + + return CreateSlateRequest; + })(); + + v1.GetSlateRequest = (function() { + + /** + * Properties of a GetSlateRequest. + * @memberof google.cloud.video.stitcher.v1 + * @interface IGetSlateRequest + * @property {string|null} [name] GetSlateRequest name + */ + + /** + * Constructs a new GetSlateRequest. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a GetSlateRequest. + * @implements IGetSlateRequest + * @constructor + * @param {google.cloud.video.stitcher.v1.IGetSlateRequest=} [properties] Properties to set + */ + function GetSlateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetSlateRequest name. + * @member {string} name + * @memberof google.cloud.video.stitcher.v1.GetSlateRequest + * @instance + */ + GetSlateRequest.prototype.name = ""; + + /** + * Creates a new GetSlateRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.GetSlateRequest + * @static + * @param {google.cloud.video.stitcher.v1.IGetSlateRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.GetSlateRequest} GetSlateRequest instance + */ + GetSlateRequest.create = function create(properties) { + return new GetSlateRequest(properties); + }; + + /** + * Encodes the specified GetSlateRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.GetSlateRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.GetSlateRequest + * @static + * @param {google.cloud.video.stitcher.v1.IGetSlateRequest} message GetSlateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSlateRequest.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 GetSlateRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GetSlateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.GetSlateRequest + * @static + * @param {google.cloud.video.stitcher.v1.IGetSlateRequest} message GetSlateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSlateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetSlateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.GetSlateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.GetSlateRequest} GetSlateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSlateRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.GetSlateRequest(); + 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 GetSlateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.GetSlateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.GetSlateRequest} GetSlateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSlateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetSlateRequest message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.GetSlateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetSlateRequest.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 GetSlateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.GetSlateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.GetSlateRequest} GetSlateRequest + */ + GetSlateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.GetSlateRequest) + return object; + var message = new $root.google.cloud.video.stitcher.v1.GetSlateRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetSlateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.GetSlateRequest + * @static + * @param {google.cloud.video.stitcher.v1.GetSlateRequest} message GetSlateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetSlateRequest.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 GetSlateRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.GetSlateRequest + * @instance + * @returns {Object.} JSON object + */ + GetSlateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetSlateRequest + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.GetSlateRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetSlateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.GetSlateRequest"; + }; + + return GetSlateRequest; + })(); + + v1.ListSlatesRequest = (function() { + + /** + * Properties of a ListSlatesRequest. + * @memberof google.cloud.video.stitcher.v1 + * @interface IListSlatesRequest + * @property {string|null} [parent] ListSlatesRequest parent + * @property {number|null} [pageSize] ListSlatesRequest pageSize + * @property {string|null} [pageToken] ListSlatesRequest pageToken + * @property {string|null} [filter] ListSlatesRequest filter + * @property {string|null} [orderBy] ListSlatesRequest orderBy + */ + + /** + * Constructs a new ListSlatesRequest. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a ListSlatesRequest. + * @implements IListSlatesRequest + * @constructor + * @param {google.cloud.video.stitcher.v1.IListSlatesRequest=} [properties] Properties to set + */ + function ListSlatesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListSlatesRequest parent. + * @member {string} parent + * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * @instance + */ + ListSlatesRequest.prototype.parent = ""; + + /** + * ListSlatesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * @instance + */ + ListSlatesRequest.prototype.pageSize = 0; + + /** + * ListSlatesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * @instance + */ + ListSlatesRequest.prototype.pageToken = ""; + + /** + * ListSlatesRequest filter. + * @member {string} filter + * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * @instance + */ + ListSlatesRequest.prototype.filter = ""; + + /** + * ListSlatesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * @instance + */ + ListSlatesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListSlatesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * @static + * @param {google.cloud.video.stitcher.v1.IListSlatesRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.ListSlatesRequest} ListSlatesRequest instance + */ + ListSlatesRequest.create = function create(properties) { + return new ListSlatesRequest(properties); + }; + + /** + * Encodes the specified ListSlatesRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListSlatesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * @static + * @param {google.cloud.video.stitcher.v1.IListSlatesRequest} message ListSlatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSlatesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListSlatesRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListSlatesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * @static + * @param {google.cloud.video.stitcher.v1.IListSlatesRequest} message ListSlatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSlatesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSlatesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.ListSlatesRequest} ListSlatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSlatesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.ListSlatesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListSlatesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.ListSlatesRequest} ListSlatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSlatesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSlatesRequest message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSlatesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListSlatesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.ListSlatesRequest} ListSlatesRequest + */ + ListSlatesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.ListSlatesRequest) + return object; + var message = new $root.google.cloud.video.stitcher.v1.ListSlatesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListSlatesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * @static + * @param {google.cloud.video.stitcher.v1.ListSlatesRequest} message ListSlatesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSlatesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListSlatesRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * @instance + * @returns {Object.} JSON object + */ + ListSlatesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListSlatesRequest + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.ListSlatesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSlatesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListSlatesRequest"; + }; + + return ListSlatesRequest; + })(); + + v1.ListSlatesResponse = (function() { + + /** + * Properties of a ListSlatesResponse. + * @memberof google.cloud.video.stitcher.v1 + * @interface IListSlatesResponse + * @property {Array.|null} [slates] ListSlatesResponse slates + * @property {string|null} [nextPageToken] ListSlatesResponse nextPageToken + * @property {Array.|null} [unreachable] ListSlatesResponse unreachable + */ + + /** + * Constructs a new ListSlatesResponse. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a ListSlatesResponse. + * @implements IListSlatesResponse + * @constructor + * @param {google.cloud.video.stitcher.v1.IListSlatesResponse=} [properties] Properties to set + */ + function ListSlatesResponse(properties) { + this.slates = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListSlatesResponse slates. + * @member {Array.} slates + * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse + * @instance + */ + ListSlatesResponse.prototype.slates = $util.emptyArray; + + /** + * ListSlatesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse + * @instance + */ + ListSlatesResponse.prototype.nextPageToken = ""; + + /** + * ListSlatesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse + * @instance + */ + ListSlatesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListSlatesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse + * @static + * @param {google.cloud.video.stitcher.v1.IListSlatesResponse=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.ListSlatesResponse} ListSlatesResponse instance + */ + ListSlatesResponse.create = function create(properties) { + return new ListSlatesResponse(properties); + }; + + /** + * Encodes the specified ListSlatesResponse message. Does not implicitly {@link google.cloud.video.stitcher.v1.ListSlatesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse + * @static + * @param {google.cloud.video.stitcher.v1.IListSlatesResponse} message ListSlatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSlatesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.slates != null && message.slates.length) + for (var i = 0; i < message.slates.length; ++i) + $root.google.cloud.video.stitcher.v1.Slate.encode(message.slates[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListSlatesResponse message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.ListSlatesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse + * @static + * @param {google.cloud.video.stitcher.v1.IListSlatesResponse} message ListSlatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSlatesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSlatesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.ListSlatesResponse} ListSlatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSlatesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.ListSlatesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.slates && message.slates.length)) + message.slates = []; + message.slates.push($root.google.cloud.video.stitcher.v1.Slate.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListSlatesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.ListSlatesResponse} ListSlatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSlatesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSlatesResponse message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSlatesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.slates != null && message.hasOwnProperty("slates")) { + if (!Array.isArray(message.slates)) + return "slates: array expected"; + for (var i = 0; i < message.slates.length; ++i) { + var error = $root.google.cloud.video.stitcher.v1.Slate.verify(message.slates[i]); + if (error) + return "slates." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListSlatesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.ListSlatesResponse} ListSlatesResponse + */ + ListSlatesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.ListSlatesResponse) + return object; + var message = new $root.google.cloud.video.stitcher.v1.ListSlatesResponse(); + if (object.slates) { + if (!Array.isArray(object.slates)) + throw TypeError(".google.cloud.video.stitcher.v1.ListSlatesResponse.slates: array expected"); + message.slates = []; + for (var i = 0; i < object.slates.length; ++i) { + if (typeof object.slates[i] !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.ListSlatesResponse.slates: object expected"); + message.slates[i] = $root.google.cloud.video.stitcher.v1.Slate.fromObject(object.slates[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.video.stitcher.v1.ListSlatesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListSlatesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse + * @static + * @param {google.cloud.video.stitcher.v1.ListSlatesResponse} message ListSlatesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSlatesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.slates = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.slates && message.slates.length) { + object.slates = []; + for (var j = 0; j < message.slates.length; ++j) + object.slates[j] = $root.google.cloud.video.stitcher.v1.Slate.toObject(message.slates[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListSlatesResponse to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse + * @instance + * @returns {Object.} JSON object + */ + ListSlatesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListSlatesResponse + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.ListSlatesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSlatesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.ListSlatesResponse"; + }; + + return ListSlatesResponse; + })(); + + v1.UpdateSlateRequest = (function() { + + /** + * Properties of an UpdateSlateRequest. + * @memberof google.cloud.video.stitcher.v1 + * @interface IUpdateSlateRequest + * @property {google.cloud.video.stitcher.v1.ISlate|null} [slate] UpdateSlateRequest slate + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSlateRequest updateMask + */ + + /** + * Constructs a new UpdateSlateRequest. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents an UpdateSlateRequest. + * @implements IUpdateSlateRequest + * @constructor + * @param {google.cloud.video.stitcher.v1.IUpdateSlateRequest=} [properties] Properties to set + */ + function UpdateSlateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateSlateRequest slate. + * @member {google.cloud.video.stitcher.v1.ISlate|null|undefined} slate + * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest + * @instance + */ + UpdateSlateRequest.prototype.slate = null; + + /** + * UpdateSlateRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest + * @instance + */ + UpdateSlateRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateSlateRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest + * @static + * @param {google.cloud.video.stitcher.v1.IUpdateSlateRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.UpdateSlateRequest} UpdateSlateRequest instance + */ + UpdateSlateRequest.create = function create(properties) { + return new UpdateSlateRequest(properties); + }; + + /** + * Encodes the specified UpdateSlateRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.UpdateSlateRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest + * @static + * @param {google.cloud.video.stitcher.v1.IUpdateSlateRequest} message UpdateSlateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSlateRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.slate != null && Object.hasOwnProperty.call(message, "slate")) + $root.google.cloud.video.stitcher.v1.Slate.encode(message.slate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateSlateRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.UpdateSlateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest + * @static + * @param {google.cloud.video.stitcher.v1.IUpdateSlateRequest} message UpdateSlateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSlateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateSlateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.UpdateSlateRequest} UpdateSlateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSlateRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.UpdateSlateRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.slate = $root.google.cloud.video.stitcher.v1.Slate.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateSlateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.UpdateSlateRequest} UpdateSlateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSlateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateSlateRequest message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateSlateRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.slate != null && message.hasOwnProperty("slate")) { + var error = $root.google.cloud.video.stitcher.v1.Slate.verify(message.slate); + if (error) + return "slate." + 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 UpdateSlateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.UpdateSlateRequest} UpdateSlateRequest + */ + UpdateSlateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.UpdateSlateRequest) + return object; + var message = new $root.google.cloud.video.stitcher.v1.UpdateSlateRequest(); + if (object.slate != null) { + if (typeof object.slate !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.UpdateSlateRequest.slate: object expected"); + message.slate = $root.google.cloud.video.stitcher.v1.Slate.fromObject(object.slate); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.UpdateSlateRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateSlateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest + * @static + * @param {google.cloud.video.stitcher.v1.UpdateSlateRequest} message UpdateSlateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateSlateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.slate = null; + object.updateMask = null; + } + if (message.slate != null && message.hasOwnProperty("slate")) + object.slate = $root.google.cloud.video.stitcher.v1.Slate.toObject(message.slate, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateSlateRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateSlateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateSlateRequest + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.UpdateSlateRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateSlateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.UpdateSlateRequest"; + }; + + return UpdateSlateRequest; + })(); + + v1.DeleteSlateRequest = (function() { + + /** + * Properties of a DeleteSlateRequest. + * @memberof google.cloud.video.stitcher.v1 + * @interface IDeleteSlateRequest + * @property {string|null} [name] DeleteSlateRequest name + */ + + /** + * Constructs a new DeleteSlateRequest. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a DeleteSlateRequest. + * @implements IDeleteSlateRequest + * @constructor + * @param {google.cloud.video.stitcher.v1.IDeleteSlateRequest=} [properties] Properties to set + */ + function DeleteSlateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteSlateRequest name. + * @member {string} name + * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest + * @instance + */ + DeleteSlateRequest.prototype.name = ""; + + /** + * Creates a new DeleteSlateRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest + * @static + * @param {google.cloud.video.stitcher.v1.IDeleteSlateRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.DeleteSlateRequest} DeleteSlateRequest instance + */ + DeleteSlateRequest.create = function create(properties) { + return new DeleteSlateRequest(properties); + }; + + /** + * Encodes the specified DeleteSlateRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.DeleteSlateRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest + * @static + * @param {google.cloud.video.stitcher.v1.IDeleteSlateRequest} message DeleteSlateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSlateRequest.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 DeleteSlateRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.DeleteSlateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest + * @static + * @param {google.cloud.video.stitcher.v1.IDeleteSlateRequest} message DeleteSlateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSlateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteSlateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.DeleteSlateRequest} DeleteSlateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSlateRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.DeleteSlateRequest(); + 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 DeleteSlateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.DeleteSlateRequest} DeleteSlateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSlateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteSlateRequest message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteSlateRequest.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 DeleteSlateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.DeleteSlateRequest} DeleteSlateRequest + */ + DeleteSlateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.DeleteSlateRequest) + return object; + var message = new $root.google.cloud.video.stitcher.v1.DeleteSlateRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteSlateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest + * @static + * @param {google.cloud.video.stitcher.v1.DeleteSlateRequest} message DeleteSlateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteSlateRequest.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 DeleteSlateRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteSlateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteSlateRequest + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.DeleteSlateRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteSlateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.DeleteSlateRequest"; + }; + + return DeleteSlateRequest; + })(); + + v1.CreateLiveSessionRequest = (function() { + + /** + * Properties of a CreateLiveSessionRequest. + * @memberof google.cloud.video.stitcher.v1 + * @interface ICreateLiveSessionRequest + * @property {string|null} [parent] CreateLiveSessionRequest parent + * @property {google.cloud.video.stitcher.v1.ILiveSession|null} [liveSession] CreateLiveSessionRequest liveSession + */ + + /** + * Constructs a new CreateLiveSessionRequest. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a CreateLiveSessionRequest. + * @implements ICreateLiveSessionRequest + * @constructor + * @param {google.cloud.video.stitcher.v1.ICreateLiveSessionRequest=} [properties] Properties to set + */ + function CreateLiveSessionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateLiveSessionRequest parent. + * @member {string} parent + * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @instance + */ + CreateLiveSessionRequest.prototype.parent = ""; + + /** + * CreateLiveSessionRequest liveSession. + * @member {google.cloud.video.stitcher.v1.ILiveSession|null|undefined} liveSession + * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @instance + */ + CreateLiveSessionRequest.prototype.liveSession = null; + + /** + * Creates a new CreateLiveSessionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @static + * @param {google.cloud.video.stitcher.v1.ICreateLiveSessionRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.CreateLiveSessionRequest} CreateLiveSessionRequest instance + */ + CreateLiveSessionRequest.create = function create(properties) { + return new CreateLiveSessionRequest(properties); + }; + + /** + * Encodes the specified CreateLiveSessionRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateLiveSessionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @static + * @param {google.cloud.video.stitcher.v1.ICreateLiveSessionRequest} message CreateLiveSessionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateLiveSessionRequest.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.liveSession != null && Object.hasOwnProperty.call(message, "liveSession")) + $root.google.cloud.video.stitcher.v1.LiveSession.encode(message.liveSession, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateLiveSessionRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.CreateLiveSessionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @static + * @param {google.cloud.video.stitcher.v1.ICreateLiveSessionRequest} message CreateLiveSessionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateLiveSessionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateLiveSessionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.CreateLiveSessionRequest} CreateLiveSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateLiveSessionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.CreateLiveSessionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.liveSession = $root.google.cloud.video.stitcher.v1.LiveSession.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateLiveSessionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.CreateLiveSessionRequest} CreateLiveSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateLiveSessionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateLiveSessionRequest message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateLiveSessionRequest.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.liveSession != null && message.hasOwnProperty("liveSession")) { + var error = $root.google.cloud.video.stitcher.v1.LiveSession.verify(message.liveSession); + if (error) + return "liveSession." + error; + } + return null; + }; + + /** + * Creates a CreateLiveSessionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.CreateLiveSessionRequest} CreateLiveSessionRequest + */ + CreateLiveSessionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.CreateLiveSessionRequest) + return object; + var message = new $root.google.cloud.video.stitcher.v1.CreateLiveSessionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.liveSession != null) { + if (typeof object.liveSession !== "object") + throw TypeError(".google.cloud.video.stitcher.v1.CreateLiveSessionRequest.liveSession: object expected"); + message.liveSession = $root.google.cloud.video.stitcher.v1.LiveSession.fromObject(object.liveSession); + } + return message; + }; + + /** + * Creates a plain object from a CreateLiveSessionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @static + * @param {google.cloud.video.stitcher.v1.CreateLiveSessionRequest} message CreateLiveSessionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateLiveSessionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.liveSession = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.liveSession != null && message.hasOwnProperty("liveSession")) + object.liveSession = $root.google.cloud.video.stitcher.v1.LiveSession.toObject(message.liveSession, options); + return object; + }; + + /** + * Converts this CreateLiveSessionRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @instance + * @returns {Object.} JSON object + */ + CreateLiveSessionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateLiveSessionRequest + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.CreateLiveSessionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateLiveSessionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.CreateLiveSessionRequest"; + }; + + return CreateLiveSessionRequest; + })(); + + v1.GetLiveSessionRequest = (function() { + + /** + * Properties of a GetLiveSessionRequest. + * @memberof google.cloud.video.stitcher.v1 + * @interface IGetLiveSessionRequest + * @property {string|null} [name] GetLiveSessionRequest name + */ + + /** + * Constructs a new GetLiveSessionRequest. + * @memberof google.cloud.video.stitcher.v1 + * @classdesc Represents a GetLiveSessionRequest. + * @implements IGetLiveSessionRequest + * @constructor + * @param {google.cloud.video.stitcher.v1.IGetLiveSessionRequest=} [properties] Properties to set + */ + function GetLiveSessionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetLiveSessionRequest name. + * @member {string} name + * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @instance + */ + GetLiveSessionRequest.prototype.name = ""; + + /** + * Creates a new GetLiveSessionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @static + * @param {google.cloud.video.stitcher.v1.IGetLiveSessionRequest=} [properties] Properties to set + * @returns {google.cloud.video.stitcher.v1.GetLiveSessionRequest} GetLiveSessionRequest instance + */ + GetLiveSessionRequest.create = function create(properties) { + return new GetLiveSessionRequest(properties); + }; + + /** + * Encodes the specified GetLiveSessionRequest message. Does not implicitly {@link google.cloud.video.stitcher.v1.GetLiveSessionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @static + * @param {google.cloud.video.stitcher.v1.IGetLiveSessionRequest} message GetLiveSessionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLiveSessionRequest.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 GetLiveSessionRequest message, length delimited. Does not implicitly {@link google.cloud.video.stitcher.v1.GetLiveSessionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @static + * @param {google.cloud.video.stitcher.v1.IGetLiveSessionRequest} message GetLiveSessionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLiveSessionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetLiveSessionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.stitcher.v1.GetLiveSessionRequest} GetLiveSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetLiveSessionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.stitcher.v1.GetLiveSessionRequest(); + 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 GetLiveSessionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.stitcher.v1.GetLiveSessionRequest} GetLiveSessionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetLiveSessionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetLiveSessionRequest message. + * @function verify + * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetLiveSessionRequest.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 GetLiveSessionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.stitcher.v1.GetLiveSessionRequest} GetLiveSessionRequest + */ + GetLiveSessionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.stitcher.v1.GetLiveSessionRequest) + return object; + var message = new $root.google.cloud.video.stitcher.v1.GetLiveSessionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetLiveSessionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @static + * @param {google.cloud.video.stitcher.v1.GetLiveSessionRequest} message GetLiveSessionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetLiveSessionRequest.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 GetLiveSessionRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @instance + * @returns {Object.} JSON object + */ + GetLiveSessionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetLiveSessionRequest + * @function getTypeUrl + * @memberof google.cloud.video.stitcher.v1.GetLiveSessionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetLiveSessionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.stitcher.v1.GetLiveSessionRequest"; + }; + + return GetLiveSessionRequest; + })(); + + return v1; + })(); + + return stitcher; + })(); + + return video; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + 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; + })(); + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + return values; + })(); + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + + return CustomHttpPattern; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {string|null} [edition] FileDescriptorProto edition + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {string} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = ""; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.edition); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 13: { + message.edition = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + if (!$util.isString(message.edition)) + return "edition: string expected"; + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = message.edition; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + 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.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 42: { + message.phpGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (typeof message.phpGenericServices !== "boolean") + return "phpGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + protobuf.Struct = (function() { + + /** + * Properties of a Struct. + * @memberof google.protobuf + * @interface IStruct + * @property {Object.|null} [fields] Struct fields + */ + + /** + * Constructs a new Struct. + * @memberof google.protobuf + * @classdesc Represents a Struct. + * @implements IStruct + * @constructor + * @param {google.protobuf.IStruct=} [properties] Properties to set + */ + function Struct(properties) { + this.fields = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Struct fields. + * @member {Object.} fields + * @memberof google.protobuf.Struct + * @instance + */ + Struct.prototype.fields = $util.emptyObject; + + /** + * Creates a new Struct instance using the specified properties. + * @function create + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct=} [properties] Properties to set + * @returns {google.protobuf.Struct} Struct instance + */ + Struct.create = function create(properties) { + return new Struct(properties); + }; + + /** + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Struct.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) + for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Struct.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Struct message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Struct + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Struct} Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Struct.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (message.fields === $util.emptyObject) + message.fields = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.fields[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Struct + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Struct} Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Struct.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Struct message. + * @function verify + * @memberof google.protobuf.Struct + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Struct.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!$util.isObject(message.fields)) + return "fields: object expected"; + var key = Object.keys(message.fields); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); + if (error) + return "fields." + error; + } + } + return null; + }; + + /** + * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Struct + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Struct} Struct + */ + Struct.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Struct) + return object; + var message = new $root.google.protobuf.Struct(); + if (object.fields) { + if (typeof object.fields !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields = {}; + for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { + if (typeof object.fields[keys[i]] !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.Struct} message Struct + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Struct.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.fields = {}; + var keys2; + if (message.fields && (keys2 = Object.keys(message.fields)).length) { + object.fields = {}; + for (var j = 0; j < keys2.length; ++j) + object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); + } + return object; + }; + + /** + * Converts this Struct to JSON. + * @function toJSON + * @memberof google.protobuf.Struct + * @instance + * @returns {Object.} JSON object + */ + Struct.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Struct + * @function getTypeUrl + * @memberof google.protobuf.Struct + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Struct.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Struct"; + }; + + return Struct; + })(); + + protobuf.Value = (function() { + + /** + * Properties of a Value. + * @memberof google.protobuf + * @interface IValue + * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue + * @property {number|null} [numberValue] Value numberValue + * @property {string|null} [stringValue] Value stringValue + * @property {boolean|null} [boolValue] Value boolValue + * @property {google.protobuf.IStruct|null} [structValue] Value structValue + * @property {google.protobuf.IListValue|null} [listValue] Value listValue + */ + + /** + * Constructs a new Value. + * @memberof google.protobuf + * @classdesc Represents a Value. + * @implements IValue + * @constructor + * @param {google.protobuf.IValue=} [properties] Properties to set + */ + function Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Value nullValue. + * @member {google.protobuf.NullValue|null|undefined} nullValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.nullValue = null; + + /** + * Value numberValue. + * @member {number|null|undefined} numberValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.numberValue = null; + + /** + * Value stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.stringValue = null; + + /** + * Value boolValue. + * @member {boolean|null|undefined} boolValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.boolValue = null; + + /** + * Value structValue. + * @member {google.protobuf.IStruct|null|undefined} structValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.structValue = null; + + /** + * Value listValue. + * @member {google.protobuf.IListValue|null|undefined} listValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.listValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Value kind. + * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind + * @memberof google.protobuf.Value + * @instance + */ + Object.defineProperty(Value.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue=} [properties] Properties to set + * @returns {google.protobuf.Value} Value instance + */ + Value.create = function create(properties) { + return new Value(properties); + }; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); + if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); + if (message.structValue != null && Object.hasOwnProperty.call(message, "structValue")) + $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.listValue != null && Object.hasOwnProperty.call(message, "listValue")) + $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.nullValue = reader.int32(); + break; + } + case 2: { + message.numberValue = reader.double(); + break; + } + case 3: { + message.stringValue = reader.string(); + break; + } + case 4: { + message.boolValue = reader.bool(); + break; + } + case 5: { + message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 6: { + message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Value message. + * @function verify + * @memberof google.protobuf.Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + properties.kind = 1; + switch (message.nullValue) { + default: + return "nullValue: enum value expected"; + case 0: + break; + } + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.numberValue !== "number") + return "numberValue: number expected"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.Struct.verify(message.structValue); + if (error) + return "structValue." + error; + } + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.ListValue.verify(message.listValue); + if (error) + return "listValue." + error; + } + } + return null; + }; + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Value} Value + */ + Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Value) + return object; + var message = new $root.google.protobuf.Value(); + switch (object.nullValue) { + default: + if (typeof object.nullValue === "number") { + message.nullValue = object.nullValue; + break; + } + break; + case "NULL_VALUE": + case 0: + message.nullValue = 0; + break; + } + if (object.numberValue != null) + message.numberValue = Number(object.numberValue); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.structValue != null) { + if (typeof object.structValue !== "object") + throw TypeError(".google.protobuf.Value.structValue: object expected"); + message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); + } + if (object.listValue != null) { + if (typeof object.listValue !== "object") + throw TypeError(".google.protobuf.Value.listValue: object expected"); + message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); + } + return message; + }; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.Value} message Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] === undefined ? message.nullValue : $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; + if (options.oneofs) + object.kind = "nullValue"; + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; + if (options.oneofs) + object.kind = "numberValue"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.kind = "boolValue"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); + if (options.oneofs) + object.kind = "structValue"; + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); + if (options.oneofs) + object.kind = "listValue"; + } + return object; + }; + + /** + * Converts this Value to JSON. + * @function toJSON + * @memberof google.protobuf.Value + * @instance + * @returns {Object.} JSON object + */ + Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Value + * @function getTypeUrl + * @memberof google.protobuf.Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Value"; + }; + + return Value; + })(); + + /** + * NullValue enum. + * @name google.protobuf.NullValue + * @enum {number} + * @property {number} NULL_VALUE=0 NULL_VALUE value + */ + protobuf.NullValue = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NULL_VALUE"] = 0; + return values; + })(); + + protobuf.ListValue = (function() { + + /** + * Properties of a ListValue. + * @memberof google.protobuf + * @interface IListValue + * @property {Array.|null} [values] ListValue values + */ + + /** + * Constructs a new ListValue. + * @memberof google.protobuf + * @classdesc Represents a ListValue. + * @implements IListValue + * @constructor + * @param {google.protobuf.IListValue=} [properties] Properties to set + */ + function ListValue(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListValue values. + * @member {Array.} values + * @memberof google.protobuf.ListValue + * @instance + */ + ListValue.prototype.values = $util.emptyArray; + + /** + * Creates a new ListValue instance using the specified properties. + * @function create + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue=} [properties] Properties to set + * @returns {google.protobuf.ListValue} ListValue instance + */ + ListValue.create = function create(properties) { + return new ListValue(properties); + }; + + /** + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ListValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ListValue} ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ListValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ListValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ListValue} ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListValue message. + * @function verify + * @memberof google.protobuf.ListValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.values[i]); + if (error) + return "values." + error; + } + } + return null; + }; + + /** + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ListValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ListValue} ListValue + */ + ListValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ListValue) + return object; + var message = new $root.google.protobuf.ListValue(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.protobuf.ListValue.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".google.protobuf.ListValue.values: object expected"); + message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.ListValue} message ListValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); + } + return object; + }; + + /** + * Converts this ListValue to JSON. + * @function toJSON + * @memberof google.protobuf.ListValue + * @instance + * @returns {Object.} JSON object + */ + ListValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListValue + * @function getTypeUrl + * @memberof google.protobuf.ListValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ListValue"; + }; + + return ListValue; + })(); + + protobuf.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; + })(); + + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + + return FieldMask; + })(); + + return protobuf; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-cloud-video-stitcher/protos/protos.json b/packages/google-cloud-video-stitcher/protos/protos.json new file mode 100644 index 00000000000..3e930fa09ff --- /dev/null +++ b/packages/google-cloud-video-stitcher/protos/protos.json @@ -0,0 +1,2719 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "video": { + "nested": { + "stitcher": { + "nested": { + "v1": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/cloud/video/stitcher/v1;stitcher", + "java_multiple_files": true, + "java_outer_classname": "VideoStitcherServiceProto", + "java_package": "com.google.cloud.video.stitcher.v1" + }, + "nested": { + "LiveAdTagDetail": { + "options": { + "(google.api.resource).type": "videostitcher.googleapis.com/LiveAdTagDetail", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "adRequests": { + "rule": "repeated", + "type": "AdRequest", + "id": 2 + } + } + }, + "VodAdTagDetail": { + "options": { + "(google.api.resource).type": "videostitcher.googleapis.com/VodAdTagDetail", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/vodSessions/{vod_session}/vodAdTagDetails/{vod_ad_tag_detail}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "adRequests": { + "rule": "repeated", + "type": "AdRequest", + "id": 2 + } + } + }, + "AdRequest": { + "fields": { + "uri": { + "type": "string", + "id": 1 + }, + "requestMetadata": { + "type": "RequestMetadata", + "id": 2 + }, + "responseMetadata": { + "type": "ResponseMetadata", + "id": 3 + } + } + }, + "RequestMetadata": { + "fields": { + "headers": { + "type": "google.protobuf.Struct", + "id": 1 + } + } + }, + "ResponseMetadata": { + "fields": { + "error": { + "type": "string", + "id": 1 + }, + "headers": { + "type": "google.protobuf.Struct", + "id": 2 + }, + "statusCode": { + "type": "string", + "id": 3 + }, + "sizeBytes": { + "type": "int32", + "id": 4 + }, + "duration": { + "type": "google.protobuf.Duration", + "id": 5 + }, + "body": { + "type": "string", + "id": 6 + } + } + }, + "CdnKey": { + "options": { + "(google.api.resource).type": "videostitcher.googleapis.com/CdnKey", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/cdnKeys/{cdn_key}" + }, + "oneofs": { + "cdnKeyConfig": { + "oneof": [ + "googleCdnKey", + "akamaiCdnKey", + "mediaCdnKey" + ] + } + }, + "fields": { + "googleCdnKey": { + "type": "GoogleCdnKey", + "id": 5 + }, + "akamaiCdnKey": { + "type": "AkamaiCdnKey", + "id": 6 + }, + "mediaCdnKey": { + "type": "MediaCdnKey", + "id": 8 + }, + "name": { + "type": "string", + "id": 1 + }, + "hostname": { + "type": "string", + "id": 4 + } + } + }, + "GoogleCdnKey": { + "fields": { + "privateKey": { + "type": "bytes", + "id": 1, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY" + } + }, + "keyName": { + "type": "string", + "id": 2 + } + } + }, + "AkamaiCdnKey": { + "fields": { + "tokenKey": { + "type": "bytes", + "id": 1, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY" + } + } + } + }, + "MediaCdnKey": { + "fields": { + "privateKey": { + "type": "bytes", + "id": 1, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY" + } + }, + "keyName": { + "type": "string", + "id": 2 + } + } + }, + "CompanionAds": { + "fields": { + "displayRequirement": { + "type": "DisplayRequirement", + "id": 1 + }, + "companions": { + "rule": "repeated", + "type": "Companion", + "id": 2 + } + }, + "nested": { + "DisplayRequirement": { + "values": { + "DISPLAY_REQUIREMENT_UNSPECIFIED": 0, + "ALL": 1, + "ANY": 2, + "NONE": 3 + } + } + } + }, + "Companion": { + "oneofs": { + "adResource": { + "oneof": [ + "iframeAdResource", + "staticAdResource", + "htmlAdResource" + ] + } + }, + "fields": { + "iframeAdResource": { + "type": "IframeAdResource", + "id": 10 + }, + "staticAdResource": { + "type": "StaticAdResource", + "id": 11 + }, + "htmlAdResource": { + "type": "HtmlAdResource", + "id": 12 + }, + "apiFramework": { + "type": "string", + "id": 1 + }, + "heightPx": { + "type": "int32", + "id": 2 + }, + "widthPx": { + "type": "int32", + "id": 3 + }, + "assetHeightPx": { + "type": "int32", + "id": 4 + }, + "expandedHeightPx": { + "type": "int32", + "id": 5 + }, + "assetWidthPx": { + "type": "int32", + "id": 6 + }, + "expandedWidthPx": { + "type": "int32", + "id": 7 + }, + "adSlotId": { + "type": "string", + "id": 8 + }, + "events": { + "rule": "repeated", + "type": "Event", + "id": 9 + } + } + }, + "HtmlAdResource": { + "fields": { + "htmlSource": { + "type": "string", + "id": 1 + } + } + }, + "IframeAdResource": { + "fields": { + "uri": { + "type": "string", + "id": 1 + } + } + }, + "StaticAdResource": { + "fields": { + "uri": { + "type": "string", + "id": 1 + }, + "creativeType": { + "type": "string", + "id": 2 + } + } + }, + "Event": { + "fields": { + "type": { + "type": "EventType", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "id": { + "type": "string", + "id": 3 + }, + "offset": { + "type": "google.protobuf.Duration", + "id": 4 + } + }, + "nested": { + "EventType": { + "values": { + "EVENT_TYPE_UNSPECIFIED": 0, + "CREATIVE_VIEW": 1, + "START": 2, + "BREAK_START": 3, + "BREAK_END": 4, + "IMPRESSION": 5, + "FIRST_QUARTILE": 6, + "MIDPOINT": 7, + "THIRD_QUARTILE": 8, + "COMPLETE": 9, + "PROGRESS": 10, + "MUTE": 11, + "UNMUTE": 12, + "PAUSE": 13, + "CLICK": 14, + "CLICK_THROUGH": 15, + "REWIND": 16, + "RESUME": 17, + "ERROR": 18, + "EXPAND": 21, + "COLLAPSE": 22, + "CLOSE": 24, + "CLOSE_LINEAR": 25, + "SKIP": 26, + "ACCEPT_INVITATION": 27 + } + } + } + }, + "ProgressEvent": { + "fields": { + "timeOffset": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "events": { + "rule": "repeated", + "type": "Event", + "id": 2 + } + } + }, + "VodSession": { + "options": { + "(google.api.resource).type": "videostitcher.googleapis.com/VodSession", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/vodSessions/{vod_session}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "interstitials": { + "type": "Interstitials", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "playUri": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sourceUri": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "adTagUri": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "adTagMacroMap": { + "keyType": "string", + "type": "string", + "id": 7 + }, + "clientAdTracking": { + "type": "bool", + "id": 8 + }, + "manifestOptions": { + "type": "ManifestOptions", + "id": 9 + }, + "assetId": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "Interstitials": { + "fields": { + "adBreaks": { + "rule": "repeated", + "type": "VodSessionAdBreak", + "id": 1 + }, + "sessionContent": { + "type": "VodSessionContent", + "id": 2 + } + } + }, + "VodSessionAd": { + "fields": { + "duration": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "companionAds": { + "type": "CompanionAds", + "id": 2 + }, + "activityEvents": { + "rule": "repeated", + "type": "Event", + "id": 3 + } + } + }, + "VodSessionContent": { + "fields": { + "duration": { + "type": "google.protobuf.Duration", + "id": 1 + } + } + }, + "VodSessionAdBreak": { + "fields": { + "progressEvents": { + "rule": "repeated", + "type": "ProgressEvent", + "id": 1 + }, + "ads": { + "rule": "repeated", + "type": "VodSessionAd", + "id": 2 + }, + "endTimeOffset": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "startTimeOffset": { + "type": "google.protobuf.Duration", + "id": 4 + } + } + }, + "LiveSession": { + "options": { + "(google.api.resource).type": "videostitcher.googleapis.com/LiveSession", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/liveSessions/{live_session}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "playUri": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sourceUri": { + "type": "string", + "id": 3 + }, + "defaultAdTagId": { + "type": "string", + "id": 4 + }, + "adTagMap": { + "keyType": "string", + "type": "AdTag", + "id": 5 + }, + "adTagMacros": { + "keyType": "string", + "type": "string", + "id": 6 + }, + "clientAdTracking": { + "type": "bool", + "id": 7 + }, + "defaultSlateId": { + "type": "string", + "id": 8 + }, + "stitchingPolicy": { + "type": "StitchingPolicy", + "id": 9 + }, + "manifestOptions": { + "type": "ManifestOptions", + "id": 10 + }, + "streamId": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "StitchingPolicy": { + "values": { + "STITCHING_POLICY_UNSPECIFIED": 0, + "COMPLETE_AD": 1, + "CUT_CURRENT": 3 + } + } + } + }, + "AdTag": { + "fields": { + "uri": { + "type": "string", + "id": 1 + } + } + }, + "ManifestOptions": { + "fields": { + "includeRenditions": { + "rule": "repeated", + "type": "RenditionFilter", + "id": 1 + }, + "bitrateOrder": { + "type": "OrderPolicy", + "id": 2 + } + }, + "nested": { + "OrderPolicy": { + "values": { + "ORDER_POLICY_UNSPECIFIED": 0, + "ASCENDING": 1, + "DESCENDING": 2 + } + } + } + }, + "RenditionFilter": { + "fields": { + "bitrateBps": { + "type": "int32", + "id": 1 + }, + "codecs": { + "type": "string", + "id": 2 + } + } + }, + "Slate": { + "options": { + "(google.api.resource).type": "videostitcher.googleapis.com/Slate", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/slates/{slate}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "uri": { + "type": "string", + "id": 2 + } + } + }, + "VodStitchDetail": { + "options": { + "(google.api.resource).type": "videostitcher.googleapis.com/VodStitchDetail", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/vodSessions/{vod_session}/vodStitchDetails/{vod_stitch_detail}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "adStitchDetails": { + "rule": "repeated", + "type": "AdStitchDetail", + "id": 3 + } + } + }, + "AdStitchDetail": { + "fields": { + "adBreakId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "adId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "adTimeOffset": { + "type": "google.protobuf.Duration", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "skipReason": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "media": { + "keyType": "string", + "type": "google.protobuf.Value", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "VideoStitcherService": { + "options": { + "(google.api.default_host)": "videostitcher.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateCdnKey": { + "requestType": "CreateCdnKeyRequest", + "responseType": "CdnKey", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/cdnKeys", + "(google.api.http).body": "cdn_key", + "(google.api.method_signature)": "parent,cdn_key,cdn_key_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/cdnKeys", + "body": "cdn_key" + } + }, + { + "(google.api.method_signature)": "parent,cdn_key,cdn_key_id" + } + ] + }, + "ListCdnKeys": { + "requestType": "ListCdnKeysRequest", + "responseType": "ListCdnKeysResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/cdnKeys", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/cdnKeys" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetCdnKey": { + "requestType": "GetCdnKeyRequest", + "responseType": "CdnKey", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/cdnKeys/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/cdnKeys/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteCdnKey": { + "requestType": "DeleteCdnKeyRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/cdnKeys/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/cdnKeys/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateCdnKey": { + "requestType": "UpdateCdnKeyRequest", + "responseType": "CdnKey", + "options": { + "(google.api.http).patch": "/v1/{cdn_key.name=projects/*/locations/*/cdnKeys/*}", + "(google.api.http).body": "cdn_key", + "(google.api.method_signature)": "cdn_key,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{cdn_key.name=projects/*/locations/*/cdnKeys/*}", + "body": "cdn_key" + } + }, + { + "(google.api.method_signature)": "cdn_key,update_mask" + } + ] + }, + "CreateVodSession": { + "requestType": "CreateVodSessionRequest", + "responseType": "VodSession", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/vodSessions", + "(google.api.http).body": "vod_session", + "(google.api.method_signature)": "parent,vod_session" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/vodSessions", + "body": "vod_session" + } + }, + { + "(google.api.method_signature)": "parent,vod_session" + } + ] + }, + "GetVodSession": { + "requestType": "GetVodSessionRequest", + "responseType": "VodSession", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/vodSessions/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/vodSessions/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListVodStitchDetails": { + "requestType": "ListVodStitchDetailsRequest", + "responseType": "ListVodStitchDetailsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/vodSessions/*}/vodStitchDetails", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/vodSessions/*}/vodStitchDetails" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetVodStitchDetail": { + "requestType": "GetVodStitchDetailRequest", + "responseType": "VodStitchDetail", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/vodSessions/*/vodStitchDetails/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/vodSessions/*/vodStitchDetails/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListVodAdTagDetails": { + "requestType": "ListVodAdTagDetailsRequest", + "responseType": "ListVodAdTagDetailsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/vodSessions/*}/vodAdTagDetails", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/vodSessions/*}/vodAdTagDetails" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetVodAdTagDetail": { + "requestType": "GetVodAdTagDetailRequest", + "responseType": "VodAdTagDetail", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/vodSessions/*/vodAdTagDetails/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/vodSessions/*/vodAdTagDetails/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListLiveAdTagDetails": { + "requestType": "ListLiveAdTagDetailsRequest", + "responseType": "ListLiveAdTagDetailsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/liveSessions/*}/liveAdTagDetails", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/liveSessions/*}/liveAdTagDetails" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetLiveAdTagDetail": { + "requestType": "GetLiveAdTagDetailRequest", + "responseType": "LiveAdTagDetail", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/liveSessions/*/liveAdTagDetails/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/liveSessions/*/liveAdTagDetails/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateSlate": { + "requestType": "CreateSlateRequest", + "responseType": "Slate", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/slates", + "(google.api.http).body": "slate", + "(google.api.method_signature)": "parent,slate,slate_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/slates", + "body": "slate" + } + }, + { + "(google.api.method_signature)": "parent,slate,slate_id" + } + ] + }, + "ListSlates": { + "requestType": "ListSlatesRequest", + "responseType": "ListSlatesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/slates", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/slates" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetSlate": { + "requestType": "GetSlateRequest", + "responseType": "Slate", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/slates/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/slates/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateSlate": { + "requestType": "UpdateSlateRequest", + "responseType": "Slate", + "options": { + "(google.api.http).patch": "/v1/{slate.name=projects/*/locations/*/slates/*}", + "(google.api.http).body": "slate", + "(google.api.method_signature)": "slate,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{slate.name=projects/*/locations/*/slates/*}", + "body": "slate" + } + }, + { + "(google.api.method_signature)": "slate,update_mask" + } + ] + }, + "DeleteSlate": { + "requestType": "DeleteSlateRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/slates/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/slates/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateLiveSession": { + "requestType": "CreateLiveSessionRequest", + "responseType": "LiveSession", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/liveSessions", + "(google.api.http).body": "live_session", + "(google.api.method_signature)": "parent,live_session" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/liveSessions", + "body": "live_session" + } + }, + { + "(google.api.method_signature)": "parent,live_session" + } + ] + }, + "GetLiveSession": { + "requestType": "GetLiveSessionRequest", + "responseType": "LiveSession", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/liveSessions/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/liveSessions/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "CreateCdnKeyRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "videostitcher.googleapis.com/CdnKey" + } + }, + "cdnKey": { + "type": "CdnKey", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "cdnKeyId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListCdnKeysRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "videostitcher.googleapis.com/CdnKey" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5 + } + } + }, + "ListCdnKeysResponse": { + "fields": { + "cdnKeys": { + "rule": "repeated", + "type": "CdnKey", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetCdnKeyRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "videostitcher.googleapis.com/CdnKey" + } + } + } + }, + "DeleteCdnKeyRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "videostitcher.googleapis.com/CdnKey" + } + } + } + }, + "UpdateCdnKeyRequest": { + "fields": { + "cdnKey": { + "type": "CdnKey", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CreateVodSessionRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "videostitcher.googleapis.com/VodSession" + } + }, + "vodSession": { + "type": "VodSession", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetVodSessionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "videostitcher.googleapis.com/VodSession" + } + } + } + }, + "ListVodStitchDetailsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "videostitcher.googleapis.com/VodStitchDetail" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListVodStitchDetailsResponse": { + "fields": { + "vodStitchDetails": { + "rule": "repeated", + "type": "VodStitchDetail", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetVodStitchDetailRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "videostitcher.googleapis.com/VodStitchDetail" + } + } + } + }, + "ListVodAdTagDetailsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "videostitcher.googleapis.com/VodAdTagDetail" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListVodAdTagDetailsResponse": { + "fields": { + "vodAdTagDetails": { + "rule": "repeated", + "type": "VodAdTagDetail", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetVodAdTagDetailRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "videostitcher.googleapis.com/VodAdTagDetail" + } + } + } + }, + "ListLiveAdTagDetailsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "videostitcher.googleapis.com/LiveAdTagDetail" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListLiveAdTagDetailsResponse": { + "fields": { + "liveAdTagDetails": { + "rule": "repeated", + "type": "LiveAdTagDetail", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetLiveAdTagDetailRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "videostitcher.googleapis.com/LiveAdTagDetail" + } + } + } + }, + "CreateSlateRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "videostitcher.googleapis.com/Slate" + } + }, + "slateId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "slate": { + "type": "Slate", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetSlateRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "videostitcher.googleapis.com/Slate" + } + } + } + }, + "ListSlatesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "videostitcher.googleapis.com/Slate" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5 + } + } + }, + "ListSlatesResponse": { + "fields": { + "slates": { + "rule": "repeated", + "type": "Slate", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "UpdateSlateRequest": { + "fields": { + "slate": { + "type": "Slate", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteSlateRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "videostitcher.googleapis.com/Slate" + } + } + } + }, + "CreateLiveSessionRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "videostitcher.googleapis.com/LiveSession" + } + }, + "liveSession": { + "type": "LiveSession", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetLiveSessionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "videostitcher.googleapis.com/LiveSession" + } + } + } + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ClientProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI" + }, + "nested": { + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 + } + }, + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "string", + "id": 13 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "phpGenericServices": { + "type": "bool", + "id": 42, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + } + } + }, + "OneofOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Struct": { + "fields": { + "fields": { + "keyType": "string", + "type": "Value", + "id": 1 + } + } + }, + "Value": { + "oneofs": { + "kind": { + "oneof": [ + "nullValue", + "numberValue", + "stringValue", + "boolValue", + "structValue", + "listValue" + ] + } + }, + "fields": { + "nullValue": { + "type": "NullValue", + "id": 1 + }, + "numberValue": { + "type": "double", + "id": 2 + }, + "stringValue": { + "type": "string", + "id": 3 + }, + "boolValue": { + "type": "bool", + "id": 4 + }, + "structValue": { + "type": "Struct", + "id": 5 + }, + "listValue": { + "type": "ListValue", + "id": 6 + } + } + }, + "NullValue": { + "values": { + "NULL_VALUE": 0 + } + }, + "ListValue": { + "fields": { + "values": { + "rule": "repeated", + "type": "Value", + "id": 1 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-cloud-video-stitcher/samples/README.md b/packages/google-cloud-video-stitcher/samples/README.md new file mode 100644 index 00000000000..23ba8a8cde1 --- /dev/null +++ b/packages/google-cloud-video-stitcher/samples/README.md @@ -0,0 +1,428 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Video Stitcher API: Node.js Samples](https://github.com/googleapis/google-cloud-node) + +[![Open in Cloud Shell][shell_img]][shell_link] + + + +## Table of Contents + +* [Before you begin](#before-you-begin) +* [Samples](#samples) + * [Video_stitcher_service.create_cdn_key](#video_stitcher_service.create_cdn_key) + * [Video_stitcher_service.create_live_session](#video_stitcher_service.create_live_session) + * [Video_stitcher_service.create_slate](#video_stitcher_service.create_slate) + * [Video_stitcher_service.create_vod_session](#video_stitcher_service.create_vod_session) + * [Video_stitcher_service.delete_cdn_key](#video_stitcher_service.delete_cdn_key) + * [Video_stitcher_service.delete_slate](#video_stitcher_service.delete_slate) + * [Video_stitcher_service.get_cdn_key](#video_stitcher_service.get_cdn_key) + * [Video_stitcher_service.get_live_ad_tag_detail](#video_stitcher_service.get_live_ad_tag_detail) + * [Video_stitcher_service.get_live_session](#video_stitcher_service.get_live_session) + * [Video_stitcher_service.get_slate](#video_stitcher_service.get_slate) + * [Video_stitcher_service.get_vod_ad_tag_detail](#video_stitcher_service.get_vod_ad_tag_detail) + * [Video_stitcher_service.get_vod_session](#video_stitcher_service.get_vod_session) + * [Video_stitcher_service.get_vod_stitch_detail](#video_stitcher_service.get_vod_stitch_detail) + * [Video_stitcher_service.list_cdn_keys](#video_stitcher_service.list_cdn_keys) + * [Video_stitcher_service.list_live_ad_tag_details](#video_stitcher_service.list_live_ad_tag_details) + * [Video_stitcher_service.list_slates](#video_stitcher_service.list_slates) + * [Video_stitcher_service.list_vod_ad_tag_details](#video_stitcher_service.list_vod_ad_tag_details) + * [Video_stitcher_service.list_vod_stitch_details](#video_stitcher_service.list_vod_stitch_details) + * [Video_stitcher_service.update_cdn_key](#video_stitcher_service.update_cdn_key) + * [Video_stitcher_service.update_slate](#video_stitcher_service.update_slate) + * [Quickstart](#quickstart) + * [Quickstart](#quickstart) + +## Before you begin + +Before running the samples, make sure you've followed the steps outlined in +[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library). + +`cd samples` + +`npm install` + +`cd ..` + +## Samples + + + +### Video_stitcher_service.create_cdn_key + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_cdn_key.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_cdn_key.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_cdn_key.js` + + +----- + + + + +### Video_stitcher_service.create_live_session + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_live_session.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_live_session.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_live_session.js` + + +----- + + + + +### Video_stitcher_service.create_slate + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_slate.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_slate.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_slate.js` + + +----- + + + + +### Video_stitcher_service.create_vod_session + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_vod_session.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_vod_session.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_vod_session.js` + + +----- + + + + +### Video_stitcher_service.delete_cdn_key + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_cdn_key.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_cdn_key.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_cdn_key.js` + + +----- + + + + +### Video_stitcher_service.delete_slate + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_slate.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_slate.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_slate.js` + + +----- + + + + +### Video_stitcher_service.get_cdn_key + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_cdn_key.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_cdn_key.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_cdn_key.js` + + +----- + + + + +### Video_stitcher_service.get_live_ad_tag_detail + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_ad_tag_detail.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_ad_tag_detail.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_ad_tag_detail.js` + + +----- + + + + +### Video_stitcher_service.get_live_session + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_session.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_session.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_session.js` + + +----- + + + + +### Video_stitcher_service.get_slate + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_slate.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_slate.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_slate.js` + + +----- + + + + +### Video_stitcher_service.get_vod_ad_tag_detail + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_ad_tag_detail.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_ad_tag_detail.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_ad_tag_detail.js` + + +----- + + + + +### Video_stitcher_service.get_vod_session + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_session.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_session.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_session.js` + + +----- + + + + +### Video_stitcher_service.get_vod_stitch_detail + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_stitch_detail.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_stitch_detail.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_stitch_detail.js` + + +----- + + + + +### Video_stitcher_service.list_cdn_keys + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_cdn_keys.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_cdn_keys.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_cdn_keys.js` + + +----- + + + + +### Video_stitcher_service.list_live_ad_tag_details + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_live_ad_tag_details.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_live_ad_tag_details.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_live_ad_tag_details.js` + + +----- + + + + +### Video_stitcher_service.list_slates + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_slates.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_slates.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_slates.js` + + +----- + + + + +### Video_stitcher_service.list_vod_ad_tag_details + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_ad_tag_details.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_ad_tag_details.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_ad_tag_details.js` + + +----- + + + + +### Video_stitcher_service.list_vod_stitch_details + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_stitch_details.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_stitch_details.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_stitch_details.js` + + +----- + + + + +### Video_stitcher_service.update_cdn_key + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_cdn_key.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_cdn_key.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_cdn_key.js` + + +----- + + + + +### Video_stitcher_service.update_slate + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_slate.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_slate.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_slate.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-stitcher/samples/quickstart.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-video-stitcher/samples/test/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-video-stitcher/samples/test/quickstart.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-video-stitcher/samples/test/quickstart.js` + + + + + + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=samples/README.md +[product-docs]: https://cloud.google.com/video-stitcher/ diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/snippet_metadata.google.cloud.video.stitcher.v1.json b/packages/google-cloud-video-stitcher/samples/generated/v1/snippet_metadata.google.cloud.video.stitcher.v1.json new file mode 100644 index 00000000000..4d0041bb0c7 --- /dev/null +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/snippet_metadata.google.cloud.video.stitcher.v1.json @@ -0,0 +1,903 @@ +{ + "clientLibrary": { + "name": "nodejs-stitcher", + "version": "0.3.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.video.stitcher.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "videostitcher_v1_generated_VideoStitcherService_CreateCdnKey_async", + "title": "VideoStitcherService createCdnKey Sample", + "origin": "API_DEFINITION", + "description": " Creates a new CDN key.", + "canonical": true, + "file": "video_stitcher_service.create_cdn_key.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateCdnKey", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.CreateCdnKey", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "cdn_key", + "type": ".google.cloud.video.stitcher.v1.CdnKey" + }, + { + "name": "cdn_key_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.video.stitcher.v1.CdnKey", + "client": { + "shortName": "VideoStitcherServiceClient", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherServiceClient" + }, + "method": { + "shortName": "CreateCdnKey", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.CreateCdnKey", + "service": { + "shortName": "VideoStitcherService", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + } + }, + { + "regionTag": "videostitcher_v1_generated_VideoStitcherService_ListCdnKeys_async", + "title": "VideoStitcherService listCdnKeys Sample", + "origin": "API_DEFINITION", + "description": " Lists all CDN keys in the specified project and location.", + "canonical": true, + "file": "video_stitcher_service.list_cdn_keys.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListCdnKeys", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.ListCdnKeys", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.video.stitcher.v1.ListCdnKeysResponse", + "client": { + "shortName": "VideoStitcherServiceClient", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherServiceClient" + }, + "method": { + "shortName": "ListCdnKeys", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.ListCdnKeys", + "service": { + "shortName": "VideoStitcherService", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + } + }, + { + "regionTag": "videostitcher_v1_generated_VideoStitcherService_GetCdnKey_async", + "title": "VideoStitcherService getCdnKey Sample", + "origin": "API_DEFINITION", + "description": " Returns the specified CDN key.", + "canonical": true, + "file": "video_stitcher_service.get_cdn_key.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCdnKey", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.GetCdnKey", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.video.stitcher.v1.CdnKey", + "client": { + "shortName": "VideoStitcherServiceClient", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherServiceClient" + }, + "method": { + "shortName": "GetCdnKey", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.GetCdnKey", + "service": { + "shortName": "VideoStitcherService", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + } + }, + { + "regionTag": "videostitcher_v1_generated_VideoStitcherService_DeleteCdnKey_async", + "title": "VideoStitcherService deleteCdnKey Sample", + "origin": "API_DEFINITION", + "description": " Deletes the specified CDN key.", + "canonical": true, + "file": "video_stitcher_service.delete_cdn_key.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteCdnKey", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.DeleteCdnKey", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "VideoStitcherServiceClient", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherServiceClient" + }, + "method": { + "shortName": "DeleteCdnKey", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.DeleteCdnKey", + "service": { + "shortName": "VideoStitcherService", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + } + }, + { + "regionTag": "videostitcher_v1_generated_VideoStitcherService_UpdateCdnKey_async", + "title": "VideoStitcherService updateCdnKey Sample", + "origin": "API_DEFINITION", + "description": " Updates the specified CDN key. Only update fields specified in the call method body.", + "canonical": true, + "file": "video_stitcher_service.update_cdn_key.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateCdnKey", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.UpdateCdnKey", + "async": true, + "parameters": [ + { + "name": "cdn_key", + "type": ".google.cloud.video.stitcher.v1.CdnKey" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.video.stitcher.v1.CdnKey", + "client": { + "shortName": "VideoStitcherServiceClient", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherServiceClient" + }, + "method": { + "shortName": "UpdateCdnKey", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.UpdateCdnKey", + "service": { + "shortName": "VideoStitcherService", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + } + }, + { + "regionTag": "videostitcher_v1_generated_VideoStitcherService_CreateVodSession_async", + "title": "VideoStitcherService createVodSession Sample", + "origin": "API_DEFINITION", + "description": " Creates a client side playback VOD session and returns the full tracking and playback metadata of the session.", + "canonical": true, + "file": "video_stitcher_service.create_vod_session.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateVodSession", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.CreateVodSession", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "vod_session", + "type": ".google.cloud.video.stitcher.v1.VodSession" + } + ], + "resultType": ".google.cloud.video.stitcher.v1.VodSession", + "client": { + "shortName": "VideoStitcherServiceClient", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherServiceClient" + }, + "method": { + "shortName": "CreateVodSession", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.CreateVodSession", + "service": { + "shortName": "VideoStitcherService", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + } + }, + { + "regionTag": "videostitcher_v1_generated_VideoStitcherService_GetVodSession_async", + "title": "VideoStitcherService getVodSession Sample", + "origin": "API_DEFINITION", + "description": " Returns the full tracking, playback metadata, and relevant ad-ops logs for the specified VOD session.", + "canonical": true, + "file": "video_stitcher_service.get_vod_session.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetVodSession", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.GetVodSession", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.video.stitcher.v1.VodSession", + "client": { + "shortName": "VideoStitcherServiceClient", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherServiceClient" + }, + "method": { + "shortName": "GetVodSession", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.GetVodSession", + "service": { + "shortName": "VideoStitcherService", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + } + }, + { + "regionTag": "videostitcher_v1_generated_VideoStitcherService_ListVodStitchDetails_async", + "title": "VideoStitcherService listVodStitchDetails Sample", + "origin": "API_DEFINITION", + "description": " Returns a list of detailed stitching information of the specified VOD session.", + "canonical": true, + "file": "video_stitcher_service.list_vod_stitch_details.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListVodStitchDetails", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.ListVodStitchDetails", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse", + "client": { + "shortName": "VideoStitcherServiceClient", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherServiceClient" + }, + "method": { + "shortName": "ListVodStitchDetails", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.ListVodStitchDetails", + "service": { + "shortName": "VideoStitcherService", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + } + }, + { + "regionTag": "videostitcher_v1_generated_VideoStitcherService_GetVodStitchDetail_async", + "title": "VideoStitcherService getVodStitchDetail Sample", + "origin": "API_DEFINITION", + "description": " Returns the specified stitching information for the specified VOD session.", + "canonical": true, + "file": "video_stitcher_service.get_vod_stitch_detail.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetVodStitchDetail", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.GetVodStitchDetail", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.video.stitcher.v1.VodStitchDetail", + "client": { + "shortName": "VideoStitcherServiceClient", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherServiceClient" + }, + "method": { + "shortName": "GetVodStitchDetail", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.GetVodStitchDetail", + "service": { + "shortName": "VideoStitcherService", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + } + }, + { + "regionTag": "videostitcher_v1_generated_VideoStitcherService_ListVodAdTagDetails_async", + "title": "VideoStitcherService listVodAdTagDetails Sample", + "origin": "API_DEFINITION", + "description": " Return the list of ad tag details for the specified VOD session.", + "canonical": true, + "file": "video_stitcher_service.list_vod_ad_tag_details.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListVodAdTagDetails", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.ListVodAdTagDetails", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse", + "client": { + "shortName": "VideoStitcherServiceClient", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherServiceClient" + }, + "method": { + "shortName": "ListVodAdTagDetails", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.ListVodAdTagDetails", + "service": { + "shortName": "VideoStitcherService", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + } + }, + { + "regionTag": "videostitcher_v1_generated_VideoStitcherService_GetVodAdTagDetail_async", + "title": "VideoStitcherService getVodAdTagDetail Sample", + "origin": "API_DEFINITION", + "description": " Returns the specified ad tag detail for the specified VOD session.", + "canonical": true, + "file": "video_stitcher_service.get_vod_ad_tag_detail.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetVodAdTagDetail", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.GetVodAdTagDetail", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.video.stitcher.v1.VodAdTagDetail", + "client": { + "shortName": "VideoStitcherServiceClient", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherServiceClient" + }, + "method": { + "shortName": "GetVodAdTagDetail", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.GetVodAdTagDetail", + "service": { + "shortName": "VideoStitcherService", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + } + }, + { + "regionTag": "videostitcher_v1_generated_VideoStitcherService_ListLiveAdTagDetails_async", + "title": "VideoStitcherService listLiveAdTagDetails Sample", + "origin": "API_DEFINITION", + "description": " Return the list of ad tag details for the specified live session.", + "canonical": true, + "file": "video_stitcher_service.list_live_ad_tag_details.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListLiveAdTagDetails", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.ListLiveAdTagDetails", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse", + "client": { + "shortName": "VideoStitcherServiceClient", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherServiceClient" + }, + "method": { + "shortName": "ListLiveAdTagDetails", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.ListLiveAdTagDetails", + "service": { + "shortName": "VideoStitcherService", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + } + }, + { + "regionTag": "videostitcher_v1_generated_VideoStitcherService_GetLiveAdTagDetail_async", + "title": "VideoStitcherService getLiveAdTagDetail Sample", + "origin": "API_DEFINITION", + "description": " Returns the specified ad tag detail for the specified live session.", + "canonical": true, + "file": "video_stitcher_service.get_live_ad_tag_detail.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetLiveAdTagDetail", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.GetLiveAdTagDetail", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.video.stitcher.v1.LiveAdTagDetail", + "client": { + "shortName": "VideoStitcherServiceClient", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherServiceClient" + }, + "method": { + "shortName": "GetLiveAdTagDetail", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.GetLiveAdTagDetail", + "service": { + "shortName": "VideoStitcherService", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + } + }, + { + "regionTag": "videostitcher_v1_generated_VideoStitcherService_CreateSlate_async", + "title": "VideoStitcherService createSlate Sample", + "origin": "API_DEFINITION", + "description": " Creates a slate.", + "canonical": true, + "file": "video_stitcher_service.create_slate.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateSlate", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.CreateSlate", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "slate_id", + "type": "TYPE_STRING" + }, + { + "name": "slate", + "type": ".google.cloud.video.stitcher.v1.Slate" + } + ], + "resultType": ".google.cloud.video.stitcher.v1.Slate", + "client": { + "shortName": "VideoStitcherServiceClient", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherServiceClient" + }, + "method": { + "shortName": "CreateSlate", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.CreateSlate", + "service": { + "shortName": "VideoStitcherService", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + } + }, + { + "regionTag": "videostitcher_v1_generated_VideoStitcherService_ListSlates_async", + "title": "VideoStitcherService listSlates Sample", + "origin": "API_DEFINITION", + "description": " Lists all slates in the specified project and location.", + "canonical": true, + "file": "video_stitcher_service.list_slates.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListSlates", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.ListSlates", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.video.stitcher.v1.ListSlatesResponse", + "client": { + "shortName": "VideoStitcherServiceClient", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherServiceClient" + }, + "method": { + "shortName": "ListSlates", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.ListSlates", + "service": { + "shortName": "VideoStitcherService", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + } + }, + { + "regionTag": "videostitcher_v1_generated_VideoStitcherService_GetSlate_async", + "title": "VideoStitcherService getSlate Sample", + "origin": "API_DEFINITION", + "description": " Returns the specified slate.", + "canonical": true, + "file": "video_stitcher_service.get_slate.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetSlate", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.GetSlate", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.video.stitcher.v1.Slate", + "client": { + "shortName": "VideoStitcherServiceClient", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherServiceClient" + }, + "method": { + "shortName": "GetSlate", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.GetSlate", + "service": { + "shortName": "VideoStitcherService", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + } + }, + { + "regionTag": "videostitcher_v1_generated_VideoStitcherService_UpdateSlate_async", + "title": "VideoStitcherService updateSlate Sample", + "origin": "API_DEFINITION", + "description": " Updates the specified slate.", + "canonical": true, + "file": "video_stitcher_service.update_slate.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateSlate", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.UpdateSlate", + "async": true, + "parameters": [ + { + "name": "slate", + "type": ".google.cloud.video.stitcher.v1.Slate" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.video.stitcher.v1.Slate", + "client": { + "shortName": "VideoStitcherServiceClient", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherServiceClient" + }, + "method": { + "shortName": "UpdateSlate", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.UpdateSlate", + "service": { + "shortName": "VideoStitcherService", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + } + }, + { + "regionTag": "videostitcher_v1_generated_VideoStitcherService_DeleteSlate_async", + "title": "VideoStitcherService deleteSlate Sample", + "origin": "API_DEFINITION", + "description": " Deletes the specified slate.", + "canonical": true, + "file": "video_stitcher_service.delete_slate.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteSlate", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.DeleteSlate", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "VideoStitcherServiceClient", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherServiceClient" + }, + "method": { + "shortName": "DeleteSlate", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.DeleteSlate", + "service": { + "shortName": "VideoStitcherService", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + } + }, + { + "regionTag": "videostitcher_v1_generated_VideoStitcherService_CreateLiveSession_async", + "title": "VideoStitcherService createLiveSession Sample", + "origin": "API_DEFINITION", + "description": " Creates a new live session.", + "canonical": true, + "file": "video_stitcher_service.create_live_session.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateLiveSession", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.CreateLiveSession", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "live_session", + "type": ".google.cloud.video.stitcher.v1.LiveSession" + } + ], + "resultType": ".google.cloud.video.stitcher.v1.LiveSession", + "client": { + "shortName": "VideoStitcherServiceClient", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherServiceClient" + }, + "method": { + "shortName": "CreateLiveSession", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.CreateLiveSession", + "service": { + "shortName": "VideoStitcherService", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + } + }, + { + "regionTag": "videostitcher_v1_generated_VideoStitcherService_GetLiveSession_async", + "title": "VideoStitcherService getLiveSession Sample", + "origin": "API_DEFINITION", + "description": " Returns the details for the specified live session.", + "canonical": true, + "file": "video_stitcher_service.get_live_session.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetLiveSession", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.GetLiveSession", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.video.stitcher.v1.LiveSession", + "client": { + "shortName": "VideoStitcherServiceClient", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherServiceClient" + }, + "method": { + "shortName": "GetLiveSession", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService.GetLiveSession", + "service": { + "shortName": "VideoStitcherService", + "fullName": "google.cloud.video.stitcher.v1.VideoStitcherService" + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_cdn_key.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_cdn_key.js new file mode 100644 index 00000000000..0f04829cd4a --- /dev/null +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_cdn_key.js @@ -0,0 +1,76 @@ +// 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'; + +function main(parent, cdnKey, cdnKeyId) { + // [START videostitcher_v1_generated_VideoStitcherService_CreateCdnKey_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project in which the CDN key should be created, in the form of + * `projects/{project_number}/locations/{location}`. + */ + // const parent = 'abc123' + /** + * Required. The CDN key resource to create. + */ + // const cdnKey = {} + /** + * Required. The ID to use for the CDN key, which will become the final component of + * the CDN key's resource name. + * This value should conform to RFC-1034, which restricts to + * lower-case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + */ + // const cdnKeyId = 'abc123' + + // Imports the Stitcher library + const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1; + + // Instantiates a client + const stitcherClient = new VideoStitcherServiceClient(); + + async function callCreateCdnKey() { + // Construct request + const request = { + parent, + cdnKey, + cdnKeyId, + }; + + // Run request + const response = await stitcherClient.createCdnKey(request); + console.log(response); + } + + callCreateCdnKey(); + // [END videostitcher_v1_generated_VideoStitcherService_CreateCdnKey_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_live_session.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_live_session.js new file mode 100644 index 00000000000..e1328d4b0b5 --- /dev/null +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_live_session.js @@ -0,0 +1,67 @@ +// 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'; + +function main(parent, liveSession) { + // [START videostitcher_v1_generated_VideoStitcherService_CreateLiveSession_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location in which the live session should be created, + * in the form of `projects/{project_number}/locations/{location}`. + */ + // const parent = 'abc123' + /** + * Required. Parameters for creating a live session. + */ + // const liveSession = {} + + // Imports the Stitcher library + const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1; + + // Instantiates a client + const stitcherClient = new VideoStitcherServiceClient(); + + async function callCreateLiveSession() { + // Construct request + const request = { + parent, + liveSession, + }; + + // Run request + const response = await stitcherClient.createLiveSession(request); + console.log(response); + } + + callCreateLiveSession(); + // [END videostitcher_v1_generated_VideoStitcherService_CreateLiveSession_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_slate.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_slate.js new file mode 100644 index 00000000000..2913b36a683 --- /dev/null +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_slate.js @@ -0,0 +1,75 @@ +// 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'; + +function main(parent, slateId, slate) { + // [START videostitcher_v1_generated_VideoStitcherService_CreateSlate_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project in which the slate should be created, in the form of + * `projects/{project_number}`. + */ + // const parent = 'abc123' + /** + * Required. The unique identifier for the slate. + * This value should conform to RFC-1034, which restricts to + * lower-case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + */ + // const slateId = 'abc123' + /** + * Required. The slate to create. + */ + // const slate = {} + + // Imports the Stitcher library + const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1; + + // Instantiates a client + const stitcherClient = new VideoStitcherServiceClient(); + + async function callCreateSlate() { + // Construct request + const request = { + parent, + slateId, + slate, + }; + + // Run request + const response = await stitcherClient.createSlate(request); + console.log(response); + } + + callCreateSlate(); + // [END videostitcher_v1_generated_VideoStitcherService_CreateSlate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_vod_session.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_vod_session.js new file mode 100644 index 00000000000..e5d42ead0bb --- /dev/null +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.create_vod_session.js @@ -0,0 +1,67 @@ +// 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'; + +function main(parent, vodSession) { + // [START videostitcher_v1_generated_VideoStitcherService_CreateVodSession_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location in which the VOD session should be created, in the + * form of `projects/{project_number}/locations/{location}`. + */ + // const parent = 'abc123' + /** + * Required. Parameters for creating a session. + */ + // const vodSession = {} + + // Imports the Stitcher library + const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1; + + // Instantiates a client + const stitcherClient = new VideoStitcherServiceClient(); + + async function callCreateVodSession() { + // Construct request + const request = { + parent, + vodSession, + }; + + // Run request + const response = await stitcherClient.createVodSession(request); + console.log(response); + } + + callCreateVodSession(); + // [END videostitcher_v1_generated_VideoStitcherService_CreateVodSession_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_cdn_key.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_cdn_key.js new file mode 100644 index 00000000000..b4d1e0ad495 --- /dev/null +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_cdn_key.js @@ -0,0 +1,62 @@ +// 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'; + +function main(name) { + // [START videostitcher_v1_generated_VideoStitcherService_DeleteCdnKey_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the CDN key to be deleted, in the form of + * `projects/{project_number}/locations/{location}/cdnKeys/{id}`. + */ + // const name = 'abc123' + + // Imports the Stitcher library + const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1; + + // Instantiates a client + const stitcherClient = new VideoStitcherServiceClient(); + + async function callDeleteCdnKey() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await stitcherClient.deleteCdnKey(request); + console.log(response); + } + + callDeleteCdnKey(); + // [END videostitcher_v1_generated_VideoStitcherService_DeleteCdnKey_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_slate.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_slate.js new file mode 100644 index 00000000000..b57f5974298 --- /dev/null +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.delete_slate.js @@ -0,0 +1,62 @@ +// 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'; + +function main(name) { + // [START videostitcher_v1_generated_VideoStitcherService_DeleteSlate_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the slate to be deleted, in the form of + * `projects/{project_number}/locations/{location}/slates/{id}`. + */ + // const name = 'abc123' + + // Imports the Stitcher library + const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1; + + // Instantiates a client + const stitcherClient = new VideoStitcherServiceClient(); + + async function callDeleteSlate() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await stitcherClient.deleteSlate(request); + console.log(response); + } + + callDeleteSlate(); + // [END videostitcher_v1_generated_VideoStitcherService_DeleteSlate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_cdn_key.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_cdn_key.js new file mode 100644 index 00000000000..4891bc0c8f7 --- /dev/null +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_cdn_key.js @@ -0,0 +1,62 @@ +// 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'; + +function main(name) { + // [START videostitcher_v1_generated_VideoStitcherService_GetCdnKey_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the CDN key to be retrieved, in the form of + * `projects/{project}/locations/{location}/cdnKeys/{id}`. + */ + // const name = 'abc123' + + // Imports the Stitcher library + const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1; + + // Instantiates a client + const stitcherClient = new VideoStitcherServiceClient(); + + async function callGetCdnKey() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await stitcherClient.getCdnKey(request); + console.log(response); + } + + callGetCdnKey(); + // [END videostitcher_v1_generated_VideoStitcherService_GetCdnKey_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_ad_tag_detail.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_ad_tag_detail.js new file mode 100644 index 00000000000..3adaca9fb5b --- /dev/null +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_ad_tag_detail.js @@ -0,0 +1,62 @@ +// 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'; + +function main(name) { + // [START videostitcher_v1_generated_VideoStitcherService_GetLiveAdTagDetail_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. + */ + // const name = 'abc123' + + // Imports the Stitcher library + const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1; + + // Instantiates a client + const stitcherClient = new VideoStitcherServiceClient(); + + async function callGetLiveAdTagDetail() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await stitcherClient.getLiveAdTagDetail(request); + console.log(response); + } + + callGetLiveAdTagDetail(); + // [END videostitcher_v1_generated_VideoStitcherService_GetLiveAdTagDetail_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_session.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_session.js new file mode 100644 index 00000000000..39191cca2d6 --- /dev/null +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_live_session.js @@ -0,0 +1,62 @@ +// 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'; + +function main(name) { + // [START videostitcher_v1_generated_VideoStitcherService_GetLiveSession_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the live session, in the form of + * `projects/{project_number}/locations/{location}/liveSessions/{id}`. + */ + // const name = 'abc123' + + // Imports the Stitcher library + const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1; + + // Instantiates a client + const stitcherClient = new VideoStitcherServiceClient(); + + async function callGetLiveSession() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await stitcherClient.getLiveSession(request); + console.log(response); + } + + callGetLiveSession(); + // [END videostitcher_v1_generated_VideoStitcherService_GetLiveSession_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_slate.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_slate.js new file mode 100644 index 00000000000..667e1272aac --- /dev/null +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_slate.js @@ -0,0 +1,62 @@ +// 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'; + +function main(name) { + // [START videostitcher_v1_generated_VideoStitcherService_GetSlate_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the slate to be retrieved, of the slate, in the form of + * `projects/{project_number}/locations/{location}/slates/{id}`. + */ + // const name = 'abc123' + + // Imports the Stitcher library + const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1; + + // Instantiates a client + const stitcherClient = new VideoStitcherServiceClient(); + + async function callGetSlate() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await stitcherClient.getSlate(request); + console.log(response); + } + + callGetSlate(); + // [END videostitcher_v1_generated_VideoStitcherService_GetSlate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_ad_tag_detail.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_ad_tag_detail.js new file mode 100644 index 00000000000..c7f650633be --- /dev/null +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_ad_tag_detail.js @@ -0,0 +1,62 @@ +// 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'; + +function main(name) { + // [START videostitcher_v1_generated_VideoStitcherService_GetVodAdTagDetail_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the ad tag detail for the specified VOD session, in the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. + */ + // const name = 'abc123' + + // Imports the Stitcher library + const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1; + + // Instantiates a client + const stitcherClient = new VideoStitcherServiceClient(); + + async function callGetVodAdTagDetail() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await stitcherClient.getVodAdTagDetail(request); + console.log(response); + } + + callGetVodAdTagDetail(); + // [END videostitcher_v1_generated_VideoStitcherService_GetVodAdTagDetail_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_session.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_session.js new file mode 100644 index 00000000000..bf4b3825d5a --- /dev/null +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_session.js @@ -0,0 +1,62 @@ +// 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'; + +function main(name) { + // [START videostitcher_v1_generated_VideoStitcherService_GetVodSession_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the VOD session to be retrieved, in the form of + * `projects/{project_number}/locations/{location}/vodSessions/{id}`. + */ + // const name = 'abc123' + + // Imports the Stitcher library + const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1; + + // Instantiates a client + const stitcherClient = new VideoStitcherServiceClient(); + + async function callGetVodSession() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await stitcherClient.getVodSession(request); + console.log(response); + } + + callGetVodSession(); + // [END videostitcher_v1_generated_VideoStitcherService_GetVodSession_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_stitch_detail.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_stitch_detail.js new file mode 100644 index 00000000000..53530102db7 --- /dev/null +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.get_vod_stitch_detail.js @@ -0,0 +1,62 @@ +// 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'; + +function main(name) { + // [START videostitcher_v1_generated_VideoStitcherService_GetVodStitchDetail_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the stitch detail in the specified VOD session, in the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. + */ + // const name = 'abc123' + + // Imports the Stitcher library + const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1; + + // Instantiates a client + const stitcherClient = new VideoStitcherServiceClient(); + + async function callGetVodStitchDetail() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await stitcherClient.getVodStitchDetail(request); + console.log(response); + } + + callGetVodStitchDetail(); + // [END videostitcher_v1_generated_VideoStitcherService_GetVodStitchDetail_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_cdn_keys.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_cdn_keys.js new file mode 100644 index 00000000000..e147b822541 --- /dev/null +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_cdn_keys.js @@ -0,0 +1,81 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START videostitcher_v1_generated_VideoStitcherService_ListCdnKeys_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project that contains the list of CDN keys, in the form of + * `projects/{project_number}/locations/{location}`. + */ + // const parent = 'abc123' + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Filtering results + */ + // const filter = 'abc123' + /** + * Hint for how to order the results + */ + // const orderBy = 'abc123' + + // Imports the Stitcher library + const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1; + + // Instantiates a client + const stitcherClient = new VideoStitcherServiceClient(); + + async function callListCdnKeys() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await stitcherClient.listCdnKeysAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListCdnKeys(); + // [END videostitcher_v1_generated_VideoStitcherService_ListCdnKeys_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_live_ad_tag_details.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_live_ad_tag_details.js new file mode 100644 index 00000000000..6d8017fecf8 --- /dev/null +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_live_ad_tag_details.js @@ -0,0 +1,72 @@ +// 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'; + +function main(parent) { + // [START videostitcher_v1_generated_VideoStitcherService_ListLiveAdTagDetails_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource parent in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}`. + */ + // const parent = 'abc123' + /** + * The maximum number of items to return. + */ + // const pageSize = 1234 + /** + * The pagination token returned from a previous List request. + */ + // const pageToken = 'abc123' + + // Imports the Stitcher library + const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1; + + // Instantiates a client + const stitcherClient = new VideoStitcherServiceClient(); + + async function callListLiveAdTagDetails() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await stitcherClient.listLiveAdTagDetailsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListLiveAdTagDetails(); + // [END videostitcher_v1_generated_VideoStitcherService_ListLiveAdTagDetails_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_slates.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_slates.js new file mode 100644 index 00000000000..162e46a607c --- /dev/null +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_slates.js @@ -0,0 +1,80 @@ +// 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'; + +function main(parent) { + // [START videostitcher_v1_generated_VideoStitcherService_ListSlates_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project to list slates, in the form of `projects/{project_number}`. + */ + // const parent = 'abc123' + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Filtering results + */ + // const filter = 'abc123' + /** + * Hint for how to order the results + */ + // const orderBy = 'abc123' + + // Imports the Stitcher library + const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1; + + // Instantiates a client + const stitcherClient = new VideoStitcherServiceClient(); + + async function callListSlates() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await stitcherClient.listSlatesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListSlates(); + // [END videostitcher_v1_generated_VideoStitcherService_ListSlates_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_ad_tag_details.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_ad_tag_details.js new file mode 100644 index 00000000000..6a56e6df649 --- /dev/null +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_ad_tag_details.js @@ -0,0 +1,72 @@ +// 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'; + +function main(parent) { + // [START videostitcher_v1_generated_VideoStitcherService_ListVodAdTagDetails_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The VOD session which the ad tag details belong to, in the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. + */ + // const parent = 'abc123' + /** + * The maximum number of items to return. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous List request, if any. + */ + // const pageToken = 'abc123' + + // Imports the Stitcher library + const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1; + + // Instantiates a client + const stitcherClient = new VideoStitcherServiceClient(); + + async function callListVodAdTagDetails() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await stitcherClient.listVodAdTagDetailsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListVodAdTagDetails(); + // [END videostitcher_v1_generated_VideoStitcherService_ListVodAdTagDetails_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_stitch_details.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_stitch_details.js new file mode 100644 index 00000000000..6141171a9cf --- /dev/null +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.list_vod_stitch_details.js @@ -0,0 +1,72 @@ +// 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'; + +function main(parent) { + // [START videostitcher_v1_generated_VideoStitcherService_ListVodStitchDetails_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The VOD session where the stitch details belong to, in the form of + * `projects/{project}/locations/{location}/vodSessions/{id}`. + */ + // const parent = 'abc123' + /** + * The maximum number of items to return. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous List request, if any. + */ + // const pageToken = 'abc123' + + // Imports the Stitcher library + const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1; + + // Instantiates a client + const stitcherClient = new VideoStitcherServiceClient(); + + async function callListVodStitchDetails() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await stitcherClient.listVodStitchDetailsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListVodStitchDetails(); + // [END videostitcher_v1_generated_VideoStitcherService_ListVodStitchDetails_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_cdn_key.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_cdn_key.js new file mode 100644 index 00000000000..fd70c4f87d3 --- /dev/null +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_cdn_key.js @@ -0,0 +1,68 @@ +// 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'; + +function main(cdnKey, updateMask) { + // [START videostitcher_v1_generated_VideoStitcherService_UpdateCdnKey_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The CDN key resource which replaces the resource on the server. + */ + // const cdnKey = {} + /** + * Required. The update mask applies to the resource. + * For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + */ + // const updateMask = {} + + // Imports the Stitcher library + const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1; + + // Instantiates a client + const stitcherClient = new VideoStitcherServiceClient(); + + async function callUpdateCdnKey() { + // Construct request + const request = { + cdnKey, + updateMask, + }; + + // Run request + const response = await stitcherClient.updateCdnKey(request); + console.log(response); + } + + callUpdateCdnKey(); + // [END videostitcher_v1_generated_VideoStitcherService_UpdateCdnKey_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_slate.js b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_slate.js new file mode 100644 index 00000000000..8e2474732ab --- /dev/null +++ b/packages/google-cloud-video-stitcher/samples/generated/v1/video_stitcher_service.update_slate.js @@ -0,0 +1,66 @@ +// 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'; + +function main(slate, updateMask) { + // [START videostitcher_v1_generated_VideoStitcherService_UpdateSlate_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource with updated fields. + */ + // const slate = {} + /** + * Required. The update mask which specifies fields which should be updated. + */ + // const updateMask = {} + + // Imports the Stitcher library + const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1; + + // Instantiates a client + const stitcherClient = new VideoStitcherServiceClient(); + + async function callUpdateSlate() { + // Construct request + const request = { + slate, + updateMask, + }; + + // Run request + const response = await stitcherClient.updateSlate(request); + console.log(response); + } + + callUpdateSlate(); + // [END videostitcher_v1_generated_VideoStitcherService_UpdateSlate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-stitcher/samples/package.json b/packages/google-cloud-video-stitcher/samples/package.json new file mode 100644 index 00000000000..cbb42837213 --- /dev/null +++ b/packages/google-cloud-video-stitcher/samples/package.json @@ -0,0 +1,23 @@ +{ + "name": "nodejs-video-stitcher", + "private": true, + "license": "Apache-2.0", + "author": "Google LLC", + "engines": { + "node": ">=10" + }, + "files": [ + "*.js" + ], + "scripts": { + "test": "c8 mocha --timeout 600000 test/*.js" + }, + "dependencies": { + "@google-cloud/video-stitcher": "^0.3.0" + }, + "devDependencies": { + "c8": "^7.1.0", + "chai": "^4.2.0", + "mocha": "^8.0.0" + } +} diff --git a/packages/google-cloud-video-stitcher/samples/quickstart.js b/packages/google-cloud-video-stitcher/samples/quickstart.js new file mode 100644 index 00000000000..3f07eb51655 --- /dev/null +++ b/packages/google-cloud-video-stitcher/samples/quickstart.js @@ -0,0 +1,78 @@ +// 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'; + +function main(parent) { + // [START videostitcher_v1_generated_VideoStitcherService_ListCdnKeys_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project that contains the list of CDN keys, in the form of + * `projects/{project_number}/locations/{location}`. + */ + // const parent = 'abc123' + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Filtering results + */ + // const filter = 'abc123' + /** + * Hint for how to order the results + */ + // const orderBy = 'abc123' + + // Imports the Stitcher library + const {VideoStitcherServiceClient} = + require('@google-cloud/video-stitcher').v1; + + // Instantiates a client + const stitcherClient = new VideoStitcherServiceClient(); + + async function callListCdnKeys() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await stitcherClient.listCdnKeysAsync(request); + for await (const response of iterable) { + console.log(response); + } + console.log(iterable); + } + + callListCdnKeys(); + // [END videostitcher_v1_generated_VideoStitcherService_ListCdnKeys_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-stitcher/samples/test/quickstart.js b/packages/google-cloud-video-stitcher/samples/test/quickstart.js new file mode 100644 index 00000000000..073e774bc3a --- /dev/null +++ b/packages/google-cloud-video-stitcher/samples/test/quickstart.js @@ -0,0 +1,50 @@ +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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'; + +const path = require('path'); +const cp = require('child_process'); +const {before, describe, it} = require('mocha'); +// eslint-disable-next-line node/no-missing-require +const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher'); +// eslint-disable-next-line no-unused-vars, node/no-missing-require +const {assert} = require('chai'); + +const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); + +const cwd = path.join(__dirname, '..'); + +const client = new VideoStitcherServiceClient(); + +describe('Quickstart', () => { + // eslint-disable-next-line no-unused-vars + let projectId; + + before(async () => { + // eslint-disable-next-line no-unused-vars + projectId = await client.getProjectId(); + }); + + it('should run quickstart', async () => { + const stdout = execSync( + `node ./quickstart.js projects/${projectId}/locations/us-central1`, + {cwd} + ); + assert(stdout, stdout !== null); + }); +}); diff --git a/packages/google-cloud-video-stitcher/src/index.ts b/packages/google-cloud-video-stitcher/src/index.ts new file mode 100644 index 00000000000..547a1b9743b --- /dev/null +++ b/packages/google-cloud-video-stitcher/src/index.ts @@ -0,0 +1,27 @@ +// 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 synthtool. ** +// ** https://github.com/googleapis/synthtool ** +// ** All changes to this file may be overwritten. ** + +import * as v1 from './v1'; + +const VideoStitcherServiceClient = v1.VideoStitcherServiceClient; +type VideoStitcherServiceClient = v1.VideoStitcherServiceClient; + +export {v1, VideoStitcherServiceClient}; +export default {v1, VideoStitcherServiceClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-cloud-video-stitcher/src/v1/gapic_metadata.json b/packages/google-cloud-video-stitcher/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..6af8b697956 --- /dev/null +++ b/packages/google-cloud-video-stitcher/src/v1/gapic_metadata.json @@ -0,0 +1,243 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.video.stitcher.v1", + "libraryPackage": "@google-cloud/video-stitcher", + "services": { + "VideoStitcherService": { + "clients": { + "grpc": { + "libraryClient": "VideoStitcherServiceClient", + "rpcs": { + "CreateCdnKey": { + "methods": [ + "createCdnKey" + ] + }, + "GetCdnKey": { + "methods": [ + "getCdnKey" + ] + }, + "DeleteCdnKey": { + "methods": [ + "deleteCdnKey" + ] + }, + "UpdateCdnKey": { + "methods": [ + "updateCdnKey" + ] + }, + "CreateVodSession": { + "methods": [ + "createVodSession" + ] + }, + "GetVodSession": { + "methods": [ + "getVodSession" + ] + }, + "GetVodStitchDetail": { + "methods": [ + "getVodStitchDetail" + ] + }, + "GetVodAdTagDetail": { + "methods": [ + "getVodAdTagDetail" + ] + }, + "GetLiveAdTagDetail": { + "methods": [ + "getLiveAdTagDetail" + ] + }, + "CreateSlate": { + "methods": [ + "createSlate" + ] + }, + "GetSlate": { + "methods": [ + "getSlate" + ] + }, + "UpdateSlate": { + "methods": [ + "updateSlate" + ] + }, + "DeleteSlate": { + "methods": [ + "deleteSlate" + ] + }, + "CreateLiveSession": { + "methods": [ + "createLiveSession" + ] + }, + "GetLiveSession": { + "methods": [ + "getLiveSession" + ] + }, + "ListCdnKeys": { + "methods": [ + "listCdnKeys", + "listCdnKeysStream", + "listCdnKeysAsync" + ] + }, + "ListVodStitchDetails": { + "methods": [ + "listVodStitchDetails", + "listVodStitchDetailsStream", + "listVodStitchDetailsAsync" + ] + }, + "ListVodAdTagDetails": { + "methods": [ + "listVodAdTagDetails", + "listVodAdTagDetailsStream", + "listVodAdTagDetailsAsync" + ] + }, + "ListLiveAdTagDetails": { + "methods": [ + "listLiveAdTagDetails", + "listLiveAdTagDetailsStream", + "listLiveAdTagDetailsAsync" + ] + }, + "ListSlates": { + "methods": [ + "listSlates", + "listSlatesStream", + "listSlatesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "VideoStitcherServiceClient", + "rpcs": { + "CreateCdnKey": { + "methods": [ + "createCdnKey" + ] + }, + "GetCdnKey": { + "methods": [ + "getCdnKey" + ] + }, + "DeleteCdnKey": { + "methods": [ + "deleteCdnKey" + ] + }, + "UpdateCdnKey": { + "methods": [ + "updateCdnKey" + ] + }, + "CreateVodSession": { + "methods": [ + "createVodSession" + ] + }, + "GetVodSession": { + "methods": [ + "getVodSession" + ] + }, + "GetVodStitchDetail": { + "methods": [ + "getVodStitchDetail" + ] + }, + "GetVodAdTagDetail": { + "methods": [ + "getVodAdTagDetail" + ] + }, + "GetLiveAdTagDetail": { + "methods": [ + "getLiveAdTagDetail" + ] + }, + "CreateSlate": { + "methods": [ + "createSlate" + ] + }, + "GetSlate": { + "methods": [ + "getSlate" + ] + }, + "UpdateSlate": { + "methods": [ + "updateSlate" + ] + }, + "DeleteSlate": { + "methods": [ + "deleteSlate" + ] + }, + "CreateLiveSession": { + "methods": [ + "createLiveSession" + ] + }, + "GetLiveSession": { + "methods": [ + "getLiveSession" + ] + }, + "ListCdnKeys": { + "methods": [ + "listCdnKeys", + "listCdnKeysStream", + "listCdnKeysAsync" + ] + }, + "ListVodStitchDetails": { + "methods": [ + "listVodStitchDetails", + "listVodStitchDetailsStream", + "listVodStitchDetailsAsync" + ] + }, + "ListVodAdTagDetails": { + "methods": [ + "listVodAdTagDetails", + "listVodAdTagDetailsStream", + "listVodAdTagDetailsAsync" + ] + }, + "ListLiveAdTagDetails": { + "methods": [ + "listLiveAdTagDetails", + "listLiveAdTagDetailsStream", + "listLiveAdTagDetailsAsync" + ] + }, + "ListSlates": { + "methods": [ + "listSlates", + "listSlatesStream", + "listSlatesAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-video-stitcher/src/v1/index.ts b/packages/google-cloud-video-stitcher/src/v1/index.ts new file mode 100644 index 00000000000..316607a88f7 --- /dev/null +++ b/packages/google-cloud-video-stitcher/src/v1/index.ts @@ -0,0 +1,19 @@ +// 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. ** + +export {VideoStitcherServiceClient} from './video_stitcher_service_client'; diff --git a/packages/google-cloud-video-stitcher/src/v1/video_stitcher_service_client.ts b/packages/google-cloud-video-stitcher/src/v1/video_stitcher_service_client.ts new file mode 100644 index 00000000000..3b513585f59 --- /dev/null +++ b/packages/google-cloud-video-stitcher/src/v1/video_stitcher_service_client.ts @@ -0,0 +1,3324 @@ +// 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. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + GaxCall, +} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/video_stitcher_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './video_stitcher_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Video-On-Demand content stitching API allows you to insert ads + * into (VoD) video on demand files. You will be able to render custom + * scrubber bars with highlighted ads, enforce ad policies, allow + * seamless playback and tracking on native players and monetize + * content with any standard VMAP compliant ad server. + * @class + * @memberof v1 + */ +export class VideoStitcherServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + videoStitcherServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of VideoStitcherServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new VideoStitcherServiceClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof VideoStitcherServiceClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + cdnKeyPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/cdnKeys/{cdn_key}' + ), + liveAdTagDetailPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}' + ), + liveSessionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/liveSessions/{live_session}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + slatePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/slates/{slate}' + ), + vodAdTagDetailPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/vodSessions/{vod_session}/vodAdTagDetails/{vod_ad_tag_detail}' + ), + vodSessionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/vodSessions/{vod_session}' + ), + vodStitchDetailPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/vodSessions/{vod_session}/vodStitchDetails/{vod_stitch_detail}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listCdnKeys: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'cdnKeys' + ), + listVodStitchDetails: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'vodStitchDetails' + ), + listVodAdTagDetails: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'vodAdTagDetails' + ), + listLiveAdTagDetails: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'liveAdTagDetails' + ), + listSlates: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'slates' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.video.stitcher.v1.VideoStitcherService', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.videoStitcherServiceStub) { + return this.videoStitcherServiceStub; + } + + // Put together the "service stub" for + // google.cloud.video.stitcher.v1.VideoStitcherService. + this.videoStitcherServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.video.stitcher.v1.VideoStitcherService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.video.stitcher.v1 + .VideoStitcherService, + this._opts, + this._providedCustomServicePath + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const videoStitcherServiceStubMethods = [ + 'createCdnKey', + 'listCdnKeys', + 'getCdnKey', + 'deleteCdnKey', + 'updateCdnKey', + 'createVodSession', + 'getVodSession', + 'listVodStitchDetails', + 'getVodStitchDetail', + 'listVodAdTagDetails', + 'getVodAdTagDetail', + 'listLiveAdTagDetails', + 'getLiveAdTagDetail', + 'createSlate', + 'listSlates', + 'getSlate', + 'updateSlate', + 'deleteSlate', + 'createLiveSession', + 'getLiveSession', + ]; + for (const methodName of videoStitcherServiceStubMethods) { + const callPromise = this.videoStitcherServiceStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = this.descriptors.page[methodName] || undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.videoStitcherServiceStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'videostitcher.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'videostitcher.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Creates a new CDN key. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project in which the CDN key should be created, in the form of + * `projects/{project_number}/locations/{location}`. + * @param {google.cloud.video.stitcher.v1.CdnKey} request.cdnKey + * Required. The CDN key resource to create. + * @param {string} request.cdnKeyId + * Required. The ID to use for the CDN key, which will become the final component of + * the CDN key's resource name. + * + * This value should conform to RFC-1034, which restricts to + * lower-case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [CdnKey]{@link google.cloud.video.stitcher.v1.CdnKey}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/video_stitcher_service.create_cdn_key.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_CreateCdnKey_async + */ + createCdnKey( + request?: protos.google.cloud.video.stitcher.v1.ICreateCdnKeyRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.ICdnKey, + protos.google.cloud.video.stitcher.v1.ICreateCdnKeyRequest | undefined, + {} | undefined + ] + >; + createCdnKey( + request: protos.google.cloud.video.stitcher.v1.ICreateCdnKeyRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.video.stitcher.v1.ICdnKey, + | protos.google.cloud.video.stitcher.v1.ICreateCdnKeyRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createCdnKey( + request: protos.google.cloud.video.stitcher.v1.ICreateCdnKeyRequest, + callback: Callback< + protos.google.cloud.video.stitcher.v1.ICdnKey, + | protos.google.cloud.video.stitcher.v1.ICreateCdnKeyRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createCdnKey( + request?: protos.google.cloud.video.stitcher.v1.ICreateCdnKeyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.video.stitcher.v1.ICdnKey, + | protos.google.cloud.video.stitcher.v1.ICreateCdnKeyRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.video.stitcher.v1.ICdnKey, + | protos.google.cloud.video.stitcher.v1.ICreateCdnKeyRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.ICdnKey, + protos.google.cloud.video.stitcher.v1.ICreateCdnKeyRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createCdnKey(request, options, callback); + } + /** + * Returns the specified CDN key. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the CDN key to be retrieved, in the form of + * `projects/{project}/locations/{location}/cdnKeys/{id}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [CdnKey]{@link google.cloud.video.stitcher.v1.CdnKey}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/video_stitcher_service.get_cdn_key.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_GetCdnKey_async + */ + getCdnKey( + request?: protos.google.cloud.video.stitcher.v1.IGetCdnKeyRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.ICdnKey, + protos.google.cloud.video.stitcher.v1.IGetCdnKeyRequest | undefined, + {} | undefined + ] + >; + getCdnKey( + request: protos.google.cloud.video.stitcher.v1.IGetCdnKeyRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.video.stitcher.v1.ICdnKey, + | protos.google.cloud.video.stitcher.v1.IGetCdnKeyRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getCdnKey( + request: protos.google.cloud.video.stitcher.v1.IGetCdnKeyRequest, + callback: Callback< + protos.google.cloud.video.stitcher.v1.ICdnKey, + | protos.google.cloud.video.stitcher.v1.IGetCdnKeyRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getCdnKey( + request?: protos.google.cloud.video.stitcher.v1.IGetCdnKeyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.video.stitcher.v1.ICdnKey, + | protos.google.cloud.video.stitcher.v1.IGetCdnKeyRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.video.stitcher.v1.ICdnKey, + | protos.google.cloud.video.stitcher.v1.IGetCdnKeyRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.ICdnKey, + protos.google.cloud.video.stitcher.v1.IGetCdnKeyRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getCdnKey(request, options, callback); + } + /** + * Deletes the specified CDN key. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the CDN key to be deleted, in the form of + * `projects/{project_number}/locations/{location}/cdnKeys/{id}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/video_stitcher_service.delete_cdn_key.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_DeleteCdnKey_async + */ + deleteCdnKey( + request?: protos.google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest | undefined, + {} | undefined + ] + >; + deleteCdnKey( + request: protos.google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteCdnKey( + request: protos.google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteCdnKey( + request?: protos.google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.video.stitcher.v1.IDeleteCdnKeyRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteCdnKey(request, options, callback); + } + /** + * Updates the specified CDN key. Only update fields specified + * in the call method body. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.video.stitcher.v1.CdnKey} request.cdnKey + * Required. The CDN key resource which replaces the resource on the server. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The update mask applies to the resource. + * For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [CdnKey]{@link google.cloud.video.stitcher.v1.CdnKey}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/video_stitcher_service.update_cdn_key.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_UpdateCdnKey_async + */ + updateCdnKey( + request?: protos.google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.ICdnKey, + protos.google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest | undefined, + {} | undefined + ] + >; + updateCdnKey( + request: protos.google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.video.stitcher.v1.ICdnKey, + | protos.google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateCdnKey( + request: protos.google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest, + callback: Callback< + protos.google.cloud.video.stitcher.v1.ICdnKey, + | protos.google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateCdnKey( + request?: protos.google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.video.stitcher.v1.ICdnKey, + | protos.google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.video.stitcher.v1.ICdnKey, + | protos.google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.ICdnKey, + protos.google.cloud.video.stitcher.v1.IUpdateCdnKeyRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'cdn_key.name': request.cdnKey!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateCdnKey(request, options, callback); + } + /** + * Creates a client side playback VOD session and returns the full + * tracking and playback metadata of the session. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location in which the VOD session should be created, in the + * form of `projects/{project_number}/locations/{location}`. + * @param {google.cloud.video.stitcher.v1.VodSession} request.vodSession + * Required. Parameters for creating a session. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [VodSession]{@link google.cloud.video.stitcher.v1.VodSession}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/video_stitcher_service.create_vod_session.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_CreateVodSession_async + */ + createVodSession( + request?: protos.google.cloud.video.stitcher.v1.ICreateVodSessionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.IVodSession, + ( + | protos.google.cloud.video.stitcher.v1.ICreateVodSessionRequest + | undefined + ), + {} | undefined + ] + >; + createVodSession( + request: protos.google.cloud.video.stitcher.v1.ICreateVodSessionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.video.stitcher.v1.IVodSession, + | protos.google.cloud.video.stitcher.v1.ICreateVodSessionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createVodSession( + request: protos.google.cloud.video.stitcher.v1.ICreateVodSessionRequest, + callback: Callback< + protos.google.cloud.video.stitcher.v1.IVodSession, + | protos.google.cloud.video.stitcher.v1.ICreateVodSessionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createVodSession( + request?: protos.google.cloud.video.stitcher.v1.ICreateVodSessionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.video.stitcher.v1.IVodSession, + | protos.google.cloud.video.stitcher.v1.ICreateVodSessionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.video.stitcher.v1.IVodSession, + | protos.google.cloud.video.stitcher.v1.ICreateVodSessionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.IVodSession, + ( + | protos.google.cloud.video.stitcher.v1.ICreateVodSessionRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createVodSession(request, options, callback); + } + /** + * Returns the full tracking, playback metadata, and relevant ad-ops + * logs for the specified VOD session. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the VOD session to be retrieved, in the form of + * `projects/{project_number}/locations/{location}/vodSessions/{id}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [VodSession]{@link google.cloud.video.stitcher.v1.VodSession}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/video_stitcher_service.get_vod_session.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_GetVodSession_async + */ + getVodSession( + request?: protos.google.cloud.video.stitcher.v1.IGetVodSessionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.IVodSession, + protos.google.cloud.video.stitcher.v1.IGetVodSessionRequest | undefined, + {} | undefined + ] + >; + getVodSession( + request: protos.google.cloud.video.stitcher.v1.IGetVodSessionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.video.stitcher.v1.IVodSession, + | protos.google.cloud.video.stitcher.v1.IGetVodSessionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getVodSession( + request: protos.google.cloud.video.stitcher.v1.IGetVodSessionRequest, + callback: Callback< + protos.google.cloud.video.stitcher.v1.IVodSession, + | protos.google.cloud.video.stitcher.v1.IGetVodSessionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getVodSession( + request?: protos.google.cloud.video.stitcher.v1.IGetVodSessionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.video.stitcher.v1.IVodSession, + | protos.google.cloud.video.stitcher.v1.IGetVodSessionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.video.stitcher.v1.IVodSession, + | protos.google.cloud.video.stitcher.v1.IGetVodSessionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.IVodSession, + protos.google.cloud.video.stitcher.v1.IGetVodSessionRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getVodSession(request, options, callback); + } + /** + * Returns the specified stitching information for the specified VOD session. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the stitch detail in the specified VOD session, in the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [VodStitchDetail]{@link google.cloud.video.stitcher.v1.VodStitchDetail}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/video_stitcher_service.get_vod_stitch_detail.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_GetVodStitchDetail_async + */ + getVodStitchDetail( + request?: protos.google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.IVodStitchDetail, + ( + | protos.google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest + | undefined + ), + {} | undefined + ] + >; + getVodStitchDetail( + request: protos.google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.video.stitcher.v1.IVodStitchDetail, + | protos.google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getVodStitchDetail( + request: protos.google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest, + callback: Callback< + protos.google.cloud.video.stitcher.v1.IVodStitchDetail, + | protos.google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getVodStitchDetail( + request?: protos.google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.video.stitcher.v1.IVodStitchDetail, + | protos.google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.video.stitcher.v1.IVodStitchDetail, + | protos.google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.IVodStitchDetail, + ( + | protos.google.cloud.video.stitcher.v1.IGetVodStitchDetailRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getVodStitchDetail(request, options, callback); + } + /** + * Returns the specified ad tag detail for the specified VOD session. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the ad tag detail for the specified VOD session, in the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [VodAdTagDetail]{@link google.cloud.video.stitcher.v1.VodAdTagDetail}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/video_stitcher_service.get_vod_ad_tag_detail.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_GetVodAdTagDetail_async + */ + getVodAdTagDetail( + request?: protos.google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.IVodAdTagDetail, + ( + | protos.google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest + | undefined + ), + {} | undefined + ] + >; + getVodAdTagDetail( + request: protos.google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.video.stitcher.v1.IVodAdTagDetail, + | protos.google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getVodAdTagDetail( + request: protos.google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest, + callback: Callback< + protos.google.cloud.video.stitcher.v1.IVodAdTagDetail, + | protos.google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getVodAdTagDetail( + request?: protos.google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.video.stitcher.v1.IVodAdTagDetail, + | protos.google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.video.stitcher.v1.IVodAdTagDetail, + | protos.google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.IVodAdTagDetail, + ( + | protos.google.cloud.video.stitcher.v1.IGetVodAdTagDetailRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getVodAdTagDetail(request, options, callback); + } + /** + * Returns the specified ad tag detail for the specified live session. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LiveAdTagDetail]{@link google.cloud.video.stitcher.v1.LiveAdTagDetail}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/video_stitcher_service.get_live_ad_tag_detail.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_GetLiveAdTagDetail_async + */ + getLiveAdTagDetail( + request?: protos.google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail, + ( + | protos.google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest + | undefined + ), + {} | undefined + ] + >; + getLiveAdTagDetail( + request: protos.google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail, + | protos.google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getLiveAdTagDetail( + request: protos.google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest, + callback: Callback< + protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail, + | protos.google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getLiveAdTagDetail( + request?: protos.google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail, + | protos.google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail, + | protos.google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail, + ( + | protos.google.cloud.video.stitcher.v1.IGetLiveAdTagDetailRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getLiveAdTagDetail(request, options, callback); + } + /** + * Creates a slate. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project in which the slate should be created, in the form of + * `projects/{project_number}`. + * @param {string} request.slateId + * Required. The unique identifier for the slate. + * This value should conform to RFC-1034, which restricts to + * lower-case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + * @param {google.cloud.video.stitcher.v1.Slate} request.slate + * Required. The slate to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Slate]{@link google.cloud.video.stitcher.v1.Slate}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/video_stitcher_service.create_slate.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_CreateSlate_async + */ + createSlate( + request?: protos.google.cloud.video.stitcher.v1.ICreateSlateRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.ISlate, + protos.google.cloud.video.stitcher.v1.ICreateSlateRequest | undefined, + {} | undefined + ] + >; + createSlate( + request: protos.google.cloud.video.stitcher.v1.ICreateSlateRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.video.stitcher.v1.ISlate, + | protos.google.cloud.video.stitcher.v1.ICreateSlateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createSlate( + request: protos.google.cloud.video.stitcher.v1.ICreateSlateRequest, + callback: Callback< + protos.google.cloud.video.stitcher.v1.ISlate, + | protos.google.cloud.video.stitcher.v1.ICreateSlateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createSlate( + request?: protos.google.cloud.video.stitcher.v1.ICreateSlateRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.video.stitcher.v1.ISlate, + | protos.google.cloud.video.stitcher.v1.ICreateSlateRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.video.stitcher.v1.ISlate, + | protos.google.cloud.video.stitcher.v1.ICreateSlateRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.ISlate, + protos.google.cloud.video.stitcher.v1.ICreateSlateRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createSlate(request, options, callback); + } + /** + * Returns the specified slate. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the slate to be retrieved, of the slate, in the form of + * `projects/{project_number}/locations/{location}/slates/{id}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Slate]{@link google.cloud.video.stitcher.v1.Slate}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/video_stitcher_service.get_slate.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_GetSlate_async + */ + getSlate( + request?: protos.google.cloud.video.stitcher.v1.IGetSlateRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.ISlate, + protos.google.cloud.video.stitcher.v1.IGetSlateRequest | undefined, + {} | undefined + ] + >; + getSlate( + request: protos.google.cloud.video.stitcher.v1.IGetSlateRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.video.stitcher.v1.ISlate, + protos.google.cloud.video.stitcher.v1.IGetSlateRequest | null | undefined, + {} | null | undefined + > + ): void; + getSlate( + request: protos.google.cloud.video.stitcher.v1.IGetSlateRequest, + callback: Callback< + protos.google.cloud.video.stitcher.v1.ISlate, + protos.google.cloud.video.stitcher.v1.IGetSlateRequest | null | undefined, + {} | null | undefined + > + ): void; + getSlate( + request?: protos.google.cloud.video.stitcher.v1.IGetSlateRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.video.stitcher.v1.ISlate, + | protos.google.cloud.video.stitcher.v1.IGetSlateRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.video.stitcher.v1.ISlate, + protos.google.cloud.video.stitcher.v1.IGetSlateRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.ISlate, + protos.google.cloud.video.stitcher.v1.IGetSlateRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getSlate(request, options, callback); + } + /** + * Updates the specified slate. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.video.stitcher.v1.Slate} request.slate + * Required. The resource with updated fields. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The update mask which specifies fields which should be updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Slate]{@link google.cloud.video.stitcher.v1.Slate}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/video_stitcher_service.update_slate.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_UpdateSlate_async + */ + updateSlate( + request?: protos.google.cloud.video.stitcher.v1.IUpdateSlateRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.ISlate, + protos.google.cloud.video.stitcher.v1.IUpdateSlateRequest | undefined, + {} | undefined + ] + >; + updateSlate( + request: protos.google.cloud.video.stitcher.v1.IUpdateSlateRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.video.stitcher.v1.ISlate, + | protos.google.cloud.video.stitcher.v1.IUpdateSlateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateSlate( + request: protos.google.cloud.video.stitcher.v1.IUpdateSlateRequest, + callback: Callback< + protos.google.cloud.video.stitcher.v1.ISlate, + | protos.google.cloud.video.stitcher.v1.IUpdateSlateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateSlate( + request?: protos.google.cloud.video.stitcher.v1.IUpdateSlateRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.video.stitcher.v1.ISlate, + | protos.google.cloud.video.stitcher.v1.IUpdateSlateRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.video.stitcher.v1.ISlate, + | protos.google.cloud.video.stitcher.v1.IUpdateSlateRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.ISlate, + protos.google.cloud.video.stitcher.v1.IUpdateSlateRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'slate.name': request.slate!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateSlate(request, options, callback); + } + /** + * Deletes the specified slate. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the slate to be deleted, in the form of + * `projects/{project_number}/locations/{location}/slates/{id}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/video_stitcher_service.delete_slate.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_DeleteSlate_async + */ + deleteSlate( + request?: protos.google.cloud.video.stitcher.v1.IDeleteSlateRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.video.stitcher.v1.IDeleteSlateRequest | undefined, + {} | undefined + ] + >; + deleteSlate( + request: protos.google.cloud.video.stitcher.v1.IDeleteSlateRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.video.stitcher.v1.IDeleteSlateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteSlate( + request: protos.google.cloud.video.stitcher.v1.IDeleteSlateRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.video.stitcher.v1.IDeleteSlateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteSlate( + request?: protos.google.cloud.video.stitcher.v1.IDeleteSlateRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.video.stitcher.v1.IDeleteSlateRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.video.stitcher.v1.IDeleteSlateRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.video.stitcher.v1.IDeleteSlateRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteSlate(request, options, callback); + } + /** + * Creates a new live session. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location in which the live session should be created, + * in the form of `projects/{project_number}/locations/{location}`. + * @param {google.cloud.video.stitcher.v1.LiveSession} request.liveSession + * Required. Parameters for creating a live session. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LiveSession]{@link google.cloud.video.stitcher.v1.LiveSession}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/video_stitcher_service.create_live_session.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_CreateLiveSession_async + */ + createLiveSession( + request?: protos.google.cloud.video.stitcher.v1.ICreateLiveSessionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.ILiveSession, + ( + | protos.google.cloud.video.stitcher.v1.ICreateLiveSessionRequest + | undefined + ), + {} | undefined + ] + >; + createLiveSession( + request: protos.google.cloud.video.stitcher.v1.ICreateLiveSessionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.video.stitcher.v1.ILiveSession, + | protos.google.cloud.video.stitcher.v1.ICreateLiveSessionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createLiveSession( + request: protos.google.cloud.video.stitcher.v1.ICreateLiveSessionRequest, + callback: Callback< + protos.google.cloud.video.stitcher.v1.ILiveSession, + | protos.google.cloud.video.stitcher.v1.ICreateLiveSessionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createLiveSession( + request?: protos.google.cloud.video.stitcher.v1.ICreateLiveSessionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.video.stitcher.v1.ILiveSession, + | protos.google.cloud.video.stitcher.v1.ICreateLiveSessionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.video.stitcher.v1.ILiveSession, + | protos.google.cloud.video.stitcher.v1.ICreateLiveSessionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.ILiveSession, + ( + | protos.google.cloud.video.stitcher.v1.ICreateLiveSessionRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createLiveSession(request, options, callback); + } + /** + * Returns the details for the specified live session. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the live session, in the form of + * `projects/{project_number}/locations/{location}/liveSessions/{id}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [LiveSession]{@link google.cloud.video.stitcher.v1.LiveSession}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/video_stitcher_service.get_live_session.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_GetLiveSession_async + */ + getLiveSession( + request?: protos.google.cloud.video.stitcher.v1.IGetLiveSessionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.ILiveSession, + protos.google.cloud.video.stitcher.v1.IGetLiveSessionRequest | undefined, + {} | undefined + ] + >; + getLiveSession( + request: protos.google.cloud.video.stitcher.v1.IGetLiveSessionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.video.stitcher.v1.ILiveSession, + | protos.google.cloud.video.stitcher.v1.IGetLiveSessionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getLiveSession( + request: protos.google.cloud.video.stitcher.v1.IGetLiveSessionRequest, + callback: Callback< + protos.google.cloud.video.stitcher.v1.ILiveSession, + | protos.google.cloud.video.stitcher.v1.IGetLiveSessionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getLiveSession( + request?: protos.google.cloud.video.stitcher.v1.IGetLiveSessionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.video.stitcher.v1.ILiveSession, + | protos.google.cloud.video.stitcher.v1.IGetLiveSessionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.video.stitcher.v1.ILiveSession, + | protos.google.cloud.video.stitcher.v1.IGetLiveSessionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.ILiveSession, + protos.google.cloud.video.stitcher.v1.IGetLiveSessionRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getLiveSession(request, options, callback); + } + + /** + * Lists all CDN keys in the specified project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project that contains the list of CDN keys, in the form of + * `projects/{project_number}/locations/{location}`. + * @param {number} request.pageSize + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @param {string} request.pageToken + * A token identifying a page of results the server should return. + * @param {string} request.filter + * Filtering results + * @param {string} request.orderBy + * Hint for how to order the results + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [CdnKey]{@link google.cloud.video.stitcher.v1.CdnKey}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listCdnKeysAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listCdnKeys( + request?: protos.google.cloud.video.stitcher.v1.IListCdnKeysRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.ICdnKey[], + protos.google.cloud.video.stitcher.v1.IListCdnKeysRequest | null, + protos.google.cloud.video.stitcher.v1.IListCdnKeysResponse + ] + >; + listCdnKeys( + request: protos.google.cloud.video.stitcher.v1.IListCdnKeysRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.video.stitcher.v1.IListCdnKeysRequest, + | protos.google.cloud.video.stitcher.v1.IListCdnKeysResponse + | null + | undefined, + protos.google.cloud.video.stitcher.v1.ICdnKey + > + ): void; + listCdnKeys( + request: protos.google.cloud.video.stitcher.v1.IListCdnKeysRequest, + callback: PaginationCallback< + protos.google.cloud.video.stitcher.v1.IListCdnKeysRequest, + | protos.google.cloud.video.stitcher.v1.IListCdnKeysResponse + | null + | undefined, + protos.google.cloud.video.stitcher.v1.ICdnKey + > + ): void; + listCdnKeys( + request?: protos.google.cloud.video.stitcher.v1.IListCdnKeysRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.video.stitcher.v1.IListCdnKeysRequest, + | protos.google.cloud.video.stitcher.v1.IListCdnKeysResponse + | null + | undefined, + protos.google.cloud.video.stitcher.v1.ICdnKey + >, + callback?: PaginationCallback< + protos.google.cloud.video.stitcher.v1.IListCdnKeysRequest, + | protos.google.cloud.video.stitcher.v1.IListCdnKeysResponse + | null + | undefined, + protos.google.cloud.video.stitcher.v1.ICdnKey + > + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.ICdnKey[], + protos.google.cloud.video.stitcher.v1.IListCdnKeysRequest | null, + protos.google.cloud.video.stitcher.v1.IListCdnKeysResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listCdnKeys(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project that contains the list of CDN keys, in the form of + * `projects/{project_number}/locations/{location}`. + * @param {number} request.pageSize + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @param {string} request.pageToken + * A token identifying a page of results the server should return. + * @param {string} request.filter + * Filtering results + * @param {string} request.orderBy + * Hint for how to order the results + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [CdnKey]{@link google.cloud.video.stitcher.v1.CdnKey} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listCdnKeysAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listCdnKeysStream( + request?: protos.google.cloud.video.stitcher.v1.IListCdnKeysRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listCdnKeys']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listCdnKeys.createStream( + this.innerApiCalls.listCdnKeys as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listCdnKeys`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project that contains the list of CDN keys, in the form of + * `projects/{project_number}/locations/{location}`. + * @param {number} request.pageSize + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @param {string} request.pageToken + * A token identifying a page of results the server should return. + * @param {string} request.filter + * Filtering results + * @param {string} request.orderBy + * Hint for how to order the results + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [CdnKey]{@link google.cloud.video.stitcher.v1.CdnKey}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/video_stitcher_service.list_cdn_keys.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_ListCdnKeys_async + */ + listCdnKeysAsync( + request?: protos.google.cloud.video.stitcher.v1.IListCdnKeysRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listCdnKeys']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listCdnKeys.asyncIterate( + this.innerApiCalls['listCdnKeys'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns a list of detailed stitching information of the specified VOD + * session. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The VOD session where the stitch details belong to, in the form of + * `projects/{project}/locations/{location}/vodSessions/{id}`. + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [VodStitchDetail]{@link google.cloud.video.stitcher.v1.VodStitchDetail}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listVodStitchDetailsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listVodStitchDetails( + request?: protos.google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.IVodStitchDetail[], + protos.google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest | null, + protos.google.cloud.video.stitcher.v1.IListVodStitchDetailsResponse + ] + >; + listVodStitchDetails( + request: protos.google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest, + | protos.google.cloud.video.stitcher.v1.IListVodStitchDetailsResponse + | null + | undefined, + protos.google.cloud.video.stitcher.v1.IVodStitchDetail + > + ): void; + listVodStitchDetails( + request: protos.google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest, + callback: PaginationCallback< + protos.google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest, + | protos.google.cloud.video.stitcher.v1.IListVodStitchDetailsResponse + | null + | undefined, + protos.google.cloud.video.stitcher.v1.IVodStitchDetail + > + ): void; + listVodStitchDetails( + request?: protos.google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest, + | protos.google.cloud.video.stitcher.v1.IListVodStitchDetailsResponse + | null + | undefined, + protos.google.cloud.video.stitcher.v1.IVodStitchDetail + >, + callback?: PaginationCallback< + protos.google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest, + | protos.google.cloud.video.stitcher.v1.IListVodStitchDetailsResponse + | null + | undefined, + protos.google.cloud.video.stitcher.v1.IVodStitchDetail + > + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.IVodStitchDetail[], + protos.google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest | null, + protos.google.cloud.video.stitcher.v1.IListVodStitchDetailsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listVodStitchDetails(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The VOD session where the stitch details belong to, in the form of + * `projects/{project}/locations/{location}/vodSessions/{id}`. + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [VodStitchDetail]{@link google.cloud.video.stitcher.v1.VodStitchDetail} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listVodStitchDetailsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listVodStitchDetailsStream( + request?: protos.google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listVodStitchDetails']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listVodStitchDetails.createStream( + this.innerApiCalls.listVodStitchDetails as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listVodStitchDetails`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The VOD session where the stitch details belong to, in the form of + * `projects/{project}/locations/{location}/vodSessions/{id}`. + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [VodStitchDetail]{@link google.cloud.video.stitcher.v1.VodStitchDetail}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/video_stitcher_service.list_vod_stitch_details.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_ListVodStitchDetails_async + */ + listVodStitchDetailsAsync( + request?: protos.google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listVodStitchDetails']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listVodStitchDetails.asyncIterate( + this.innerApiCalls['listVodStitchDetails'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Return the list of ad tag details for the specified VOD session. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The VOD session which the ad tag details belong to, in the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [VodAdTagDetail]{@link google.cloud.video.stitcher.v1.VodAdTagDetail}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listVodAdTagDetailsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listVodAdTagDetails( + request?: protos.google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.IVodAdTagDetail[], + protos.google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest | null, + protos.google.cloud.video.stitcher.v1.IListVodAdTagDetailsResponse + ] + >; + listVodAdTagDetails( + request: protos.google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest, + | protos.google.cloud.video.stitcher.v1.IListVodAdTagDetailsResponse + | null + | undefined, + protos.google.cloud.video.stitcher.v1.IVodAdTagDetail + > + ): void; + listVodAdTagDetails( + request: protos.google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest, + callback: PaginationCallback< + protos.google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest, + | protos.google.cloud.video.stitcher.v1.IListVodAdTagDetailsResponse + | null + | undefined, + protos.google.cloud.video.stitcher.v1.IVodAdTagDetail + > + ): void; + listVodAdTagDetails( + request?: protos.google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest, + | protos.google.cloud.video.stitcher.v1.IListVodAdTagDetailsResponse + | null + | undefined, + protos.google.cloud.video.stitcher.v1.IVodAdTagDetail + >, + callback?: PaginationCallback< + protos.google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest, + | protos.google.cloud.video.stitcher.v1.IListVodAdTagDetailsResponse + | null + | undefined, + protos.google.cloud.video.stitcher.v1.IVodAdTagDetail + > + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.IVodAdTagDetail[], + protos.google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest | null, + protos.google.cloud.video.stitcher.v1.IListVodAdTagDetailsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listVodAdTagDetails(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The VOD session which the ad tag details belong to, in the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [VodAdTagDetail]{@link google.cloud.video.stitcher.v1.VodAdTagDetail} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listVodAdTagDetailsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listVodAdTagDetailsStream( + request?: protos.google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listVodAdTagDetails']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listVodAdTagDetails.createStream( + this.innerApiCalls.listVodAdTagDetails as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listVodAdTagDetails`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The VOD session which the ad tag details belong to, in the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [VodAdTagDetail]{@link google.cloud.video.stitcher.v1.VodAdTagDetail}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/video_stitcher_service.list_vod_ad_tag_details.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_ListVodAdTagDetails_async + */ + listVodAdTagDetailsAsync( + request?: protos.google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listVodAdTagDetails']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listVodAdTagDetails.asyncIterate( + this.innerApiCalls['listVodAdTagDetails'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Return the list of ad tag details for the specified live session. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource parent in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}`. + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The pagination token returned from a previous List request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [LiveAdTagDetail]{@link google.cloud.video.stitcher.v1.LiveAdTagDetail}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listLiveAdTagDetailsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listLiveAdTagDetails( + request?: protos.google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail[], + protos.google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest | null, + protos.google.cloud.video.stitcher.v1.IListLiveAdTagDetailsResponse + ] + >; + listLiveAdTagDetails( + request: protos.google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest, + | protos.google.cloud.video.stitcher.v1.IListLiveAdTagDetailsResponse + | null + | undefined, + protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail + > + ): void; + listLiveAdTagDetails( + request: protos.google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest, + callback: PaginationCallback< + protos.google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest, + | protos.google.cloud.video.stitcher.v1.IListLiveAdTagDetailsResponse + | null + | undefined, + protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail + > + ): void; + listLiveAdTagDetails( + request?: protos.google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest, + | protos.google.cloud.video.stitcher.v1.IListLiveAdTagDetailsResponse + | null + | undefined, + protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail + >, + callback?: PaginationCallback< + protos.google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest, + | protos.google.cloud.video.stitcher.v1.IListLiveAdTagDetailsResponse + | null + | undefined, + protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail + > + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail[], + protos.google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest | null, + protos.google.cloud.video.stitcher.v1.IListLiveAdTagDetailsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listLiveAdTagDetails(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource parent in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}`. + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The pagination token returned from a previous List request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [LiveAdTagDetail]{@link google.cloud.video.stitcher.v1.LiveAdTagDetail} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listLiveAdTagDetailsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listLiveAdTagDetailsStream( + request?: protos.google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listLiveAdTagDetails']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listLiveAdTagDetails.createStream( + this.innerApiCalls.listLiveAdTagDetails as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listLiveAdTagDetails`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource parent in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}`. + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The pagination token returned from a previous List request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [LiveAdTagDetail]{@link google.cloud.video.stitcher.v1.LiveAdTagDetail}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/video_stitcher_service.list_live_ad_tag_details.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_ListLiveAdTagDetails_async + */ + listLiveAdTagDetailsAsync( + request?: protos.google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listLiveAdTagDetails']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listLiveAdTagDetails.asyncIterate( + this.innerApiCalls['listLiveAdTagDetails'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists all slates in the specified project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project to list slates, in the form of `projects/{project_number}`. + * @param {number} request.pageSize + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @param {string} request.pageToken + * A token identifying a page of results the server should return. + * @param {string} request.filter + * Filtering results + * @param {string} request.orderBy + * Hint for how to order the results + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Slate]{@link google.cloud.video.stitcher.v1.Slate}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listSlatesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listSlates( + request?: protos.google.cloud.video.stitcher.v1.IListSlatesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.ISlate[], + protos.google.cloud.video.stitcher.v1.IListSlatesRequest | null, + protos.google.cloud.video.stitcher.v1.IListSlatesResponse + ] + >; + listSlates( + request: protos.google.cloud.video.stitcher.v1.IListSlatesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.video.stitcher.v1.IListSlatesRequest, + | protos.google.cloud.video.stitcher.v1.IListSlatesResponse + | null + | undefined, + protos.google.cloud.video.stitcher.v1.ISlate + > + ): void; + listSlates( + request: protos.google.cloud.video.stitcher.v1.IListSlatesRequest, + callback: PaginationCallback< + protos.google.cloud.video.stitcher.v1.IListSlatesRequest, + | protos.google.cloud.video.stitcher.v1.IListSlatesResponse + | null + | undefined, + protos.google.cloud.video.stitcher.v1.ISlate + > + ): void; + listSlates( + request?: protos.google.cloud.video.stitcher.v1.IListSlatesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.video.stitcher.v1.IListSlatesRequest, + | protos.google.cloud.video.stitcher.v1.IListSlatesResponse + | null + | undefined, + protos.google.cloud.video.stitcher.v1.ISlate + >, + callback?: PaginationCallback< + protos.google.cloud.video.stitcher.v1.IListSlatesRequest, + | protos.google.cloud.video.stitcher.v1.IListSlatesResponse + | null + | undefined, + protos.google.cloud.video.stitcher.v1.ISlate + > + ): Promise< + [ + protos.google.cloud.video.stitcher.v1.ISlate[], + protos.google.cloud.video.stitcher.v1.IListSlatesRequest | null, + protos.google.cloud.video.stitcher.v1.IListSlatesResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listSlates(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project to list slates, in the form of `projects/{project_number}`. + * @param {number} request.pageSize + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @param {string} request.pageToken + * A token identifying a page of results the server should return. + * @param {string} request.filter + * Filtering results + * @param {string} request.orderBy + * Hint for how to order the results + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Slate]{@link google.cloud.video.stitcher.v1.Slate} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listSlatesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listSlatesStream( + request?: protos.google.cloud.video.stitcher.v1.IListSlatesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listSlates']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listSlates.createStream( + this.innerApiCalls.listSlates as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listSlates`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project to list slates, in the form of `projects/{project_number}`. + * @param {number} request.pageSize + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @param {string} request.pageToken + * A token identifying a page of results the server should return. + * @param {string} request.filter + * Filtering results + * @param {string} request.orderBy + * Hint for how to order the results + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Slate]{@link google.cloud.video.stitcher.v1.Slate}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/video_stitcher_service.list_slates.js + * region_tag:videostitcher_v1_generated_VideoStitcherService_ListSlates_async + */ + listSlatesAsync( + request?: protos.google.cloud.video.stitcher.v1.IListSlatesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listSlates']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listSlates.asyncIterate( + this.innerApiCalls['listSlates'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified cdnKey resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} cdn_key + * @returns {string} Resource name string. + */ + cdnKeyPath(project: string, location: string, cdnKey: string) { + return this.pathTemplates.cdnKeyPathTemplate.render({ + project: project, + location: location, + cdn_key: cdnKey, + }); + } + + /** + * Parse the project from CdnKey resource. + * + * @param {string} cdnKeyName + * A fully-qualified path representing CdnKey resource. + * @returns {string} A string representing the project. + */ + matchProjectFromCdnKeyName(cdnKeyName: string) { + return this.pathTemplates.cdnKeyPathTemplate.match(cdnKeyName).project; + } + + /** + * Parse the location from CdnKey resource. + * + * @param {string} cdnKeyName + * A fully-qualified path representing CdnKey resource. + * @returns {string} A string representing the location. + */ + matchLocationFromCdnKeyName(cdnKeyName: string) { + return this.pathTemplates.cdnKeyPathTemplate.match(cdnKeyName).location; + } + + /** + * Parse the cdn_key from CdnKey resource. + * + * @param {string} cdnKeyName + * A fully-qualified path representing CdnKey resource. + * @returns {string} A string representing the cdn_key. + */ + matchCdnKeyFromCdnKeyName(cdnKeyName: string) { + return this.pathTemplates.cdnKeyPathTemplate.match(cdnKeyName).cdn_key; + } + + /** + * Return a fully-qualified liveAdTagDetail resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} live_session + * @param {string} live_ad_tag_detail + * @returns {string} Resource name string. + */ + liveAdTagDetailPath( + project: string, + location: string, + liveSession: string, + liveAdTagDetail: string + ) { + return this.pathTemplates.liveAdTagDetailPathTemplate.render({ + project: project, + location: location, + live_session: liveSession, + live_ad_tag_detail: liveAdTagDetail, + }); + } + + /** + * Parse the project from LiveAdTagDetail resource. + * + * @param {string} liveAdTagDetailName + * A fully-qualified path representing LiveAdTagDetail resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLiveAdTagDetailName(liveAdTagDetailName: string) { + return this.pathTemplates.liveAdTagDetailPathTemplate.match( + liveAdTagDetailName + ).project; + } + + /** + * Parse the location from LiveAdTagDetail resource. + * + * @param {string} liveAdTagDetailName + * A fully-qualified path representing LiveAdTagDetail resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLiveAdTagDetailName(liveAdTagDetailName: string) { + return this.pathTemplates.liveAdTagDetailPathTemplate.match( + liveAdTagDetailName + ).location; + } + + /** + * Parse the live_session from LiveAdTagDetail resource. + * + * @param {string} liveAdTagDetailName + * A fully-qualified path representing LiveAdTagDetail resource. + * @returns {string} A string representing the live_session. + */ + matchLiveSessionFromLiveAdTagDetailName(liveAdTagDetailName: string) { + return this.pathTemplates.liveAdTagDetailPathTemplate.match( + liveAdTagDetailName + ).live_session; + } + + /** + * Parse the live_ad_tag_detail from LiveAdTagDetail resource. + * + * @param {string} liveAdTagDetailName + * A fully-qualified path representing LiveAdTagDetail resource. + * @returns {string} A string representing the live_ad_tag_detail. + */ + matchLiveAdTagDetailFromLiveAdTagDetailName(liveAdTagDetailName: string) { + return this.pathTemplates.liveAdTagDetailPathTemplate.match( + liveAdTagDetailName + ).live_ad_tag_detail; + } + + /** + * Return a fully-qualified liveSession resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} live_session + * @returns {string} Resource name string. + */ + liveSessionPath(project: string, location: string, liveSession: string) { + return this.pathTemplates.liveSessionPathTemplate.render({ + project: project, + location: location, + live_session: liveSession, + }); + } + + /** + * Parse the project from LiveSession resource. + * + * @param {string} liveSessionName + * A fully-qualified path representing LiveSession resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLiveSessionName(liveSessionName: string) { + return this.pathTemplates.liveSessionPathTemplate.match(liveSessionName) + .project; + } + + /** + * Parse the location from LiveSession resource. + * + * @param {string} liveSessionName + * A fully-qualified path representing LiveSession resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLiveSessionName(liveSessionName: string) { + return this.pathTemplates.liveSessionPathTemplate.match(liveSessionName) + .location; + } + + /** + * Parse the live_session from LiveSession resource. + * + * @param {string} liveSessionName + * A fully-qualified path representing LiveSession resource. + * @returns {string} A string representing the live_session. + */ + matchLiveSessionFromLiveSessionName(liveSessionName: string) { + return this.pathTemplates.liveSessionPathTemplate.match(liveSessionName) + .live_session; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project: string, location: string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project: string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Return a fully-qualified slate resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} slate + * @returns {string} Resource name string. + */ + slatePath(project: string, location: string, slate: string) { + return this.pathTemplates.slatePathTemplate.render({ + project: project, + location: location, + slate: slate, + }); + } + + /** + * Parse the project from Slate resource. + * + * @param {string} slateName + * A fully-qualified path representing Slate resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSlateName(slateName: string) { + return this.pathTemplates.slatePathTemplate.match(slateName).project; + } + + /** + * Parse the location from Slate resource. + * + * @param {string} slateName + * A fully-qualified path representing Slate resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSlateName(slateName: string) { + return this.pathTemplates.slatePathTemplate.match(slateName).location; + } + + /** + * Parse the slate from Slate resource. + * + * @param {string} slateName + * A fully-qualified path representing Slate resource. + * @returns {string} A string representing the slate. + */ + matchSlateFromSlateName(slateName: string) { + return this.pathTemplates.slatePathTemplate.match(slateName).slate; + } + + /** + * Return a fully-qualified vodAdTagDetail resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} vod_session + * @param {string} vod_ad_tag_detail + * @returns {string} Resource name string. + */ + vodAdTagDetailPath( + project: string, + location: string, + vodSession: string, + vodAdTagDetail: string + ) { + return this.pathTemplates.vodAdTagDetailPathTemplate.render({ + project: project, + location: location, + vod_session: vodSession, + vod_ad_tag_detail: vodAdTagDetail, + }); + } + + /** + * Parse the project from VodAdTagDetail resource. + * + * @param {string} vodAdTagDetailName + * A fully-qualified path representing VodAdTagDetail resource. + * @returns {string} A string representing the project. + */ + matchProjectFromVodAdTagDetailName(vodAdTagDetailName: string) { + return this.pathTemplates.vodAdTagDetailPathTemplate.match( + vodAdTagDetailName + ).project; + } + + /** + * Parse the location from VodAdTagDetail resource. + * + * @param {string} vodAdTagDetailName + * A fully-qualified path representing VodAdTagDetail resource. + * @returns {string} A string representing the location. + */ + matchLocationFromVodAdTagDetailName(vodAdTagDetailName: string) { + return this.pathTemplates.vodAdTagDetailPathTemplate.match( + vodAdTagDetailName + ).location; + } + + /** + * Parse the vod_session from VodAdTagDetail resource. + * + * @param {string} vodAdTagDetailName + * A fully-qualified path representing VodAdTagDetail resource. + * @returns {string} A string representing the vod_session. + */ + matchVodSessionFromVodAdTagDetailName(vodAdTagDetailName: string) { + return this.pathTemplates.vodAdTagDetailPathTemplate.match( + vodAdTagDetailName + ).vod_session; + } + + /** + * Parse the vod_ad_tag_detail from VodAdTagDetail resource. + * + * @param {string} vodAdTagDetailName + * A fully-qualified path representing VodAdTagDetail resource. + * @returns {string} A string representing the vod_ad_tag_detail. + */ + matchVodAdTagDetailFromVodAdTagDetailName(vodAdTagDetailName: string) { + return this.pathTemplates.vodAdTagDetailPathTemplate.match( + vodAdTagDetailName + ).vod_ad_tag_detail; + } + + /** + * Return a fully-qualified vodSession resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} vod_session + * @returns {string} Resource name string. + */ + vodSessionPath(project: string, location: string, vodSession: string) { + return this.pathTemplates.vodSessionPathTemplate.render({ + project: project, + location: location, + vod_session: vodSession, + }); + } + + /** + * Parse the project from VodSession resource. + * + * @param {string} vodSessionName + * A fully-qualified path representing VodSession resource. + * @returns {string} A string representing the project. + */ + matchProjectFromVodSessionName(vodSessionName: string) { + return this.pathTemplates.vodSessionPathTemplate.match(vodSessionName) + .project; + } + + /** + * Parse the location from VodSession resource. + * + * @param {string} vodSessionName + * A fully-qualified path representing VodSession resource. + * @returns {string} A string representing the location. + */ + matchLocationFromVodSessionName(vodSessionName: string) { + return this.pathTemplates.vodSessionPathTemplate.match(vodSessionName) + .location; + } + + /** + * Parse the vod_session from VodSession resource. + * + * @param {string} vodSessionName + * A fully-qualified path representing VodSession resource. + * @returns {string} A string representing the vod_session. + */ + matchVodSessionFromVodSessionName(vodSessionName: string) { + return this.pathTemplates.vodSessionPathTemplate.match(vodSessionName) + .vod_session; + } + + /** + * Return a fully-qualified vodStitchDetail resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} vod_session + * @param {string} vod_stitch_detail + * @returns {string} Resource name string. + */ + vodStitchDetailPath( + project: string, + location: string, + vodSession: string, + vodStitchDetail: string + ) { + return this.pathTemplates.vodStitchDetailPathTemplate.render({ + project: project, + location: location, + vod_session: vodSession, + vod_stitch_detail: vodStitchDetail, + }); + } + + /** + * Parse the project from VodStitchDetail resource. + * + * @param {string} vodStitchDetailName + * A fully-qualified path representing VodStitchDetail resource. + * @returns {string} A string representing the project. + */ + matchProjectFromVodStitchDetailName(vodStitchDetailName: string) { + return this.pathTemplates.vodStitchDetailPathTemplate.match( + vodStitchDetailName + ).project; + } + + /** + * Parse the location from VodStitchDetail resource. + * + * @param {string} vodStitchDetailName + * A fully-qualified path representing VodStitchDetail resource. + * @returns {string} A string representing the location. + */ + matchLocationFromVodStitchDetailName(vodStitchDetailName: string) { + return this.pathTemplates.vodStitchDetailPathTemplate.match( + vodStitchDetailName + ).location; + } + + /** + * Parse the vod_session from VodStitchDetail resource. + * + * @param {string} vodStitchDetailName + * A fully-qualified path representing VodStitchDetail resource. + * @returns {string} A string representing the vod_session. + */ + matchVodSessionFromVodStitchDetailName(vodStitchDetailName: string) { + return this.pathTemplates.vodStitchDetailPathTemplate.match( + vodStitchDetailName + ).vod_session; + } + + /** + * Parse the vod_stitch_detail from VodStitchDetail resource. + * + * @param {string} vodStitchDetailName + * A fully-qualified path representing VodStitchDetail resource. + * @returns {string} A string representing the vod_stitch_detail. + */ + matchVodStitchDetailFromVodStitchDetailName(vodStitchDetailName: string) { + return this.pathTemplates.vodStitchDetailPathTemplate.match( + vodStitchDetailName + ).vod_stitch_detail; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.videoStitcherServiceStub && !this._terminated) { + return this.videoStitcherServiceStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-video-stitcher/src/v1/video_stitcher_service_client_config.json b/packages/google-cloud-video-stitcher/src/v1/video_stitcher_service_client_config.json new file mode 100644 index 00000000000..691ca37cb93 --- /dev/null +++ b/packages/google-cloud-video-stitcher/src/v1/video_stitcher_service_client_config.json @@ -0,0 +1,126 @@ +{ + "interfaces": { + "google.cloud.video.stitcher.v1.VideoStitcherService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreateCdnKey": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListCdnKeys": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetCdnKey": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteCdnKey": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateCdnKey": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateVodSession": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetVodSession": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListVodStitchDetails": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetVodStitchDetail": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListVodAdTagDetails": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetVodAdTagDetail": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListLiveAdTagDetails": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetLiveAdTagDetail": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateSlate": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListSlates": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetSlate": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateSlate": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteSlate": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateLiveSession": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetLiveSession": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-video-stitcher/src/v1/video_stitcher_service_proto_list.json b/packages/google-cloud-video-stitcher/src/v1/video_stitcher_service_proto_list.json new file mode 100644 index 00000000000..c3a39905131 --- /dev/null +++ b/packages/google-cloud-video-stitcher/src/v1/video_stitcher_service_proto_list.json @@ -0,0 +1,10 @@ +[ + "../../protos/google/cloud/video/stitcher/v1/ad_tag_details.proto", + "../../protos/google/cloud/video/stitcher/v1/cdn_keys.proto", + "../../protos/google/cloud/video/stitcher/v1/companions.proto", + "../../protos/google/cloud/video/stitcher/v1/events.proto", + "../../protos/google/cloud/video/stitcher/v1/sessions.proto", + "../../protos/google/cloud/video/stitcher/v1/slates.proto", + "../../protos/google/cloud/video/stitcher/v1/stitch_details.proto", + "../../protos/google/cloud/video/stitcher/v1/video_stitcher_service.proto" +] diff --git a/packages/google-cloud-video-stitcher/system-test/fixtures/sample/src/index.js b/packages/google-cloud-video-stitcher/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..df8432104ce --- /dev/null +++ b/packages/google-cloud-video-stitcher/system-test/fixtures/sample/src/index.js @@ -0,0 +1,26 @@ +// 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. ** + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const stitcher = require('@google-cloud/video-stitcher'); + +function main() { + const videoStitcherServiceClient = new stitcher.VideoStitcherServiceClient(); +} + +main(); diff --git a/packages/google-cloud-video-stitcher/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-video-stitcher/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..e32242ae95f --- /dev/null +++ b/packages/google-cloud-video-stitcher/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,34 @@ +// 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. ** + +import {VideoStitcherServiceClient} from '@google-cloud/video-stitcher'; + +// check that the client class type name can be used +function doStuffWithVideoStitcherServiceClient( + client: VideoStitcherServiceClient +) { + client.close(); +} + +function main() { + // check that the client instance can be created + const videoStitcherServiceClient = new VideoStitcherServiceClient(); + doStuffWithVideoStitcherServiceClient(videoStitcherServiceClient); +} + +main(); diff --git a/packages/google-cloud-video-stitcher/system-test/install.ts b/packages/google-cloud-video-stitcher/system-test/install.ts new file mode 100644 index 00000000000..6dd1eaadafa --- /dev/null +++ b/packages/google-cloud-video-stitcher/system-test/install.ts @@ -0,0 +1,51 @@ +// 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. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + it('TypeScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts' + ).toString(), + }, + }; + await packNTest(options); + }); + + it('JavaScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync( + './system-test/fixtures/sample/src/index.js' + ).toString(), + }, + }; + await packNTest(options); + }); +}); diff --git a/packages/google-cloud-video-stitcher/test/gapic_video_stitcher_service_v1.ts b/packages/google-cloud-video-stitcher/test/gapic_video_stitcher_service_v1.ts new file mode 100644 index 00000000000..ffd239686ec --- /dev/null +++ b/packages/google-cloud-video-stitcher/test/gapic_video_stitcher_service_v1.ts @@ -0,0 +1,4525 @@ +// 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. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as videostitcherserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.VideoStitcherServiceClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + videostitcherserviceModule.v1.VideoStitcherServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + videostitcherserviceModule.v1.VideoStitcherServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = + videostitcherserviceModule.v1.VideoStitcherServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.videoStitcherServiceStub, undefined); + await client.initialize(); + assert(client.videoStitcherServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.videoStitcherServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.videoStitcherServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('createCdnKey', () => { + it('invokes createCdnKey without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CreateCdnKeyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.CreateCdnKeyRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CdnKey() + ); + client.innerApiCalls.createCdnKey = stubSimpleCall(expectedResponse); + const [response] = await client.createCdnKey(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createCdnKey as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCdnKey as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCdnKey without error using callback', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CreateCdnKeyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.CreateCdnKeyRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CdnKey() + ); + client.innerApiCalls.createCdnKey = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createCdnKey( + request, + ( + err?: Error | null, + result?: protos.google.cloud.video.stitcher.v1.ICdnKey | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createCdnKey as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCdnKey as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCdnKey with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CreateCdnKeyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.CreateCdnKeyRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createCdnKey = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createCdnKey(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createCdnKey as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCdnKey as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCdnKey with closed client', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CreateCdnKeyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.CreateCdnKeyRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createCdnKey(request), expectedError); + }); + }); + + describe('getCdnKey', () => { + it('invokes getCdnKey without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.GetCdnKeyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.GetCdnKeyRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CdnKey() + ); + client.innerApiCalls.getCdnKey = stubSimpleCall(expectedResponse); + const [response] = await client.getCdnKey(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getCdnKey as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCdnKey as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCdnKey without error using callback', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.GetCdnKeyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.GetCdnKeyRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CdnKey() + ); + client.innerApiCalls.getCdnKey = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getCdnKey( + request, + ( + err?: Error | null, + result?: protos.google.cloud.video.stitcher.v1.ICdnKey | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getCdnKey as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCdnKey as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCdnKey with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.GetCdnKeyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.GetCdnKeyRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getCdnKey = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getCdnKey(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getCdnKey as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCdnKey as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCdnKey with closed client', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.GetCdnKeyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.GetCdnKeyRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getCdnKey(request), expectedError); + }); + }); + + describe('deleteCdnKey', () => { + it('invokes deleteCdnKey without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteCdnKey = stubSimpleCall(expectedResponse); + const [response] = await client.deleteCdnKey(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteCdnKey as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteCdnKey as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteCdnKey without error using callback', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteCdnKey = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteCdnKey( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteCdnKey as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteCdnKey as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteCdnKey with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteCdnKey = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteCdnKey(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteCdnKey as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteCdnKey as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteCdnKey with closed client', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteCdnKey(request), expectedError); + }); + }); + + describe('updateCdnKey', () => { + it('invokes updateCdnKey without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest() + ); + request.cdnKey ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest', + ['cdnKey', 'name'] + ); + request.cdnKey.name = defaultValue1; + const expectedHeaderRequestParams = `cdn_key.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CdnKey() + ); + client.innerApiCalls.updateCdnKey = stubSimpleCall(expectedResponse); + const [response] = await client.updateCdnKey(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateCdnKey as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCdnKey as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCdnKey without error using callback', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest() + ); + request.cdnKey ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest', + ['cdnKey', 'name'] + ); + request.cdnKey.name = defaultValue1; + const expectedHeaderRequestParams = `cdn_key.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CdnKey() + ); + client.innerApiCalls.updateCdnKey = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateCdnKey( + request, + ( + err?: Error | null, + result?: protos.google.cloud.video.stitcher.v1.ICdnKey | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateCdnKey as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCdnKey as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCdnKey with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest() + ); + request.cdnKey ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest', + ['cdnKey', 'name'] + ); + request.cdnKey.name = defaultValue1; + const expectedHeaderRequestParams = `cdn_key.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateCdnKey = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateCdnKey(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateCdnKey as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCdnKey as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCdnKey with closed client', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest() + ); + request.cdnKey ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest', + ['cdnKey', 'name'] + ); + request.cdnKey.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateCdnKey(request), expectedError); + }); + }); + + describe('createVodSession', () => { + it('invokes createVodSession without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CreateVodSessionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.CreateVodSessionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodSession() + ); + client.innerApiCalls.createVodSession = stubSimpleCall(expectedResponse); + const [response] = await client.createVodSession(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createVodSession as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createVodSession as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createVodSession without error using callback', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CreateVodSessionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.CreateVodSessionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodSession() + ); + client.innerApiCalls.createVodSession = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createVodSession( + request, + ( + err?: Error | null, + result?: protos.google.cloud.video.stitcher.v1.IVodSession | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createVodSession as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createVodSession as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createVodSession with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CreateVodSessionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.CreateVodSessionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createVodSession = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createVodSession(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createVodSession as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createVodSession as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createVodSession with closed client', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CreateVodSessionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.CreateVodSessionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createVodSession(request), expectedError); + }); + }); + + describe('getVodSession', () => { + it('invokes getVodSession without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.GetVodSessionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.GetVodSessionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodSession() + ); + client.innerApiCalls.getVodSession = stubSimpleCall(expectedResponse); + const [response] = await client.getVodSession(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getVodSession as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getVodSession as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVodSession without error using callback', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.GetVodSessionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.GetVodSessionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodSession() + ); + client.innerApiCalls.getVodSession = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getVodSession( + request, + ( + err?: Error | null, + result?: protos.google.cloud.video.stitcher.v1.IVodSession | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getVodSession as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getVodSession as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVodSession with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.GetVodSessionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.GetVodSessionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getVodSession = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getVodSession(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getVodSession as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getVodSession as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVodSession with closed client', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.GetVodSessionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.GetVodSessionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getVodSession(request), expectedError); + }); + }); + + describe('getVodStitchDetail', () => { + it('invokes getVodStitchDetail without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + ); + client.innerApiCalls.getVodStitchDetail = + stubSimpleCall(expectedResponse); + const [response] = await client.getVodStitchDetail(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getVodStitchDetail as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getVodStitchDetail as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVodStitchDetail without error using callback', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + ); + client.innerApiCalls.getVodStitchDetail = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getVodStitchDetail( + request, + ( + err?: Error | null, + result?: protos.google.cloud.video.stitcher.v1.IVodStitchDetail | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getVodStitchDetail as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getVodStitchDetail as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVodStitchDetail with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getVodStitchDetail = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getVodStitchDetail(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getVodStitchDetail as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getVodStitchDetail as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVodStitchDetail with closed client', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getVodStitchDetail(request), expectedError); + }); + }); + + describe('getVodAdTagDetail', () => { + it('invokes getVodAdTagDetail without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() + ); + client.innerApiCalls.getVodAdTagDetail = stubSimpleCall(expectedResponse); + const [response] = await client.getVodAdTagDetail(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getVodAdTagDetail as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getVodAdTagDetail as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVodAdTagDetail without error using callback', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() + ); + client.innerApiCalls.getVodAdTagDetail = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getVodAdTagDetail( + request, + ( + err?: Error | null, + result?: protos.google.cloud.video.stitcher.v1.IVodAdTagDetail | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getVodAdTagDetail as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getVodAdTagDetail as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVodAdTagDetail with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getVodAdTagDetail = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getVodAdTagDetail(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getVodAdTagDetail as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getVodAdTagDetail as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVodAdTagDetail with closed client', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getVodAdTagDetail(request), expectedError); + }); + }); + + describe('getLiveAdTagDetail', () => { + it('invokes getLiveAdTagDetail without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() + ); + client.innerApiCalls.getLiveAdTagDetail = + stubSimpleCall(expectedResponse); + const [response] = await client.getLiveAdTagDetail(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getLiveAdTagDetail as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getLiveAdTagDetail as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getLiveAdTagDetail without error using callback', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() + ); + client.innerApiCalls.getLiveAdTagDetail = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLiveAdTagDetail( + request, + ( + err?: Error | null, + result?: protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getLiveAdTagDetail as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getLiveAdTagDetail as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getLiveAdTagDetail with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getLiveAdTagDetail = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getLiveAdTagDetail(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getLiveAdTagDetail as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getLiveAdTagDetail as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getLiveAdTagDetail with closed client', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getLiveAdTagDetail(request), expectedError); + }); + }); + + describe('createSlate', () => { + it('invokes createSlate without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CreateSlateRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.CreateSlateRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.Slate() + ); + client.innerApiCalls.createSlate = stubSimpleCall(expectedResponse); + const [response] = await client.createSlate(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createSlate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createSlate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createSlate without error using callback', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CreateSlateRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.CreateSlateRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.Slate() + ); + client.innerApiCalls.createSlate = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createSlate( + request, + ( + err?: Error | null, + result?: protos.google.cloud.video.stitcher.v1.ISlate | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createSlate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createSlate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createSlate with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CreateSlateRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.CreateSlateRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createSlate = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createSlate(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createSlate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createSlate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createSlate with closed client', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CreateSlateRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.CreateSlateRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createSlate(request), expectedError); + }); + }); + + describe('getSlate', () => { + it('invokes getSlate without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.GetSlateRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.GetSlateRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.Slate() + ); + client.innerApiCalls.getSlate = stubSimpleCall(expectedResponse); + const [response] = await client.getSlate(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getSlate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getSlate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSlate without error using callback', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.GetSlateRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.GetSlateRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.Slate() + ); + client.innerApiCalls.getSlate = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getSlate( + request, + ( + err?: Error | null, + result?: protos.google.cloud.video.stitcher.v1.ISlate | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getSlate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getSlate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSlate with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.GetSlateRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.GetSlateRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getSlate = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getSlate(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getSlate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getSlate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSlate with closed client', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.GetSlateRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.GetSlateRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getSlate(request), expectedError); + }); + }); + + describe('updateSlate', () => { + it('invokes updateSlate without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.UpdateSlateRequest() + ); + request.slate ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.UpdateSlateRequest', + ['slate', 'name'] + ); + request.slate.name = defaultValue1; + const expectedHeaderRequestParams = `slate.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.Slate() + ); + client.innerApiCalls.updateSlate = stubSimpleCall(expectedResponse); + const [response] = await client.updateSlate(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateSlate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSlate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSlate without error using callback', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.UpdateSlateRequest() + ); + request.slate ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.UpdateSlateRequest', + ['slate', 'name'] + ); + request.slate.name = defaultValue1; + const expectedHeaderRequestParams = `slate.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.Slate() + ); + client.innerApiCalls.updateSlate = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateSlate( + request, + ( + err?: Error | null, + result?: protos.google.cloud.video.stitcher.v1.ISlate | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateSlate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSlate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSlate with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.UpdateSlateRequest() + ); + request.slate ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.UpdateSlateRequest', + ['slate', 'name'] + ); + request.slate.name = defaultValue1; + const expectedHeaderRequestParams = `slate.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateSlate = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateSlate(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateSlate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSlate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSlate with closed client', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.UpdateSlateRequest() + ); + request.slate ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.UpdateSlateRequest', + ['slate', 'name'] + ); + request.slate.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateSlate(request), expectedError); + }); + }); + + describe('deleteSlate', () => { + it('invokes deleteSlate without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.DeleteSlateRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.DeleteSlateRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteSlate = stubSimpleCall(expectedResponse); + const [response] = await client.deleteSlate(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteSlate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSlate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSlate without error using callback', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.DeleteSlateRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.DeleteSlateRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteSlate = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteSlate( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteSlate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSlate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSlate with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.DeleteSlateRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.DeleteSlateRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteSlate = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteSlate(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteSlate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSlate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSlate with closed client', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.DeleteSlateRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.DeleteSlateRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteSlate(request), expectedError); + }); + }); + + describe('createLiveSession', () => { + it('invokes createLiveSession without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CreateLiveSessionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.CreateLiveSessionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.LiveSession() + ); + client.innerApiCalls.createLiveSession = stubSimpleCall(expectedResponse); + const [response] = await client.createLiveSession(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createLiveSession as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createLiveSession as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createLiveSession without error using callback', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CreateLiveSessionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.CreateLiveSessionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.LiveSession() + ); + client.innerApiCalls.createLiveSession = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createLiveSession( + request, + ( + err?: Error | null, + result?: protos.google.cloud.video.stitcher.v1.ILiveSession | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createLiveSession as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createLiveSession as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createLiveSession with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CreateLiveSessionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.CreateLiveSessionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createLiveSession = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createLiveSession(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createLiveSession as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createLiveSession as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createLiveSession with closed client', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CreateLiveSessionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.CreateLiveSessionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createLiveSession(request), expectedError); + }); + }); + + describe('getLiveSession', () => { + it('invokes getLiveSession without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.GetLiveSessionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.GetLiveSessionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.LiveSession() + ); + client.innerApiCalls.getLiveSession = stubSimpleCall(expectedResponse); + const [response] = await client.getLiveSession(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getLiveSession as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getLiveSession as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getLiveSession without error using callback', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.GetLiveSessionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.GetLiveSessionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.LiveSession() + ); + client.innerApiCalls.getLiveSession = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLiveSession( + request, + ( + err?: Error | null, + result?: protos.google.cloud.video.stitcher.v1.ILiveSession | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getLiveSession as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getLiveSession as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getLiveSession with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.GetLiveSessionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.GetLiveSessionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getLiveSession = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getLiveSession(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getLiveSession as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getLiveSession as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getLiveSession with closed client', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.GetLiveSessionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.GetLiveSessionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getLiveSession(request), expectedError); + }); + }); + + describe('listCdnKeys', () => { + it('invokes listCdnKeys without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListCdnKeysRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListCdnKeysRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CdnKey() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CdnKey() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CdnKey() + ), + ]; + client.innerApiCalls.listCdnKeys = stubSimpleCall(expectedResponse); + const [response] = await client.listCdnKeys(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listCdnKeys as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCdnKeys as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCdnKeys without error using callback', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListCdnKeysRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListCdnKeysRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CdnKey() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CdnKey() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CdnKey() + ), + ]; + client.innerApiCalls.listCdnKeys = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listCdnKeys( + request, + ( + err?: Error | null, + result?: protos.google.cloud.video.stitcher.v1.ICdnKey[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listCdnKeys as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCdnKeys as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCdnKeys with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListCdnKeysRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListCdnKeysRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listCdnKeys = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listCdnKeys(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listCdnKeys as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCdnKeys as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCdnKeysStream without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListCdnKeysRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListCdnKeysRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CdnKey() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CdnKey() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CdnKey() + ), + ]; + client.descriptors.page.listCdnKeys.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listCdnKeysStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.video.stitcher.v1.CdnKey[] = []; + stream.on( + 'data', + (response: protos.google.cloud.video.stitcher.v1.CdnKey) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listCdnKeys.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listCdnKeys, request) + ); + assert( + (client.descriptors.page.listCdnKeys.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listCdnKeysStream with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListCdnKeysRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListCdnKeysRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listCdnKeys.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listCdnKeysStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.video.stitcher.v1.CdnKey[] = []; + stream.on( + 'data', + (response: protos.google.cloud.video.stitcher.v1.CdnKey) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listCdnKeys.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listCdnKeys, request) + ); + assert( + (client.descriptors.page.listCdnKeys.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listCdnKeys without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListCdnKeysRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListCdnKeysRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CdnKey() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CdnKey() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.CdnKey() + ), + ]; + client.descriptors.page.listCdnKeys.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.video.stitcher.v1.ICdnKey[] = []; + const iterable = client.listCdnKeysAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listCdnKeys.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert( + (client.descriptors.page.listCdnKeys.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listCdnKeys with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListCdnKeysRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListCdnKeysRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listCdnKeys.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listCdnKeysAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.video.stitcher.v1.ICdnKey[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listCdnKeys.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert( + (client.descriptors.page.listCdnKeys.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listVodStitchDetails', () => { + it('invokes listVodStitchDetails without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + ), + ]; + client.innerApiCalls.listVodStitchDetails = + stubSimpleCall(expectedResponse); + const [response] = await client.listVodStitchDetails(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listVodStitchDetails as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listVodStitchDetails as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listVodStitchDetails without error using callback', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + ), + ]; + client.innerApiCalls.listVodStitchDetails = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listVodStitchDetails( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.video.stitcher.v1.IVodStitchDetail[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listVodStitchDetails as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listVodStitchDetails as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listVodStitchDetails with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listVodStitchDetails = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listVodStitchDetails(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listVodStitchDetails as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listVodStitchDetails as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listVodStitchDetailsStream without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + ), + ]; + client.descriptors.page.listVodStitchDetails.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listVodStitchDetailsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.video.stitcher.v1.VodStitchDetail[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.video.stitcher.v1.VodStitchDetail) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listVodStitchDetails.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listVodStitchDetails, request) + ); + assert( + (client.descriptors.page.listVodStitchDetails.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listVodStitchDetailsStream with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listVodStitchDetails.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listVodStitchDetailsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.video.stitcher.v1.VodStitchDetail[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.video.stitcher.v1.VodStitchDetail) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listVodStitchDetails.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listVodStitchDetails, request) + ); + assert( + (client.descriptors.page.listVodStitchDetails.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listVodStitchDetails without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodStitchDetail() + ), + ]; + client.descriptors.page.listVodStitchDetails.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.video.stitcher.v1.IVodStitchDetail[] = + []; + const iterable = client.listVodStitchDetailsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listVodStitchDetails.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listVodStitchDetails.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listVodStitchDetails with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listVodStitchDetails.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listVodStitchDetailsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.video.stitcher.v1.IVodStitchDetail[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listVodStitchDetails.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listVodStitchDetails.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listVodAdTagDetails', () => { + it('invokes listVodAdTagDetails without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() + ), + ]; + client.innerApiCalls.listVodAdTagDetails = + stubSimpleCall(expectedResponse); + const [response] = await client.listVodAdTagDetails(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listVodAdTagDetails as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listVodAdTagDetails as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listVodAdTagDetails without error using callback', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() + ), + ]; + client.innerApiCalls.listVodAdTagDetails = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listVodAdTagDetails( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.video.stitcher.v1.IVodAdTagDetail[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listVodAdTagDetails as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listVodAdTagDetails as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listVodAdTagDetails with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listVodAdTagDetails = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listVodAdTagDetails(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listVodAdTagDetails as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listVodAdTagDetails as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listVodAdTagDetailsStream without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() + ), + ]; + client.descriptors.page.listVodAdTagDetails.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listVodAdTagDetailsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.video.stitcher.v1.VodAdTagDetail[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.video.stitcher.v1.VodAdTagDetail) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listVodAdTagDetails.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listVodAdTagDetails, request) + ); + assert( + (client.descriptors.page.listVodAdTagDetails.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listVodAdTagDetailsStream with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listVodAdTagDetails.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listVodAdTagDetailsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.video.stitcher.v1.VodAdTagDetail[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.video.stitcher.v1.VodAdTagDetail) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listVodAdTagDetails.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listVodAdTagDetails, request) + ); + assert( + (client.descriptors.page.listVodAdTagDetails.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listVodAdTagDetails without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.VodAdTagDetail() + ), + ]; + client.descriptors.page.listVodAdTagDetails.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.video.stitcher.v1.IVodAdTagDetail[] = + []; + const iterable = client.listVodAdTagDetailsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listVodAdTagDetails.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listVodAdTagDetails.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listVodAdTagDetails with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listVodAdTagDetails.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listVodAdTagDetailsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.video.stitcher.v1.IVodAdTagDetail[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listVodAdTagDetails.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listVodAdTagDetails.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listLiveAdTagDetails', () => { + it('invokes listLiveAdTagDetails without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() + ), + ]; + client.innerApiCalls.listLiveAdTagDetails = + stubSimpleCall(expectedResponse); + const [response] = await client.listLiveAdTagDetails(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listLiveAdTagDetails as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listLiveAdTagDetails as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listLiveAdTagDetails without error using callback', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() + ), + ]; + client.innerApiCalls.listLiveAdTagDetails = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listLiveAdTagDetails( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listLiveAdTagDetails as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listLiveAdTagDetails as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listLiveAdTagDetails with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listLiveAdTagDetails = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listLiveAdTagDetails(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listLiveAdTagDetails as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listLiveAdTagDetails as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listLiveAdTagDetailsStream without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() + ), + ]; + client.descriptors.page.listLiveAdTagDetails.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listLiveAdTagDetailsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.video.stitcher.v1.LiveAdTagDetail[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.video.stitcher.v1.LiveAdTagDetail) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listLiveAdTagDetails.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listLiveAdTagDetails, request) + ); + assert( + (client.descriptors.page.listLiveAdTagDetails.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listLiveAdTagDetailsStream with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listLiveAdTagDetails.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listLiveAdTagDetailsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.video.stitcher.v1.LiveAdTagDetail[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.video.stitcher.v1.LiveAdTagDetail) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listLiveAdTagDetails.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listLiveAdTagDetails, request) + ); + assert( + (client.descriptors.page.listLiveAdTagDetails.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listLiveAdTagDetails without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.LiveAdTagDetail() + ), + ]; + client.descriptors.page.listLiveAdTagDetails.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail[] = + []; + const iterable = client.listLiveAdTagDetailsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listLiveAdTagDetails.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listLiveAdTagDetails.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listLiveAdTagDetails with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listLiveAdTagDetails.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLiveAdTagDetailsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.video.stitcher.v1.ILiveAdTagDetail[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listLiveAdTagDetails.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listLiveAdTagDetails.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listSlates', () => { + it('invokes listSlates without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListSlatesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListSlatesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.Slate() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.Slate() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.Slate() + ), + ]; + client.innerApiCalls.listSlates = stubSimpleCall(expectedResponse); + const [response] = await client.listSlates(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listSlates as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listSlates as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSlates without error using callback', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListSlatesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListSlatesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.Slate() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.Slate() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.Slate() + ), + ]; + client.innerApiCalls.listSlates = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listSlates( + request, + ( + err?: Error | null, + result?: protos.google.cloud.video.stitcher.v1.ISlate[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listSlates as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listSlates as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSlates with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListSlatesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListSlatesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listSlates = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listSlates(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listSlates as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listSlates as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSlatesStream without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListSlatesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListSlatesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.Slate() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.Slate() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.Slate() + ), + ]; + client.descriptors.page.listSlates.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listSlatesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.video.stitcher.v1.Slate[] = []; + stream.on( + 'data', + (response: protos.google.cloud.video.stitcher.v1.Slate) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listSlates.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listSlates, request) + ); + assert( + (client.descriptors.page.listSlates.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listSlatesStream with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListSlatesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListSlatesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listSlates.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listSlatesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.video.stitcher.v1.Slate[] = []; + stream.on( + 'data', + (response: protos.google.cloud.video.stitcher.v1.Slate) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listSlates.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listSlates, request) + ); + assert( + (client.descriptors.page.listSlates.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listSlates without error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListSlatesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListSlatesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.Slate() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.Slate() + ), + generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.Slate() + ), + ]; + client.descriptors.page.listSlates.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.video.stitcher.v1.ISlate[] = []; + const iterable = client.listSlatesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listSlates.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert( + (client.descriptors.page.listSlates.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listSlates with error', async () => { + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.stitcher.v1.ListSlatesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.stitcher.v1.ListSlatesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listSlates.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listSlatesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.video.stitcher.v1.ISlate[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listSlates.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert( + (client.descriptors.page.listSlates.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + describe('cdnKey', () => { + const fakePath = '/rendered/path/cdnKey'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + cdn_key: 'cdnKeyValue', + }; + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.cdnKeyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.cdnKeyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('cdnKeyPath', () => { + const result = client.cdnKeyPath( + 'projectValue', + 'locationValue', + 'cdnKeyValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.cdnKeyPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromCdnKeyName', () => { + const result = client.matchProjectFromCdnKeyName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.cdnKeyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromCdnKeyName', () => { + const result = client.matchLocationFromCdnKeyName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.cdnKeyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCdnKeyFromCdnKeyName', () => { + const result = client.matchCdnKeyFromCdnKeyName(fakePath); + assert.strictEqual(result, 'cdnKeyValue'); + assert( + (client.pathTemplates.cdnKeyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('liveAdTagDetail', () => { + const fakePath = '/rendered/path/liveAdTagDetail'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + live_session: 'liveSessionValue', + live_ad_tag_detail: 'liveAdTagDetailValue', + }; + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.liveAdTagDetailPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.liveAdTagDetailPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('liveAdTagDetailPath', () => { + const result = client.liveAdTagDetailPath( + 'projectValue', + 'locationValue', + 'liveSessionValue', + 'liveAdTagDetailValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.liveAdTagDetailPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLiveAdTagDetailName', () => { + const result = client.matchProjectFromLiveAdTagDetailName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.liveAdTagDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLiveAdTagDetailName', () => { + const result = client.matchLocationFromLiveAdTagDetailName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.liveAdTagDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLiveSessionFromLiveAdTagDetailName', () => { + const result = client.matchLiveSessionFromLiveAdTagDetailName(fakePath); + assert.strictEqual(result, 'liveSessionValue'); + assert( + (client.pathTemplates.liveAdTagDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLiveAdTagDetailFromLiveAdTagDetailName', () => { + const result = + client.matchLiveAdTagDetailFromLiveAdTagDetailName(fakePath); + assert.strictEqual(result, 'liveAdTagDetailValue'); + assert( + (client.pathTemplates.liveAdTagDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('liveSession', () => { + const fakePath = '/rendered/path/liveSession'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + live_session: 'liveSessionValue', + }; + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.liveSessionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.liveSessionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('liveSessionPath', () => { + const result = client.liveSessionPath( + 'projectValue', + 'locationValue', + 'liveSessionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.liveSessionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLiveSessionName', () => { + const result = client.matchProjectFromLiveSessionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.liveSessionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLiveSessionName', () => { + const result = client.matchLocationFromLiveSessionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.liveSessionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLiveSessionFromLiveSessionName', () => { + const result = client.matchLiveSessionFromLiveSessionName(fakePath); + assert.strictEqual(result, 'liveSessionValue'); + assert( + (client.pathTemplates.liveSessionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('project', () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath('projectValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('slate', () => { + const fakePath = '/rendered/path/slate'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + slate: 'slateValue', + }; + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.slatePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.slatePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('slatePath', () => { + const result = client.slatePath( + 'projectValue', + 'locationValue', + 'slateValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.slatePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromSlateName', () => { + const result = client.matchProjectFromSlateName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.slatePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromSlateName', () => { + const result = client.matchLocationFromSlateName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.slatePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSlateFromSlateName', () => { + const result = client.matchSlateFromSlateName(fakePath); + assert.strictEqual(result, 'slateValue'); + assert( + (client.pathTemplates.slatePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('vodAdTagDetail', () => { + const fakePath = '/rendered/path/vodAdTagDetail'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + vod_session: 'vodSessionValue', + vod_ad_tag_detail: 'vodAdTagDetailValue', + }; + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.vodAdTagDetailPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.vodAdTagDetailPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('vodAdTagDetailPath', () => { + const result = client.vodAdTagDetailPath( + 'projectValue', + 'locationValue', + 'vodSessionValue', + 'vodAdTagDetailValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.vodAdTagDetailPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromVodAdTagDetailName', () => { + const result = client.matchProjectFromVodAdTagDetailName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.vodAdTagDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromVodAdTagDetailName', () => { + const result = client.matchLocationFromVodAdTagDetailName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.vodAdTagDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchVodSessionFromVodAdTagDetailName', () => { + const result = client.matchVodSessionFromVodAdTagDetailName(fakePath); + assert.strictEqual(result, 'vodSessionValue'); + assert( + (client.pathTemplates.vodAdTagDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchVodAdTagDetailFromVodAdTagDetailName', () => { + const result = + client.matchVodAdTagDetailFromVodAdTagDetailName(fakePath); + assert.strictEqual(result, 'vodAdTagDetailValue'); + assert( + (client.pathTemplates.vodAdTagDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('vodSession', () => { + const fakePath = '/rendered/path/vodSession'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + vod_session: 'vodSessionValue', + }; + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.vodSessionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.vodSessionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('vodSessionPath', () => { + const result = client.vodSessionPath( + 'projectValue', + 'locationValue', + 'vodSessionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.vodSessionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromVodSessionName', () => { + const result = client.matchProjectFromVodSessionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.vodSessionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromVodSessionName', () => { + const result = client.matchLocationFromVodSessionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.vodSessionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchVodSessionFromVodSessionName', () => { + const result = client.matchVodSessionFromVodSessionName(fakePath); + assert.strictEqual(result, 'vodSessionValue'); + assert( + (client.pathTemplates.vodSessionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('vodStitchDetail', () => { + const fakePath = '/rendered/path/vodStitchDetail'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + vod_session: 'vodSessionValue', + vod_stitch_detail: 'vodStitchDetailValue', + }; + const client = + new videostitcherserviceModule.v1.VideoStitcherServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.vodStitchDetailPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.vodStitchDetailPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('vodStitchDetailPath', () => { + const result = client.vodStitchDetailPath( + 'projectValue', + 'locationValue', + 'vodSessionValue', + 'vodStitchDetailValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.vodStitchDetailPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromVodStitchDetailName', () => { + const result = client.matchProjectFromVodStitchDetailName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.vodStitchDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromVodStitchDetailName', () => { + const result = client.matchLocationFromVodStitchDetailName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.vodStitchDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchVodSessionFromVodStitchDetailName', () => { + const result = client.matchVodSessionFromVodStitchDetailName(fakePath); + assert.strictEqual(result, 'vodSessionValue'); + assert( + (client.pathTemplates.vodStitchDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchVodStitchDetailFromVodStitchDetailName', () => { + const result = + client.matchVodStitchDetailFromVodStitchDetailName(fakePath); + assert.strictEqual(result, 'vodStitchDetailValue'); + assert( + (client.pathTemplates.vodStitchDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-video-stitcher/tsconfig.json b/packages/google-cloud-video-stitcher/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/packages/google-cloud-video-stitcher/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2018", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/packages/google-cloud-video-stitcher/webpack.config.js b/packages/google-cloud-video-stitcher/webpack.config.js new file mode 100644 index 00000000000..94e99ce886e --- /dev/null +++ b/packages/google-cloud-video-stitcher/webpack.config.js @@ -0,0 +1,64 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'VideoStitcherService', + filename: './video-stitcher-service.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/, + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader', + }, + ], + }, + mode: 'production', +}; diff --git a/release-please-config.json b/release-please-config.json index ddfdd72f67a..bc88c7d0561 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -101,9 +101,11 @@ "packages/google-cloud-tpu": {}, "packages/google-cloud-translate": {}, "packages/google-cloud-video-livestream": {}, + "packages/google-cloud-video-stitcher": {}, "packages/google-cloud-video-transcoder": {}, "packages/google-cloud-videointelligence": {}, "packages/google-cloud-vmmigration": {}, + "packages/google-cloud-vmwareengine": {}, "packages/google-cloud-vpcaccess": {}, "packages/google-cloud-webrisk": {}, "packages/google-cloud-websecurityscanner": {}, @@ -121,8 +123,7 @@ "packages/google-monitoring-dashboard": {}, "packages/google-storagetransfer": {}, "packages/grafeas": {}, - "packages/typeless-sample-bot": {}, - "packages/google-cloud-vmwareengine": {} + "packages/typeless-sample-bot": {} }, "plugins": [ {