From b8f70eafa0a669d340870f8b656c3847e34d4477 Mon Sep 17 00:00:00 2001 From: Benjamin Coe Date: Wed, 16 Sep 2020 14:54:28 -0700 Subject: [PATCH 001/116] build: initial library generation --- .../CODE_OF_CONDUCT.md | 43 ++++ .../CONTRIBUTING.md | 65 ++++++ .../google-cloud-video-transcoder/LICENSE | 202 ++++++++++++++++++ .../google-cloud-video-transcoder/README.md | 125 +++++++++++ .../google-cloud-video-transcoder/synth.py | 42 ++++ 5 files changed, 477 insertions(+) create mode 100644 packages/google-cloud-video-transcoder/CODE_OF_CONDUCT.md create mode 100644 packages/google-cloud-video-transcoder/CONTRIBUTING.md create mode 100644 packages/google-cloud-video-transcoder/LICENSE create mode 100644 packages/google-cloud-video-transcoder/README.md create mode 100644 packages/google-cloud-video-transcoder/synth.py diff --git a/packages/google-cloud-video-transcoder/CODE_OF_CONDUCT.md b/packages/google-cloud-video-transcoder/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..46b2a08ea6d --- /dev/null +++ b/packages/google-cloud-video-transcoder/CODE_OF_CONDUCT.md @@ -0,0 +1,43 @@ +# Contributor Code of Conduct + +As contributors and maintainers of this project, +and in the interest of fostering an open and welcoming community, +we pledge to respect all people who contribute through reporting issues, +posting feature requests, updating documentation, +submitting pull requests or patches, and other activities. + +We are committed to making participation in this project +a harassment-free experience for everyone, +regardless of level of experience, gender, gender identity and expression, +sexual orientation, disability, personal appearance, +body size, race, ethnicity, age, religion, or nationality. + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery +* Personal attacks +* Trolling or insulting/derogatory comments +* Public or private harassment +* Publishing other's private information, +such as physical or electronic +addresses, without explicit permission +* Other unethical or unprofessional conduct. + +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. +By adopting this Code of Conduct, +project maintainers commit themselves to fairly and consistently +applying these principles to every aspect of managing this project. +Project maintainers who do not follow or enforce the Code of Conduct +may be permanently removed from the project team. + +This code of conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. + +Instances of abusive, harassing, or otherwise unacceptable behavior +may be reported by opening an issue +or contacting one or more of the project maintainers. + +This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, +available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) diff --git a/packages/google-cloud-video-transcoder/CONTRIBUTING.md b/packages/google-cloud-video-transcoder/CONTRIBUTING.md new file mode 100644 index 00000000000..f6c4cf010e3 --- /dev/null +++ b/packages/google-cloud-video-transcoder/CONTRIBUTING.md @@ -0,0 +1,65 @@ +# 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. + +## 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. + gcloud auth application-default login + npm run samples-test + + # Run all system tests. + gcloud auth application-default login + npm run system-test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup diff --git a/packages/google-cloud-video-transcoder/LICENSE b/packages/google-cloud-video-transcoder/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/packages/google-cloud-video-transcoder/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-transcoder/README.md b/packages/google-cloud-video-transcoder/README.md new file mode 100644 index 00000000000..a3ca4821621 --- /dev/null +++ b/packages/google-cloud-video-transcoder/README.md @@ -0,0 +1,125 @@ +[//]: # "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 + +# [Transcoder API: Node.js Client](https://github.com/googleapis/nodejs-video-transcoder) + +[![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/transcoder.svg)](https://www.npmjs.org/package/transcoder) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-video-transcoder/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-video-transcoder) + + + + +Transcoder client for Node.js + + +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/nodejs-video-transcoder/blob/master/CHANGELOG.md). + +* [Transcoder API Node.js Client API Reference][client-docs] + +* [github.com/googleapis/nodejs-video-transcoder](https://github.com/googleapis/nodejs-video-transcoder) + +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) + + +* [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 Transcoder 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 transcoder +``` + + + + + +The [Transcoder 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. + +Client libraries targetting some end-of-life versions of Node.js are available, and +can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. + +_Legacy Node.js versions are supported as a best effort:_ + +* Legacy versions will not be tested in continuous integration. +* Some security patches may not be able to be backported. +* Dependencies will not be kept up-to-date, and features will not be backported. + +#### Legacy tags available + +* `legacy-8`: install client libraries from this dist-tag 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/nodejs-video-transcoder/blob/master/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 template in this +[directory](https://github.com/googleapis/synthtool/tree/master/synthtool/gcp/templates/node_library). + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/nodejs-video-transcoder/blob/master/LICENSE) + +[client-docs]: https://googleapis.dev/nodejs/transcoder/latest + +[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=transcoder.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started diff --git a/packages/google-cloud-video-transcoder/synth.py b/packages/google-cloud-video-transcoder/synth.py new file mode 100644 index 00000000000..aea6f23fa63 --- /dev/null +++ b/packages/google-cloud-video-transcoder/synth.py @@ -0,0 +1,42 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""This script is used to synthesize generated parts of this library.""" + +import synthtool as s +import synthtool.gcp as gcp +import synthtool.languages.node as node +import subprocess +import logging + +logging.basicConfig(level=logging.DEBUG) + +# run the gapic generator +gapic = gcp.GAPICBazel() +versions = ['v1beta1'] +for version in versions: + library = gapic.node_library( + 'policytroubleshooter', + version, + bazel_target=f"//google/cloud/video/transcoder/{version}:video-transcoder-{version}-nodejs" + ) + s.copy(library, excludes=[]) + +# Copy common templates +common_templates = gcp.CommonTemplates() +templates = common_templates.node_library( + source_location='build/src', versions=['v1']) +s.copy(templates, excludes=[]) + +node.postprocess_gapic_library() + From 78ddccb0947e56c09b4bcda0402a32471149d156 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 29 Oct 2020 15:56:33 -0700 Subject: [PATCH 002/116] feat!: initial release of @google-cloud/video-transcoder (#1) --- .../.eslintignore | 6 + .../.eslintrc.json | 3 + .../.gitattributes | 4 + .../google-cloud-video-transcoder/.gitignore | 14 + .../google-cloud-video-transcoder/.jsdoc.js | 55 + .../google-cloud-video-transcoder/.mocharc.js | 29 + packages/google-cloud-video-transcoder/.nycrc | 24 + .../.prettierignore | 6 + .../.prettierrc.js | 17 + .../.repo-metadata.json | 13 + .../CODE_OF_CONDUCT.md | 123 +- .../google-cloud-video-transcoder/README.md | 45 +- .../api-extractor.json | 369 + .../linkinator.config.json | 14 + .../package.json | 66 + .../video/transcoder/v1beta1/resources.proto | 873 + .../video/transcoder/v1beta1/services.proto | 248 + .../protos/protos.d.ts | 9491 ++++++ .../protos/protos.js | 24107 ++++++++++++++++ .../protos/protos.json | 2369 ++ .../samples/README.md | 50 + .../samples/package.json | 22 + .../samples/quickstart.js | 43 + .../samples/test/quickstart.js | 35 + .../src/index.ts | 24 + .../src/v1beta1/index.ts | 19 + .../src/v1beta1/transcoder_service_client.ts | 1457 + .../transcoder_service_client_config.json | 66 + .../transcoder_service_proto_list.json | 4 + .../synth.metadata | 102 + .../google-cloud-video-transcoder/synth.py | 6 +- .../system-test/fixtures/sample/src/index.js | 26 + .../system-test/fixtures/sample/src/index.ts | 25 + .../system-test/install.ts | 51 + .../test/gapic_transcoder_service_v1beta1.ts | 1733 ++ .../tsconfig.json | 19 + .../webpack.config.js | 64 + 37 files changed, 41577 insertions(+), 45 deletions(-) create mode 100644 packages/google-cloud-video-transcoder/.eslintignore create mode 100644 packages/google-cloud-video-transcoder/.eslintrc.json create mode 100644 packages/google-cloud-video-transcoder/.gitattributes create mode 100644 packages/google-cloud-video-transcoder/.gitignore create mode 100644 packages/google-cloud-video-transcoder/.jsdoc.js create mode 100644 packages/google-cloud-video-transcoder/.mocharc.js create mode 100644 packages/google-cloud-video-transcoder/.nycrc create mode 100644 packages/google-cloud-video-transcoder/.prettierignore create mode 100644 packages/google-cloud-video-transcoder/.prettierrc.js create mode 100644 packages/google-cloud-video-transcoder/.repo-metadata.json create mode 100644 packages/google-cloud-video-transcoder/api-extractor.json create mode 100644 packages/google-cloud-video-transcoder/linkinator.config.json create mode 100644 packages/google-cloud-video-transcoder/package.json create mode 100644 packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1beta1/resources.proto create mode 100644 packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1beta1/services.proto create mode 100644 packages/google-cloud-video-transcoder/protos/protos.d.ts create mode 100644 packages/google-cloud-video-transcoder/protos/protos.js create mode 100644 packages/google-cloud-video-transcoder/protos/protos.json create mode 100644 packages/google-cloud-video-transcoder/samples/README.md create mode 100644 packages/google-cloud-video-transcoder/samples/package.json create mode 100644 packages/google-cloud-video-transcoder/samples/quickstart.js create mode 100644 packages/google-cloud-video-transcoder/samples/test/quickstart.js create mode 100644 packages/google-cloud-video-transcoder/src/index.ts create mode 100644 packages/google-cloud-video-transcoder/src/v1beta1/index.ts create mode 100644 packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts create mode 100644 packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client_config.json create mode 100644 packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_proto_list.json create mode 100644 packages/google-cloud-video-transcoder/synth.metadata create mode 100644 packages/google-cloud-video-transcoder/system-test/fixtures/sample/src/index.js create mode 100644 packages/google-cloud-video-transcoder/system-test/fixtures/sample/src/index.ts create mode 100644 packages/google-cloud-video-transcoder/system-test/install.ts create mode 100644 packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1beta1.ts create mode 100644 packages/google-cloud-video-transcoder/tsconfig.json create mode 100644 packages/google-cloud-video-transcoder/webpack.config.js diff --git a/packages/google-cloud-video-transcoder/.eslintignore b/packages/google-cloud-video-transcoder/.eslintignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-cloud-video-transcoder/.eslintignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-video-transcoder/.eslintrc.json b/packages/google-cloud-video-transcoder/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/packages/google-cloud-video-transcoder/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-cloud-video-transcoder/.gitattributes b/packages/google-cloud-video-transcoder/.gitattributes new file mode 100644 index 00000000000..33739cb74e4 --- /dev/null +++ b/packages/google-cloud-video-transcoder/.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-transcoder/.gitignore b/packages/google-cloud-video-transcoder/.gitignore new file mode 100644 index 00000000000..5d32b23782f --- /dev/null +++ b/packages/google-cloud-video-transcoder/.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-transcoder/.jsdoc.js b/packages/google-cloud-video-transcoder/.jsdoc.js new file mode 100644 index 00000000000..ce0870843c7 --- /dev/null +++ b/packages/google-cloud-video-transcoder/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 2020 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/video-transcoder', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-cloud-video-transcoder/.mocharc.js b/packages/google-cloud-video-transcoder/.mocharc.js new file mode 100644 index 00000000000..0b600509bed --- /dev/null +++ b/packages/google-cloud-video-transcoder/.mocharc.js @@ -0,0 +1,29 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000, + "recursive": true +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/packages/google-cloud-video-transcoder/.nycrc b/packages/google-cloud-video-transcoder/.nycrc new file mode 100644 index 00000000000..b18d5472b62 --- /dev/null +++ b/packages/google-cloud-video-transcoder/.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-transcoder/.prettierignore b/packages/google-cloud-video-transcoder/.prettierignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-cloud-video-transcoder/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-video-transcoder/.prettierrc.js b/packages/google-cloud-video-transcoder/.prettierrc.js new file mode 100644 index 00000000000..d1b95106f4c --- /dev/null +++ b/packages/google-cloud-video-transcoder/.prettierrc.js @@ -0,0 +1,17 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/packages/google-cloud-video-transcoder/.repo-metadata.json b/packages/google-cloud-video-transcoder/.repo-metadata.json new file mode 100644 index 00000000000..2d5655b32e5 --- /dev/null +++ b/packages/google-cloud-video-transcoder/.repo-metadata.json @@ -0,0 +1,13 @@ +{ + "name": "transcoder", + "name_pretty": "Transcoder API", + "product_documentation": "https://googleapis.dev/nodejs/transcoder/latest", + "client_documentation": "https://googleapis.dev/nodejs/transcoder/latest", + "issue_tracker": "https://github.com/googleapis/nodejs-video-transcoder/issues", + "release_level": "beta", + "language": "nodejs", + "repo": "googleapis/nodejs-video-transcoder", + "distribution_name": "@google-cloud/video-transcoder", + "api_id": "transcoder.googleapis.com", + "requires_billing": true +} diff --git a/packages/google-cloud-video-transcoder/CODE_OF_CONDUCT.md b/packages/google-cloud-video-transcoder/CODE_OF_CONDUCT.md index 46b2a08ea6d..2add2547a81 100644 --- a/packages/google-cloud-video-transcoder/CODE_OF_CONDUCT.md +++ b/packages/google-cloud-video-transcoder/CODE_OF_CONDUCT.md @@ -1,43 +1,94 @@ -# Contributor Code of Conduct + +# Code of Conduct -As contributors and maintainers of this project, -and in the interest of fostering an open and welcoming community, -we pledge to respect all people who contribute through reporting issues, -posting feature requests, updating documentation, -submitting pull requests or patches, and other activities. +## Our Pledge -We are committed to making participation in this project -a harassment-free experience for everyone, -regardless of level of experience, gender, gender identity and expression, -sexual orientation, disability, personal appearance, -body size, race, ethnicity, age, religion, or nationality. +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 -* Personal attacks -* Trolling or insulting/derogatory comments -* Public or private harassment -* Publishing other's private information, -such as physical or electronic -addresses, without explicit permission -* Other unethical or unprofessional conduct. +* 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. -By adopting this Code of Conduct, -project maintainers commit themselves to fairly and consistently -applying these principles to every aspect of managing this project. -Project maintainers who do not follow or enforce the Code of Conduct -may be permanently removed from the project team. - -This code of conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. - -Instances of abusive, harassing, or otherwise unacceptable behavior -may be reported by opening an issue -or contacting one or more of the project maintainers. - -This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, -available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) +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-transcoder/README.md b/packages/google-cloud-video-transcoder/README.md index a3ca4821621..5483e868abe 100644 --- a/packages/google-cloud-video-transcoder/README.md +++ b/packages/google-cloud-video-transcoder/README.md @@ -5,7 +5,7 @@ # [Transcoder API: Node.js Client](https://github.com/googleapis/nodejs-video-transcoder) [![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/transcoder.svg)](https://www.npmjs.org/package/transcoder) +[![npm version](https://img.shields.io/npm/v/@google-cloud/video-transcoder.svg)](https://www.npmjs.org/package/@google-cloud/video-transcoder) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-video-transcoder/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-video-transcoder) @@ -18,7 +18,7 @@ A comprehensive list of changes in each version may be found in [the CHANGELOG](https://github.com/googleapis/nodejs-video-transcoder/blob/master/CHANGELOG.md). * [Transcoder API Node.js Client API Reference][client-docs] - +* [Transcoder API Documentation][product-docs] * [github.com/googleapis/nodejs-video-transcoder](https://github.com/googleapis/nodejs-video-transcoder) Read more about the client libraries for Cloud APIs, including the older @@ -32,8 +32,8 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. * [Quickstart](#quickstart) * [Before you begin](#before-you-begin) * [Installing the client library](#installing-the-client-library) - - + * [Using the client library](#using-the-client-library) +* [Samples](#samples) * [Versioning](#versioning) * [Contributing](#contributing) * [License](#license) @@ -51,10 +51,43 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. ### Installing the client library ```bash -npm install transcoder +npm install @google-cloud/video-transcoder ``` +### Using the client library + +```javascript +/** + * TODO(developer): Uncomment these variables before running the sample. + */ +// const projectId = 'my-project'; +// const location = 'us-central1'; +const {TranscoderServiceClient} = require('@google-cloud/video-transcoder'); +const client = new TranscoderServiceClient(); +async function listJobs() { + const [jobs] = await client.listJobs({ + parent: client.locationPath(projectId, location), + }); + console.info('jobs:'); + for (const job of jobs) { + console.info(job); + } +} +listJobs(); + +``` + + + +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-video-transcoder/tree/master/samples) directory. The samples' `README.md` +has instructions for running the samples. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Quickstart | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | @@ -117,7 +150,7 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-video-transcoder/blob/master/LICENSE) [client-docs]: https://googleapis.dev/nodejs/transcoder/latest - +[product-docs]: https://googleapis.dev/nodejs/transcoder/latest [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 diff --git a/packages/google-cloud-video-transcoder/api-extractor.json b/packages/google-cloud-video-transcoder/api-extractor.json new file mode 100644 index 00000000000..de228294b23 --- /dev/null +++ b/packages/google-cloud-video-transcoder/api-extractor.json @@ -0,0 +1,369 @@ +/** + * Config file for API Extractor. For more info, please visit: https://api-extractor.com + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + + /** + * Optionally specifies another JSON config file that this file extends from. This provides a way for + * standard settings to be shared across multiple projects. + * + * If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains + * the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be + * resolved using NodeJS require(). + * + * SUPPORTED TOKENS: none + * DEFAULT VALUE: "" + */ + // "extends": "./shared/api-extractor-base.json" + // "extends": "my-package/include/api-extractor-base.json" + + /** + * Determines the "" token that can be used with other config file settings. The project folder + * typically contains the tsconfig.json and package.json config files, but the path is user-defined. + * + * The path is resolved relative to the folder of the config file that contains the setting. + * + * The default value for "projectFolder" is the token "", which means the folder is determined by traversing + * parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder + * that contains a tsconfig.json file. If a tsconfig.json file cannot be found in this way, then an error + * will be reported. + * + * SUPPORTED TOKENS: + * DEFAULT VALUE: "" + */ + // "projectFolder": "..", + + /** + * (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor + * analyzes the symbols exported by this module. + * + * The file extension must be ".d.ts" and not ".ts". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + */ + "mainEntryPointFilePath": "/protos/protos.d.ts", + + /** + * A list of NPM package names whose exports should be treated as part of this package. + * + * For example, suppose that Webpack is used to generate a distributed bundle for the project "library1", + * and another NPM package "library2" is embedded in this bundle. Some types from library2 may become part + * of the exported API for library1, but by default API Extractor would generate a .d.ts rollup that explicitly + * imports library2. To avoid this, we can specify: + * + * "bundledPackages": [ "library2" ], + * + * This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been + * local files for library1. + */ + "bundledPackages": [ ], + + /** + * Determines how the TypeScript compiler engine will be invoked by API Extractor. + */ + "compiler": { + /** + * Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * Note: This setting will be ignored if "overrideTsconfig" is used. + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/tsconfig.json" + */ + // "tsconfigFilePath": "/tsconfig.json", + + /** + * Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. + * The object must conform to the TypeScript tsconfig schema: + * + * http://json.schemastore.org/tsconfig + * + * If omitted, then the tsconfig.json file will be read from the "projectFolder". + * + * DEFAULT VALUE: no overrideTsconfig section + */ + // "overrideTsconfig": { + // . . . + // } + + /** + * This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended + * and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when + * dependencies contain declarations that are incompatible with the TypeScript engine that API Extractor uses + * for its analysis. Where possible, the underlying issue should be fixed rather than relying on skipLibCheck. + * + * DEFAULT VALUE: false + */ + // "skipLibCheck": true, + }, + + /** + * Configures how the API report file (*.api.md) will be generated. + */ + "apiReport": { + /** + * (REQUIRED) Whether to generate an API report. + */ + "enabled": true, + + /** + * The filename for the API report files. It will be combined with "reportFolder" or "reportTempFolder" to produce + * a full file path. + * + * The file extension should be ".api.md", and the string should not contain a path separator such as "\" or "/". + * + * SUPPORTED TOKENS: , + * DEFAULT VALUE: ".api.md" + */ + // "reportFileName": ".api.md", + + /** + * Specifies the folder where the API report file is written. The file name portion is determined by + * the "reportFileName" setting. + * + * The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy, + * e.g. for an API review. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/etc/" + */ + // "reportFolder": "/etc/", + + /** + * Specifies the folder where the temporary report file is written. The file name portion is determined by + * the "reportFileName" setting. + * + * After the temporary file is written to disk, it is compared with the file in the "reportFolder". + * If they are different, a production build will fail. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/" + */ + // "reportTempFolder": "/temp/" + }, + + /** + * Configures how the doc model file (*.api.json) will be generated. + */ + "docModel": { + /** + * (REQUIRED) Whether to generate a doc model file. + */ + "enabled": true, + + /** + * The output path for the doc model file. The file extension should be ".api.json". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/.api.json" + */ + // "apiJsonFilePath": "/temp/.api.json" + }, + + /** + * Configures how the .d.ts rollup file will be generated. + */ + "dtsRollup": { + /** + * (REQUIRED) Whether to generate the .d.ts rollup file. + */ + "enabled": true, + + /** + * Specifies the output path for a .d.ts rollup file to be generated without any trimming. + * This file will include all declarations that are exported by the main entry point. + * + * If the path is an empty string, then this file will not be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/dist/.d.ts" + */ + // "untrimmedFilePath": "/dist/.d.ts", + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release. + * This file will include only declarations that are marked as "@public" or "@beta". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "betaTrimmedFilePath": "/dist/-beta.d.ts", + + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release. + * This file will include only declarations that are marked as "@public". + * + * If the path is an empty string, then this file will not be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "publicTrimmedFilePath": "/dist/-public.d.ts", + + /** + * When a declaration is trimmed, by default it will be replaced by a code comment such as + * "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the + * declaration completely. + * + * DEFAULT VALUE: false + */ + // "omitTrimmingComments": true + }, + + /** + * Configures how the tsdoc-metadata.json file will be generated. + */ + "tsdocMetadata": { + /** + * Whether to generate the tsdoc-metadata.json file. + * + * DEFAULT VALUE: true + */ + // "enabled": true, + + /** + * Specifies where the TSDoc metadata file should be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * The default value is "", which causes the path to be automatically inferred from the "tsdocMetadata", + * "typings" or "main" fields of the project's package.json. If none of these fields are set, the lookup + * falls back to "tsdoc-metadata.json" in the package folder. + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "tsdocMetadataFilePath": "/dist/tsdoc-metadata.json" + }, + + /** + * Specifies what type of newlines API Extractor should use when writing output files. By default, the output files + * will be written with Windows-style newlines. To use POSIX-style newlines, specify "lf" instead. + * To use the OS's default newline kind, specify "os". + * + * DEFAULT VALUE: "crlf" + */ + // "newlineKind": "crlf", + + /** + * Configures how API Extractor reports error and warning messages produced during analysis. + * + * There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages. + */ + "messages": { + /** + * Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing + * the input .d.ts files. + * + * TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551" + * + * DEFAULT VALUE: A single "default" entry with logLevel=warning. + */ + "compilerMessageReporting": { + /** + * Configures the default routing for messages that don't match an explicit rule in this table. + */ + "default": { + /** + * Specifies whether the message should be written to the the tool's output log. Note that + * the "addToApiReportFile" property may supersede this option. + * + * Possible values: "error", "warning", "none" + * + * Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail + * and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes + * the "--local" option), the warning is displayed but the build will not fail. + * + * DEFAULT VALUE: "warning" + */ + "logLevel": "warning", + + /** + * When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md), + * then the message will be written inside that file; otherwise, the message is instead logged according to + * the "logLevel" option. + * + * DEFAULT VALUE: false + */ + // "addToApiReportFile": false + }, + + // "TS2551": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + }, + + /** + * Configures handling of messages reported by API Extractor during its analysis. + * + * API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag" + * + * DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings + */ + "extractorMessageReporting": { + "default": { + "logLevel": "warning", + // "addToApiReportFile": false + }, + + // "ae-extra-release-tag": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + }, + + /** + * Configures handling of messages reported by the TSDoc parser when analyzing code comments. + * + * TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text" + * + * DEFAULT VALUE: A single "default" entry with logLevel=warning. + */ + "tsdocMessageReporting": { + "default": { + "logLevel": "warning", + // "addToApiReportFile": false + } + + // "tsdoc-link-tag-unescaped-text": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + } + } + +} diff --git a/packages/google-cloud-video-transcoder/linkinator.config.json b/packages/google-cloud-video-transcoder/linkinator.config.json new file mode 100644 index 00000000000..4e6801326b6 --- /dev/null +++ b/packages/google-cloud-video-transcoder/linkinator.config.json @@ -0,0 +1,14 @@ +{ + "recurse": true, + "skip": [ + "https://codecov.io/gh/googleapis/", + "www.googleapis.com", + "img.shields.io", + "https://googleapis.dev/nodejs/transcoder/latest", + "https://github.com/googleapis/nodejs-video-transcoder/blob/master/CHANGELOG.md", + "https://github.com/googleapis/nodejs-video-transcoder/tree/master/samples", + "https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/quickstart.js" + ], + "silent": true, + "concurrency": 10 +} diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json new file mode 100644 index 00000000000..81ef922ebe0 --- /dev/null +++ b/packages/google-cloud-video-transcoder/package.json @@ -0,0 +1,66 @@ +{ + "name": "@google-cloud/video-transcoder", + "version": "0.1.0", + "description": "Transcoder client for Node.js", + "repository": "googleapis/nodejs-video-transcoder", + "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 transcoder", + "transcoder", + "transcoder 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", + "prelint": "cd samples; npm link ../; npm i", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "samples-test": "cd samples/ && npm link ../ && npm test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^2.7.0" + }, + "devDependencies": { + "@types/mocha": "^8.0.3", + "@types/node": "^14.6.1", + "@types/sinon": "^9.0.5", + "c8": "^7.3.0", + "gts": "^2.0.2", + "jsdoc": "^3.6.5", + "jsdoc-fresh": "^1.0.2", + "jsdoc-region-tag": "^1.0.4", + "linkinator": "^2.1.2", + "mocha": "^8.1.2", + "null-loader": "^4.0.0", + "pack-n-play": "^1.0.0-2", + "sinon": "^9.0.3", + "ts-loader": "^8.0.3", + "typescript": "^3.9.7", + "webpack": "^4.44.1", + "webpack-cli": "^3.3.12" + }, + "engines": { + "node": ">=10.0.0" + } +} diff --git a/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1beta1/resources.proto b/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1beta1/resources.proto new file mode 100644 index 00000000000..4e2163c9dbc --- /dev/null +++ b/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1beta1/resources.proto @@ -0,0 +1,873 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.video.transcoder.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/video/transcoder/v1beta1;transcoder"; +option java_multiple_files = true; +option java_outer_classname = "ResourcesProto"; +option java_package = "com.google.cloud.video.transcoder.v1beta1"; + +// Transcoding job resource. +message Job { + option (google.api.resource) = { + type: "transcoder.googleapis.com/Job" + pattern: "projects/{project}/locations/{location}/jobs/{job}" + }; + + // The origin URI. + message OriginUri { + // HLS master manifest URI. If multiple HLS master manifests are created + // only first one is listed. + string hls = 1; + + // Dash manifest URI. If multiple Dash manifests are created, only the first + // one is listed. + string dash = 2; + } + + // The current state of the job. + enum ProcessingState { + // The processing state is not specified. + PROCESSING_STATE_UNSPECIFIED = 0; + + // The job is enqueued and will be picked up for processing soon. + PENDING = 1; + + // The job is being processed. + RUNNING = 2; + + // The job has been completed successfully. + SUCCEEDED = 3; + + // The job has failed. For additional information, see `failure_reason` and + // `failure_details` + FAILED = 4; + } + + // The resource name of the job. + // Format: `projects/{project}/locations/{location}/jobs/{job}` + string name = 1; + + // Input only. Specify the `input_uri` to populate empty `uri` fields in each element of + // `Job.config.inputs` or `JobTemplate.config.inputs` when using template. + // URI of the media. It must be stored in Cloud Storage. For example, + // `gs://bucket/inputs/file.mp4`. + string input_uri = 2 [(google.api.field_behavior) = INPUT_ONLY]; + + // Input only. Specify the `output_uri` to populate an empty `Job.config.output.uri` or + // `JobTemplate.config.output.uri` when using template. + // URI for the output file(s). For example, `gs://my-bucket/outputs/`. + string output_uri = 3 [(google.api.field_behavior) = INPUT_ONLY]; + + // Specify the `job_config` for transcoding job. When you use a `template_id` + // to create a job, the `Job.config` is populated by the `JobTemplate.config`. + oneof job_config { + // Input only. Specify the `template_id` to use for populating `Job.config`. The default + // is `preset/web-hd`. + // + // Preset Transcoder templates: + // - `preset/{preset_id}` + // + // - User defined JobTemplate: + // `{job_template_id}` + string template_id = 4 [(google.api.field_behavior) = INPUT_ONLY]; + + // The configuration for this job. + JobConfig config = 5; + } + + // Specify the priority of the job. Enter a value between 0 and 100, where 0 + // is the lowest priority and 100 is the highest priority. The default is 0. + int32 priority = 6; + + // Output only. The origin URI. + OriginUri origin_uri = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the job. + ProcessingState state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Estimated fractional progress, from `0` to `1` for each + // step. + Progress progress = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A description of the reason for the failure. This property is + // always present when `state` is `FAILED`. + string failure_reason = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. List of failure details. This property may contain additional + // information about the failure when `failure_reason` is present. + repeated FailureDetail failure_details = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the job was created. + google.protobuf.Timestamp create_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the transcoding started. + google.protobuf.Timestamp start_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the transcoding finished. + google.protobuf.Timestamp end_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Transcoding job template resource. +message JobTemplate { + option (google.api.resource) = { + type: "transcoder.googleapis.com/JobTemplate" + pattern: "projects/{project}/locations/{location}/jobTemplates/{job_template}" + }; + + // The resource name of the job template. + // Format: + // `projects/{project}/locations/{location}/jobTemplates/{job_template}` + string name = 1; + + // The configuration for this template. + JobConfig config = 2; +} + +// Job configuration +message JobConfig { + // List of input assets stored in Cloud Storage. + repeated Input inputs = 1; + + // List of `Edit atom`s. Defines the ultimate timeline of the resulting + // file or manifest. + repeated EditAtom edit_list = 2; + + // List of elementary streams. + repeated ElementaryStream elementary_streams = 3; + + // List of multiplexing settings for output streams. + repeated MuxStream mux_streams = 4; + + // List of output manifests. + repeated Manifest manifests = 5; + + // Output configuration. + Output output = 6; + + // List of ad breaks. Specifies where to insert ad break tags in the output + // manifests. + repeated AdBreak ad_breaks = 7; + + // Destination on Pub/Sub. + PubsubDestination pubsub_destination = 8; + + // List of output sprite sheets. + repeated SpriteSheet sprite_sheets = 9; + + // List of overlays on the output video, in descending Z-order. + repeated Overlay overlays = 10; +} + +// Input asset. +message Input { + // A unique key for this input. Must be specified when using advanced + // mapping and edit lists. + string key = 1; + + // URI of the media. It must be stored in Cloud Storage. Example + // `gs://bucket/inputs/file.mp4`. + // If empty the value will be populated from `Job.input_uri`. + string uri = 2; + + // Preprocessing configurations. + PreprocessingConfig preprocessing_config = 3; +} + +// Location of output file(s) in a Cloud Storage bucket. +message Output { + // URI for the output file(s). For example, `gs://my-bucket/outputs/`. + // If empty the value is populated from `Job.output_uri`. + string uri = 1; +} + +// Edit atom. +message EditAtom { + // A unique key for this atom. Must be specified when using advanced + // mapping. + string key = 1; + + // List of `Input.key`s identifying files that should be used in this atom. + // The listed `inputs` must have the same timeline. + repeated string inputs = 2; + + // End time in seconds for the atom, relative to the input file timeline. + // When `end_time_offset` is not specified, the `inputs` are used until + // the end of the atom. + google.protobuf.Duration end_time_offset = 3; + + // Start time in seconds for the atom, relative to the input file timeline. + // The default is `0s`. + google.protobuf.Duration start_time_offset = 4; +} + +// Ad break. +message AdBreak { + // Start time in seconds for the ad break, relative to the output file + // timeline. The default is `0s`. + google.protobuf.Duration start_time_offset = 1; +} + +// Encoding of an input file such as an audio, video, or text track. +// Elementary streams must be packaged before +// mapping and sharing between different output formats. +message ElementaryStream { + // A unique key for this elementary stream. + string key = 4; + + // Encoding of an audio, video, or text track. + oneof elementary_stream { + // Encoding of a video stream. + VideoStream video_stream = 1; + + // Encoding of an audio stream. + AudioStream audio_stream = 2; + + // Encoding of a text stream. For example, closed captions or subtitles. + TextStream text_stream = 3; + } +} + +// Multiplexing settings for output stream. +message MuxStream { + // A unique key for this multiplexed stream. HLS media manifests will be + // named `MuxStream.key` with the `".m3u8"` extension suffix. + string key = 1; + + // The name of the generated file. The default is `MuxStream.key` with the + // extension suffix corresponding to the `MuxStream.container`. + // + // Individual segments also have an incremental 10-digit zero-padded suffix + // starting from 0 before the extension, such as `"mux_stream0000000123.ts"`. + string file_name = 2; + + // The container format. The default is `"mp4"` + // + // Supported container formats: + // - 'ts' + // - 'fmp4'- the corresponding file extension is `".m4s"` + // - 'mp4' + // - 'vtt' + string container = 3; + + // List of `ElementaryStream.key`s multiplexed in this stream. + repeated string elementary_streams = 4; + + // Segment settings for `"ts"`, `"fmp4"` and `"vtt"`. + SegmentSettings segment_settings = 5; + + // Encryption settings. + Encryption encryption = 6; +} + +// Manifest configuration. +message Manifest { + // The manifest type can be either `"HLS"` or `"DASH"`. + enum ManifestType { + // The manifest type is not specified. + MANIFEST_TYPE_UNSPECIFIED = 0; + + // Create `"HLS"` manifest. The corresponding file extension is `".m3u8"`. + HLS = 1; + + // Create `"DASH"` manifest. The corresponding file extension is `".mpd"`. + DASH = 2; + } + + // The name of the generated file. The default is `"manifest"` with the + // extension suffix corresponding to the `Manifest.type`. + string file_name = 1; + + // Required. Type of the manifest, can be "HLS" or "DASH". + ManifestType type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. List of user given `MuxStream.key`s that should appear in this manifest. + // + // When `Manifest.type` is `HLS`, a media manifest with name `MuxStream.key` + // and `.m3u8` extension is generated for each element of the + // `Manifest.mux_streams`. + repeated string mux_streams = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// A Pub/Sub destination. +message PubsubDestination { + // The name of the Pub/Sub topic to publish job completion notification + // to. For example: `projects/{project}/topics/{topic}`. + string topic = 1; +} + +// Sprite sheet configuration. +message SpriteSheet { + // Format type. The default is `"jpeg"`. + // + // Supported formats: + // - 'jpeg' + string format = 1; + + // Required. File name prefix for the generated sprite sheets. + // + // Each sprite sheet has an incremental 10-digit zero-padded suffix starting + // from 0 before the extension, such as `"sprite_sheet0000000123.jpeg"`. + string file_prefix = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The width of sprite in pixels. Must be an even integer. + int32 sprite_width_pixels = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The height of sprite in pixels. Must be an even integer. + int32 sprite_height_pixels = 4 [(google.api.field_behavior) = REQUIRED]; + + // The maximum number of sprites per row in a sprite sheet. The default is 0, + // which indicates no maximum limit. + int32 column_count = 5; + + // The maximum number of rows per sprite sheet. When the sprite sheet is full, + // a new sprite sheet is created. The default is 0, which indicates no maximum + // limit. + int32 row_count = 6; + + // Start time in seconds, relative to the output file timeline. Determines the + // first sprite to pick. The default is `0s`. + google.protobuf.Duration start_time_offset = 7; + + // End time in seconds, relative to the output file timeline. When + // `end_time_offset` is not specified, the sprites are generated until the end + // of the output file. + google.protobuf.Duration end_time_offset = 8; + + // Specify either total number of sprites or interval to create sprites. + oneof extraction_strategy { + // Total number of sprites. Create the specified number of sprites + // distributed evenly across the timeline of the output media. The default + // is 100. + int32 total_count = 9; + + // Starting from `0s`, create sprites at regular intervals. Specify the + // interval value in seconds. + google.protobuf.Duration interval = 10; + } +} + +// Overlay configuration. +message Overlay { + // 2D normalized coordinates. Default: `{0.0, 0.0}` + message NormalizedCoordinate { + // Normalized x coordinate. + double x = 1; + + // Normalized y coordinate. + double y = 2; + } + + // Overlaid jpeg image. + message Image { + // Required. URI of the image in Cloud Storage. For example, + // `gs://bucket/inputs/image.jpeg`. + string uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // Normalized image resolution, based on output video resolution. Valid + // values: `0.0`โ€“`1.0`. To respect the original image aspect ratio, set + // either `x` or `y` to `0.0`. To use the original image resolution, set + // both `x` and `y` to `0.0`. + NormalizedCoordinate resolution = 2; + + // Target image opacity. Valid values: `1` (solid, default), + // `0` (transparent). + double alpha = 3; + } + + // Display static overlay object. + message AnimationStatic { + // Normalized coordinates based on output video resolution. Valid + // values: `0.0`โ€“`1.0`. `xy` is the upper-left coordinate of the overlay + // object. + NormalizedCoordinate xy = 1; + + // The time to start displaying the overlay object, in seconds. Default: 0 + google.protobuf.Duration start_time_offset = 2; + } + + // Display overlay object with fade animation. + message AnimationFade { + // Required. Type of fade animation: `FADE_IN` or `FADE_OUT`. + FadeType fade_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Normalized coordinates based on output video resolution. Valid + // values: `0.0`โ€“`1.0`. `xy` is the upper-left coordinate of the overlay + // object. + NormalizedCoordinate xy = 2; + + // The time to start the fade animation, in seconds. Default: 0 + google.protobuf.Duration start_time_offset = 3; + + // The time to end the fade animation, in seconds. Default: + // `start_time_offset` + 1s + google.protobuf.Duration end_time_offset = 4; + } + + // End previous overlay animation from the video. Without AnimationEnd, the + // overlay object will keep the state of previous animation until the end of + // the video. + message AnimationEnd { + // The time to end overlay object, in seconds. Default: 0 + google.protobuf.Duration start_time_offset = 1; + } + + // Animation types. + message Animation { + // Animations can be static or fade, or they can end the previous animation. + oneof animation_type { + // Display static overlay object. + AnimationStatic animation_static = 1; + + // Display overlay object with fade animation. + AnimationFade animation_fade = 2; + + // End previous animation. + AnimationEnd animation_end = 3; + } + } + + // Fade type for the overlay: `FADE_IN` or `FADE_OUT`. + enum FadeType { + // The fade type is not specified. + FADE_TYPE_UNSPECIFIED = 0; + + // Fade the overlay object into view. + FADE_IN = 1; + + // Fade the overlay object out of view. + FADE_OUT = 2; + } + + // Image overlay. + Image image = 1; + + // List of Animations. The list should be chronological, without any time + // overlap. + repeated Animation animations = 2; +} + +// Preprocessing configurations. +message PreprocessingConfig { + // Color preprocessing configuration. + message Color { + // Control color saturation of the video. Enter a value between -1 and 1, + // where -1 is fully desaturated and 1 is maximum saturation. 0 is no + // change. The default is 0. + double saturation = 1; + + // Control black and white contrast of the video. Enter a value between -1 + // and 1, where -1 is minimum contrast and 1 is maximum contrast. 0 is no + // change. The default is 0. + double contrast = 2; + + // Control brightness of the video. Enter a value between -1 and 1, where -1 + // is minimum brightness and 1 is maximum brightness. 0 is no change. The + // default is 0. + double brightness = 3; + } + + // Denoise preprocessing configuration. + message Denoise { + // Set strength of the denoise. Enter a value between 0 and 1. The higher + // the value, the smoother the image. 0 is no denoising. The default is 0. + double strength = 1; + + // Set the denoiser mode. The default is `"standard"`. + // + // Supported denoiser modes: + // - 'standard' + // - 'grain' + string tune = 2; + } + + // Deblock preprocessing configuration. + message Deblock { + // Set strength of the deblocker. Enter a value between 0 and 1. The higher + // the value, the stronger the block removal. 0 is no deblocking. The + // default is 0. + double strength = 1; + + // Enable deblocker. The default is `false`. + bool enabled = 2; + } + + // Audio preprocessing configuration. + message Audio { + // Specify audio loudness normalization in loudness units relative to full + // scale (LUFS). Enter a value between -24 and 0, where -24 is the Advanced + // Television Systems Committee (ATSC A/85), -23 is the EU R128 broadcast + // standard, -19 is the prior standard for online mono audio, -18 is the + // ReplayGain standard, -16 is the prior standard for stereo audio, -14 is + // the new online audio standard recommended by Spotify, as well as Amazon + // Echo, and 0 disables normalization. The default is 0. + double lufs = 1; + + // Enable boosting high frequency components. The default is `false`. + bool high_boost = 2; + + // Enable boosting low frequency components. The default is `false`. + bool low_boost = 3; + } + + // Color preprocessing configuration. + Color color = 1; + + // Denoise preprocessing configuration. + Denoise denoise = 2; + + // Deblock preprocessing configuration. + Deblock deblock = 3; + + // Audio preprocessing configuration. + Audio audio = 4; +} + +// Video stream resource. +message VideoStream { + // Codec type. The default is `"h264"`. + // + // Supported codecs: + // - 'h264' + // - 'h265' + // - 'vp9' + string codec = 1; + + // Enforce specified codec profile. The default is `"high"`. + // + // Supported codec profiles: + // - 'baseline' + // - 'main' + // - 'high' + string profile = 2; + + // Enforce specified codec tune. + string tune = 3; + + // Enforce specified codec preset. The default is `"veryfast"`. + string preset = 4; + + // The height of the video in pixels. Must be an even integer. + // When not specified, the height is adjusted to match the specified width and + // input aspect ratio. If both are omitted, the input height is used. + int32 height_pixels = 5; + + // The width of the video in pixels. Must be an even integer. + // When not specified, the width is adjusted to match the specified height and + // input aspect ratio. If both are omitted, the input width is used. + int32 width_pixels = 6; + + // Pixel format to use. The default is `"yuv420p"`. + // + // Supported pixel formats: + // - 'yuv420p' pixel format. + // - 'yuv422p' pixel format. + // - 'yuv444p' pixel format. + // - 'yuv420p10' 10-bit HDR pixel format. + // - 'yuv422p10' 10-bit HDR pixel format. + // - 'yuv444p10' 10-bit HDR pixel format. + // - 'yuv420p12' 12-bit HDR pixel format. + // - 'yuv422p12' 12-bit HDR pixel format. + // - 'yuv444p12' 12-bit HDR pixel format. + string pixel_format = 7; + + // Required. The video bitrate in bits per second. Must be between 1 and 1,000,000,000. + int32 bitrate_bps = 8 [(google.api.field_behavior) = REQUIRED]; + + // Specify the `rate_control_mode`. The default is `"vbr"`. + // + // Supported rate control modes: + // - 'vbr' - variable bitrate + // - 'crf' - constant rate factor + string rate_control_mode = 9; + + // Use two-pass encoding strategy to achieve better video quality. + // `VideoStream.rate_control_mode` must be `"vbr"`. The default is `false`. + bool enable_two_pass = 10; + + // Target CRF level. Must be between 10 and 36, where 10 is the highest + // quality and 36 is the most efficient compression. The default is 21. + int32 crf_level = 11; + + // Size of the Video Buffering Verifier (VBV) buffer in bits. Must be greater + // than zero. The default is equal to `VideoStream.bitrate_bps`. + int32 vbv_size_bits = 12; + + // Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. Must + // be greater than zero. The default is equal to 90% of + // `VideoStream.vbv_size_bits`. + int32 vbv_fullness_bits = 13; + + // Specifies whether an open Group of Pictures (GOP) structure should be + // allowed or not. The default is `false`. + bool allow_open_gop = 14; + + // GOP mode can be either by frame count or duration. + oneof gop_mode { + // Select the GOP size based on the specified frame count. Must be greater + // than zero. + int32 gop_frame_count = 15; + + // Select the GOP size based on the specified duration. The default is + // `"3s"`. + google.protobuf.Duration gop_duration = 16; + } + + // The entropy coder to use. The default is `"cabac"`. + // + // Supported entropy coders: + // - 'cavlc' + // - 'cabac' + string entropy_coder = 17; + + // Allow B-pyramid for reference frame selection. This may not be supported + // on all decoders. The default is `false`. + bool b_pyramid = 18; + + // The number of consecutive B-frames. Must be greater than or equal to zero. + // Must be less than `VideoStream.gop_frame_count` if set. The default is 0. + int32 b_frame_count = 19; + + // Required. The target video frame rate in frames per second (FPS). Must be less than + // or equal to 120. Will default to the input frame rate if larger than the + // input frame rate. The API will generate an output FPS that is divisible by + // the input FPS, and smaller or equal to the target FPS. + // + // The following table shows the computed video FPS given the target FPS (in + // parenthesis) and input FPS (in the first column): + // + // | | (30) | (60) | (25) | (50) | + // |--------|--------|--------|------|------| + // | 240 | Fail | Fail | Fail | Fail | + // | 120 | 30 | 60 | 20 | 30 | + // | 100 | 25 | 50 | 20 | 30 | + // | 50 | 25 | 50 | 20 | 30 | + // | 60 | 30 | 60 | 20 | 30 | + // | 59.94 | 29.97 | 59.94 | 20 | 30 | + // | 48 | 24 | 48 | 20 | 30 | + // | 30 | 30 | 30 | 20 | 30 | + // | 25 | 25 | 25 | 20 | 30 | + // | 24 | 24 | 24 | 20 | 30 | + // | 23.976 | 23.976 | 23.976 | 20 | 30 | + // | 15 | 15 | 15 | 20 | 30 | + // | 12 | 12 | 12 | 20 | 30 | + // | 10 | 10 | 10 | 20 | 30 | + double frame_rate = 20 [(google.api.field_behavior) = REQUIRED]; + + // Specify the intensity of the adaptive quantizer (AQ). Must be between 0 and + // 1, where 0 disables the quantizer and 1 maximizes the quantizer. A + // higher value equals a lower bitrate but smoother image. The default is 0. + double aq_strength = 21; +} + +// Audio stream resource. +message AudioStream { + // The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`. + message AudioAtom { + // The audio channel. + message AudioChannel { + // Identifies which input file, track, and channel should be used. + message AudioChannelInput { + // Required. The `Input.key` that identifies the input file. + string key = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The zero-based index of the track in the input file. + int32 track = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The zero-based index of the channel in the input file. + int32 channel = 3 [(google.api.field_behavior) = REQUIRED]; + + // Audio volume control in dB. Negative values decrease volume, + // positive values increase. The default is 0. + double gain_db = 4; + } + + // List of `Job.inputs` for this audio channel. + repeated AudioChannelInput inputs = 2; + } + + // Required. The `EditAtom.key` that references the atom with audio inputs in the + // `Job.edit_list`. + string key = 1 [(google.api.field_behavior) = REQUIRED]; + + // List of `Channel`s for this audio stream. + // for in-depth explanation. + repeated AudioChannel channels = 2; + } + + // The codec for this audio stream. The default is `"aac"`. + // + // Supported audio codecs: + // - 'aac' + // - 'aac-he' + // - 'aac-he-v2' + // - 'mp3' + // - 'ac3' + // - 'eac3' + string codec = 1; + + // Required. Audio bitrate in bits per second. Must be between 1 and 10,000,000. + int32 bitrate_bps = 2 [(google.api.field_behavior) = REQUIRED]; + + // Number of audio channels. Must be between 1 and 6. The default is 2. + int32 channel_count = 3; + + // A list of channel names specifying layout of the audio channels. + // This only affects the metadata embedded in the container headers, if + // supported by the specified format. The default is `["fl", "fr"]`. + // + // Supported channel names: + // - 'fl' - Front left channel + // - 'fr' - Front right channel + // - 'sl' - Side left channel + // - 'sr' - Side right channel + // - 'fc' - Front center channel + // - 'lfe' - Low frequency + repeated string channel_layout = 4; + + // The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`. + repeated AudioAtom mapping = 5; + + // The audio sample rate in Hertz. The default is 48000 Hertz. + int32 sample_rate_hertz = 6; +} + +// Encoding of a text stream. For example, closed captions or subtitles. +message TextStream { + // The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`. + message TextAtom { + // Identifies which input file and track should be used. + message TextInput { + // Required. The `Input.key` that identifies the input file. + string key = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The zero-based index of the track in the input file. + int32 track = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Required. The `EditAtom.key` that references atom with text inputs in the + // `Job.edit_list`. + string key = 1 [(google.api.field_behavior) = REQUIRED]; + + // List of `Job.inputs` that should be embedded in this atom. Only one + // input is supported. + repeated TextInput inputs = 2; + } + + // The codec for this text stream. The default is `"webvtt"`. + // + // Supported text codecs: + // - 'srt' + // - 'ttml' + // - 'cea608' + // - 'cea708' + // - 'webvtt' + string codec = 1; + + // Required. The BCP-47 language code, such as `"en-US"` or `"sr-Latn"`. For more + // information, see + // https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + string language_code = 2 [(google.api.field_behavior) = REQUIRED]; + + // The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`. + repeated TextAtom mapping = 3; +} + +// Segment settings for `"ts"`, `"fmp4"` and `"vtt"`. +message SegmentSettings { + // Duration of the segments in seconds. The default is `"6.0s"`. + google.protobuf.Duration segment_duration = 1; + + // Required. Create an individual segment file. The default is `false`. + bool individual_segments = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Encryption settings. +message Encryption { + // Configuration for AES-128 encryption. + message Aes128Encryption { + // Required. URI of the key delivery service. This URI is inserted into the M3U8 + // header. + string key_uri = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Configuration for SAMPLE-AES encryption. + message SampleAesEncryption { + // Required. URI of the key delivery service. This URI is inserted into the M3U8 + // header. + string key_uri = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Configuration for MPEG Common Encryption (MPEG-CENC). + message MpegCommonEncryption { + // Required. 128 bit Key ID represented as lowercase hexadecimal digits for use with + // common encryption. + string key_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Specify the encryption scheme. + // + // Supported encryption schemes: + // - 'cenc' + // - 'cbcs' + string scheme = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Required. 128 bit encryption key represented as lowercase hexadecimal digits. + string key = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. 128 bit Initialization Vector (IV) represented as lowercase hexadecimal + // digits. + string iv = 2 [(google.api.field_behavior) = REQUIRED]; + + // Encryption mode can be either `aes` or `cenc`. + oneof encryption_mode { + // Configuration for AES-128 encryption. + Aes128Encryption aes_128 = 3; + + // Configuration for SAMPLE-AES encryption. + SampleAesEncryption sample_aes = 4; + + // Configuration for MPEG Common Encryption (MPEG-CENC). + MpegCommonEncryption mpeg_cenc = 5; + } +} + +// Estimated fractional progress for each step, from `0` to `1`. +message Progress { + // Estimated fractional progress for `analyzing` step. + double analyzed = 1; + + // Estimated fractional progress for `encoding` step. + double encoded = 2; + + // Estimated fractional progress for `uploading` step. + double uploaded = 3; + + // Estimated fractional progress for `notifying` step. + double notified = 4; +} + +// Additional information about the reasons for the failure. +message FailureDetail { + // A description of the failure. + string description = 1; +} diff --git a/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1beta1/services.proto b/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1beta1/services.proto new file mode 100644 index 00000000000..0ec2e05cb97 --- /dev/null +++ b/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1beta1/services.proto @@ -0,0 +1,248 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.video.transcoder.v1beta1; + +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/transcoder/v1beta1/resources.proto"; +import "google/protobuf/empty.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/video/transcoder/v1beta1;transcoder"; +option java_multiple_files = true; +option java_outer_classname = "ServicesProto"; +option java_package = "com.google.cloud.video.transcoder.v1beta1"; + +// Using the Transcoder API, you can queue asynchronous jobs for transcoding +// media into various output formats. Output formats may include different +// streaming standards such as HTTP Live Streaming (HLS) and Dynamic Adaptive +// Streaming over HTTP (DASH). You can also customize jobs using advanced +// features such as Digital Rights Management (DRM), audio equalization, content +// concatenation, and digital ad-stitch ready content generation. +service TranscoderService { + option (google.api.default_host) = "transcoder.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a job in the specified region. + rpc CreateJob(CreateJobRequest) returns (Job) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/jobs" + body: "job" + }; + option (google.api.method_signature) = "parent,job"; + } + + // Lists jobs in the specified region. + rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/jobs" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the job data. + rpc GetJob(GetJobRequest) returns (Job) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/jobs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes a job. + rpc DeleteJob(DeleteJobRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/jobs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a job template in the specified region. + rpc CreateJobTemplate(CreateJobTemplateRequest) returns (JobTemplate) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/jobTemplates" + body: "job_template" + }; + option (google.api.method_signature) = "parent,job_template,job_template_id"; + } + + // Lists job templates in the specified region. + rpc ListJobTemplates(ListJobTemplatesRequest) returns (ListJobTemplatesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/jobTemplates" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the job template data. + rpc GetJobTemplate(GetJobTemplateRequest) returns (JobTemplate) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/jobTemplates/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes a job template. + rpc DeleteJobTemplate(DeleteJobTemplateRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/jobTemplates/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Request message for `TranscoderService.CreateJob`. +message CreateJobRequest { + // Required. The parent location to create and process this job. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. Parameters for creating transcoding job. + Job job = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for `TranscoderService.ListJobs`. +// The parent location from which to retrieve the collection of jobs. +message ListJobsRequest { + // Required. Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // 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; +} + +// Request message for `TranscoderService.GetJob`. +message GetJobRequest { + // Required. The name of the job to retrieve. + // Format: `projects/{project}/locations/{location}/jobs/{job}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "transcoder.googleapis.com/Job" + } + ]; +} + +// Request message for `TranscoderService.DeleteJob`. +message DeleteJobRequest { + // Required. The name of the job to delete. + // Format: `projects/{project}/locations/{location}/jobs/{job}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "transcoder.googleapis.com/Job" + } + ]; +} + +// Response message for `TranscoderService.ListJobs`. +message ListJobsResponse { + // List of jobs in the specified region. + repeated Job jobs = 1; + + // The pagination token. + string next_page_token = 2; +} + +// Request message for `TranscoderService.CreateJobTemplate`. +message CreateJobTemplateRequest { + // Required. The parent location to create this job template. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. Parameters for creating job template. + JobTemplate job_template = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the job template, which will become the final component + // of the job template's resource name. + // + // This value should be 4-63 characters, and valid characters must match the + // regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. + string job_template_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for `TranscoderService.ListJobTemplates`. +message ListJobTemplatesRequest { + // Required. The parent location from which to retrieve the collection of job templates. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // 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; +} + +// Request message for `TranscoderService.GetJobTemplate`. +message GetJobTemplateRequest { + // Required. The name of the job template to retrieve. + // Format: + // `projects/{project}/locations/{location}/jobTemplates/{job_template}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "transcoder.googleapis.com/JobTemplate" + } + ]; +} + +// Request message for `TranscoderService.DeleteJobTemplate`. +message DeleteJobTemplateRequest { + // Required. The name of the job template to delete. + // `projects/{project}/locations/{location}/jobTemplates/{job_template}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "transcoder.googleapis.com/JobTemplate" + } + ]; +} + +// Response message for `TranscoderService.ListJobTemplates`. +message ListJobTemplatesResponse { + // List of job templates in the specified region. + repeated JobTemplate job_templates = 1; + + // The pagination token. + string next_page_token = 2; +} diff --git a/packages/google-cloud-video-transcoder/protos/protos.d.ts b/packages/google-cloud-video-transcoder/protos/protos.d.ts new file mode 100644 index 00000000000..fbf0b25a415 --- /dev/null +++ b/packages/google-cloud-video-transcoder/protos/protos.d.ts @@ -0,0 +1,9491 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import * as Long from "long"; +import {protobuf as $protobuf} from "google-gax"; +/** Namespace google. */ +export namespace google { + + /** Namespace cloud. */ + namespace cloud { + + /** Namespace video. */ + namespace video { + + /** Namespace transcoder. */ + namespace transcoder { + + /** Namespace v1beta1. */ + namespace v1beta1 { + + /** Properties of a Job. */ + interface IJob { + + /** Job name */ + name?: (string|null); + + /** Job inputUri */ + inputUri?: (string|null); + + /** Job outputUri */ + outputUri?: (string|null); + + /** Job templateId */ + templateId?: (string|null); + + /** Job config */ + config?: (google.cloud.video.transcoder.v1beta1.IJobConfig|null); + + /** Job priority */ + priority?: (number|null); + + /** Job originUri */ + originUri?: (google.cloud.video.transcoder.v1beta1.Job.IOriginUri|null); + + /** Job state */ + state?: (google.cloud.video.transcoder.v1beta1.Job.ProcessingState|keyof typeof google.cloud.video.transcoder.v1beta1.Job.ProcessingState|null); + + /** Job progress */ + progress?: (google.cloud.video.transcoder.v1beta1.IProgress|null); + + /** Job failureReason */ + failureReason?: (string|null); + + /** Job failureDetails */ + failureDetails?: (google.cloud.video.transcoder.v1beta1.IFailureDetail[]|null); + + /** Job createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Job startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** Job endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a Job. */ + class Job implements IJob { + + /** + * Constructs a new Job. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.IJob); + + /** Job name. */ + public name: string; + + /** Job inputUri. */ + public inputUri: string; + + /** Job outputUri. */ + public outputUri: string; + + /** Job templateId. */ + public templateId: string; + + /** Job config. */ + public config?: (google.cloud.video.transcoder.v1beta1.IJobConfig|null); + + /** Job priority. */ + public priority: number; + + /** Job originUri. */ + public originUri?: (google.cloud.video.transcoder.v1beta1.Job.IOriginUri|null); + + /** Job state. */ + public state: (google.cloud.video.transcoder.v1beta1.Job.ProcessingState|keyof typeof google.cloud.video.transcoder.v1beta1.Job.ProcessingState); + + /** Job progress. */ + public progress?: (google.cloud.video.transcoder.v1beta1.IProgress|null); + + /** Job failureReason. */ + public failureReason: string; + + /** Job failureDetails. */ + public failureDetails: google.cloud.video.transcoder.v1beta1.IFailureDetail[]; + + /** Job createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Job startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** Job endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** Job jobConfig. */ + public jobConfig?: ("templateId"|"config"); + + /** + * Creates a new Job instance using the specified properties. + * @param [properties] Properties to set + * @returns Job instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.IJob): google.cloud.video.transcoder.v1beta1.Job; + + /** + * Encodes the specified Job message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Job.verify|verify} messages. + * @param message Job message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.IJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Job message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Job.verify|verify} messages. + * @param message Job message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Job message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Job + * @throws {Error} If the payload is not 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.transcoder.v1beta1.Job; + + /** + * Decodes a Job message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Job + * @throws {Error} If the payload 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.transcoder.v1beta1.Job; + + /** + * Verifies a Job message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Job message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Job + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Job; + + /** + * Creates a plain object from a Job message. Also converts values to other types if specified. + * @param message Job + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.Job, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Job to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Job { + + /** Properties of an OriginUri. */ + interface IOriginUri { + + /** OriginUri hls */ + hls?: (string|null); + + /** OriginUri dash */ + dash?: (string|null); + } + + /** Represents an OriginUri. */ + class OriginUri implements IOriginUri { + + /** + * Constructs a new OriginUri. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.Job.IOriginUri); + + /** OriginUri hls. */ + public hls: string; + + /** OriginUri dash. */ + public dash: string; + + /** + * Creates a new OriginUri instance using the specified properties. + * @param [properties] Properties to set + * @returns OriginUri instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.Job.IOriginUri): google.cloud.video.transcoder.v1beta1.Job.OriginUri; + + /** + * Encodes the specified OriginUri message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Job.OriginUri.verify|verify} messages. + * @param message OriginUri message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.Job.IOriginUri, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OriginUri message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Job.OriginUri.verify|verify} messages. + * @param message OriginUri message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.Job.IOriginUri, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OriginUri message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OriginUri + * @throws {Error} If the payload is not 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.transcoder.v1beta1.Job.OriginUri; + + /** + * Decodes an OriginUri message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OriginUri + * @throws {Error} If the payload 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.transcoder.v1beta1.Job.OriginUri; + + /** + * Verifies an OriginUri message. + * @param message Plain 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 OriginUri message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OriginUri + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Job.OriginUri; + + /** + * Creates a plain object from an OriginUri message. Also converts values to other types if specified. + * @param message OriginUri + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.Job.OriginUri, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OriginUri to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** ProcessingState enum. */ + enum ProcessingState { + PROCESSING_STATE_UNSPECIFIED = 0, + PENDING = 1, + RUNNING = 2, + SUCCEEDED = 3, + FAILED = 4 + } + } + + /** Properties of a JobTemplate. */ + interface IJobTemplate { + + /** JobTemplate name */ + name?: (string|null); + + /** JobTemplate config */ + config?: (google.cloud.video.transcoder.v1beta1.IJobConfig|null); + } + + /** Represents a JobTemplate. */ + class JobTemplate implements IJobTemplate { + + /** + * Constructs a new JobTemplate. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.IJobTemplate); + + /** JobTemplate name. */ + public name: string; + + /** JobTemplate config. */ + public config?: (google.cloud.video.transcoder.v1beta1.IJobConfig|null); + + /** + * Creates a new JobTemplate instance using the specified properties. + * @param [properties] Properties to set + * @returns JobTemplate instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.IJobTemplate): google.cloud.video.transcoder.v1beta1.JobTemplate; + + /** + * Encodes the specified JobTemplate message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.JobTemplate.verify|verify} messages. + * @param message JobTemplate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.IJobTemplate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JobTemplate message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.JobTemplate.verify|verify} messages. + * @param message JobTemplate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IJobTemplate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JobTemplate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JobTemplate + * @throws {Error} If the payload is not 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.transcoder.v1beta1.JobTemplate; + + /** + * Decodes a JobTemplate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JobTemplate + * @throws {Error} If the payload 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.transcoder.v1beta1.JobTemplate; + + /** + * Verifies a JobTemplate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JobTemplate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JobTemplate + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.JobTemplate; + + /** + * Creates a plain object from a JobTemplate message. Also converts values to other types if specified. + * @param message JobTemplate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.JobTemplate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JobTemplate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a JobConfig. */ + interface IJobConfig { + + /** JobConfig inputs */ + inputs?: (google.cloud.video.transcoder.v1beta1.IInput[]|null); + + /** JobConfig editList */ + editList?: (google.cloud.video.transcoder.v1beta1.IEditAtom[]|null); + + /** JobConfig elementaryStreams */ + elementaryStreams?: (google.cloud.video.transcoder.v1beta1.IElementaryStream[]|null); + + /** JobConfig muxStreams */ + muxStreams?: (google.cloud.video.transcoder.v1beta1.IMuxStream[]|null); + + /** JobConfig manifests */ + manifests?: (google.cloud.video.transcoder.v1beta1.IManifest[]|null); + + /** JobConfig output */ + output?: (google.cloud.video.transcoder.v1beta1.IOutput|null); + + /** JobConfig adBreaks */ + adBreaks?: (google.cloud.video.transcoder.v1beta1.IAdBreak[]|null); + + /** JobConfig pubsubDestination */ + pubsubDestination?: (google.cloud.video.transcoder.v1beta1.IPubsubDestination|null); + + /** JobConfig spriteSheets */ + spriteSheets?: (google.cloud.video.transcoder.v1beta1.ISpriteSheet[]|null); + + /** JobConfig overlays */ + overlays?: (google.cloud.video.transcoder.v1beta1.IOverlay[]|null); + } + + /** Represents a JobConfig. */ + class JobConfig implements IJobConfig { + + /** + * Constructs a new JobConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.IJobConfig); + + /** JobConfig inputs. */ + public inputs: google.cloud.video.transcoder.v1beta1.IInput[]; + + /** JobConfig editList. */ + public editList: google.cloud.video.transcoder.v1beta1.IEditAtom[]; + + /** JobConfig elementaryStreams. */ + public elementaryStreams: google.cloud.video.transcoder.v1beta1.IElementaryStream[]; + + /** JobConfig muxStreams. */ + public muxStreams: google.cloud.video.transcoder.v1beta1.IMuxStream[]; + + /** JobConfig manifests. */ + public manifests: google.cloud.video.transcoder.v1beta1.IManifest[]; + + /** JobConfig output. */ + public output?: (google.cloud.video.transcoder.v1beta1.IOutput|null); + + /** JobConfig adBreaks. */ + public adBreaks: google.cloud.video.transcoder.v1beta1.IAdBreak[]; + + /** JobConfig pubsubDestination. */ + public pubsubDestination?: (google.cloud.video.transcoder.v1beta1.IPubsubDestination|null); + + /** JobConfig spriteSheets. */ + public spriteSheets: google.cloud.video.transcoder.v1beta1.ISpriteSheet[]; + + /** JobConfig overlays. */ + public overlays: google.cloud.video.transcoder.v1beta1.IOverlay[]; + + /** + * Creates a new JobConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns JobConfig instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.IJobConfig): google.cloud.video.transcoder.v1beta1.JobConfig; + + /** + * Encodes the specified JobConfig message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.JobConfig.verify|verify} messages. + * @param message JobConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.IJobConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JobConfig message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.JobConfig.verify|verify} messages. + * @param message JobConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IJobConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JobConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JobConfig + * @throws {Error} If the payload is not 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.transcoder.v1beta1.JobConfig; + + /** + * Decodes a JobConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JobConfig + * @throws {Error} If the payload 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.transcoder.v1beta1.JobConfig; + + /** + * Verifies a JobConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JobConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JobConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.JobConfig; + + /** + * Creates a plain object from a JobConfig message. Also converts values to other types if specified. + * @param message JobConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.JobConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JobConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Input. */ + interface IInput { + + /** Input key */ + key?: (string|null); + + /** Input uri */ + uri?: (string|null); + + /** Input preprocessingConfig */ + preprocessingConfig?: (google.cloud.video.transcoder.v1beta1.IPreprocessingConfig|null); + } + + /** Represents an Input. */ + class Input implements IInput { + + /** + * Constructs a new Input. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.IInput); + + /** Input key. */ + public key: string; + + /** Input uri. */ + public uri: string; + + /** Input preprocessingConfig. */ + public preprocessingConfig?: (google.cloud.video.transcoder.v1beta1.IPreprocessingConfig|null); + + /** + * Creates a new Input instance using the specified properties. + * @param [properties] Properties to set + * @returns Input instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.IInput): google.cloud.video.transcoder.v1beta1.Input; + + /** + * Encodes the specified Input message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Input.verify|verify} messages. + * @param message Input message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.IInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Input message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Input.verify|verify} messages. + * @param message Input message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Input message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Input + * @throws {Error} If the payload is not 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.transcoder.v1beta1.Input; + + /** + * Decodes an Input message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Input + * @throws {Error} If the payload 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.transcoder.v1beta1.Input; + + /** + * Verifies an Input message. + * @param message Plain 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 Input message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Input + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Input; + + /** + * Creates a plain object from an Input message. Also converts values to other types if specified. + * @param message Input + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.Input, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Input to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Output. */ + interface IOutput { + + /** Output uri */ + uri?: (string|null); + } + + /** Represents an Output. */ + class Output implements IOutput { + + /** + * Constructs a new Output. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.IOutput); + + /** Output uri. */ + public uri: string; + + /** + * Creates a new Output instance using the specified properties. + * @param [properties] Properties to set + * @returns Output instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.IOutput): google.cloud.video.transcoder.v1beta1.Output; + + /** + * Encodes the specified Output message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Output.verify|verify} messages. + * @param message Output message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.IOutput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Output message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Output.verify|verify} messages. + * @param message Output message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IOutput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Output message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Output + * @throws {Error} If the payload is not 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.transcoder.v1beta1.Output; + + /** + * Decodes an Output message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Output + * @throws {Error} If the payload 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.transcoder.v1beta1.Output; + + /** + * Verifies an Output message. + * @param message Plain 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 Output message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Output + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Output; + + /** + * Creates a plain object from an Output message. Also converts values to other types if specified. + * @param message Output + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.Output, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Output to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EditAtom. */ + interface IEditAtom { + + /** EditAtom key */ + key?: (string|null); + + /** EditAtom inputs */ + inputs?: (string[]|null); + + /** EditAtom endTimeOffset */ + endTimeOffset?: (google.protobuf.IDuration|null); + + /** EditAtom startTimeOffset */ + startTimeOffset?: (google.protobuf.IDuration|null); + } + + /** Represents an EditAtom. */ + class EditAtom implements IEditAtom { + + /** + * Constructs a new EditAtom. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.IEditAtom); + + /** EditAtom key. */ + public key: string; + + /** EditAtom inputs. */ + public inputs: string[]; + + /** EditAtom endTimeOffset. */ + public endTimeOffset?: (google.protobuf.IDuration|null); + + /** EditAtom startTimeOffset. */ + public startTimeOffset?: (google.protobuf.IDuration|null); + + /** + * Creates a new EditAtom instance using the specified properties. + * @param [properties] Properties to set + * @returns EditAtom instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.IEditAtom): google.cloud.video.transcoder.v1beta1.EditAtom; + + /** + * Encodes the specified EditAtom message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.EditAtom.verify|verify} messages. + * @param message EditAtom message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.IEditAtom, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EditAtom message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.EditAtom.verify|verify} messages. + * @param message EditAtom message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IEditAtom, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EditAtom message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EditAtom + * @throws {Error} If the payload is not 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.transcoder.v1beta1.EditAtom; + + /** + * Decodes an EditAtom message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EditAtom + * @throws {Error} If the payload 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.transcoder.v1beta1.EditAtom; + + /** + * Verifies an EditAtom message. + * @param message Plain 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 EditAtom message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EditAtom + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.EditAtom; + + /** + * Creates a plain object from an EditAtom message. Also converts values to other types if specified. + * @param message EditAtom + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.EditAtom, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EditAtom to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AdBreak. */ + interface IAdBreak { + + /** AdBreak startTimeOffset */ + startTimeOffset?: (google.protobuf.IDuration|null); + } + + /** Represents an AdBreak. */ + class AdBreak implements IAdBreak { + + /** + * Constructs a new AdBreak. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.IAdBreak); + + /** AdBreak startTimeOffset. */ + public startTimeOffset?: (google.protobuf.IDuration|null); + + /** + * Creates a new AdBreak instance using the specified properties. + * @param [properties] Properties to set + * @returns AdBreak instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.IAdBreak): google.cloud.video.transcoder.v1beta1.AdBreak; + + /** + * Encodes the specified AdBreak message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AdBreak.verify|verify} messages. + * @param message AdBreak message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.IAdBreak, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdBreak message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AdBreak.verify|verify} messages. + * @param message AdBreak message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IAdBreak, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdBreak message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdBreak + * @throws {Error} If the payload is not 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.transcoder.v1beta1.AdBreak; + + /** + * Decodes an AdBreak message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdBreak + * @throws {Error} If the payload 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.transcoder.v1beta1.AdBreak; + + /** + * Verifies an AdBreak message. + * @param message Plain 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 AdBreak message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdBreak + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.AdBreak; + + /** + * Creates a plain object from an AdBreak message. Also converts values to other types if specified. + * @param message AdBreak + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.AdBreak, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdBreak to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ElementaryStream. */ + interface IElementaryStream { + + /** ElementaryStream key */ + key?: (string|null); + + /** ElementaryStream videoStream */ + videoStream?: (google.cloud.video.transcoder.v1beta1.IVideoStream|null); + + /** ElementaryStream audioStream */ + audioStream?: (google.cloud.video.transcoder.v1beta1.IAudioStream|null); + + /** ElementaryStream textStream */ + textStream?: (google.cloud.video.transcoder.v1beta1.ITextStream|null); + } + + /** Represents an ElementaryStream. */ + class ElementaryStream implements IElementaryStream { + + /** + * Constructs a new ElementaryStream. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.IElementaryStream); + + /** ElementaryStream key. */ + public key: string; + + /** ElementaryStream videoStream. */ + public videoStream?: (google.cloud.video.transcoder.v1beta1.IVideoStream|null); + + /** ElementaryStream audioStream. */ + public audioStream?: (google.cloud.video.transcoder.v1beta1.IAudioStream|null); + + /** ElementaryStream textStream. */ + public textStream?: (google.cloud.video.transcoder.v1beta1.ITextStream|null); + + /** ElementaryStream elementaryStream. */ + public elementaryStream?: ("videoStream"|"audioStream"|"textStream"); + + /** + * Creates a new ElementaryStream instance using the specified properties. + * @param [properties] Properties to set + * @returns ElementaryStream instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.IElementaryStream): google.cloud.video.transcoder.v1beta1.ElementaryStream; + + /** + * Encodes the specified ElementaryStream message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ElementaryStream.verify|verify} messages. + * @param message ElementaryStream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.IElementaryStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ElementaryStream message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ElementaryStream.verify|verify} messages. + * @param message ElementaryStream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IElementaryStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ElementaryStream message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ElementaryStream + * @throws {Error} If the payload is not 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.transcoder.v1beta1.ElementaryStream; + + /** + * Decodes an ElementaryStream message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ElementaryStream + * @throws {Error} If the payload 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.transcoder.v1beta1.ElementaryStream; + + /** + * Verifies an ElementaryStream message. + * @param message Plain 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 ElementaryStream message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ElementaryStream + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.ElementaryStream; + + /** + * Creates a plain object from an ElementaryStream message. Also converts values to other types if specified. + * @param message ElementaryStream + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.ElementaryStream, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ElementaryStream to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MuxStream. */ + interface IMuxStream { + + /** MuxStream key */ + key?: (string|null); + + /** MuxStream fileName */ + fileName?: (string|null); + + /** MuxStream container */ + container?: (string|null); + + /** MuxStream elementaryStreams */ + elementaryStreams?: (string[]|null); + + /** MuxStream segmentSettings */ + segmentSettings?: (google.cloud.video.transcoder.v1beta1.ISegmentSettings|null); + + /** MuxStream encryption */ + encryption?: (google.cloud.video.transcoder.v1beta1.IEncryption|null); + } + + /** Represents a MuxStream. */ + class MuxStream implements IMuxStream { + + /** + * Constructs a new MuxStream. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.IMuxStream); + + /** MuxStream key. */ + public key: string; + + /** MuxStream fileName. */ + public fileName: string; + + /** MuxStream container. */ + public container: string; + + /** MuxStream elementaryStreams. */ + public elementaryStreams: string[]; + + /** MuxStream segmentSettings. */ + public segmentSettings?: (google.cloud.video.transcoder.v1beta1.ISegmentSettings|null); + + /** MuxStream encryption. */ + public encryption?: (google.cloud.video.transcoder.v1beta1.IEncryption|null); + + /** + * Creates a new MuxStream instance using the specified properties. + * @param [properties] Properties to set + * @returns MuxStream instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.IMuxStream): google.cloud.video.transcoder.v1beta1.MuxStream; + + /** + * Encodes the specified MuxStream message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.MuxStream.verify|verify} messages. + * @param message MuxStream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.IMuxStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MuxStream message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.MuxStream.verify|verify} messages. + * @param message MuxStream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IMuxStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MuxStream message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MuxStream + * @throws {Error} If the payload is not 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.transcoder.v1beta1.MuxStream; + + /** + * Decodes a MuxStream message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MuxStream + * @throws {Error} If the payload 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.transcoder.v1beta1.MuxStream; + + /** + * Verifies a MuxStream message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MuxStream message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MuxStream + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.MuxStream; + + /** + * Creates a plain object from a MuxStream message. Also converts values to other types if specified. + * @param message MuxStream + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.MuxStream, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MuxStream to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Manifest. */ + interface IManifest { + + /** Manifest fileName */ + fileName?: (string|null); + + /** Manifest type */ + type?: (google.cloud.video.transcoder.v1beta1.Manifest.ManifestType|keyof typeof google.cloud.video.transcoder.v1beta1.Manifest.ManifestType|null); + + /** Manifest muxStreams */ + muxStreams?: (string[]|null); + } + + /** Represents a Manifest. */ + class Manifest implements IManifest { + + /** + * Constructs a new Manifest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.IManifest); + + /** Manifest fileName. */ + public fileName: string; + + /** Manifest type. */ + public type: (google.cloud.video.transcoder.v1beta1.Manifest.ManifestType|keyof typeof google.cloud.video.transcoder.v1beta1.Manifest.ManifestType); + + /** Manifest muxStreams. */ + public muxStreams: string[]; + + /** + * Creates a new Manifest instance using the specified properties. + * @param [properties] Properties to set + * @returns Manifest instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.IManifest): google.cloud.video.transcoder.v1beta1.Manifest; + + /** + * Encodes the specified Manifest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Manifest.verify|verify} messages. + * @param message Manifest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.IManifest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Manifest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Manifest.verify|verify} messages. + * @param message Manifest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IManifest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Manifest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Manifest + * @throws {Error} If the payload is not 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.transcoder.v1beta1.Manifest; + + /** + * Decodes a Manifest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Manifest + * @throws {Error} If the payload 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.transcoder.v1beta1.Manifest; + + /** + * Verifies a Manifest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Manifest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Manifest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Manifest; + + /** + * Creates a plain object from a Manifest message. Also converts values to other types if specified. + * @param message Manifest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.Manifest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Manifest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Manifest { + + /** ManifestType enum. */ + enum ManifestType { + MANIFEST_TYPE_UNSPECIFIED = 0, + HLS = 1, + DASH = 2 + } + } + + /** Properties of a PubsubDestination. */ + interface IPubsubDestination { + + /** PubsubDestination topic */ + topic?: (string|null); + } + + /** Represents a PubsubDestination. */ + class PubsubDestination implements IPubsubDestination { + + /** + * Constructs a new PubsubDestination. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.IPubsubDestination); + + /** PubsubDestination topic. */ + public topic: string; + + /** + * Creates a new PubsubDestination instance using the specified properties. + * @param [properties] Properties to set + * @returns PubsubDestination instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.IPubsubDestination): google.cloud.video.transcoder.v1beta1.PubsubDestination; + + /** + * Encodes the specified PubsubDestination message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PubsubDestination.verify|verify} messages. + * @param message PubsubDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.IPubsubDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PubsubDestination message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PubsubDestination.verify|verify} messages. + * @param message PubsubDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IPubsubDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PubsubDestination message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PubsubDestination + * @throws {Error} If the payload is not 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.transcoder.v1beta1.PubsubDestination; + + /** + * Decodes a PubsubDestination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PubsubDestination + * @throws {Error} If the payload 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.transcoder.v1beta1.PubsubDestination; + + /** + * Verifies a PubsubDestination message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PubsubDestination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PubsubDestination + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.PubsubDestination; + + /** + * Creates a plain object from a PubsubDestination message. Also converts values to other types if specified. + * @param message PubsubDestination + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.PubsubDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PubsubDestination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SpriteSheet. */ + interface ISpriteSheet { + + /** SpriteSheet format */ + format?: (string|null); + + /** SpriteSheet filePrefix */ + filePrefix?: (string|null); + + /** SpriteSheet spriteWidthPixels */ + spriteWidthPixels?: (number|null); + + /** SpriteSheet spriteHeightPixels */ + spriteHeightPixels?: (number|null); + + /** SpriteSheet columnCount */ + columnCount?: (number|null); + + /** SpriteSheet rowCount */ + rowCount?: (number|null); + + /** SpriteSheet startTimeOffset */ + startTimeOffset?: (google.protobuf.IDuration|null); + + /** SpriteSheet endTimeOffset */ + endTimeOffset?: (google.protobuf.IDuration|null); + + /** SpriteSheet totalCount */ + totalCount?: (number|null); + + /** SpriteSheet interval */ + interval?: (google.protobuf.IDuration|null); + } + + /** Represents a SpriteSheet. */ + class SpriteSheet implements ISpriteSheet { + + /** + * Constructs a new SpriteSheet. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.ISpriteSheet); + + /** SpriteSheet format. */ + public format: string; + + /** SpriteSheet filePrefix. */ + public filePrefix: string; + + /** SpriteSheet spriteWidthPixels. */ + public spriteWidthPixels: number; + + /** SpriteSheet spriteHeightPixels. */ + public spriteHeightPixels: number; + + /** SpriteSheet columnCount. */ + public columnCount: number; + + /** SpriteSheet rowCount. */ + public rowCount: number; + + /** SpriteSheet startTimeOffset. */ + public startTimeOffset?: (google.protobuf.IDuration|null); + + /** SpriteSheet endTimeOffset. */ + public endTimeOffset?: (google.protobuf.IDuration|null); + + /** SpriteSheet totalCount. */ + public totalCount: number; + + /** SpriteSheet interval. */ + public interval?: (google.protobuf.IDuration|null); + + /** SpriteSheet extractionStrategy. */ + public extractionStrategy?: ("totalCount"|"interval"); + + /** + * Creates a new SpriteSheet instance using the specified properties. + * @param [properties] Properties to set + * @returns SpriteSheet instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.ISpriteSheet): google.cloud.video.transcoder.v1beta1.SpriteSheet; + + /** + * Encodes the specified SpriteSheet message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.SpriteSheet.verify|verify} messages. + * @param message SpriteSheet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.ISpriteSheet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SpriteSheet message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.SpriteSheet.verify|verify} messages. + * @param message SpriteSheet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.ISpriteSheet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SpriteSheet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SpriteSheet + * @throws {Error} If the payload is not 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.transcoder.v1beta1.SpriteSheet; + + /** + * Decodes a SpriteSheet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SpriteSheet + * @throws {Error} If the payload 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.transcoder.v1beta1.SpriteSheet; + + /** + * Verifies a SpriteSheet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SpriteSheet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SpriteSheet + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.SpriteSheet; + + /** + * Creates a plain object from a SpriteSheet message. Also converts values to other types if specified. + * @param message SpriteSheet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.SpriteSheet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SpriteSheet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Overlay. */ + interface IOverlay { + + /** Overlay image */ + image?: (google.cloud.video.transcoder.v1beta1.Overlay.IImage|null); + + /** Overlay animations */ + animations?: (google.cloud.video.transcoder.v1beta1.Overlay.IAnimation[]|null); + } + + /** Represents an Overlay. */ + class Overlay implements IOverlay { + + /** + * Constructs a new Overlay. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.IOverlay); + + /** Overlay image. */ + public image?: (google.cloud.video.transcoder.v1beta1.Overlay.IImage|null); + + /** Overlay animations. */ + public animations: google.cloud.video.transcoder.v1beta1.Overlay.IAnimation[]; + + /** + * Creates a new Overlay instance using the specified properties. + * @param [properties] Properties to set + * @returns Overlay instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.IOverlay): google.cloud.video.transcoder.v1beta1.Overlay; + + /** + * Encodes the specified Overlay message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.verify|verify} messages. + * @param message Overlay message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.IOverlay, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Overlay message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.verify|verify} messages. + * @param message Overlay message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IOverlay, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Overlay message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Overlay + * @throws {Error} If the payload is not 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.transcoder.v1beta1.Overlay; + + /** + * Decodes an Overlay message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Overlay + * @throws {Error} If the payload 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.transcoder.v1beta1.Overlay; + + /** + * Verifies an Overlay message. + * @param message Plain 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 Overlay message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Overlay + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Overlay; + + /** + * Creates a plain object from an Overlay message. Also converts values to other types if specified. + * @param message Overlay + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.Overlay, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Overlay to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Overlay { + + /** Properties of a NormalizedCoordinate. */ + interface INormalizedCoordinate { + + /** NormalizedCoordinate x */ + x?: (number|null); + + /** NormalizedCoordinate y */ + y?: (number|null); + } + + /** Represents a NormalizedCoordinate. */ + class NormalizedCoordinate implements INormalizedCoordinate { + + /** + * Constructs a new NormalizedCoordinate. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate); + + /** NormalizedCoordinate x. */ + public x: number; + + /** NormalizedCoordinate y. */ + public y: number; + + /** + * Creates a new NormalizedCoordinate instance using the specified properties. + * @param [properties] Properties to set + * @returns NormalizedCoordinate instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate): google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate; + + /** + * Encodes the specified NormalizedCoordinate message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.verify|verify} messages. + * @param message NormalizedCoordinate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NormalizedCoordinate message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.verify|verify} messages. + * @param message NormalizedCoordinate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NormalizedCoordinate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NormalizedCoordinate + * @throws {Error} If the payload is not 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.transcoder.v1beta1.Overlay.NormalizedCoordinate; + + /** + * Decodes a NormalizedCoordinate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NormalizedCoordinate + * @throws {Error} If the payload 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.transcoder.v1beta1.Overlay.NormalizedCoordinate; + + /** + * Verifies a NormalizedCoordinate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NormalizedCoordinate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NormalizedCoordinate + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate; + + /** + * Creates a plain object from a NormalizedCoordinate message. Also converts values to other types if specified. + * @param message NormalizedCoordinate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NormalizedCoordinate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Image. */ + interface IImage { + + /** Image uri */ + uri?: (string|null); + + /** Image resolution */ + resolution?: (google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate|null); + + /** Image alpha */ + alpha?: (number|null); + } + + /** Represents an Image. */ + class Image implements IImage { + + /** + * Constructs a new Image. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.Overlay.IImage); + + /** Image uri. */ + public uri: string; + + /** Image resolution. */ + public resolution?: (google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate|null); + + /** Image alpha. */ + public alpha: number; + + /** + * Creates a new Image instance using the specified properties. + * @param [properties] Properties to set + * @returns Image instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.Overlay.IImage): google.cloud.video.transcoder.v1beta1.Overlay.Image; + + /** + * Encodes the specified Image message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.Image.verify|verify} messages. + * @param message Image message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.Overlay.IImage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Image message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.Image.verify|verify} messages. + * @param message Image message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.Overlay.IImage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Image message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Image + * @throws {Error} If the payload is not 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.transcoder.v1beta1.Overlay.Image; + + /** + * Decodes an Image message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Image + * @throws {Error} If the payload 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.transcoder.v1beta1.Overlay.Image; + + /** + * Verifies an Image message. + * @param message Plain 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 Image message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Image + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Overlay.Image; + + /** + * Creates a plain object from an Image message. Also converts values to other types if specified. + * @param message Image + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.Overlay.Image, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Image to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AnimationStatic. */ + interface IAnimationStatic { + + /** AnimationStatic xy */ + xy?: (google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate|null); + + /** AnimationStatic startTimeOffset */ + startTimeOffset?: (google.protobuf.IDuration|null); + } + + /** Represents an AnimationStatic. */ + class AnimationStatic implements IAnimationStatic { + + /** + * Constructs a new AnimationStatic. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.Overlay.IAnimationStatic); + + /** AnimationStatic xy. */ + public xy?: (google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate|null); + + /** AnimationStatic startTimeOffset. */ + public startTimeOffset?: (google.protobuf.IDuration|null); + + /** + * Creates a new AnimationStatic instance using the specified properties. + * @param [properties] Properties to set + * @returns AnimationStatic instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.Overlay.IAnimationStatic): google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic; + + /** + * Encodes the specified AnimationStatic message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic.verify|verify} messages. + * @param message AnimationStatic message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.Overlay.IAnimationStatic, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnimationStatic message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic.verify|verify} messages. + * @param message AnimationStatic message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.Overlay.IAnimationStatic, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnimationStatic message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnimationStatic + * @throws {Error} If the payload is not 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.transcoder.v1beta1.Overlay.AnimationStatic; + + /** + * Decodes an AnimationStatic message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnimationStatic + * @throws {Error} If the payload 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.transcoder.v1beta1.Overlay.AnimationStatic; + + /** + * Verifies an AnimationStatic message. + * @param message Plain 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 AnimationStatic message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnimationStatic + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic; + + /** + * Creates a plain object from an AnimationStatic message. Also converts values to other types if specified. + * @param message AnimationStatic + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnimationStatic to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AnimationFade. */ + interface IAnimationFade { + + /** AnimationFade fadeType */ + fadeType?: (google.cloud.video.transcoder.v1beta1.Overlay.FadeType|keyof typeof google.cloud.video.transcoder.v1beta1.Overlay.FadeType|null); + + /** AnimationFade xy */ + xy?: (google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate|null); + + /** AnimationFade startTimeOffset */ + startTimeOffset?: (google.protobuf.IDuration|null); + + /** AnimationFade endTimeOffset */ + endTimeOffset?: (google.protobuf.IDuration|null); + } + + /** Represents an AnimationFade. */ + class AnimationFade implements IAnimationFade { + + /** + * Constructs a new AnimationFade. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.Overlay.IAnimationFade); + + /** AnimationFade fadeType. */ + public fadeType: (google.cloud.video.transcoder.v1beta1.Overlay.FadeType|keyof typeof google.cloud.video.transcoder.v1beta1.Overlay.FadeType); + + /** AnimationFade xy. */ + public xy?: (google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate|null); + + /** AnimationFade startTimeOffset. */ + public startTimeOffset?: (google.protobuf.IDuration|null); + + /** AnimationFade endTimeOffset. */ + public endTimeOffset?: (google.protobuf.IDuration|null); + + /** + * Creates a new AnimationFade instance using the specified properties. + * @param [properties] Properties to set + * @returns AnimationFade instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.Overlay.IAnimationFade): google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade; + + /** + * Encodes the specified AnimationFade message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade.verify|verify} messages. + * @param message AnimationFade message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.Overlay.IAnimationFade, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnimationFade message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade.verify|verify} messages. + * @param message AnimationFade message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.Overlay.IAnimationFade, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnimationFade message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnimationFade + * @throws {Error} If the payload is not 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.transcoder.v1beta1.Overlay.AnimationFade; + + /** + * Decodes an AnimationFade message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnimationFade + * @throws {Error} If the payload 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.transcoder.v1beta1.Overlay.AnimationFade; + + /** + * Verifies an AnimationFade message. + * @param message Plain 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 AnimationFade message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnimationFade + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade; + + /** + * Creates a plain object from an AnimationFade message. Also converts values to other types if specified. + * @param message AnimationFade + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnimationFade to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AnimationEnd. */ + interface IAnimationEnd { + + /** AnimationEnd startTimeOffset */ + startTimeOffset?: (google.protobuf.IDuration|null); + } + + /** Represents an AnimationEnd. */ + class AnimationEnd implements IAnimationEnd { + + /** + * Constructs a new AnimationEnd. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.Overlay.IAnimationEnd); + + /** AnimationEnd startTimeOffset. */ + public startTimeOffset?: (google.protobuf.IDuration|null); + + /** + * Creates a new AnimationEnd instance using the specified properties. + * @param [properties] Properties to set + * @returns AnimationEnd instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.Overlay.IAnimationEnd): google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd; + + /** + * Encodes the specified AnimationEnd message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd.verify|verify} messages. + * @param message AnimationEnd message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.Overlay.IAnimationEnd, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnimationEnd message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd.verify|verify} messages. + * @param message AnimationEnd message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.Overlay.IAnimationEnd, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnimationEnd message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnimationEnd + * @throws {Error} If the payload is not 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.transcoder.v1beta1.Overlay.AnimationEnd; + + /** + * Decodes an AnimationEnd message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnimationEnd + * @throws {Error} If the payload 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.transcoder.v1beta1.Overlay.AnimationEnd; + + /** + * Verifies an AnimationEnd message. + * @param message Plain 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 AnimationEnd message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnimationEnd + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd; + + /** + * Creates a plain object from an AnimationEnd message. Also converts values to other types if specified. + * @param message AnimationEnd + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnimationEnd to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Animation. */ + interface IAnimation { + + /** Animation animationStatic */ + animationStatic?: (google.cloud.video.transcoder.v1beta1.Overlay.IAnimationStatic|null); + + /** Animation animationFade */ + animationFade?: (google.cloud.video.transcoder.v1beta1.Overlay.IAnimationFade|null); + + /** Animation animationEnd */ + animationEnd?: (google.cloud.video.transcoder.v1beta1.Overlay.IAnimationEnd|null); + } + + /** Represents an Animation. */ + class Animation implements IAnimation { + + /** + * Constructs a new Animation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.Overlay.IAnimation); + + /** Animation animationStatic. */ + public animationStatic?: (google.cloud.video.transcoder.v1beta1.Overlay.IAnimationStatic|null); + + /** Animation animationFade. */ + public animationFade?: (google.cloud.video.transcoder.v1beta1.Overlay.IAnimationFade|null); + + /** Animation animationEnd. */ + public animationEnd?: (google.cloud.video.transcoder.v1beta1.Overlay.IAnimationEnd|null); + + /** Animation animationType. */ + public animationType?: ("animationStatic"|"animationFade"|"animationEnd"); + + /** + * Creates a new Animation instance using the specified properties. + * @param [properties] Properties to set + * @returns Animation instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.Overlay.IAnimation): google.cloud.video.transcoder.v1beta1.Overlay.Animation; + + /** + * Encodes the specified Animation message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.Animation.verify|verify} messages. + * @param message Animation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.Overlay.IAnimation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Animation message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.Animation.verify|verify} messages. + * @param message Animation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.Overlay.IAnimation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Animation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Animation + * @throws {Error} If the payload is not 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.transcoder.v1beta1.Overlay.Animation; + + /** + * Decodes an Animation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Animation + * @throws {Error} If the payload 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.transcoder.v1beta1.Overlay.Animation; + + /** + * Verifies an Animation message. + * @param message Plain 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 Animation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Animation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Overlay.Animation; + + /** + * Creates a plain object from an Animation message. Also converts values to other types if specified. + * @param message Animation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.Overlay.Animation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Animation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** FadeType enum. */ + enum FadeType { + FADE_TYPE_UNSPECIFIED = 0, + FADE_IN = 1, + FADE_OUT = 2 + } + } + + /** Properties of a PreprocessingConfig. */ + interface IPreprocessingConfig { + + /** PreprocessingConfig color */ + color?: (google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IColor|null); + + /** PreprocessingConfig denoise */ + denoise?: (google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDenoise|null); + + /** PreprocessingConfig deblock */ + deblock?: (google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDeblock|null); + + /** PreprocessingConfig audio */ + audio?: (google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IAudio|null); + } + + /** Represents a PreprocessingConfig. */ + class PreprocessingConfig implements IPreprocessingConfig { + + /** + * Constructs a new PreprocessingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.IPreprocessingConfig); + + /** PreprocessingConfig color. */ + public color?: (google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IColor|null); + + /** PreprocessingConfig denoise. */ + public denoise?: (google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDenoise|null); + + /** PreprocessingConfig deblock. */ + public deblock?: (google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDeblock|null); + + /** PreprocessingConfig audio. */ + public audio?: (google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IAudio|null); + + /** + * Creates a new PreprocessingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns PreprocessingConfig instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.IPreprocessingConfig): google.cloud.video.transcoder.v1beta1.PreprocessingConfig; + + /** + * Encodes the specified PreprocessingConfig message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.verify|verify} messages. + * @param message PreprocessingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.IPreprocessingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PreprocessingConfig message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.verify|verify} messages. + * @param message PreprocessingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IPreprocessingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PreprocessingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PreprocessingConfig + * @throws {Error} If the payload is not 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.transcoder.v1beta1.PreprocessingConfig; + + /** + * Decodes a PreprocessingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PreprocessingConfig + * @throws {Error} If the payload 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.transcoder.v1beta1.PreprocessingConfig; + + /** + * Verifies a PreprocessingConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PreprocessingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PreprocessingConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.PreprocessingConfig; + + /** + * Creates a plain object from a PreprocessingConfig message. Also converts values to other types if specified. + * @param message PreprocessingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PreprocessingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace PreprocessingConfig { + + /** Properties of a Color. */ + interface IColor { + + /** Color saturation */ + saturation?: (number|null); + + /** Color contrast */ + contrast?: (number|null); + + /** Color brightness */ + brightness?: (number|null); + } + + /** Represents a Color. */ + class Color implements IColor { + + /** + * Constructs a new Color. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IColor); + + /** Color saturation. */ + public saturation: number; + + /** Color contrast. */ + public contrast: number; + + /** Color brightness. */ + public brightness: number; + + /** + * Creates a new Color instance using the specified properties. + * @param [properties] Properties to set + * @returns Color instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IColor): google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color; + + /** + * Encodes the specified Color message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color.verify|verify} messages. + * @param message Color message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IColor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Color message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color.verify|verify} messages. + * @param message Color message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IColor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Color message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Color + * @throws {Error} If the payload is not 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.transcoder.v1beta1.PreprocessingConfig.Color; + + /** + * Decodes a Color message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Color + * @throws {Error} If the payload 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.transcoder.v1beta1.PreprocessingConfig.Color; + + /** + * Verifies a Color message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Color message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Color + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color; + + /** + * Creates a plain object from a Color message. Also converts values to other types if specified. + * @param message Color + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Color to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Denoise. */ + interface IDenoise { + + /** Denoise strength */ + strength?: (number|null); + + /** Denoise tune */ + tune?: (string|null); + } + + /** Represents a Denoise. */ + class Denoise implements IDenoise { + + /** + * Constructs a new Denoise. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDenoise); + + /** Denoise strength. */ + public strength: number; + + /** Denoise tune. */ + public tune: string; + + /** + * Creates a new Denoise instance using the specified properties. + * @param [properties] Properties to set + * @returns Denoise instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDenoise): google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise; + + /** + * Encodes the specified Denoise message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise.verify|verify} messages. + * @param message Denoise message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDenoise, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Denoise message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise.verify|verify} messages. + * @param message Denoise message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDenoise, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Denoise message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Denoise + * @throws {Error} If the payload is not 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.transcoder.v1beta1.PreprocessingConfig.Denoise; + + /** + * Decodes a Denoise message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Denoise + * @throws {Error} If the payload 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.transcoder.v1beta1.PreprocessingConfig.Denoise; + + /** + * Verifies a Denoise message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Denoise message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Denoise + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise; + + /** + * Creates a plain object from a Denoise message. Also converts values to other types if specified. + * @param message Denoise + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Denoise to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Deblock. */ + interface IDeblock { + + /** Deblock strength */ + strength?: (number|null); + + /** Deblock enabled */ + enabled?: (boolean|null); + } + + /** Represents a Deblock. */ + class Deblock implements IDeblock { + + /** + * Constructs a new Deblock. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDeblock); + + /** Deblock strength. */ + public strength: number; + + /** Deblock enabled. */ + public enabled: boolean; + + /** + * Creates a new Deblock instance using the specified properties. + * @param [properties] Properties to set + * @returns Deblock instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDeblock): google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock; + + /** + * Encodes the specified Deblock message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock.verify|verify} messages. + * @param message Deblock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDeblock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Deblock message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock.verify|verify} messages. + * @param message Deblock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDeblock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Deblock message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Deblock + * @throws {Error} If the payload is not 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.transcoder.v1beta1.PreprocessingConfig.Deblock; + + /** + * Decodes a Deblock message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Deblock + * @throws {Error} If the payload 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.transcoder.v1beta1.PreprocessingConfig.Deblock; + + /** + * Verifies a Deblock message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Deblock message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Deblock + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock; + + /** + * Creates a plain object from a Deblock message. Also converts values to other types if specified. + * @param message Deblock + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Deblock to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Audio. */ + interface IAudio { + + /** Audio lufs */ + lufs?: (number|null); + + /** Audio highBoost */ + highBoost?: (boolean|null); + + /** Audio lowBoost */ + lowBoost?: (boolean|null); + } + + /** Represents an Audio. */ + class Audio implements IAudio { + + /** + * Constructs a new Audio. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IAudio); + + /** Audio lufs. */ + public lufs: number; + + /** Audio highBoost. */ + public highBoost: boolean; + + /** Audio lowBoost. */ + public lowBoost: boolean; + + /** + * Creates a new Audio instance using the specified properties. + * @param [properties] Properties to set + * @returns Audio instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IAudio): google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio; + + /** + * Encodes the specified Audio message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio.verify|verify} messages. + * @param message Audio message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IAudio, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Audio message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio.verify|verify} messages. + * @param message Audio message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IAudio, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Audio message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Audio + * @throws {Error} If the payload is not 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.transcoder.v1beta1.PreprocessingConfig.Audio; + + /** + * Decodes an Audio message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Audio + * @throws {Error} If the payload 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.transcoder.v1beta1.PreprocessingConfig.Audio; + + /** + * Verifies an Audio message. + * @param message Plain 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 Audio message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Audio + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio; + + /** + * Creates a plain object from an Audio message. Also converts values to other types if specified. + * @param message Audio + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Audio to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a VideoStream. */ + interface IVideoStream { + + /** VideoStream codec */ + codec?: (string|null); + + /** VideoStream profile */ + profile?: (string|null); + + /** VideoStream tune */ + tune?: (string|null); + + /** VideoStream preset */ + preset?: (string|null); + + /** VideoStream heightPixels */ + heightPixels?: (number|null); + + /** VideoStream widthPixels */ + widthPixels?: (number|null); + + /** VideoStream pixelFormat */ + pixelFormat?: (string|null); + + /** VideoStream bitrateBps */ + bitrateBps?: (number|null); + + /** VideoStream rateControlMode */ + rateControlMode?: (string|null); + + /** VideoStream enableTwoPass */ + enableTwoPass?: (boolean|null); + + /** VideoStream crfLevel */ + crfLevel?: (number|null); + + /** VideoStream vbvSizeBits */ + vbvSizeBits?: (number|null); + + /** VideoStream vbvFullnessBits */ + vbvFullnessBits?: (number|null); + + /** VideoStream allowOpenGop */ + allowOpenGop?: (boolean|null); + + /** VideoStream gopFrameCount */ + gopFrameCount?: (number|null); + + /** VideoStream gopDuration */ + gopDuration?: (google.protobuf.IDuration|null); + + /** VideoStream entropyCoder */ + entropyCoder?: (string|null); + + /** VideoStream bPyramid */ + bPyramid?: (boolean|null); + + /** VideoStream bFrameCount */ + bFrameCount?: (number|null); + + /** VideoStream frameRate */ + frameRate?: (number|null); + + /** VideoStream aqStrength */ + aqStrength?: (number|null); + } + + /** Represents a VideoStream. */ + class VideoStream implements IVideoStream { + + /** + * Constructs a new VideoStream. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.IVideoStream); + + /** VideoStream codec. */ + public codec: string; + + /** VideoStream profile. */ + public profile: string; + + /** VideoStream tune. */ + public tune: string; + + /** VideoStream preset. */ + public preset: string; + + /** VideoStream heightPixels. */ + public heightPixels: number; + + /** VideoStream widthPixels. */ + public widthPixels: number; + + /** VideoStream pixelFormat. */ + public pixelFormat: string; + + /** VideoStream bitrateBps. */ + public bitrateBps: number; + + /** VideoStream rateControlMode. */ + public rateControlMode: string; + + /** VideoStream enableTwoPass. */ + public enableTwoPass: boolean; + + /** VideoStream crfLevel. */ + public crfLevel: number; + + /** VideoStream vbvSizeBits. */ + public vbvSizeBits: number; + + /** VideoStream vbvFullnessBits. */ + public vbvFullnessBits: number; + + /** VideoStream allowOpenGop. */ + public allowOpenGop: boolean; + + /** VideoStream gopFrameCount. */ + public gopFrameCount: number; + + /** VideoStream gopDuration. */ + public gopDuration?: (google.protobuf.IDuration|null); + + /** VideoStream entropyCoder. */ + public entropyCoder: string; + + /** VideoStream bPyramid. */ + public bPyramid: boolean; + + /** VideoStream bFrameCount. */ + public bFrameCount: number; + + /** VideoStream frameRate. */ + public frameRate: number; + + /** VideoStream aqStrength. */ + public aqStrength: number; + + /** VideoStream gopMode. */ + public gopMode?: ("gopFrameCount"|"gopDuration"); + + /** + * Creates a new VideoStream instance using the specified properties. + * @param [properties] Properties to set + * @returns VideoStream instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.IVideoStream): google.cloud.video.transcoder.v1beta1.VideoStream; + + /** + * Encodes the specified VideoStream message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.VideoStream.verify|verify} messages. + * @param message VideoStream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.IVideoStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VideoStream message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.VideoStream.verify|verify} messages. + * @param message VideoStream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IVideoStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VideoStream message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VideoStream + * @throws {Error} If the payload is not 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.transcoder.v1beta1.VideoStream; + + /** + * Decodes a VideoStream message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VideoStream + * @throws {Error} If the payload 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.transcoder.v1beta1.VideoStream; + + /** + * Verifies a VideoStream message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VideoStream message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VideoStream + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.VideoStream; + + /** + * Creates a plain object from a VideoStream message. Also converts values to other types if specified. + * @param message VideoStream + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.VideoStream, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VideoStream to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AudioStream. */ + interface IAudioStream { + + /** AudioStream codec */ + codec?: (string|null); + + /** AudioStream bitrateBps */ + bitrateBps?: (number|null); + + /** AudioStream channelCount */ + channelCount?: (number|null); + + /** AudioStream channelLayout */ + channelLayout?: (string[]|null); + + /** AudioStream mapping */ + mapping?: (google.cloud.video.transcoder.v1beta1.AudioStream.IAudioAtom[]|null); + + /** AudioStream sampleRateHertz */ + sampleRateHertz?: (number|null); + } + + /** Represents an AudioStream. */ + class AudioStream implements IAudioStream { + + /** + * Constructs a new AudioStream. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.IAudioStream); + + /** AudioStream codec. */ + public codec: string; + + /** AudioStream bitrateBps. */ + public bitrateBps: number; + + /** AudioStream channelCount. */ + public channelCount: number; + + /** AudioStream channelLayout. */ + public channelLayout: string[]; + + /** AudioStream mapping. */ + public mapping: google.cloud.video.transcoder.v1beta1.AudioStream.IAudioAtom[]; + + /** AudioStream sampleRateHertz. */ + public sampleRateHertz: number; + + /** + * Creates a new AudioStream instance using the specified properties. + * @param [properties] Properties to set + * @returns AudioStream instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.IAudioStream): google.cloud.video.transcoder.v1beta1.AudioStream; + + /** + * Encodes the specified AudioStream message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.verify|verify} messages. + * @param message AudioStream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.IAudioStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudioStream message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.verify|verify} messages. + * @param message AudioStream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IAudioStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudioStream message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudioStream + * @throws {Error} If the payload is not 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.transcoder.v1beta1.AudioStream; + + /** + * Decodes an AudioStream message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudioStream + * @throws {Error} If the payload 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.transcoder.v1beta1.AudioStream; + + /** + * Verifies an AudioStream message. + * @param message Plain 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 AudioStream message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudioStream + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.AudioStream; + + /** + * Creates a plain object from an AudioStream message. Also converts values to other types if specified. + * @param message AudioStream + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.AudioStream, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudioStream to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace AudioStream { + + /** Properties of an AudioAtom. */ + interface IAudioAtom { + + /** AudioAtom key */ + key?: (string|null); + + /** AudioAtom channels */ + channels?: (google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.IAudioChannel[]|null); + } + + /** Represents an AudioAtom. */ + class AudioAtom implements IAudioAtom { + + /** + * Constructs a new AudioAtom. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.AudioStream.IAudioAtom); + + /** AudioAtom key. */ + public key: string; + + /** AudioAtom channels. */ + public channels: google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.IAudioChannel[]; + + /** + * Creates a new AudioAtom instance using the specified properties. + * @param [properties] Properties to set + * @returns AudioAtom instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.AudioStream.IAudioAtom): google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom; + + /** + * Encodes the specified AudioAtom message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.verify|verify} messages. + * @param message AudioAtom message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.AudioStream.IAudioAtom, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudioAtom message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.verify|verify} messages. + * @param message AudioAtom message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.AudioStream.IAudioAtom, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudioAtom message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudioAtom + * @throws {Error} If the payload is not 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.transcoder.v1beta1.AudioStream.AudioAtom; + + /** + * Decodes an AudioAtom message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudioAtom + * @throws {Error} If the payload 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.transcoder.v1beta1.AudioStream.AudioAtom; + + /** + * Verifies an AudioAtom message. + * @param message Plain 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 AudioAtom message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudioAtom + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom; + + /** + * Creates a plain object from an AudioAtom message. Also converts values to other types if specified. + * @param message AudioAtom + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudioAtom to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace AudioAtom { + + /** Properties of an AudioChannel. */ + interface IAudioChannel { + + /** AudioChannel inputs */ + inputs?: (google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.IAudioChannelInput[]|null); + } + + /** Represents an AudioChannel. */ + class AudioChannel implements IAudioChannel { + + /** + * Constructs a new AudioChannel. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.IAudioChannel); + + /** AudioChannel inputs. */ + public inputs: google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.IAudioChannelInput[]; + + /** + * Creates a new AudioChannel instance using the specified properties. + * @param [properties] Properties to set + * @returns AudioChannel instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.IAudioChannel): google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel; + + /** + * Encodes the specified AudioChannel message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.verify|verify} messages. + * @param message AudioChannel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.IAudioChannel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudioChannel message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.verify|verify} messages. + * @param message AudioChannel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.IAudioChannel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudioChannel message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudioChannel + * @throws {Error} If the payload is not 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.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel; + + /** + * Decodes an AudioChannel message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudioChannel + * @throws {Error} If the payload 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.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel; + + /** + * Verifies an AudioChannel message. + * @param message Plain 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 AudioChannel message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudioChannel + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel; + + /** + * Creates a plain object from an AudioChannel message. Also converts values to other types if specified. + * @param message AudioChannel + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudioChannel to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace AudioChannel { + + /** Properties of an AudioChannelInput. */ + interface IAudioChannelInput { + + /** AudioChannelInput key */ + key?: (string|null); + + /** AudioChannelInput track */ + track?: (number|null); + + /** AudioChannelInput channel */ + channel?: (number|null); + + /** AudioChannelInput gainDb */ + gainDb?: (number|null); + } + + /** Represents an AudioChannelInput. */ + class AudioChannelInput implements IAudioChannelInput { + + /** + * Constructs a new AudioChannelInput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.IAudioChannelInput); + + /** AudioChannelInput key. */ + public key: string; + + /** AudioChannelInput track. */ + public track: number; + + /** AudioChannelInput channel. */ + public channel: number; + + /** AudioChannelInput gainDb. */ + public gainDb: number; + + /** + * Creates a new AudioChannelInput instance using the specified properties. + * @param [properties] Properties to set + * @returns AudioChannelInput instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.IAudioChannelInput): google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput; + + /** + * Encodes the specified AudioChannelInput message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput.verify|verify} messages. + * @param message AudioChannelInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.IAudioChannelInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudioChannelInput message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput.verify|verify} messages. + * @param message AudioChannelInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.IAudioChannelInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudioChannelInput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudioChannelInput + * @throws {Error} If the payload is not 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.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput; + + /** + * Decodes an AudioChannelInput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudioChannelInput + * @throws {Error} If the payload 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.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput; + + /** + * Verifies an AudioChannelInput message. + * @param message Plain 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 AudioChannelInput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudioChannelInput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput; + + /** + * Creates a plain object from an AudioChannelInput message. Also converts values to other types if specified. + * @param message AudioChannelInput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudioChannelInput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + } + + /** Properties of a TextStream. */ + interface ITextStream { + + /** TextStream codec */ + codec?: (string|null); + + /** TextStream languageCode */ + languageCode?: (string|null); + + /** TextStream mapping */ + mapping?: (google.cloud.video.transcoder.v1beta1.TextStream.ITextAtom[]|null); + } + + /** Represents a TextStream. */ + class TextStream implements ITextStream { + + /** + * Constructs a new TextStream. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.ITextStream); + + /** TextStream codec. */ + public codec: string; + + /** TextStream languageCode. */ + public languageCode: string; + + /** TextStream mapping. */ + public mapping: google.cloud.video.transcoder.v1beta1.TextStream.ITextAtom[]; + + /** + * Creates a new TextStream instance using the specified properties. + * @param [properties] Properties to set + * @returns TextStream instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.ITextStream): google.cloud.video.transcoder.v1beta1.TextStream; + + /** + * Encodes the specified TextStream message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.TextStream.verify|verify} messages. + * @param message TextStream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.ITextStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TextStream message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.TextStream.verify|verify} messages. + * @param message TextStream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.ITextStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TextStream message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TextStream + * @throws {Error} If the payload is not 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.transcoder.v1beta1.TextStream; + + /** + * Decodes a TextStream message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TextStream + * @throws {Error} If the payload 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.transcoder.v1beta1.TextStream; + + /** + * Verifies a TextStream message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TextStream message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TextStream + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.TextStream; + + /** + * Creates a plain object from a TextStream message. Also converts values to other types if specified. + * @param message TextStream + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.TextStream, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TextStream to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace TextStream { + + /** Properties of a TextAtom. */ + interface ITextAtom { + + /** TextAtom key */ + key?: (string|null); + + /** TextAtom inputs */ + inputs?: (google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.ITextInput[]|null); + } + + /** Represents a TextAtom. */ + class TextAtom implements ITextAtom { + + /** + * Constructs a new TextAtom. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.TextStream.ITextAtom); + + /** TextAtom key. */ + public key: string; + + /** TextAtom inputs. */ + public inputs: google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.ITextInput[]; + + /** + * Creates a new TextAtom instance using the specified properties. + * @param [properties] Properties to set + * @returns TextAtom instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.TextStream.ITextAtom): google.cloud.video.transcoder.v1beta1.TextStream.TextAtom; + + /** + * Encodes the specified TextAtom message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.verify|verify} messages. + * @param message TextAtom message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.TextStream.ITextAtom, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TextAtom message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.verify|verify} messages. + * @param message TextAtom message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.TextStream.ITextAtom, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TextAtom message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TextAtom + * @throws {Error} If the payload is not 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.transcoder.v1beta1.TextStream.TextAtom; + + /** + * Decodes a TextAtom message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TextAtom + * @throws {Error} If the payload 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.transcoder.v1beta1.TextStream.TextAtom; + + /** + * Verifies a TextAtom message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TextAtom message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TextAtom + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.TextStream.TextAtom; + + /** + * Creates a plain object from a TextAtom message. Also converts values to other types if specified. + * @param message TextAtom + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.TextStream.TextAtom, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TextAtom to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace TextAtom { + + /** Properties of a TextInput. */ + interface ITextInput { + + /** TextInput key */ + key?: (string|null); + + /** TextInput track */ + track?: (number|null); + } + + /** Represents a TextInput. */ + class TextInput implements ITextInput { + + /** + * Constructs a new TextInput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.ITextInput); + + /** TextInput key. */ + public key: string; + + /** TextInput track. */ + public track: number; + + /** + * Creates a new TextInput instance using the specified properties. + * @param [properties] Properties to set + * @returns TextInput instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.ITextInput): google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput; + + /** + * Encodes the specified TextInput message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput.verify|verify} messages. + * @param message TextInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.ITextInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TextInput message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput.verify|verify} messages. + * @param message TextInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.ITextInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TextInput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TextInput + * @throws {Error} If the payload is not 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.transcoder.v1beta1.TextStream.TextAtom.TextInput; + + /** + * Decodes a TextInput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TextInput + * @throws {Error} If the payload 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.transcoder.v1beta1.TextStream.TextAtom.TextInput; + + /** + * Verifies a TextInput message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TextInput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TextInput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput; + + /** + * Creates a plain object from a TextInput message. Also converts values to other types if specified. + * @param message TextInput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TextInput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Properties of a SegmentSettings. */ + interface ISegmentSettings { + + /** SegmentSettings segmentDuration */ + segmentDuration?: (google.protobuf.IDuration|null); + + /** SegmentSettings individualSegments */ + individualSegments?: (boolean|null); + } + + /** Represents a SegmentSettings. */ + class SegmentSettings implements ISegmentSettings { + + /** + * Constructs a new SegmentSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.ISegmentSettings); + + /** SegmentSettings segmentDuration. */ + public segmentDuration?: (google.protobuf.IDuration|null); + + /** SegmentSettings individualSegments. */ + public individualSegments: boolean; + + /** + * Creates a new SegmentSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns SegmentSettings instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.ISegmentSettings): google.cloud.video.transcoder.v1beta1.SegmentSettings; + + /** + * Encodes the specified SegmentSettings message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.SegmentSettings.verify|verify} messages. + * @param message SegmentSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.ISegmentSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SegmentSettings message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.SegmentSettings.verify|verify} messages. + * @param message SegmentSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.ISegmentSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SegmentSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SegmentSettings + * @throws {Error} If the payload is not 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.transcoder.v1beta1.SegmentSettings; + + /** + * Decodes a SegmentSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SegmentSettings + * @throws {Error} If the payload 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.transcoder.v1beta1.SegmentSettings; + + /** + * Verifies a SegmentSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SegmentSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SegmentSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.SegmentSettings; + + /** + * Creates a plain object from a SegmentSettings message. Also converts values to other types if specified. + * @param message SegmentSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.SegmentSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SegmentSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Encryption. */ + interface IEncryption { + + /** Encryption key */ + key?: (string|null); + + /** Encryption iv */ + iv?: (string|null); + + /** Encryption aes_128 */ + aes_128?: (google.cloud.video.transcoder.v1beta1.Encryption.IAes128Encryption|null); + + /** Encryption sampleAes */ + sampleAes?: (google.cloud.video.transcoder.v1beta1.Encryption.ISampleAesEncryption|null); + + /** Encryption mpegCenc */ + mpegCenc?: (google.cloud.video.transcoder.v1beta1.Encryption.IMpegCommonEncryption|null); + } + + /** Represents an Encryption. */ + class Encryption implements IEncryption { + + /** + * Constructs a new Encryption. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.IEncryption); + + /** Encryption key. */ + public key: string; + + /** Encryption iv. */ + public iv: string; + + /** Encryption aes_128. */ + public aes_128?: (google.cloud.video.transcoder.v1beta1.Encryption.IAes128Encryption|null); + + /** Encryption sampleAes. */ + public sampleAes?: (google.cloud.video.transcoder.v1beta1.Encryption.ISampleAesEncryption|null); + + /** Encryption mpegCenc. */ + public mpegCenc?: (google.cloud.video.transcoder.v1beta1.Encryption.IMpegCommonEncryption|null); + + /** Encryption encryptionMode. */ + public encryptionMode?: ("aes_128"|"sampleAes"|"mpegCenc"); + + /** + * Creates a new Encryption instance using the specified properties. + * @param [properties] Properties to set + * @returns Encryption instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.IEncryption): google.cloud.video.transcoder.v1beta1.Encryption; + + /** + * Encodes the specified Encryption message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.verify|verify} messages. + * @param message Encryption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.IEncryption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Encryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.verify|verify} messages. + * @param message Encryption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IEncryption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Encryption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Encryption + * @throws {Error} If the payload is not 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.transcoder.v1beta1.Encryption; + + /** + * Decodes an Encryption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Encryption + * @throws {Error} If the payload 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.transcoder.v1beta1.Encryption; + + /** + * Verifies an Encryption message. + * @param message Plain 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 Encryption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Encryption + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Encryption; + + /** + * Creates a plain object from an Encryption message. Also converts values to other types if specified. + * @param message Encryption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.Encryption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Encryption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Encryption { + + /** Properties of an Aes128Encryption. */ + interface IAes128Encryption { + + /** Aes128Encryption keyUri */ + keyUri?: (string|null); + } + + /** Represents an Aes128Encryption. */ + class Aes128Encryption implements IAes128Encryption { + + /** + * Constructs a new Aes128Encryption. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.Encryption.IAes128Encryption); + + /** Aes128Encryption keyUri. */ + public keyUri: string; + + /** + * Creates a new Aes128Encryption instance using the specified properties. + * @param [properties] Properties to set + * @returns Aes128Encryption instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.Encryption.IAes128Encryption): google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption; + + /** + * Encodes the specified Aes128Encryption message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption.verify|verify} messages. + * @param message Aes128Encryption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.Encryption.IAes128Encryption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Aes128Encryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption.verify|verify} messages. + * @param message Aes128Encryption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.Encryption.IAes128Encryption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Aes128Encryption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Aes128Encryption + * @throws {Error} If the payload is not 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.transcoder.v1beta1.Encryption.Aes128Encryption; + + /** + * Decodes an Aes128Encryption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Aes128Encryption + * @throws {Error} If the payload 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.transcoder.v1beta1.Encryption.Aes128Encryption; + + /** + * Verifies an Aes128Encryption message. + * @param message Plain 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 Aes128Encryption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Aes128Encryption + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption; + + /** + * Creates a plain object from an Aes128Encryption message. Also converts values to other types if specified. + * @param message Aes128Encryption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Aes128Encryption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SampleAesEncryption. */ + interface ISampleAesEncryption { + + /** SampleAesEncryption keyUri */ + keyUri?: (string|null); + } + + /** Represents a SampleAesEncryption. */ + class SampleAesEncryption implements ISampleAesEncryption { + + /** + * Constructs a new SampleAesEncryption. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.Encryption.ISampleAesEncryption); + + /** SampleAesEncryption keyUri. */ + public keyUri: string; + + /** + * Creates a new SampleAesEncryption instance using the specified properties. + * @param [properties] Properties to set + * @returns SampleAesEncryption instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.Encryption.ISampleAesEncryption): google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption; + + /** + * Encodes the specified SampleAesEncryption message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption.verify|verify} messages. + * @param message SampleAesEncryption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.Encryption.ISampleAesEncryption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SampleAesEncryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption.verify|verify} messages. + * @param message SampleAesEncryption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.Encryption.ISampleAesEncryption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SampleAesEncryption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SampleAesEncryption + * @throws {Error} If the payload is not 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.transcoder.v1beta1.Encryption.SampleAesEncryption; + + /** + * Decodes a SampleAesEncryption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SampleAesEncryption + * @throws {Error} If the payload 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.transcoder.v1beta1.Encryption.SampleAesEncryption; + + /** + * Verifies a SampleAesEncryption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SampleAesEncryption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SampleAesEncryption + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption; + + /** + * Creates a plain object from a SampleAesEncryption message. Also converts values to other types if specified. + * @param message SampleAesEncryption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SampleAesEncryption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MpegCommonEncryption. */ + interface IMpegCommonEncryption { + + /** MpegCommonEncryption keyId */ + keyId?: (string|null); + + /** MpegCommonEncryption scheme */ + scheme?: (string|null); + } + + /** Represents a MpegCommonEncryption. */ + class MpegCommonEncryption implements IMpegCommonEncryption { + + /** + * Constructs a new MpegCommonEncryption. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.Encryption.IMpegCommonEncryption); + + /** MpegCommonEncryption keyId. */ + public keyId: string; + + /** MpegCommonEncryption scheme. */ + public scheme: string; + + /** + * Creates a new MpegCommonEncryption instance using the specified properties. + * @param [properties] Properties to set + * @returns MpegCommonEncryption instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.Encryption.IMpegCommonEncryption): google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption; + + /** + * Encodes the specified MpegCommonEncryption message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption.verify|verify} messages. + * @param message MpegCommonEncryption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.Encryption.IMpegCommonEncryption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MpegCommonEncryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption.verify|verify} messages. + * @param message MpegCommonEncryption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.Encryption.IMpegCommonEncryption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MpegCommonEncryption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MpegCommonEncryption + * @throws {Error} If the payload is not 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.transcoder.v1beta1.Encryption.MpegCommonEncryption; + + /** + * Decodes a MpegCommonEncryption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MpegCommonEncryption + * @throws {Error} If the payload 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.transcoder.v1beta1.Encryption.MpegCommonEncryption; + + /** + * Verifies a MpegCommonEncryption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MpegCommonEncryption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MpegCommonEncryption + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption; + + /** + * Creates a plain object from a MpegCommonEncryption message. Also converts values to other types if specified. + * @param message MpegCommonEncryption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MpegCommonEncryption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a Progress. */ + interface IProgress { + + /** Progress analyzed */ + analyzed?: (number|null); + + /** Progress encoded */ + encoded?: (number|null); + + /** Progress uploaded */ + uploaded?: (number|null); + + /** Progress notified */ + notified?: (number|null); + } + + /** Represents a Progress. */ + class Progress implements IProgress { + + /** + * Constructs a new Progress. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.IProgress); + + /** Progress analyzed. */ + public analyzed: number; + + /** Progress encoded. */ + public encoded: number; + + /** Progress uploaded. */ + public uploaded: number; + + /** Progress notified. */ + public notified: number; + + /** + * Creates a new Progress instance using the specified properties. + * @param [properties] Properties to set + * @returns Progress instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.IProgress): google.cloud.video.transcoder.v1beta1.Progress; + + /** + * Encodes the specified Progress message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Progress.verify|verify} messages. + * @param message Progress message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.IProgress, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Progress message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Progress.verify|verify} messages. + * @param message Progress message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IProgress, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Progress message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Progress + * @throws {Error} If the payload is not 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.transcoder.v1beta1.Progress; + + /** + * Decodes a Progress message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Progress + * @throws {Error} If the payload 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.transcoder.v1beta1.Progress; + + /** + * Verifies a Progress message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Progress message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Progress + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Progress; + + /** + * Creates a plain object from a Progress message. Also converts values to other types if specified. + * @param message Progress + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.Progress, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Progress to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FailureDetail. */ + interface IFailureDetail { + + /** FailureDetail description */ + description?: (string|null); + } + + /** Represents a FailureDetail. */ + class FailureDetail implements IFailureDetail { + + /** + * Constructs a new FailureDetail. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.IFailureDetail); + + /** FailureDetail description. */ + public description: string; + + /** + * Creates a new FailureDetail instance using the specified properties. + * @param [properties] Properties to set + * @returns FailureDetail instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.IFailureDetail): google.cloud.video.transcoder.v1beta1.FailureDetail; + + /** + * Encodes the specified FailureDetail message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.FailureDetail.verify|verify} messages. + * @param message FailureDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.IFailureDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FailureDetail message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.FailureDetail.verify|verify} messages. + * @param message FailureDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IFailureDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FailureDetail message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FailureDetail + * @throws {Error} If the payload is not 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.transcoder.v1beta1.FailureDetail; + + /** + * Decodes a FailureDetail message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FailureDetail + * @throws {Error} If the payload 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.transcoder.v1beta1.FailureDetail; + + /** + * Verifies a FailureDetail message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FailureDetail message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FailureDetail + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.FailureDetail; + + /** + * Creates a plain object from a FailureDetail message. Also converts values to other types if specified. + * @param message FailureDetail + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.FailureDetail, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FailureDetail to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Represents a TranscoderService */ + class TranscoderService extends $protobuf.rpc.Service { + + /** + * Constructs a new TranscoderService 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 TranscoderService 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): TranscoderService; + + /** + * Calls CreateJob. + * @param request CreateJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Job + */ + public createJob(request: google.cloud.video.transcoder.v1beta1.ICreateJobRequest, callback: google.cloud.video.transcoder.v1beta1.TranscoderService.CreateJobCallback): void; + + /** + * Calls CreateJob. + * @param request CreateJobRequest message or plain object + * @returns Promise + */ + public createJob(request: google.cloud.video.transcoder.v1beta1.ICreateJobRequest): Promise; + + /** + * Calls ListJobs. + * @param request ListJobsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListJobsResponse + */ + public listJobs(request: google.cloud.video.transcoder.v1beta1.IListJobsRequest, callback: google.cloud.video.transcoder.v1beta1.TranscoderService.ListJobsCallback): void; + + /** + * Calls ListJobs. + * @param request ListJobsRequest message or plain object + * @returns Promise + */ + public listJobs(request: google.cloud.video.transcoder.v1beta1.IListJobsRequest): Promise; + + /** + * Calls GetJob. + * @param request GetJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Job + */ + public getJob(request: google.cloud.video.transcoder.v1beta1.IGetJobRequest, callback: google.cloud.video.transcoder.v1beta1.TranscoderService.GetJobCallback): void; + + /** + * Calls GetJob. + * @param request GetJobRequest message or plain object + * @returns Promise + */ + public getJob(request: google.cloud.video.transcoder.v1beta1.IGetJobRequest): Promise; + + /** + * Calls DeleteJob. + * @param request DeleteJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteJob(request: google.cloud.video.transcoder.v1beta1.IDeleteJobRequest, callback: google.cloud.video.transcoder.v1beta1.TranscoderService.DeleteJobCallback): void; + + /** + * Calls DeleteJob. + * @param request DeleteJobRequest message or plain object + * @returns Promise + */ + public deleteJob(request: google.cloud.video.transcoder.v1beta1.IDeleteJobRequest): Promise; + + /** + * Calls CreateJobTemplate. + * @param request CreateJobTemplateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and JobTemplate + */ + public createJobTemplate(request: google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest, callback: google.cloud.video.transcoder.v1beta1.TranscoderService.CreateJobTemplateCallback): void; + + /** + * Calls CreateJobTemplate. + * @param request CreateJobTemplateRequest message or plain object + * @returns Promise + */ + public createJobTemplate(request: google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest): Promise; + + /** + * Calls ListJobTemplates. + * @param request ListJobTemplatesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListJobTemplatesResponse + */ + public listJobTemplates(request: google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, callback: google.cloud.video.transcoder.v1beta1.TranscoderService.ListJobTemplatesCallback): void; + + /** + * Calls ListJobTemplates. + * @param request ListJobTemplatesRequest message or plain object + * @returns Promise + */ + public listJobTemplates(request: google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest): Promise; + + /** + * Calls GetJobTemplate. + * @param request GetJobTemplateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and JobTemplate + */ + public getJobTemplate(request: google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest, callback: google.cloud.video.transcoder.v1beta1.TranscoderService.GetJobTemplateCallback): void; + + /** + * Calls GetJobTemplate. + * @param request GetJobTemplateRequest message or plain object + * @returns Promise + */ + public getJobTemplate(request: google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest): Promise; + + /** + * Calls DeleteJobTemplate. + * @param request DeleteJobTemplateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteJobTemplate(request: google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest, callback: google.cloud.video.transcoder.v1beta1.TranscoderService.DeleteJobTemplateCallback): void; + + /** + * Calls DeleteJobTemplate. + * @param request DeleteJobTemplateRequest message or plain object + * @returns Promise + */ + public deleteJobTemplate(request: google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest): Promise; + } + + namespace TranscoderService { + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#createJob}. + * @param error Error, if any + * @param [response] Job + */ + type CreateJobCallback = (error: (Error|null), response?: google.cloud.video.transcoder.v1beta1.Job) => void; + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#listJobs}. + * @param error Error, if any + * @param [response] ListJobsResponse + */ + type ListJobsCallback = (error: (Error|null), response?: google.cloud.video.transcoder.v1beta1.ListJobsResponse) => void; + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#getJob}. + * @param error Error, if any + * @param [response] Job + */ + type GetJobCallback = (error: (Error|null), response?: google.cloud.video.transcoder.v1beta1.Job) => void; + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#deleteJob}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteJobCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#createJobTemplate}. + * @param error Error, if any + * @param [response] JobTemplate + */ + type CreateJobTemplateCallback = (error: (Error|null), response?: google.cloud.video.transcoder.v1beta1.JobTemplate) => void; + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#listJobTemplates}. + * @param error Error, if any + * @param [response] ListJobTemplatesResponse + */ + type ListJobTemplatesCallback = (error: (Error|null), response?: google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse) => void; + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#getJobTemplate}. + * @param error Error, if any + * @param [response] JobTemplate + */ + type GetJobTemplateCallback = (error: (Error|null), response?: google.cloud.video.transcoder.v1beta1.JobTemplate) => void; + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#deleteJobTemplate}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteJobTemplateCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } + + /** Properties of a CreateJobRequest. */ + interface ICreateJobRequest { + + /** CreateJobRequest parent */ + parent?: (string|null); + + /** CreateJobRequest job */ + job?: (google.cloud.video.transcoder.v1beta1.IJob|null); + } + + /** Represents a CreateJobRequest. */ + class CreateJobRequest implements ICreateJobRequest { + + /** + * Constructs a new CreateJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.ICreateJobRequest); + + /** CreateJobRequest parent. */ + public parent: string; + + /** CreateJobRequest job. */ + public job?: (google.cloud.video.transcoder.v1beta1.IJob|null); + + /** + * Creates a new CreateJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateJobRequest instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.ICreateJobRequest): google.cloud.video.transcoder.v1beta1.CreateJobRequest; + + /** + * Encodes the specified CreateJobRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.CreateJobRequest.verify|verify} messages. + * @param message CreateJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.ICreateJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateJobRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.CreateJobRequest.verify|verify} messages. + * @param message CreateJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.ICreateJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateJobRequest + * @throws {Error} If the payload is not 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.transcoder.v1beta1.CreateJobRequest; + + /** + * Decodes a CreateJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateJobRequest + * @throws {Error} If the payload 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.transcoder.v1beta1.CreateJobRequest; + + /** + * Verifies a CreateJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.CreateJobRequest; + + /** + * Creates a plain object from a CreateJobRequest message. Also converts values to other types if specified. + * @param message CreateJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.CreateJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListJobsRequest. */ + interface IListJobsRequest { + + /** ListJobsRequest parent */ + parent?: (string|null); + + /** ListJobsRequest pageSize */ + pageSize?: (number|null); + + /** ListJobsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListJobsRequest. */ + class ListJobsRequest implements IListJobsRequest { + + /** + * Constructs a new ListJobsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.IListJobsRequest); + + /** ListJobsRequest parent. */ + public parent: string; + + /** ListJobsRequest pageSize. */ + public pageSize: number; + + /** ListJobsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListJobsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListJobsRequest instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.IListJobsRequest): google.cloud.video.transcoder.v1beta1.ListJobsRequest; + + /** + * Encodes the specified ListJobsRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobsRequest.verify|verify} messages. + * @param message ListJobsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.IListJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListJobsRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobsRequest.verify|verify} messages. + * @param message ListJobsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IListJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListJobsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListJobsRequest + * @throws {Error} If the payload is not 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.transcoder.v1beta1.ListJobsRequest; + + /** + * Decodes a ListJobsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListJobsRequest + * @throws {Error} If the payload 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.transcoder.v1beta1.ListJobsRequest; + + /** + * Verifies a ListJobsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListJobsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListJobsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.ListJobsRequest; + + /** + * Creates a plain object from a ListJobsRequest message. Also converts values to other types if specified. + * @param message ListJobsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.ListJobsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListJobsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetJobRequest. */ + interface IGetJobRequest { + + /** GetJobRequest name */ + name?: (string|null); + } + + /** Represents a GetJobRequest. */ + class GetJobRequest implements IGetJobRequest { + + /** + * Constructs a new GetJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.IGetJobRequest); + + /** GetJobRequest name. */ + public name: string; + + /** + * Creates a new GetJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetJobRequest instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.IGetJobRequest): google.cloud.video.transcoder.v1beta1.GetJobRequest; + + /** + * Encodes the specified GetJobRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.GetJobRequest.verify|verify} messages. + * @param message GetJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.IGetJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetJobRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.GetJobRequest.verify|verify} messages. + * @param message GetJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IGetJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetJobRequest + * @throws {Error} If the payload is not 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.transcoder.v1beta1.GetJobRequest; + + /** + * Decodes a GetJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetJobRequest + * @throws {Error} If the payload 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.transcoder.v1beta1.GetJobRequest; + + /** + * Verifies a GetJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.GetJobRequest; + + /** + * Creates a plain object from a GetJobRequest message. Also converts values to other types if specified. + * @param message GetJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.GetJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteJobRequest. */ + interface IDeleteJobRequest { + + /** DeleteJobRequest name */ + name?: (string|null); + } + + /** Represents a DeleteJobRequest. */ + class DeleteJobRequest implements IDeleteJobRequest { + + /** + * Constructs a new DeleteJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.IDeleteJobRequest); + + /** DeleteJobRequest name. */ + public name: string; + + /** + * Creates a new DeleteJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteJobRequest instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.IDeleteJobRequest): google.cloud.video.transcoder.v1beta1.DeleteJobRequest; + + /** + * Encodes the specified DeleteJobRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.DeleteJobRequest.verify|verify} messages. + * @param message DeleteJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.IDeleteJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteJobRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.DeleteJobRequest.verify|verify} messages. + * @param message DeleteJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IDeleteJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteJobRequest + * @throws {Error} If the payload is not 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.transcoder.v1beta1.DeleteJobRequest; + + /** + * Decodes a DeleteJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteJobRequest + * @throws {Error} If the payload 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.transcoder.v1beta1.DeleteJobRequest; + + /** + * Verifies a DeleteJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.DeleteJobRequest; + + /** + * Creates a plain object from a DeleteJobRequest message. Also converts values to other types if specified. + * @param message DeleteJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.DeleteJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListJobsResponse. */ + interface IListJobsResponse { + + /** ListJobsResponse jobs */ + jobs?: (google.cloud.video.transcoder.v1beta1.IJob[]|null); + + /** ListJobsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListJobsResponse. */ + class ListJobsResponse implements IListJobsResponse { + + /** + * Constructs a new ListJobsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.IListJobsResponse); + + /** ListJobsResponse jobs. */ + public jobs: google.cloud.video.transcoder.v1beta1.IJob[]; + + /** ListJobsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListJobsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListJobsResponse instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.IListJobsResponse): google.cloud.video.transcoder.v1beta1.ListJobsResponse; + + /** + * Encodes the specified ListJobsResponse message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobsResponse.verify|verify} messages. + * @param message ListJobsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.IListJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListJobsResponse message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobsResponse.verify|verify} messages. + * @param message ListJobsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IListJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListJobsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListJobsResponse + * @throws {Error} If the payload is not 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.transcoder.v1beta1.ListJobsResponse; + + /** + * Decodes a ListJobsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListJobsResponse + * @throws {Error} If the payload 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.transcoder.v1beta1.ListJobsResponse; + + /** + * Verifies a ListJobsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListJobsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListJobsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.ListJobsResponse; + + /** + * Creates a plain object from a ListJobsResponse message. Also converts values to other types if specified. + * @param message ListJobsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.ListJobsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListJobsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateJobTemplateRequest. */ + interface ICreateJobTemplateRequest { + + /** CreateJobTemplateRequest parent */ + parent?: (string|null); + + /** CreateJobTemplateRequest jobTemplate */ + jobTemplate?: (google.cloud.video.transcoder.v1beta1.IJobTemplate|null); + + /** CreateJobTemplateRequest jobTemplateId */ + jobTemplateId?: (string|null); + } + + /** Represents a CreateJobTemplateRequest. */ + class CreateJobTemplateRequest implements ICreateJobTemplateRequest { + + /** + * Constructs a new CreateJobTemplateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest); + + /** CreateJobTemplateRequest parent. */ + public parent: string; + + /** CreateJobTemplateRequest jobTemplate. */ + public jobTemplate?: (google.cloud.video.transcoder.v1beta1.IJobTemplate|null); + + /** CreateJobTemplateRequest jobTemplateId. */ + public jobTemplateId: string; + + /** + * Creates a new CreateJobTemplateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateJobTemplateRequest instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest): google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest; + + /** + * Encodes the specified CreateJobTemplateRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest.verify|verify} messages. + * @param message CreateJobTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateJobTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest.verify|verify} messages. + * @param message CreateJobTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateJobTemplateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateJobTemplateRequest + * @throws {Error} If the payload is not 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.transcoder.v1beta1.CreateJobTemplateRequest; + + /** + * Decodes a CreateJobTemplateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateJobTemplateRequest + * @throws {Error} If the payload 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.transcoder.v1beta1.CreateJobTemplateRequest; + + /** + * Verifies a CreateJobTemplateRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateJobTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateJobTemplateRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest; + + /** + * Creates a plain object from a CreateJobTemplateRequest message. Also converts values to other types if specified. + * @param message CreateJobTemplateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateJobTemplateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListJobTemplatesRequest. */ + interface IListJobTemplatesRequest { + + /** ListJobTemplatesRequest parent */ + parent?: (string|null); + + /** ListJobTemplatesRequest pageSize */ + pageSize?: (number|null); + + /** ListJobTemplatesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListJobTemplatesRequest. */ + class ListJobTemplatesRequest implements IListJobTemplatesRequest { + + /** + * Constructs a new ListJobTemplatesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest); + + /** ListJobTemplatesRequest parent. */ + public parent: string; + + /** ListJobTemplatesRequest pageSize. */ + public pageSize: number; + + /** ListJobTemplatesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListJobTemplatesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListJobTemplatesRequest instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest): google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest; + + /** + * Encodes the specified ListJobTemplatesRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest.verify|verify} messages. + * @param message ListJobTemplatesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListJobTemplatesRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest.verify|verify} messages. + * @param message ListJobTemplatesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListJobTemplatesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListJobTemplatesRequest + * @throws {Error} If the payload is not 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.transcoder.v1beta1.ListJobTemplatesRequest; + + /** + * Decodes a ListJobTemplatesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListJobTemplatesRequest + * @throws {Error} If the payload 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.transcoder.v1beta1.ListJobTemplatesRequest; + + /** + * Verifies a ListJobTemplatesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListJobTemplatesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListJobTemplatesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest; + + /** + * Creates a plain object from a ListJobTemplatesRequest message. Also converts values to other types if specified. + * @param message ListJobTemplatesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListJobTemplatesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetJobTemplateRequest. */ + interface IGetJobTemplateRequest { + + /** GetJobTemplateRequest name */ + name?: (string|null); + } + + /** Represents a GetJobTemplateRequest. */ + class GetJobTemplateRequest implements IGetJobTemplateRequest { + + /** + * Constructs a new GetJobTemplateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest); + + /** GetJobTemplateRequest name. */ + public name: string; + + /** + * Creates a new GetJobTemplateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetJobTemplateRequest instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest): google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest; + + /** + * Encodes the specified GetJobTemplateRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest.verify|verify} messages. + * @param message GetJobTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetJobTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest.verify|verify} messages. + * @param message GetJobTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetJobTemplateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetJobTemplateRequest + * @throws {Error} If the payload is not 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.transcoder.v1beta1.GetJobTemplateRequest; + + /** + * Decodes a GetJobTemplateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetJobTemplateRequest + * @throws {Error} If the payload 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.transcoder.v1beta1.GetJobTemplateRequest; + + /** + * Verifies a GetJobTemplateRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetJobTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetJobTemplateRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest; + + /** + * Creates a plain object from a GetJobTemplateRequest message. Also converts values to other types if specified. + * @param message GetJobTemplateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetJobTemplateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteJobTemplateRequest. */ + interface IDeleteJobTemplateRequest { + + /** DeleteJobTemplateRequest name */ + name?: (string|null); + } + + /** Represents a DeleteJobTemplateRequest. */ + class DeleteJobTemplateRequest implements IDeleteJobTemplateRequest { + + /** + * Constructs a new DeleteJobTemplateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest); + + /** DeleteJobTemplateRequest name. */ + public name: string; + + /** + * Creates a new DeleteJobTemplateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteJobTemplateRequest instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest): google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest; + + /** + * Encodes the specified DeleteJobTemplateRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest.verify|verify} messages. + * @param message DeleteJobTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteJobTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest.verify|verify} messages. + * @param message DeleteJobTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteJobTemplateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteJobTemplateRequest + * @throws {Error} If the payload is not 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.transcoder.v1beta1.DeleteJobTemplateRequest; + + /** + * Decodes a DeleteJobTemplateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteJobTemplateRequest + * @throws {Error} If the payload 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.transcoder.v1beta1.DeleteJobTemplateRequest; + + /** + * Verifies a DeleteJobTemplateRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteJobTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteJobTemplateRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest; + + /** + * Creates a plain object from a DeleteJobTemplateRequest message. Also converts values to other types if specified. + * @param message DeleteJobTemplateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteJobTemplateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListJobTemplatesResponse. */ + interface IListJobTemplatesResponse { + + /** ListJobTemplatesResponse jobTemplates */ + jobTemplates?: (google.cloud.video.transcoder.v1beta1.IJobTemplate[]|null); + + /** ListJobTemplatesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListJobTemplatesResponse. */ + class ListJobTemplatesResponse implements IListJobTemplatesResponse { + + /** + * Constructs a new ListJobTemplatesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.IListJobTemplatesResponse); + + /** ListJobTemplatesResponse jobTemplates. */ + public jobTemplates: google.cloud.video.transcoder.v1beta1.IJobTemplate[]; + + /** ListJobTemplatesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListJobTemplatesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListJobTemplatesResponse instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.IListJobTemplatesResponse): google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse; + + /** + * Encodes the specified ListJobTemplatesResponse message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse.verify|verify} messages. + * @param message ListJobTemplatesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.IListJobTemplatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListJobTemplatesResponse message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse.verify|verify} messages. + * @param message ListJobTemplatesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IListJobTemplatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListJobTemplatesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListJobTemplatesResponse + * @throws {Error} If the payload is not 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.transcoder.v1beta1.ListJobTemplatesResponse; + + /** + * Decodes a ListJobTemplatesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListJobTemplatesResponse + * @throws {Error} If the payload 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.transcoder.v1beta1.ListJobTemplatesResponse; + + /** + * Verifies a ListJobTemplatesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListJobTemplatesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListJobTemplatesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse; + + /** + * Creates a plain object from a ListJobTemplatesResponse message. Also converts values to other types if specified. + * @param message ListJobTemplatesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListJobTemplatesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5 + } + + /** 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); + } + + /** 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; + + /** + * 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 }; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + } + + /** 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 }; + } + + /** 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 }; + } + + /** 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; + + /** HttpRule put. */ + public put: string; + + /** HttpRule post. */ + public post: string; + + /** HttpRule delete. */ + public delete: string; + + /** HttpRule patch. */ + public patch: string; + + /** 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 }; + } + + /** 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 }; + } + } + + /** 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 }; + } + + /** 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); + } + + /** 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; + + /** + * 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 }; + } + + /** 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 }; + } + + 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 }; + } + + /** 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 }; + } + } + + /** 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 }; + } + + /** 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 }; + } + + 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 }; + } + + /** 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 }; + } + + 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 }; + } + } + + /** 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 }; + } + + /** 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 }; + } + + /** 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 }; + } + + /** 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 }; + } + + 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 }; + } + + /** 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 deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions 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 }; + } + + 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 }; + } + + /** 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 }; + } + + /** 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 }; + } + + /** 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 }; + } + + /** 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 }; + } + + 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 }; + } + + 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 }; + } + } + + /** 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 }; + } + + 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 }; + } + } + + /** 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 }; + } + + 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); + } + + /** 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; + + /** + * 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 }; + } + } + + /** 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 }; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 }; + } + } +} diff --git a/packages/google-cloud-video-transcoder/protos/protos.js b/packages/google-cloud-video-transcoder/protos/protos.js new file mode 100644 index 00000000000..79982156a5b --- /dev/null +++ b/packages/google-cloud-video-transcoder/protos/protos.js @@ -0,0 +1,24107 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*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").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_transcoder_protos || ($protobuf.roots._google_cloud_video_transcoder_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.transcoder = (function() { + + /** + * Namespace transcoder. + * @memberof google.cloud.video + * @namespace + */ + var transcoder = {}; + + transcoder.v1beta1 = (function() { + + /** + * Namespace v1beta1. + * @memberof google.cloud.video.transcoder + * @namespace + */ + var v1beta1 = {}; + + v1beta1.Job = (function() { + + /** + * Properties of a Job. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface IJob + * @property {string|null} [name] Job name + * @property {string|null} [inputUri] Job inputUri + * @property {string|null} [outputUri] Job outputUri + * @property {string|null} [templateId] Job templateId + * @property {google.cloud.video.transcoder.v1beta1.IJobConfig|null} [config] Job config + * @property {number|null} [priority] Job priority + * @property {google.cloud.video.transcoder.v1beta1.Job.IOriginUri|null} [originUri] Job originUri + * @property {google.cloud.video.transcoder.v1beta1.Job.ProcessingState|null} [state] Job state + * @property {google.cloud.video.transcoder.v1beta1.IProgress|null} [progress] Job progress + * @property {string|null} [failureReason] Job failureReason + * @property {Array.|null} [failureDetails] Job failureDetails + * @property {google.protobuf.ITimestamp|null} [createTime] Job createTime + * @property {google.protobuf.ITimestamp|null} [startTime] Job startTime + * @property {google.protobuf.ITimestamp|null} [endTime] Job endTime + */ + + /** + * Constructs a new Job. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents a Job. + * @implements IJob + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.IJob=} [properties] Properties to set + */ + function Job(properties) { + this.failureDetails = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Job name. + * @member {string} name + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Job.prototype.name = ""; + + /** + * Job inputUri. + * @member {string} inputUri + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Job.prototype.inputUri = ""; + + /** + * Job outputUri. + * @member {string} outputUri + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Job.prototype.outputUri = ""; + + /** + * Job templateId. + * @member {string} templateId + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Job.prototype.templateId = ""; + + /** + * Job config. + * @member {google.cloud.video.transcoder.v1beta1.IJobConfig|null|undefined} config + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Job.prototype.config = null; + + /** + * Job priority. + * @member {number} priority + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Job.prototype.priority = 0; + + /** + * Job originUri. + * @member {google.cloud.video.transcoder.v1beta1.Job.IOriginUri|null|undefined} originUri + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Job.prototype.originUri = null; + + /** + * Job state. + * @member {google.cloud.video.transcoder.v1beta1.Job.ProcessingState} state + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Job.prototype.state = 0; + + /** + * Job progress. + * @member {google.cloud.video.transcoder.v1beta1.IProgress|null|undefined} progress + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Job.prototype.progress = null; + + /** + * Job failureReason. + * @member {string} failureReason + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Job.prototype.failureReason = ""; + + /** + * Job failureDetails. + * @member {Array.} failureDetails + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Job.prototype.failureDetails = $util.emptyArray; + + /** + * Job createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Job.prototype.createTime = null; + + /** + * Job startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Job.prototype.startTime = null; + + /** + * Job endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Job.prototype.endTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Job jobConfig. + * @member {"templateId"|"config"|undefined} jobConfig + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Object.defineProperty(Job.prototype, "jobConfig", { + get: $util.oneOfGetter($oneOfFields = ["templateId", "config"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Job instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @static + * @param {google.cloud.video.transcoder.v1beta1.IJob=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.Job} Job instance + */ + Job.create = function create(properties) { + return new Job(properties); + }; + + /** + * Encodes the specified Job message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Job.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @static + * @param {google.cloud.video.transcoder.v1beta1.IJob} message Job message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Job.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.inputUri != null && Object.hasOwnProperty.call(message, "inputUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputUri); + if (message.outputUri != null && Object.hasOwnProperty.call(message, "outputUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputUri); + if (message.templateId != null && Object.hasOwnProperty.call(message, "templateId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.templateId); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.cloud.video.transcoder.v1beta1.JobConfig.encode(message.config, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.priority); + if (message.originUri != null && Object.hasOwnProperty.call(message, "originUri")) + $root.google.cloud.video.transcoder.v1beta1.Job.OriginUri.encode(message.originUri, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); + if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) + $root.google.cloud.video.transcoder.v1beta1.Progress.encode(message.progress, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.failureReason != null && Object.hasOwnProperty.call(message, "failureReason")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.failureReason); + if (message.failureDetails != null && message.failureDetails.length) + for (var i = 0; i < message.failureDetails.length; ++i) + $root.google.cloud.video.transcoder.v1beta1.FailureDetail.encode(message.failureDetails[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Job message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Job.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @static + * @param {google.cloud.video.transcoder.v1beta1.IJob} message Job message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Job.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Job message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.Job} Job + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Job.decode = function 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.transcoder.v1beta1.Job(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.inputUri = reader.string(); + break; + case 3: + message.outputUri = reader.string(); + break; + case 4: + message.templateId = reader.string(); + break; + case 5: + message.config = $root.google.cloud.video.transcoder.v1beta1.JobConfig.decode(reader, reader.uint32()); + break; + case 6: + message.priority = reader.int32(); + break; + case 7: + message.originUri = $root.google.cloud.video.transcoder.v1beta1.Job.OriginUri.decode(reader, reader.uint32()); + break; + case 8: + message.state = reader.int32(); + break; + case 9: + message.progress = $root.google.cloud.video.transcoder.v1beta1.Progress.decode(reader, reader.uint32()); + break; + case 10: + message.failureReason = reader.string(); + break; + case 11: + if (!(message.failureDetails && message.failureDetails.length)) + message.failureDetails = []; + message.failureDetails.push($root.google.cloud.video.transcoder.v1beta1.FailureDetail.decode(reader, reader.uint32())); + break; + case 12: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 13: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 14: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Job message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.Job} Job + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Job.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Job message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Job.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputUri != null && message.hasOwnProperty("inputUri")) + if (!$util.isString(message.inputUri)) + return "inputUri: string expected"; + if (message.outputUri != null && message.hasOwnProperty("outputUri")) + if (!$util.isString(message.outputUri)) + return "outputUri: string expected"; + if (message.templateId != null && message.hasOwnProperty("templateId")) { + properties.jobConfig = 1; + if (!$util.isString(message.templateId)) + return "templateId: string expected"; + } + if (message.config != null && message.hasOwnProperty("config")) { + if (properties.jobConfig === 1) + return "jobConfig: multiple values"; + properties.jobConfig = 1; + { + var error = $root.google.cloud.video.transcoder.v1beta1.JobConfig.verify(message.config); + if (error) + return "config." + error; + } + } + if (message.priority != null && message.hasOwnProperty("priority")) + if (!$util.isInteger(message.priority)) + return "priority: integer expected"; + if (message.originUri != null && message.hasOwnProperty("originUri")) { + var error = $root.google.cloud.video.transcoder.v1beta1.Job.OriginUri.verify(message.originUri); + if (error) + return "originUri." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.progress != null && message.hasOwnProperty("progress")) { + var error = $root.google.cloud.video.transcoder.v1beta1.Progress.verify(message.progress); + if (error) + return "progress." + error; + } + if (message.failureReason != null && message.hasOwnProperty("failureReason")) + if (!$util.isString(message.failureReason)) + return "failureReason: string expected"; + if (message.failureDetails != null && message.hasOwnProperty("failureDetails")) { + if (!Array.isArray(message.failureDetails)) + return "failureDetails: array expected"; + for (var i = 0; i < message.failureDetails.length; ++i) { + var error = $root.google.cloud.video.transcoder.v1beta1.FailureDetail.verify(message.failureDetails[i]); + if (error) + return "failureDetails." + error; + } + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates a Job message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.Job} Job + */ + Job.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Job) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.Job(); + if (object.name != null) + message.name = String(object.name); + if (object.inputUri != null) + message.inputUri = String(object.inputUri); + if (object.outputUri != null) + message.outputUri = String(object.outputUri); + if (object.templateId != null) + message.templateId = String(object.templateId); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.config: object expected"); + message.config = $root.google.cloud.video.transcoder.v1beta1.JobConfig.fromObject(object.config); + } + if (object.priority != null) + message.priority = object.priority | 0; + if (object.originUri != null) { + if (typeof object.originUri !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.originUri: object expected"); + message.originUri = $root.google.cloud.video.transcoder.v1beta1.Job.OriginUri.fromObject(object.originUri); + } + switch (object.state) { + case "PROCESSING_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PENDING": + case 1: + message.state = 1; + break; + case "RUNNING": + case 2: + message.state = 2; + break; + case "SUCCEEDED": + case 3: + message.state = 3; + break; + case "FAILED": + case 4: + message.state = 4; + break; + } + if (object.progress != null) { + if (typeof object.progress !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.progress: object expected"); + message.progress = $root.google.cloud.video.transcoder.v1beta1.Progress.fromObject(object.progress); + } + if (object.failureReason != null) + message.failureReason = String(object.failureReason); + if (object.failureDetails) { + if (!Array.isArray(object.failureDetails)) + throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.failureDetails: array expected"); + message.failureDetails = []; + for (var i = 0; i < object.failureDetails.length; ++i) { + if (typeof object.failureDetails[i] !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.failureDetails: object expected"); + message.failureDetails[i] = $root.google.cloud.video.transcoder.v1beta1.FailureDetail.fromObject(object.failureDetails[i]); + } + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + return message; + }; + + /** + * Creates a plain object from a Job message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @static + * @param {google.cloud.video.transcoder.v1beta1.Job} message Job + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Job.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.failureDetails = []; + if (options.defaults) { + object.name = ""; + object.inputUri = ""; + object.outputUri = ""; + object.priority = 0; + object.originUri = null; + object.state = options.enums === String ? "PROCESSING_STATE_UNSPECIFIED" : 0; + object.progress = null; + object.failureReason = ""; + object.createTime = null; + object.startTime = null; + object.endTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputUri != null && message.hasOwnProperty("inputUri")) + object.inputUri = message.inputUri; + if (message.outputUri != null && message.hasOwnProperty("outputUri")) + object.outputUri = message.outputUri; + if (message.templateId != null && message.hasOwnProperty("templateId")) { + object.templateId = message.templateId; + if (options.oneofs) + object.jobConfig = "templateId"; + } + if (message.config != null && message.hasOwnProperty("config")) { + object.config = $root.google.cloud.video.transcoder.v1beta1.JobConfig.toObject(message.config, options); + if (options.oneofs) + object.jobConfig = "config"; + } + if (message.priority != null && message.hasOwnProperty("priority")) + object.priority = message.priority; + if (message.originUri != null && message.hasOwnProperty("originUri")) + object.originUri = $root.google.cloud.video.transcoder.v1beta1.Job.OriginUri.toObject(message.originUri, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.video.transcoder.v1beta1.Job.ProcessingState[message.state] : message.state; + if (message.progress != null && message.hasOwnProperty("progress")) + object.progress = $root.google.cloud.video.transcoder.v1beta1.Progress.toObject(message.progress, options); + if (message.failureReason != null && message.hasOwnProperty("failureReason")) + object.failureReason = message.failureReason; + if (message.failureDetails && message.failureDetails.length) { + object.failureDetails = []; + for (var j = 0; j < message.failureDetails.length; ++j) + object.failureDetails[j] = $root.google.cloud.video.transcoder.v1beta1.FailureDetail.toObject(message.failureDetails[j], options); + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + return object; + }; + + /** + * Converts this Job to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + * @returns {Object.} JSON object + */ + Job.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Job.OriginUri = (function() { + + /** + * Properties of an OriginUri. + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @interface IOriginUri + * @property {string|null} [hls] OriginUri hls + * @property {string|null} [dash] OriginUri dash + */ + + /** + * Constructs a new OriginUri. + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @classdesc Represents an OriginUri. + * @implements IOriginUri + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.Job.IOriginUri=} [properties] Properties to set + */ + function OriginUri(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OriginUri hls. + * @member {string} hls + * @memberof google.cloud.video.transcoder.v1beta1.Job.OriginUri + * @instance + */ + OriginUri.prototype.hls = ""; + + /** + * OriginUri dash. + * @member {string} dash + * @memberof google.cloud.video.transcoder.v1beta1.Job.OriginUri + * @instance + */ + OriginUri.prototype.dash = ""; + + /** + * Creates a new OriginUri instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.Job.OriginUri + * @static + * @param {google.cloud.video.transcoder.v1beta1.Job.IOriginUri=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.Job.OriginUri} OriginUri instance + */ + OriginUri.create = function create(properties) { + return new OriginUri(properties); + }; + + /** + * Encodes the specified OriginUri message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Job.OriginUri.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.Job.OriginUri + * @static + * @param {google.cloud.video.transcoder.v1beta1.Job.IOriginUri} message OriginUri message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OriginUri.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hls != null && Object.hasOwnProperty.call(message, "hls")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.hls); + if (message.dash != null && Object.hasOwnProperty.call(message, "dash")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dash); + return writer; + }; + + /** + * Encodes the specified OriginUri message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Job.OriginUri.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Job.OriginUri + * @static + * @param {google.cloud.video.transcoder.v1beta1.Job.IOriginUri} message OriginUri message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OriginUri.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OriginUri message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.Job.OriginUri + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.Job.OriginUri} OriginUri + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OriginUri.decode = function 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.transcoder.v1beta1.Job.OriginUri(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.hls = reader.string(); + break; + case 2: + message.dash = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OriginUri message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Job.OriginUri + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.Job.OriginUri} OriginUri + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OriginUri.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OriginUri message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.Job.OriginUri + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OriginUri.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hls != null && message.hasOwnProperty("hls")) + if (!$util.isString(message.hls)) + return "hls: string expected"; + if (message.dash != null && message.hasOwnProperty("dash")) + if (!$util.isString(message.dash)) + return "dash: string expected"; + return null; + }; + + /** + * Creates an OriginUri message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.Job.OriginUri + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.Job.OriginUri} OriginUri + */ + OriginUri.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Job.OriginUri) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.Job.OriginUri(); + if (object.hls != null) + message.hls = String(object.hls); + if (object.dash != null) + message.dash = String(object.dash); + return message; + }; + + /** + * Creates a plain object from an OriginUri message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.Job.OriginUri + * @static + * @param {google.cloud.video.transcoder.v1beta1.Job.OriginUri} message OriginUri + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OriginUri.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.hls = ""; + object.dash = ""; + } + if (message.hls != null && message.hasOwnProperty("hls")) + object.hls = message.hls; + if (message.dash != null && message.hasOwnProperty("dash")) + object.dash = message.dash; + return object; + }; + + /** + * Converts this OriginUri to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.Job.OriginUri + * @instance + * @returns {Object.} JSON object + */ + OriginUri.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OriginUri; + })(); + + /** + * ProcessingState enum. + * @name google.cloud.video.transcoder.v1beta1.Job.ProcessingState + * @enum {number} + * @property {number} PROCESSING_STATE_UNSPECIFIED=0 PROCESSING_STATE_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} RUNNING=2 RUNNING value + * @property {number} SUCCEEDED=3 SUCCEEDED value + * @property {number} FAILED=4 FAILED value + */ + Job.ProcessingState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROCESSING_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "SUCCEEDED"] = 3; + values[valuesById[4] = "FAILED"] = 4; + return values; + })(); + + return Job; + })(); + + v1beta1.JobTemplate = (function() { + + /** + * Properties of a JobTemplate. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface IJobTemplate + * @property {string|null} [name] JobTemplate name + * @property {google.cloud.video.transcoder.v1beta1.IJobConfig|null} [config] JobTemplate config + */ + + /** + * Constructs a new JobTemplate. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents a JobTemplate. + * @implements IJobTemplate + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.IJobTemplate=} [properties] Properties to set + */ + function JobTemplate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JobTemplate name. + * @member {string} name + * @memberof google.cloud.video.transcoder.v1beta1.JobTemplate + * @instance + */ + JobTemplate.prototype.name = ""; + + /** + * JobTemplate config. + * @member {google.cloud.video.transcoder.v1beta1.IJobConfig|null|undefined} config + * @memberof google.cloud.video.transcoder.v1beta1.JobTemplate + * @instance + */ + JobTemplate.prototype.config = null; + + /** + * Creates a new JobTemplate instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.JobTemplate + * @static + * @param {google.cloud.video.transcoder.v1beta1.IJobTemplate=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.JobTemplate} JobTemplate instance + */ + JobTemplate.create = function create(properties) { + return new JobTemplate(properties); + }; + + /** + * Encodes the specified JobTemplate message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.JobTemplate.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.JobTemplate + * @static + * @param {google.cloud.video.transcoder.v1beta1.IJobTemplate} message JobTemplate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JobTemplate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.cloud.video.transcoder.v1beta1.JobConfig.encode(message.config, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified JobTemplate message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.JobTemplate.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.JobTemplate + * @static + * @param {google.cloud.video.transcoder.v1beta1.IJobTemplate} message JobTemplate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JobTemplate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JobTemplate message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.JobTemplate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.JobTemplate} JobTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JobTemplate.decode = function 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.transcoder.v1beta1.JobTemplate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.config = $root.google.cloud.video.transcoder.v1beta1.JobConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JobTemplate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.JobTemplate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.JobTemplate} JobTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JobTemplate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JobTemplate message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.JobTemplate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JobTemplate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.config != null && message.hasOwnProperty("config")) { + var error = $root.google.cloud.video.transcoder.v1beta1.JobConfig.verify(message.config); + if (error) + return "config." + error; + } + return null; + }; + + /** + * Creates a JobTemplate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.JobTemplate + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.JobTemplate} JobTemplate + */ + JobTemplate.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.JobTemplate) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.JobTemplate(); + if (object.name != null) + message.name = String(object.name); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.JobTemplate.config: object expected"); + message.config = $root.google.cloud.video.transcoder.v1beta1.JobConfig.fromObject(object.config); + } + return message; + }; + + /** + * Creates a plain object from a JobTemplate message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.JobTemplate + * @static + * @param {google.cloud.video.transcoder.v1beta1.JobTemplate} message JobTemplate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JobTemplate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.config = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.video.transcoder.v1beta1.JobConfig.toObject(message.config, options); + return object; + }; + + /** + * Converts this JobTemplate to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.JobTemplate + * @instance + * @returns {Object.} JSON object + */ + JobTemplate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return JobTemplate; + })(); + + v1beta1.JobConfig = (function() { + + /** + * Properties of a JobConfig. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface IJobConfig + * @property {Array.|null} [inputs] JobConfig inputs + * @property {Array.|null} [editList] JobConfig editList + * @property {Array.|null} [elementaryStreams] JobConfig elementaryStreams + * @property {Array.|null} [muxStreams] JobConfig muxStreams + * @property {Array.|null} [manifests] JobConfig manifests + * @property {google.cloud.video.transcoder.v1beta1.IOutput|null} [output] JobConfig output + * @property {Array.|null} [adBreaks] JobConfig adBreaks + * @property {google.cloud.video.transcoder.v1beta1.IPubsubDestination|null} [pubsubDestination] JobConfig pubsubDestination + * @property {Array.|null} [spriteSheets] JobConfig spriteSheets + * @property {Array.|null} [overlays] JobConfig overlays + */ + + /** + * Constructs a new JobConfig. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents a JobConfig. + * @implements IJobConfig + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.IJobConfig=} [properties] Properties to set + */ + function JobConfig(properties) { + this.inputs = []; + this.editList = []; + this.elementaryStreams = []; + this.muxStreams = []; + this.manifests = []; + this.adBreaks = []; + this.spriteSheets = []; + this.overlays = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JobConfig inputs. + * @member {Array.} inputs + * @memberof google.cloud.video.transcoder.v1beta1.JobConfig + * @instance + */ + JobConfig.prototype.inputs = $util.emptyArray; + + /** + * JobConfig editList. + * @member {Array.} editList + * @memberof google.cloud.video.transcoder.v1beta1.JobConfig + * @instance + */ + JobConfig.prototype.editList = $util.emptyArray; + + /** + * JobConfig elementaryStreams. + * @member {Array.} elementaryStreams + * @memberof google.cloud.video.transcoder.v1beta1.JobConfig + * @instance + */ + JobConfig.prototype.elementaryStreams = $util.emptyArray; + + /** + * JobConfig muxStreams. + * @member {Array.} muxStreams + * @memberof google.cloud.video.transcoder.v1beta1.JobConfig + * @instance + */ + JobConfig.prototype.muxStreams = $util.emptyArray; + + /** + * JobConfig manifests. + * @member {Array.} manifests + * @memberof google.cloud.video.transcoder.v1beta1.JobConfig + * @instance + */ + JobConfig.prototype.manifests = $util.emptyArray; + + /** + * JobConfig output. + * @member {google.cloud.video.transcoder.v1beta1.IOutput|null|undefined} output + * @memberof google.cloud.video.transcoder.v1beta1.JobConfig + * @instance + */ + JobConfig.prototype.output = null; + + /** + * JobConfig adBreaks. + * @member {Array.} adBreaks + * @memberof google.cloud.video.transcoder.v1beta1.JobConfig + * @instance + */ + JobConfig.prototype.adBreaks = $util.emptyArray; + + /** + * JobConfig pubsubDestination. + * @member {google.cloud.video.transcoder.v1beta1.IPubsubDestination|null|undefined} pubsubDestination + * @memberof google.cloud.video.transcoder.v1beta1.JobConfig + * @instance + */ + JobConfig.prototype.pubsubDestination = null; + + /** + * JobConfig spriteSheets. + * @member {Array.} spriteSheets + * @memberof google.cloud.video.transcoder.v1beta1.JobConfig + * @instance + */ + JobConfig.prototype.spriteSheets = $util.emptyArray; + + /** + * JobConfig overlays. + * @member {Array.} overlays + * @memberof google.cloud.video.transcoder.v1beta1.JobConfig + * @instance + */ + JobConfig.prototype.overlays = $util.emptyArray; + + /** + * Creates a new JobConfig instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.JobConfig + * @static + * @param {google.cloud.video.transcoder.v1beta1.IJobConfig=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.JobConfig} JobConfig instance + */ + JobConfig.create = function create(properties) { + return new JobConfig(properties); + }; + + /** + * Encodes the specified JobConfig message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.JobConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.JobConfig + * @static + * @param {google.cloud.video.transcoder.v1beta1.IJobConfig} message JobConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JobConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inputs != null && message.inputs.length) + for (var i = 0; i < message.inputs.length; ++i) + $root.google.cloud.video.transcoder.v1beta1.Input.encode(message.inputs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.editList != null && message.editList.length) + for (var i = 0; i < message.editList.length; ++i) + $root.google.cloud.video.transcoder.v1beta1.EditAtom.encode(message.editList[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.elementaryStreams != null && message.elementaryStreams.length) + for (var i = 0; i < message.elementaryStreams.length; ++i) + $root.google.cloud.video.transcoder.v1beta1.ElementaryStream.encode(message.elementaryStreams[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.muxStreams != null && message.muxStreams.length) + for (var i = 0; i < message.muxStreams.length; ++i) + $root.google.cloud.video.transcoder.v1beta1.MuxStream.encode(message.muxStreams[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.manifests != null && message.manifests.length) + for (var i = 0; i < message.manifests.length; ++i) + $root.google.cloud.video.transcoder.v1beta1.Manifest.encode(message.manifests[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.output != null && Object.hasOwnProperty.call(message, "output")) + $root.google.cloud.video.transcoder.v1beta1.Output.encode(message.output, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.adBreaks != null && message.adBreaks.length) + for (var i = 0; i < message.adBreaks.length; ++i) + $root.google.cloud.video.transcoder.v1beta1.AdBreak.encode(message.adBreaks[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.pubsubDestination != null && Object.hasOwnProperty.call(message, "pubsubDestination")) + $root.google.cloud.video.transcoder.v1beta1.PubsubDestination.encode(message.pubsubDestination, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.spriteSheets != null && message.spriteSheets.length) + for (var i = 0; i < message.spriteSheets.length; ++i) + $root.google.cloud.video.transcoder.v1beta1.SpriteSheet.encode(message.spriteSheets[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.overlays != null && message.overlays.length) + for (var i = 0; i < message.overlays.length; ++i) + $root.google.cloud.video.transcoder.v1beta1.Overlay.encode(message.overlays[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified JobConfig message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.JobConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.JobConfig + * @static + * @param {google.cloud.video.transcoder.v1beta1.IJobConfig} message JobConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JobConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JobConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.JobConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.JobConfig} JobConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JobConfig.decode = function 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.transcoder.v1beta1.JobConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.inputs && message.inputs.length)) + message.inputs = []; + message.inputs.push($root.google.cloud.video.transcoder.v1beta1.Input.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.editList && message.editList.length)) + message.editList = []; + message.editList.push($root.google.cloud.video.transcoder.v1beta1.EditAtom.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.elementaryStreams && message.elementaryStreams.length)) + message.elementaryStreams = []; + message.elementaryStreams.push($root.google.cloud.video.transcoder.v1beta1.ElementaryStream.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.muxStreams && message.muxStreams.length)) + message.muxStreams = []; + message.muxStreams.push($root.google.cloud.video.transcoder.v1beta1.MuxStream.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.manifests && message.manifests.length)) + message.manifests = []; + message.manifests.push($root.google.cloud.video.transcoder.v1beta1.Manifest.decode(reader, reader.uint32())); + break; + case 6: + message.output = $root.google.cloud.video.transcoder.v1beta1.Output.decode(reader, reader.uint32()); + break; + case 7: + if (!(message.adBreaks && message.adBreaks.length)) + message.adBreaks = []; + message.adBreaks.push($root.google.cloud.video.transcoder.v1beta1.AdBreak.decode(reader, reader.uint32())); + break; + case 8: + message.pubsubDestination = $root.google.cloud.video.transcoder.v1beta1.PubsubDestination.decode(reader, reader.uint32()); + break; + case 9: + if (!(message.spriteSheets && message.spriteSheets.length)) + message.spriteSheets = []; + message.spriteSheets.push($root.google.cloud.video.transcoder.v1beta1.SpriteSheet.decode(reader, reader.uint32())); + break; + case 10: + if (!(message.overlays && message.overlays.length)) + message.overlays = []; + message.overlays.push($root.google.cloud.video.transcoder.v1beta1.Overlay.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JobConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.JobConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.JobConfig} JobConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JobConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JobConfig message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.JobConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JobConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.inputs != null && message.hasOwnProperty("inputs")) { + if (!Array.isArray(message.inputs)) + return "inputs: array expected"; + for (var i = 0; i < message.inputs.length; ++i) { + var error = $root.google.cloud.video.transcoder.v1beta1.Input.verify(message.inputs[i]); + if (error) + return "inputs." + error; + } + } + if (message.editList != null && message.hasOwnProperty("editList")) { + if (!Array.isArray(message.editList)) + return "editList: array expected"; + for (var i = 0; i < message.editList.length; ++i) { + var error = $root.google.cloud.video.transcoder.v1beta1.EditAtom.verify(message.editList[i]); + if (error) + return "editList." + error; + } + } + if (message.elementaryStreams != null && message.hasOwnProperty("elementaryStreams")) { + if (!Array.isArray(message.elementaryStreams)) + return "elementaryStreams: array expected"; + for (var i = 0; i < message.elementaryStreams.length; ++i) { + var error = $root.google.cloud.video.transcoder.v1beta1.ElementaryStream.verify(message.elementaryStreams[i]); + if (error) + return "elementaryStreams." + error; + } + } + if (message.muxStreams != null && message.hasOwnProperty("muxStreams")) { + if (!Array.isArray(message.muxStreams)) + return "muxStreams: array expected"; + for (var i = 0; i < message.muxStreams.length; ++i) { + var error = $root.google.cloud.video.transcoder.v1beta1.MuxStream.verify(message.muxStreams[i]); + if (error) + return "muxStreams." + error; + } + } + if (message.manifests != null && message.hasOwnProperty("manifests")) { + if (!Array.isArray(message.manifests)) + return "manifests: array expected"; + for (var i = 0; i < message.manifests.length; ++i) { + var error = $root.google.cloud.video.transcoder.v1beta1.Manifest.verify(message.manifests[i]); + if (error) + return "manifests." + error; + } + } + if (message.output != null && message.hasOwnProperty("output")) { + var error = $root.google.cloud.video.transcoder.v1beta1.Output.verify(message.output); + if (error) + return "output." + error; + } + 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.transcoder.v1beta1.AdBreak.verify(message.adBreaks[i]); + if (error) + return "adBreaks." + error; + } + } + if (message.pubsubDestination != null && message.hasOwnProperty("pubsubDestination")) { + var error = $root.google.cloud.video.transcoder.v1beta1.PubsubDestination.verify(message.pubsubDestination); + if (error) + return "pubsubDestination." + error; + } + if (message.spriteSheets != null && message.hasOwnProperty("spriteSheets")) { + if (!Array.isArray(message.spriteSheets)) + return "spriteSheets: array expected"; + for (var i = 0; i < message.spriteSheets.length; ++i) { + var error = $root.google.cloud.video.transcoder.v1beta1.SpriteSheet.verify(message.spriteSheets[i]); + if (error) + return "spriteSheets." + error; + } + } + if (message.overlays != null && message.hasOwnProperty("overlays")) { + if (!Array.isArray(message.overlays)) + return "overlays: array expected"; + for (var i = 0; i < message.overlays.length; ++i) { + var error = $root.google.cloud.video.transcoder.v1beta1.Overlay.verify(message.overlays[i]); + if (error) + return "overlays." + error; + } + } + return null; + }; + + /** + * Creates a JobConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.JobConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.JobConfig} JobConfig + */ + JobConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.JobConfig) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.JobConfig(); + if (object.inputs) { + if (!Array.isArray(object.inputs)) + throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.inputs: array expected"); + message.inputs = []; + for (var i = 0; i < object.inputs.length; ++i) { + if (typeof object.inputs[i] !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.inputs: object expected"); + message.inputs[i] = $root.google.cloud.video.transcoder.v1beta1.Input.fromObject(object.inputs[i]); + } + } + if (object.editList) { + if (!Array.isArray(object.editList)) + throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.editList: array expected"); + message.editList = []; + for (var i = 0; i < object.editList.length; ++i) { + if (typeof object.editList[i] !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.editList: object expected"); + message.editList[i] = $root.google.cloud.video.transcoder.v1beta1.EditAtom.fromObject(object.editList[i]); + } + } + if (object.elementaryStreams) { + if (!Array.isArray(object.elementaryStreams)) + throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.elementaryStreams: array expected"); + message.elementaryStreams = []; + for (var i = 0; i < object.elementaryStreams.length; ++i) { + if (typeof object.elementaryStreams[i] !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.elementaryStreams: object expected"); + message.elementaryStreams[i] = $root.google.cloud.video.transcoder.v1beta1.ElementaryStream.fromObject(object.elementaryStreams[i]); + } + } + if (object.muxStreams) { + if (!Array.isArray(object.muxStreams)) + throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.muxStreams: array expected"); + message.muxStreams = []; + for (var i = 0; i < object.muxStreams.length; ++i) { + if (typeof object.muxStreams[i] !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.muxStreams: object expected"); + message.muxStreams[i] = $root.google.cloud.video.transcoder.v1beta1.MuxStream.fromObject(object.muxStreams[i]); + } + } + if (object.manifests) { + if (!Array.isArray(object.manifests)) + throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.manifests: array expected"); + message.manifests = []; + for (var i = 0; i < object.manifests.length; ++i) { + if (typeof object.manifests[i] !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.manifests: object expected"); + message.manifests[i] = $root.google.cloud.video.transcoder.v1beta1.Manifest.fromObject(object.manifests[i]); + } + } + if (object.output != null) { + if (typeof object.output !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.output: object expected"); + message.output = $root.google.cloud.video.transcoder.v1beta1.Output.fromObject(object.output); + } + if (object.adBreaks) { + if (!Array.isArray(object.adBreaks)) + throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.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.transcoder.v1beta1.JobConfig.adBreaks: object expected"); + message.adBreaks[i] = $root.google.cloud.video.transcoder.v1beta1.AdBreak.fromObject(object.adBreaks[i]); + } + } + if (object.pubsubDestination != null) { + if (typeof object.pubsubDestination !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.pubsubDestination: object expected"); + message.pubsubDestination = $root.google.cloud.video.transcoder.v1beta1.PubsubDestination.fromObject(object.pubsubDestination); + } + if (object.spriteSheets) { + if (!Array.isArray(object.spriteSheets)) + throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.spriteSheets: array expected"); + message.spriteSheets = []; + for (var i = 0; i < object.spriteSheets.length; ++i) { + if (typeof object.spriteSheets[i] !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.spriteSheets: object expected"); + message.spriteSheets[i] = $root.google.cloud.video.transcoder.v1beta1.SpriteSheet.fromObject(object.spriteSheets[i]); + } + } + if (object.overlays) { + if (!Array.isArray(object.overlays)) + throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.overlays: array expected"); + message.overlays = []; + for (var i = 0; i < object.overlays.length; ++i) { + if (typeof object.overlays[i] !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.overlays: object expected"); + message.overlays[i] = $root.google.cloud.video.transcoder.v1beta1.Overlay.fromObject(object.overlays[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a JobConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.JobConfig + * @static + * @param {google.cloud.video.transcoder.v1beta1.JobConfig} message JobConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JobConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.inputs = []; + object.editList = []; + object.elementaryStreams = []; + object.muxStreams = []; + object.manifests = []; + object.adBreaks = []; + object.spriteSheets = []; + object.overlays = []; + } + if (options.defaults) { + object.output = null; + object.pubsubDestination = null; + } + if (message.inputs && message.inputs.length) { + object.inputs = []; + for (var j = 0; j < message.inputs.length; ++j) + object.inputs[j] = $root.google.cloud.video.transcoder.v1beta1.Input.toObject(message.inputs[j], options); + } + if (message.editList && message.editList.length) { + object.editList = []; + for (var j = 0; j < message.editList.length; ++j) + object.editList[j] = $root.google.cloud.video.transcoder.v1beta1.EditAtom.toObject(message.editList[j], options); + } + if (message.elementaryStreams && message.elementaryStreams.length) { + object.elementaryStreams = []; + for (var j = 0; j < message.elementaryStreams.length; ++j) + object.elementaryStreams[j] = $root.google.cloud.video.transcoder.v1beta1.ElementaryStream.toObject(message.elementaryStreams[j], options); + } + if (message.muxStreams && message.muxStreams.length) { + object.muxStreams = []; + for (var j = 0; j < message.muxStreams.length; ++j) + object.muxStreams[j] = $root.google.cloud.video.transcoder.v1beta1.MuxStream.toObject(message.muxStreams[j], options); + } + if (message.manifests && message.manifests.length) { + object.manifests = []; + for (var j = 0; j < message.manifests.length; ++j) + object.manifests[j] = $root.google.cloud.video.transcoder.v1beta1.Manifest.toObject(message.manifests[j], options); + } + if (message.output != null && message.hasOwnProperty("output")) + object.output = $root.google.cloud.video.transcoder.v1beta1.Output.toObject(message.output, options); + if (message.adBreaks && message.adBreaks.length) { + object.adBreaks = []; + for (var j = 0; j < message.adBreaks.length; ++j) + object.adBreaks[j] = $root.google.cloud.video.transcoder.v1beta1.AdBreak.toObject(message.adBreaks[j], options); + } + if (message.pubsubDestination != null && message.hasOwnProperty("pubsubDestination")) + object.pubsubDestination = $root.google.cloud.video.transcoder.v1beta1.PubsubDestination.toObject(message.pubsubDestination, options); + if (message.spriteSheets && message.spriteSheets.length) { + object.spriteSheets = []; + for (var j = 0; j < message.spriteSheets.length; ++j) + object.spriteSheets[j] = $root.google.cloud.video.transcoder.v1beta1.SpriteSheet.toObject(message.spriteSheets[j], options); + } + if (message.overlays && message.overlays.length) { + object.overlays = []; + for (var j = 0; j < message.overlays.length; ++j) + object.overlays[j] = $root.google.cloud.video.transcoder.v1beta1.Overlay.toObject(message.overlays[j], options); + } + return object; + }; + + /** + * Converts this JobConfig to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.JobConfig + * @instance + * @returns {Object.} JSON object + */ + JobConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return JobConfig; + })(); + + v1beta1.Input = (function() { + + /** + * Properties of an Input. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface IInput + * @property {string|null} [key] Input key + * @property {string|null} [uri] Input uri + * @property {google.cloud.video.transcoder.v1beta1.IPreprocessingConfig|null} [preprocessingConfig] Input preprocessingConfig + */ + + /** + * Constructs a new Input. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents an Input. + * @implements IInput + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.IInput=} [properties] Properties to set + */ + function Input(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Input key. + * @member {string} key + * @memberof google.cloud.video.transcoder.v1beta1.Input + * @instance + */ + Input.prototype.key = ""; + + /** + * Input uri. + * @member {string} uri + * @memberof google.cloud.video.transcoder.v1beta1.Input + * @instance + */ + Input.prototype.uri = ""; + + /** + * Input preprocessingConfig. + * @member {google.cloud.video.transcoder.v1beta1.IPreprocessingConfig|null|undefined} preprocessingConfig + * @memberof google.cloud.video.transcoder.v1beta1.Input + * @instance + */ + Input.prototype.preprocessingConfig = null; + + /** + * Creates a new Input instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.Input + * @static + * @param {google.cloud.video.transcoder.v1beta1.IInput=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.Input} Input instance + */ + Input.create = function create(properties) { + return new Input(properties); + }; + + /** + * Encodes the specified Input message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Input.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.Input + * @static + * @param {google.cloud.video.transcoder.v1beta1.IInput} message Input message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Input.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.preprocessingConfig != null && Object.hasOwnProperty.call(message, "preprocessingConfig")) + $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.encode(message.preprocessingConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Input message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Input.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Input + * @static + * @param {google.cloud.video.transcoder.v1beta1.IInput} message Input message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Input.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Input message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.Input + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.Input} Input + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Input.decode = function 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.transcoder.v1beta1.Input(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.string(); + break; + case 2: + message.uri = reader.string(); + break; + case 3: + message.preprocessingConfig = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Input message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Input + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.Input} Input + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Input.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Input message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.Input + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Input.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.preprocessingConfig != null && message.hasOwnProperty("preprocessingConfig")) { + var error = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.verify(message.preprocessingConfig); + if (error) + return "preprocessingConfig." + error; + } + return null; + }; + + /** + * Creates an Input message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.Input + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.Input} Input + */ + Input.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Input) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.Input(); + if (object.key != null) + message.key = String(object.key); + if (object.uri != null) + message.uri = String(object.uri); + if (object.preprocessingConfig != null) { + if (typeof object.preprocessingConfig !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.Input.preprocessingConfig: object expected"); + message.preprocessingConfig = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.fromObject(object.preprocessingConfig); + } + return message; + }; + + /** + * Creates a plain object from an Input message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.Input + * @static + * @param {google.cloud.video.transcoder.v1beta1.Input} message Input + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Input.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = ""; + object.uri = ""; + object.preprocessingConfig = null; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.preprocessingConfig != null && message.hasOwnProperty("preprocessingConfig")) + object.preprocessingConfig = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.toObject(message.preprocessingConfig, options); + return object; + }; + + /** + * Converts this Input to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.Input + * @instance + * @returns {Object.} JSON object + */ + Input.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Input; + })(); + + v1beta1.Output = (function() { + + /** + * Properties of an Output. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface IOutput + * @property {string|null} [uri] Output uri + */ + + /** + * Constructs a new Output. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents an Output. + * @implements IOutput + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.IOutput=} [properties] Properties to set + */ + function Output(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Output uri. + * @member {string} uri + * @memberof google.cloud.video.transcoder.v1beta1.Output + * @instance + */ + Output.prototype.uri = ""; + + /** + * Creates a new Output instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.Output + * @static + * @param {google.cloud.video.transcoder.v1beta1.IOutput=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.Output} Output instance + */ + Output.create = function create(properties) { + return new Output(properties); + }; + + /** + * Encodes the specified Output message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Output.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.Output + * @static + * @param {google.cloud.video.transcoder.v1beta1.IOutput} message Output message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Output.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 Output message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Output.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Output + * @static + * @param {google.cloud.video.transcoder.v1beta1.IOutput} message Output message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Output.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Output message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.Output + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.Output} Output + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Output.decode = function 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.transcoder.v1beta1.Output(); + 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 Output message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Output + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.Output} Output + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Output.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Output message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.Output + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Output.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 Output message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.Output + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.Output} Output + */ + Output.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Output) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.Output(); + if (object.uri != null) + message.uri = String(object.uri); + return message; + }; + + /** + * Creates a plain object from an Output message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.Output + * @static + * @param {google.cloud.video.transcoder.v1beta1.Output} message Output + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Output.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 Output to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.Output + * @instance + * @returns {Object.} JSON object + */ + Output.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Output; + })(); + + v1beta1.EditAtom = (function() { + + /** + * Properties of an EditAtom. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface IEditAtom + * @property {string|null} [key] EditAtom key + * @property {Array.|null} [inputs] EditAtom inputs + * @property {google.protobuf.IDuration|null} [endTimeOffset] EditAtom endTimeOffset + * @property {google.protobuf.IDuration|null} [startTimeOffset] EditAtom startTimeOffset + */ + + /** + * Constructs a new EditAtom. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents an EditAtom. + * @implements IEditAtom + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.IEditAtom=} [properties] Properties to set + */ + function EditAtom(properties) { + this.inputs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EditAtom key. + * @member {string} key + * @memberof google.cloud.video.transcoder.v1beta1.EditAtom + * @instance + */ + EditAtom.prototype.key = ""; + + /** + * EditAtom inputs. + * @member {Array.} inputs + * @memberof google.cloud.video.transcoder.v1beta1.EditAtom + * @instance + */ + EditAtom.prototype.inputs = $util.emptyArray; + + /** + * EditAtom endTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} endTimeOffset + * @memberof google.cloud.video.transcoder.v1beta1.EditAtom + * @instance + */ + EditAtom.prototype.endTimeOffset = null; + + /** + * EditAtom startTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} startTimeOffset + * @memberof google.cloud.video.transcoder.v1beta1.EditAtom + * @instance + */ + EditAtom.prototype.startTimeOffset = null; + + /** + * Creates a new EditAtom instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.EditAtom + * @static + * @param {google.cloud.video.transcoder.v1beta1.IEditAtom=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.EditAtom} EditAtom instance + */ + EditAtom.create = function create(properties) { + return new EditAtom(properties); + }; + + /** + * Encodes the specified EditAtom message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.EditAtom.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.EditAtom + * @static + * @param {google.cloud.video.transcoder.v1beta1.IEditAtom} message EditAtom message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditAtom.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.inputs != null && message.inputs.length) + for (var i = 0; i < message.inputs.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputs[i]); + 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 EditAtom message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.EditAtom.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.EditAtom + * @static + * @param {google.cloud.video.transcoder.v1beta1.IEditAtom} message EditAtom message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditAtom.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EditAtom message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.EditAtom + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.EditAtom} EditAtom + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditAtom.decode = function 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.transcoder.v1beta1.EditAtom(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.string(); + break; + case 2: + if (!(message.inputs && message.inputs.length)) + message.inputs = []; + message.inputs.push(reader.string()); + 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 an EditAtom message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.EditAtom + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.EditAtom} EditAtom + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditAtom.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EditAtom message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.EditAtom + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EditAtom.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.inputs != null && message.hasOwnProperty("inputs")) { + if (!Array.isArray(message.inputs)) + return "inputs: array expected"; + for (var i = 0; i < message.inputs.length; ++i) + if (!$util.isString(message.inputs[i])) + return "inputs: string[] expected"; + } + 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 an EditAtom message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.EditAtom + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.EditAtom} EditAtom + */ + EditAtom.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.EditAtom) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.EditAtom(); + if (object.key != null) + message.key = String(object.key); + if (object.inputs) { + if (!Array.isArray(object.inputs)) + throw TypeError(".google.cloud.video.transcoder.v1beta1.EditAtom.inputs: array expected"); + message.inputs = []; + for (var i = 0; i < object.inputs.length; ++i) + message.inputs[i] = String(object.inputs[i]); + } + if (object.endTimeOffset != null) { + if (typeof object.endTimeOffset !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.EditAtom.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.transcoder.v1beta1.EditAtom.startTimeOffset: object expected"); + message.startTimeOffset = $root.google.protobuf.Duration.fromObject(object.startTimeOffset); + } + return message; + }; + + /** + * Creates a plain object from an EditAtom message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.EditAtom + * @static + * @param {google.cloud.video.transcoder.v1beta1.EditAtom} message EditAtom + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EditAtom.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.inputs = []; + if (options.defaults) { + object.key = ""; + object.endTimeOffset = null; + object.startTimeOffset = null; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.inputs && message.inputs.length) { + object.inputs = []; + for (var j = 0; j < message.inputs.length; ++j) + object.inputs[j] = message.inputs[j]; + } + 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 EditAtom to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.EditAtom + * @instance + * @returns {Object.} JSON object + */ + EditAtom.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EditAtom; + })(); + + v1beta1.AdBreak = (function() { + + /** + * Properties of an AdBreak. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface IAdBreak + * @property {google.protobuf.IDuration|null} [startTimeOffset] AdBreak startTimeOffset + */ + + /** + * Constructs a new AdBreak. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents an AdBreak. + * @implements IAdBreak + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.IAdBreak=} [properties] Properties to set + */ + function AdBreak(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AdBreak startTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} startTimeOffset + * @memberof google.cloud.video.transcoder.v1beta1.AdBreak + * @instance + */ + AdBreak.prototype.startTimeOffset = null; + + /** + * Creates a new AdBreak instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.AdBreak + * @static + * @param {google.cloud.video.transcoder.v1beta1.IAdBreak=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.AdBreak} AdBreak instance + */ + AdBreak.create = function create(properties) { + return new AdBreak(properties); + }; + + /** + * Encodes the specified AdBreak message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AdBreak.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.AdBreak + * @static + * @param {google.cloud.video.transcoder.v1beta1.IAdBreak} message AdBreak message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdBreak.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTimeOffset != null && Object.hasOwnProperty.call(message, "startTimeOffset")) + $root.google.protobuf.Duration.encode(message.startTimeOffset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AdBreak message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AdBreak.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.AdBreak + * @static + * @param {google.cloud.video.transcoder.v1beta1.IAdBreak} message AdBreak message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdBreak.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AdBreak message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.AdBreak + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.AdBreak} AdBreak + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdBreak.decode = function 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.transcoder.v1beta1.AdBreak(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AdBreak message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.AdBreak + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.AdBreak} AdBreak + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdBreak.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AdBreak message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.AdBreak + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AdBreak.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.startTimeOffset); + if (error) + return "startTimeOffset." + error; + } + return null; + }; + + /** + * Creates an AdBreak message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.AdBreak + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.AdBreak} AdBreak + */ + AdBreak.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.AdBreak) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.AdBreak(); + if (object.startTimeOffset != null) { + if (typeof object.startTimeOffset !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.AdBreak.startTimeOffset: object expected"); + message.startTimeOffset = $root.google.protobuf.Duration.fromObject(object.startTimeOffset); + } + return message; + }; + + /** + * Creates a plain object from an AdBreak message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.AdBreak + * @static + * @param {google.cloud.video.transcoder.v1beta1.AdBreak} message AdBreak + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AdBreak.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.startTimeOffset = null; + if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) + object.startTimeOffset = $root.google.protobuf.Duration.toObject(message.startTimeOffset, options); + return object; + }; + + /** + * Converts this AdBreak to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.AdBreak + * @instance + * @returns {Object.} JSON object + */ + AdBreak.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AdBreak; + })(); + + v1beta1.ElementaryStream = (function() { + + /** + * Properties of an ElementaryStream. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface IElementaryStream + * @property {string|null} [key] ElementaryStream key + * @property {google.cloud.video.transcoder.v1beta1.IVideoStream|null} [videoStream] ElementaryStream videoStream + * @property {google.cloud.video.transcoder.v1beta1.IAudioStream|null} [audioStream] ElementaryStream audioStream + * @property {google.cloud.video.transcoder.v1beta1.ITextStream|null} [textStream] ElementaryStream textStream + */ + + /** + * Constructs a new ElementaryStream. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents an ElementaryStream. + * @implements IElementaryStream + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.IElementaryStream=} [properties] Properties to set + */ + function ElementaryStream(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ElementaryStream key. + * @member {string} key + * @memberof google.cloud.video.transcoder.v1beta1.ElementaryStream + * @instance + */ + ElementaryStream.prototype.key = ""; + + /** + * ElementaryStream videoStream. + * @member {google.cloud.video.transcoder.v1beta1.IVideoStream|null|undefined} videoStream + * @memberof google.cloud.video.transcoder.v1beta1.ElementaryStream + * @instance + */ + ElementaryStream.prototype.videoStream = null; + + /** + * ElementaryStream audioStream. + * @member {google.cloud.video.transcoder.v1beta1.IAudioStream|null|undefined} audioStream + * @memberof google.cloud.video.transcoder.v1beta1.ElementaryStream + * @instance + */ + ElementaryStream.prototype.audioStream = null; + + /** + * ElementaryStream textStream. + * @member {google.cloud.video.transcoder.v1beta1.ITextStream|null|undefined} textStream + * @memberof google.cloud.video.transcoder.v1beta1.ElementaryStream + * @instance + */ + ElementaryStream.prototype.textStream = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ElementaryStream elementaryStream. + * @member {"videoStream"|"audioStream"|"textStream"|undefined} elementaryStream + * @memberof google.cloud.video.transcoder.v1beta1.ElementaryStream + * @instance + */ + Object.defineProperty(ElementaryStream.prototype, "elementaryStream", { + get: $util.oneOfGetter($oneOfFields = ["videoStream", "audioStream", "textStream"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ElementaryStream instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.ElementaryStream + * @static + * @param {google.cloud.video.transcoder.v1beta1.IElementaryStream=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.ElementaryStream} ElementaryStream instance + */ + ElementaryStream.create = function create(properties) { + return new ElementaryStream(properties); + }; + + /** + * Encodes the specified ElementaryStream message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ElementaryStream.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.ElementaryStream + * @static + * @param {google.cloud.video.transcoder.v1beta1.IElementaryStream} message ElementaryStream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ElementaryStream.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.videoStream != null && Object.hasOwnProperty.call(message, "videoStream")) + $root.google.cloud.video.transcoder.v1beta1.VideoStream.encode(message.videoStream, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.audioStream != null && Object.hasOwnProperty.call(message, "audioStream")) + $root.google.cloud.video.transcoder.v1beta1.AudioStream.encode(message.audioStream, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.textStream != null && Object.hasOwnProperty.call(message, "textStream")) + $root.google.cloud.video.transcoder.v1beta1.TextStream.encode(message.textStream, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.key); + return writer; + }; + + /** + * Encodes the specified ElementaryStream message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ElementaryStream.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.ElementaryStream + * @static + * @param {google.cloud.video.transcoder.v1beta1.IElementaryStream} message ElementaryStream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ElementaryStream.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ElementaryStream message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.ElementaryStream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.ElementaryStream} ElementaryStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ElementaryStream.decode = function 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.transcoder.v1beta1.ElementaryStream(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: + message.key = reader.string(); + break; + case 1: + message.videoStream = $root.google.cloud.video.transcoder.v1beta1.VideoStream.decode(reader, reader.uint32()); + break; + case 2: + message.audioStream = $root.google.cloud.video.transcoder.v1beta1.AudioStream.decode(reader, reader.uint32()); + break; + case 3: + message.textStream = $root.google.cloud.video.transcoder.v1beta1.TextStream.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ElementaryStream message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.ElementaryStream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.ElementaryStream} ElementaryStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ElementaryStream.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ElementaryStream message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.ElementaryStream + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ElementaryStream.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.videoStream != null && message.hasOwnProperty("videoStream")) { + properties.elementaryStream = 1; + { + var error = $root.google.cloud.video.transcoder.v1beta1.VideoStream.verify(message.videoStream); + if (error) + return "videoStream." + error; + } + } + if (message.audioStream != null && message.hasOwnProperty("audioStream")) { + if (properties.elementaryStream === 1) + return "elementaryStream: multiple values"; + properties.elementaryStream = 1; + { + var error = $root.google.cloud.video.transcoder.v1beta1.AudioStream.verify(message.audioStream); + if (error) + return "audioStream." + error; + } + } + if (message.textStream != null && message.hasOwnProperty("textStream")) { + if (properties.elementaryStream === 1) + return "elementaryStream: multiple values"; + properties.elementaryStream = 1; + { + var error = $root.google.cloud.video.transcoder.v1beta1.TextStream.verify(message.textStream); + if (error) + return "textStream." + error; + } + } + return null; + }; + + /** + * Creates an ElementaryStream message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.ElementaryStream + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.ElementaryStream} ElementaryStream + */ + ElementaryStream.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.ElementaryStream) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.ElementaryStream(); + if (object.key != null) + message.key = String(object.key); + if (object.videoStream != null) { + if (typeof object.videoStream !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.ElementaryStream.videoStream: object expected"); + message.videoStream = $root.google.cloud.video.transcoder.v1beta1.VideoStream.fromObject(object.videoStream); + } + if (object.audioStream != null) { + if (typeof object.audioStream !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.ElementaryStream.audioStream: object expected"); + message.audioStream = $root.google.cloud.video.transcoder.v1beta1.AudioStream.fromObject(object.audioStream); + } + if (object.textStream != null) { + if (typeof object.textStream !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.ElementaryStream.textStream: object expected"); + message.textStream = $root.google.cloud.video.transcoder.v1beta1.TextStream.fromObject(object.textStream); + } + return message; + }; + + /** + * Creates a plain object from an ElementaryStream message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.ElementaryStream + * @static + * @param {google.cloud.video.transcoder.v1beta1.ElementaryStream} message ElementaryStream + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ElementaryStream.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.key = ""; + if (message.videoStream != null && message.hasOwnProperty("videoStream")) { + object.videoStream = $root.google.cloud.video.transcoder.v1beta1.VideoStream.toObject(message.videoStream, options); + if (options.oneofs) + object.elementaryStream = "videoStream"; + } + if (message.audioStream != null && message.hasOwnProperty("audioStream")) { + object.audioStream = $root.google.cloud.video.transcoder.v1beta1.AudioStream.toObject(message.audioStream, options); + if (options.oneofs) + object.elementaryStream = "audioStream"; + } + if (message.textStream != null && message.hasOwnProperty("textStream")) { + object.textStream = $root.google.cloud.video.transcoder.v1beta1.TextStream.toObject(message.textStream, options); + if (options.oneofs) + object.elementaryStream = "textStream"; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + return object; + }; + + /** + * Converts this ElementaryStream to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.ElementaryStream + * @instance + * @returns {Object.} JSON object + */ + ElementaryStream.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ElementaryStream; + })(); + + v1beta1.MuxStream = (function() { + + /** + * Properties of a MuxStream. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface IMuxStream + * @property {string|null} [key] MuxStream key + * @property {string|null} [fileName] MuxStream fileName + * @property {string|null} [container] MuxStream container + * @property {Array.|null} [elementaryStreams] MuxStream elementaryStreams + * @property {google.cloud.video.transcoder.v1beta1.ISegmentSettings|null} [segmentSettings] MuxStream segmentSettings + * @property {google.cloud.video.transcoder.v1beta1.IEncryption|null} [encryption] MuxStream encryption + */ + + /** + * Constructs a new MuxStream. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents a MuxStream. + * @implements IMuxStream + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.IMuxStream=} [properties] Properties to set + */ + function MuxStream(properties) { + this.elementaryStreams = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MuxStream key. + * @member {string} key + * @memberof google.cloud.video.transcoder.v1beta1.MuxStream + * @instance + */ + MuxStream.prototype.key = ""; + + /** + * MuxStream fileName. + * @member {string} fileName + * @memberof google.cloud.video.transcoder.v1beta1.MuxStream + * @instance + */ + MuxStream.prototype.fileName = ""; + + /** + * MuxStream container. + * @member {string} container + * @memberof google.cloud.video.transcoder.v1beta1.MuxStream + * @instance + */ + MuxStream.prototype.container = ""; + + /** + * MuxStream elementaryStreams. + * @member {Array.} elementaryStreams + * @memberof google.cloud.video.transcoder.v1beta1.MuxStream + * @instance + */ + MuxStream.prototype.elementaryStreams = $util.emptyArray; + + /** + * MuxStream segmentSettings. + * @member {google.cloud.video.transcoder.v1beta1.ISegmentSettings|null|undefined} segmentSettings + * @memberof google.cloud.video.transcoder.v1beta1.MuxStream + * @instance + */ + MuxStream.prototype.segmentSettings = null; + + /** + * MuxStream encryption. + * @member {google.cloud.video.transcoder.v1beta1.IEncryption|null|undefined} encryption + * @memberof google.cloud.video.transcoder.v1beta1.MuxStream + * @instance + */ + MuxStream.prototype.encryption = null; + + /** + * Creates a new MuxStream instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.MuxStream + * @static + * @param {google.cloud.video.transcoder.v1beta1.IMuxStream=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.MuxStream} MuxStream instance + */ + MuxStream.create = function create(properties) { + return new MuxStream(properties); + }; + + /** + * Encodes the specified MuxStream message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.MuxStream.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.MuxStream + * @static + * @param {google.cloud.video.transcoder.v1beta1.IMuxStream} message MuxStream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MuxStream.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fileName); + if (message.container != null && Object.hasOwnProperty.call(message, "container")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.container); + if (message.elementaryStreams != null && message.elementaryStreams.length) + for (var i = 0; i < message.elementaryStreams.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.elementaryStreams[i]); + if (message.segmentSettings != null && Object.hasOwnProperty.call(message, "segmentSettings")) + $root.google.cloud.video.transcoder.v1beta1.SegmentSettings.encode(message.segmentSettings, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.encryption != null && Object.hasOwnProperty.call(message, "encryption")) + $root.google.cloud.video.transcoder.v1beta1.Encryption.encode(message.encryption, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MuxStream message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.MuxStream.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.MuxStream + * @static + * @param {google.cloud.video.transcoder.v1beta1.IMuxStream} message MuxStream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MuxStream.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MuxStream message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.MuxStream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.MuxStream} MuxStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MuxStream.decode = function 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.transcoder.v1beta1.MuxStream(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.string(); + break; + case 2: + message.fileName = reader.string(); + break; + case 3: + message.container = reader.string(); + break; + case 4: + if (!(message.elementaryStreams && message.elementaryStreams.length)) + message.elementaryStreams = []; + message.elementaryStreams.push(reader.string()); + break; + case 5: + message.segmentSettings = $root.google.cloud.video.transcoder.v1beta1.SegmentSettings.decode(reader, reader.uint32()); + break; + case 6: + message.encryption = $root.google.cloud.video.transcoder.v1beta1.Encryption.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MuxStream message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.MuxStream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.MuxStream} MuxStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MuxStream.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MuxStream message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.MuxStream + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MuxStream.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.fileName != null && message.hasOwnProperty("fileName")) + if (!$util.isString(message.fileName)) + return "fileName: string expected"; + if (message.container != null && message.hasOwnProperty("container")) + if (!$util.isString(message.container)) + return "container: string expected"; + if (message.elementaryStreams != null && message.hasOwnProperty("elementaryStreams")) { + if (!Array.isArray(message.elementaryStreams)) + return "elementaryStreams: array expected"; + for (var i = 0; i < message.elementaryStreams.length; ++i) + if (!$util.isString(message.elementaryStreams[i])) + return "elementaryStreams: string[] expected"; + } + if (message.segmentSettings != null && message.hasOwnProperty("segmentSettings")) { + var error = $root.google.cloud.video.transcoder.v1beta1.SegmentSettings.verify(message.segmentSettings); + if (error) + return "segmentSettings." + error; + } + if (message.encryption != null && message.hasOwnProperty("encryption")) { + var error = $root.google.cloud.video.transcoder.v1beta1.Encryption.verify(message.encryption); + if (error) + return "encryption." + error; + } + return null; + }; + + /** + * Creates a MuxStream message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.MuxStream + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.MuxStream} MuxStream + */ + MuxStream.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.MuxStream) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.MuxStream(); + if (object.key != null) + message.key = String(object.key); + if (object.fileName != null) + message.fileName = String(object.fileName); + if (object.container != null) + message.container = String(object.container); + if (object.elementaryStreams) { + if (!Array.isArray(object.elementaryStreams)) + throw TypeError(".google.cloud.video.transcoder.v1beta1.MuxStream.elementaryStreams: array expected"); + message.elementaryStreams = []; + for (var i = 0; i < object.elementaryStreams.length; ++i) + message.elementaryStreams[i] = String(object.elementaryStreams[i]); + } + if (object.segmentSettings != null) { + if (typeof object.segmentSettings !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.MuxStream.segmentSettings: object expected"); + message.segmentSettings = $root.google.cloud.video.transcoder.v1beta1.SegmentSettings.fromObject(object.segmentSettings); + } + if (object.encryption != null) { + if (typeof object.encryption !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.MuxStream.encryption: object expected"); + message.encryption = $root.google.cloud.video.transcoder.v1beta1.Encryption.fromObject(object.encryption); + } + return message; + }; + + /** + * Creates a plain object from a MuxStream message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.MuxStream + * @static + * @param {google.cloud.video.transcoder.v1beta1.MuxStream} message MuxStream + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MuxStream.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.elementaryStreams = []; + if (options.defaults) { + object.key = ""; + object.fileName = ""; + object.container = ""; + object.segmentSettings = null; + object.encryption = null; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.fileName != null && message.hasOwnProperty("fileName")) + object.fileName = message.fileName; + if (message.container != null && message.hasOwnProperty("container")) + object.container = message.container; + if (message.elementaryStreams && message.elementaryStreams.length) { + object.elementaryStreams = []; + for (var j = 0; j < message.elementaryStreams.length; ++j) + object.elementaryStreams[j] = message.elementaryStreams[j]; + } + if (message.segmentSettings != null && message.hasOwnProperty("segmentSettings")) + object.segmentSettings = $root.google.cloud.video.transcoder.v1beta1.SegmentSettings.toObject(message.segmentSettings, options); + if (message.encryption != null && message.hasOwnProperty("encryption")) + object.encryption = $root.google.cloud.video.transcoder.v1beta1.Encryption.toObject(message.encryption, options); + return object; + }; + + /** + * Converts this MuxStream to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.MuxStream + * @instance + * @returns {Object.} JSON object + */ + MuxStream.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MuxStream; + })(); + + v1beta1.Manifest = (function() { + + /** + * Properties of a Manifest. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface IManifest + * @property {string|null} [fileName] Manifest fileName + * @property {google.cloud.video.transcoder.v1beta1.Manifest.ManifestType|null} [type] Manifest type + * @property {Array.|null} [muxStreams] Manifest muxStreams + */ + + /** + * Constructs a new Manifest. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents a Manifest. + * @implements IManifest + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.IManifest=} [properties] Properties to set + */ + function Manifest(properties) { + this.muxStreams = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Manifest fileName. + * @member {string} fileName + * @memberof google.cloud.video.transcoder.v1beta1.Manifest + * @instance + */ + Manifest.prototype.fileName = ""; + + /** + * Manifest type. + * @member {google.cloud.video.transcoder.v1beta1.Manifest.ManifestType} type + * @memberof google.cloud.video.transcoder.v1beta1.Manifest + * @instance + */ + Manifest.prototype.type = 0; + + /** + * Manifest muxStreams. + * @member {Array.} muxStreams + * @memberof google.cloud.video.transcoder.v1beta1.Manifest + * @instance + */ + Manifest.prototype.muxStreams = $util.emptyArray; + + /** + * Creates a new Manifest instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.Manifest + * @static + * @param {google.cloud.video.transcoder.v1beta1.IManifest=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.Manifest} Manifest instance + */ + Manifest.create = function create(properties) { + return new Manifest(properties); + }; + + /** + * Encodes the specified Manifest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Manifest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.Manifest + * @static + * @param {google.cloud.video.transcoder.v1beta1.IManifest} message Manifest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Manifest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fileName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.muxStreams != null && message.muxStreams.length) + for (var i = 0; i < message.muxStreams.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.muxStreams[i]); + return writer; + }; + + /** + * Encodes the specified Manifest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Manifest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Manifest + * @static + * @param {google.cloud.video.transcoder.v1beta1.IManifest} message Manifest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Manifest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Manifest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.Manifest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.Manifest} Manifest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Manifest.decode = function 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.transcoder.v1beta1.Manifest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.fileName = reader.string(); + break; + case 2: + message.type = reader.int32(); + break; + case 3: + if (!(message.muxStreams && message.muxStreams.length)) + message.muxStreams = []; + message.muxStreams.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Manifest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Manifest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.Manifest} Manifest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Manifest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Manifest message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.Manifest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Manifest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fileName != null && message.hasOwnProperty("fileName")) + if (!$util.isString(message.fileName)) + return "fileName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.muxStreams != null && message.hasOwnProperty("muxStreams")) { + if (!Array.isArray(message.muxStreams)) + return "muxStreams: array expected"; + for (var i = 0; i < message.muxStreams.length; ++i) + if (!$util.isString(message.muxStreams[i])) + return "muxStreams: string[] expected"; + } + return null; + }; + + /** + * Creates a Manifest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.Manifest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.Manifest} Manifest + */ + Manifest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Manifest) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.Manifest(); + if (object.fileName != null) + message.fileName = String(object.fileName); + switch (object.type) { + case "MANIFEST_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "HLS": + case 1: + message.type = 1; + break; + case "DASH": + case 2: + message.type = 2; + break; + } + if (object.muxStreams) { + if (!Array.isArray(object.muxStreams)) + throw TypeError(".google.cloud.video.transcoder.v1beta1.Manifest.muxStreams: array expected"); + message.muxStreams = []; + for (var i = 0; i < object.muxStreams.length; ++i) + message.muxStreams[i] = String(object.muxStreams[i]); + } + return message; + }; + + /** + * Creates a plain object from a Manifest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.Manifest + * @static + * @param {google.cloud.video.transcoder.v1beta1.Manifest} message Manifest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Manifest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.muxStreams = []; + if (options.defaults) { + object.fileName = ""; + object.type = options.enums === String ? "MANIFEST_TYPE_UNSPECIFIED" : 0; + } + if (message.fileName != null && message.hasOwnProperty("fileName")) + object.fileName = message.fileName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.video.transcoder.v1beta1.Manifest.ManifestType[message.type] : message.type; + if (message.muxStreams && message.muxStreams.length) { + object.muxStreams = []; + for (var j = 0; j < message.muxStreams.length; ++j) + object.muxStreams[j] = message.muxStreams[j]; + } + return object; + }; + + /** + * Converts this Manifest to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.Manifest + * @instance + * @returns {Object.} JSON object + */ + Manifest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ManifestType enum. + * @name google.cloud.video.transcoder.v1beta1.Manifest.ManifestType + * @enum {number} + * @property {number} MANIFEST_TYPE_UNSPECIFIED=0 MANIFEST_TYPE_UNSPECIFIED value + * @property {number} HLS=1 HLS value + * @property {number} DASH=2 DASH value + */ + Manifest.ManifestType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MANIFEST_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "HLS"] = 1; + values[valuesById[2] = "DASH"] = 2; + return values; + })(); + + return Manifest; + })(); + + v1beta1.PubsubDestination = (function() { + + /** + * Properties of a PubsubDestination. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface IPubsubDestination + * @property {string|null} [topic] PubsubDestination topic + */ + + /** + * Constructs a new PubsubDestination. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents a PubsubDestination. + * @implements IPubsubDestination + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.IPubsubDestination=} [properties] Properties to set + */ + function PubsubDestination(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PubsubDestination topic. + * @member {string} topic + * @memberof google.cloud.video.transcoder.v1beta1.PubsubDestination + * @instance + */ + PubsubDestination.prototype.topic = ""; + + /** + * Creates a new PubsubDestination instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.PubsubDestination + * @static + * @param {google.cloud.video.transcoder.v1beta1.IPubsubDestination=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.PubsubDestination} PubsubDestination instance + */ + PubsubDestination.create = function create(properties) { + return new PubsubDestination(properties); + }; + + /** + * Encodes the specified PubsubDestination message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PubsubDestination.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.PubsubDestination + * @static + * @param {google.cloud.video.transcoder.v1beta1.IPubsubDestination} message PubsubDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PubsubDestination.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.topic); + return writer; + }; + + /** + * Encodes the specified PubsubDestination message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PubsubDestination.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.PubsubDestination + * @static + * @param {google.cloud.video.transcoder.v1beta1.IPubsubDestination} message PubsubDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PubsubDestination.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PubsubDestination message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.PubsubDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.PubsubDestination} PubsubDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PubsubDestination.decode = function 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.transcoder.v1beta1.PubsubDestination(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.topic = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PubsubDestination message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.PubsubDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.PubsubDestination} PubsubDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PubsubDestination.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PubsubDestination message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.PubsubDestination + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PubsubDestination.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.topic != null && message.hasOwnProperty("topic")) + if (!$util.isString(message.topic)) + return "topic: string expected"; + return null; + }; + + /** + * Creates a PubsubDestination message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.PubsubDestination + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.PubsubDestination} PubsubDestination + */ + PubsubDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.PubsubDestination) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.PubsubDestination(); + if (object.topic != null) + message.topic = String(object.topic); + return message; + }; + + /** + * Creates a plain object from a PubsubDestination message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.PubsubDestination + * @static + * @param {google.cloud.video.transcoder.v1beta1.PubsubDestination} message PubsubDestination + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PubsubDestination.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.topic = ""; + if (message.topic != null && message.hasOwnProperty("topic")) + object.topic = message.topic; + return object; + }; + + /** + * Converts this PubsubDestination to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.PubsubDestination + * @instance + * @returns {Object.} JSON object + */ + PubsubDestination.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PubsubDestination; + })(); + + v1beta1.SpriteSheet = (function() { + + /** + * Properties of a SpriteSheet. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface ISpriteSheet + * @property {string|null} [format] SpriteSheet format + * @property {string|null} [filePrefix] SpriteSheet filePrefix + * @property {number|null} [spriteWidthPixels] SpriteSheet spriteWidthPixels + * @property {number|null} [spriteHeightPixels] SpriteSheet spriteHeightPixels + * @property {number|null} [columnCount] SpriteSheet columnCount + * @property {number|null} [rowCount] SpriteSheet rowCount + * @property {google.protobuf.IDuration|null} [startTimeOffset] SpriteSheet startTimeOffset + * @property {google.protobuf.IDuration|null} [endTimeOffset] SpriteSheet endTimeOffset + * @property {number|null} [totalCount] SpriteSheet totalCount + * @property {google.protobuf.IDuration|null} [interval] SpriteSheet interval + */ + + /** + * Constructs a new SpriteSheet. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents a SpriteSheet. + * @implements ISpriteSheet + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.ISpriteSheet=} [properties] Properties to set + */ + function SpriteSheet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SpriteSheet format. + * @member {string} format + * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet + * @instance + */ + SpriteSheet.prototype.format = ""; + + /** + * SpriteSheet filePrefix. + * @member {string} filePrefix + * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet + * @instance + */ + SpriteSheet.prototype.filePrefix = ""; + + /** + * SpriteSheet spriteWidthPixels. + * @member {number} spriteWidthPixels + * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet + * @instance + */ + SpriteSheet.prototype.spriteWidthPixels = 0; + + /** + * SpriteSheet spriteHeightPixels. + * @member {number} spriteHeightPixels + * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet + * @instance + */ + SpriteSheet.prototype.spriteHeightPixels = 0; + + /** + * SpriteSheet columnCount. + * @member {number} columnCount + * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet + * @instance + */ + SpriteSheet.prototype.columnCount = 0; + + /** + * SpriteSheet rowCount. + * @member {number} rowCount + * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet + * @instance + */ + SpriteSheet.prototype.rowCount = 0; + + /** + * SpriteSheet startTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} startTimeOffset + * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet + * @instance + */ + SpriteSheet.prototype.startTimeOffset = null; + + /** + * SpriteSheet endTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} endTimeOffset + * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet + * @instance + */ + SpriteSheet.prototype.endTimeOffset = null; + + /** + * SpriteSheet totalCount. + * @member {number} totalCount + * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet + * @instance + */ + SpriteSheet.prototype.totalCount = 0; + + /** + * SpriteSheet interval. + * @member {google.protobuf.IDuration|null|undefined} interval + * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet + * @instance + */ + SpriteSheet.prototype.interval = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SpriteSheet extractionStrategy. + * @member {"totalCount"|"interval"|undefined} extractionStrategy + * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet + * @instance + */ + Object.defineProperty(SpriteSheet.prototype, "extractionStrategy", { + get: $util.oneOfGetter($oneOfFields = ["totalCount", "interval"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SpriteSheet instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet + * @static + * @param {google.cloud.video.transcoder.v1beta1.ISpriteSheet=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.SpriteSheet} SpriteSheet instance + */ + SpriteSheet.create = function create(properties) { + return new SpriteSheet(properties); + }; + + /** + * Encodes the specified SpriteSheet message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.SpriteSheet.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet + * @static + * @param {google.cloud.video.transcoder.v1beta1.ISpriteSheet} message SpriteSheet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SpriteSheet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.format); + if (message.filePrefix != null && Object.hasOwnProperty.call(message, "filePrefix")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filePrefix); + if (message.spriteWidthPixels != null && Object.hasOwnProperty.call(message, "spriteWidthPixels")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.spriteWidthPixels); + if (message.spriteHeightPixels != null && Object.hasOwnProperty.call(message, "spriteHeightPixels")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.spriteHeightPixels); + if (message.columnCount != null && Object.hasOwnProperty.call(message, "columnCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.columnCount); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.rowCount); + if (message.startTimeOffset != null && Object.hasOwnProperty.call(message, "startTimeOffset")) + $root.google.protobuf.Duration.encode(message.startTimeOffset, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.endTimeOffset != null && Object.hasOwnProperty.call(message, "endTimeOffset")) + $root.google.protobuf.Duration.encode(message.endTimeOffset, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.totalCount != null && Object.hasOwnProperty.call(message, "totalCount")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.totalCount); + if (message.interval != null && Object.hasOwnProperty.call(message, "interval")) + $root.google.protobuf.Duration.encode(message.interval, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SpriteSheet message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.SpriteSheet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet + * @static + * @param {google.cloud.video.transcoder.v1beta1.ISpriteSheet} message SpriteSheet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SpriteSheet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SpriteSheet message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.SpriteSheet} SpriteSheet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SpriteSheet.decode = function 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.transcoder.v1beta1.SpriteSheet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.format = reader.string(); + break; + case 2: + message.filePrefix = reader.string(); + break; + case 3: + message.spriteWidthPixels = reader.int32(); + break; + case 4: + message.spriteHeightPixels = reader.int32(); + break; + case 5: + message.columnCount = reader.int32(); + break; + case 6: + message.rowCount = reader.int32(); + break; + case 7: + message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 8: + message.endTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 9: + message.totalCount = reader.int32(); + break; + case 10: + message.interval = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SpriteSheet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.SpriteSheet} SpriteSheet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SpriteSheet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SpriteSheet message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SpriteSheet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.format != null && message.hasOwnProperty("format")) + if (!$util.isString(message.format)) + return "format: string expected"; + if (message.filePrefix != null && message.hasOwnProperty("filePrefix")) + if (!$util.isString(message.filePrefix)) + return "filePrefix: string expected"; + if (message.spriteWidthPixels != null && message.hasOwnProperty("spriteWidthPixels")) + if (!$util.isInteger(message.spriteWidthPixels)) + return "spriteWidthPixels: integer expected"; + if (message.spriteHeightPixels != null && message.hasOwnProperty("spriteHeightPixels")) + if (!$util.isInteger(message.spriteHeightPixels)) + return "spriteHeightPixels: integer expected"; + if (message.columnCount != null && message.hasOwnProperty("columnCount")) + if (!$util.isInteger(message.columnCount)) + return "columnCount: integer expected"; + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (!$util.isInteger(message.rowCount)) + return "rowCount: integer expected"; + if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.startTimeOffset); + if (error) + return "startTimeOffset." + error; + } + if (message.endTimeOffset != null && message.hasOwnProperty("endTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.endTimeOffset); + if (error) + return "endTimeOffset." + error; + } + if (message.totalCount != null && message.hasOwnProperty("totalCount")) { + properties.extractionStrategy = 1; + if (!$util.isInteger(message.totalCount)) + return "totalCount: integer expected"; + } + if (message.interval != null && message.hasOwnProperty("interval")) { + if (properties.extractionStrategy === 1) + return "extractionStrategy: multiple values"; + properties.extractionStrategy = 1; + { + var error = $root.google.protobuf.Duration.verify(message.interval); + if (error) + return "interval." + error; + } + } + return null; + }; + + /** + * Creates a SpriteSheet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.SpriteSheet} SpriteSheet + */ + SpriteSheet.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.SpriteSheet) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.SpriteSheet(); + if (object.format != null) + message.format = String(object.format); + if (object.filePrefix != null) + message.filePrefix = String(object.filePrefix); + if (object.spriteWidthPixels != null) + message.spriteWidthPixels = object.spriteWidthPixels | 0; + if (object.spriteHeightPixels != null) + message.spriteHeightPixels = object.spriteHeightPixels | 0; + if (object.columnCount != null) + message.columnCount = object.columnCount | 0; + if (object.rowCount != null) + message.rowCount = object.rowCount | 0; + if (object.startTimeOffset != null) { + if (typeof object.startTimeOffset !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.SpriteSheet.startTimeOffset: object expected"); + message.startTimeOffset = $root.google.protobuf.Duration.fromObject(object.startTimeOffset); + } + if (object.endTimeOffset != null) { + if (typeof object.endTimeOffset !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.SpriteSheet.endTimeOffset: object expected"); + message.endTimeOffset = $root.google.protobuf.Duration.fromObject(object.endTimeOffset); + } + if (object.totalCount != null) + message.totalCount = object.totalCount | 0; + if (object.interval != null) { + if (typeof object.interval !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.SpriteSheet.interval: object expected"); + message.interval = $root.google.protobuf.Duration.fromObject(object.interval); + } + return message; + }; + + /** + * Creates a plain object from a SpriteSheet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet + * @static + * @param {google.cloud.video.transcoder.v1beta1.SpriteSheet} message SpriteSheet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SpriteSheet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.format = ""; + object.filePrefix = ""; + object.spriteWidthPixels = 0; + object.spriteHeightPixels = 0; + object.columnCount = 0; + object.rowCount = 0; + object.startTimeOffset = null; + object.endTimeOffset = null; + } + if (message.format != null && message.hasOwnProperty("format")) + object.format = message.format; + if (message.filePrefix != null && message.hasOwnProperty("filePrefix")) + object.filePrefix = message.filePrefix; + if (message.spriteWidthPixels != null && message.hasOwnProperty("spriteWidthPixels")) + object.spriteWidthPixels = message.spriteWidthPixels; + if (message.spriteHeightPixels != null && message.hasOwnProperty("spriteHeightPixels")) + object.spriteHeightPixels = message.spriteHeightPixels; + if (message.columnCount != null && message.hasOwnProperty("columnCount")) + object.columnCount = message.columnCount; + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + object.rowCount = message.rowCount; + if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) + object.startTimeOffset = $root.google.protobuf.Duration.toObject(message.startTimeOffset, options); + if (message.endTimeOffset != null && message.hasOwnProperty("endTimeOffset")) + object.endTimeOffset = $root.google.protobuf.Duration.toObject(message.endTimeOffset, options); + if (message.totalCount != null && message.hasOwnProperty("totalCount")) { + object.totalCount = message.totalCount; + if (options.oneofs) + object.extractionStrategy = "totalCount"; + } + if (message.interval != null && message.hasOwnProperty("interval")) { + object.interval = $root.google.protobuf.Duration.toObject(message.interval, options); + if (options.oneofs) + object.extractionStrategy = "interval"; + } + return object; + }; + + /** + * Converts this SpriteSheet to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet + * @instance + * @returns {Object.} JSON object + */ + SpriteSheet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SpriteSheet; + })(); + + v1beta1.Overlay = (function() { + + /** + * Properties of an Overlay. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface IOverlay + * @property {google.cloud.video.transcoder.v1beta1.Overlay.IImage|null} [image] Overlay image + * @property {Array.|null} [animations] Overlay animations + */ + + /** + * Constructs a new Overlay. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents an Overlay. + * @implements IOverlay + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.IOverlay=} [properties] Properties to set + */ + function Overlay(properties) { + this.animations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Overlay image. + * @member {google.cloud.video.transcoder.v1beta1.Overlay.IImage|null|undefined} image + * @memberof google.cloud.video.transcoder.v1beta1.Overlay + * @instance + */ + Overlay.prototype.image = null; + + /** + * Overlay animations. + * @member {Array.} animations + * @memberof google.cloud.video.transcoder.v1beta1.Overlay + * @instance + */ + Overlay.prototype.animations = $util.emptyArray; + + /** + * Creates a new Overlay instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.Overlay + * @static + * @param {google.cloud.video.transcoder.v1beta1.IOverlay=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.Overlay} Overlay instance + */ + Overlay.create = function create(properties) { + return new Overlay(properties); + }; + + /** + * Encodes the specified Overlay message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.Overlay + * @static + * @param {google.cloud.video.transcoder.v1beta1.IOverlay} message Overlay message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Overlay.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.image != null && Object.hasOwnProperty.call(message, "image")) + $root.google.cloud.video.transcoder.v1beta1.Overlay.Image.encode(message.image, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.animations != null && message.animations.length) + for (var i = 0; i < message.animations.length; ++i) + $root.google.cloud.video.transcoder.v1beta1.Overlay.Animation.encode(message.animations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Overlay message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Overlay + * @static + * @param {google.cloud.video.transcoder.v1beta1.IOverlay} message Overlay message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Overlay.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Overlay message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.Overlay + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.Overlay} Overlay + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Overlay.decode = function 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.transcoder.v1beta1.Overlay(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.image = $root.google.cloud.video.transcoder.v1beta1.Overlay.Image.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.animations && message.animations.length)) + message.animations = []; + message.animations.push($root.google.cloud.video.transcoder.v1beta1.Overlay.Animation.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Overlay message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Overlay + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.Overlay} Overlay + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Overlay.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Overlay message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.Overlay + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Overlay.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.image != null && message.hasOwnProperty("image")) { + var error = $root.google.cloud.video.transcoder.v1beta1.Overlay.Image.verify(message.image); + if (error) + return "image." + error; + } + if (message.animations != null && message.hasOwnProperty("animations")) { + if (!Array.isArray(message.animations)) + return "animations: array expected"; + for (var i = 0; i < message.animations.length; ++i) { + var error = $root.google.cloud.video.transcoder.v1beta1.Overlay.Animation.verify(message.animations[i]); + if (error) + return "animations." + error; + } + } + return null; + }; + + /** + * Creates an Overlay message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.Overlay + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.Overlay} Overlay + */ + Overlay.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Overlay) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.Overlay(); + if (object.image != null) { + if (typeof object.image !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.Overlay.image: object expected"); + message.image = $root.google.cloud.video.transcoder.v1beta1.Overlay.Image.fromObject(object.image); + } + if (object.animations) { + if (!Array.isArray(object.animations)) + throw TypeError(".google.cloud.video.transcoder.v1beta1.Overlay.animations: array expected"); + message.animations = []; + for (var i = 0; i < object.animations.length; ++i) { + if (typeof object.animations[i] !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.Overlay.animations: object expected"); + message.animations[i] = $root.google.cloud.video.transcoder.v1beta1.Overlay.Animation.fromObject(object.animations[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an Overlay message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.Overlay + * @static + * @param {google.cloud.video.transcoder.v1beta1.Overlay} message Overlay + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Overlay.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.animations = []; + if (options.defaults) + object.image = null; + if (message.image != null && message.hasOwnProperty("image")) + object.image = $root.google.cloud.video.transcoder.v1beta1.Overlay.Image.toObject(message.image, options); + if (message.animations && message.animations.length) { + object.animations = []; + for (var j = 0; j < message.animations.length; ++j) + object.animations[j] = $root.google.cloud.video.transcoder.v1beta1.Overlay.Animation.toObject(message.animations[j], options); + } + return object; + }; + + /** + * Converts this Overlay to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.Overlay + * @instance + * @returns {Object.} JSON object + */ + Overlay.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Overlay.NormalizedCoordinate = (function() { + + /** + * Properties of a NormalizedCoordinate. + * @memberof google.cloud.video.transcoder.v1beta1.Overlay + * @interface INormalizedCoordinate + * @property {number|null} [x] NormalizedCoordinate x + * @property {number|null} [y] NormalizedCoordinate y + */ + + /** + * Constructs a new NormalizedCoordinate. + * @memberof google.cloud.video.transcoder.v1beta1.Overlay + * @classdesc Represents a NormalizedCoordinate. + * @implements INormalizedCoordinate + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate=} [properties] Properties to set + */ + function NormalizedCoordinate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NormalizedCoordinate x. + * @member {number} x + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate + * @instance + */ + NormalizedCoordinate.prototype.x = 0; + + /** + * NormalizedCoordinate y. + * @member {number} y + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate + * @instance + */ + NormalizedCoordinate.prototype.y = 0; + + /** + * Creates a new NormalizedCoordinate instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate + * @static + * @param {google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate} NormalizedCoordinate instance + */ + NormalizedCoordinate.create = function create(properties) { + return new NormalizedCoordinate(properties); + }; + + /** + * Encodes the specified NormalizedCoordinate message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate + * @static + * @param {google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate} message NormalizedCoordinate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NormalizedCoordinate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.x != null && Object.hasOwnProperty.call(message, "x")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.x); + if (message.y != null && Object.hasOwnProperty.call(message, "y")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.y); + return writer; + }; + + /** + * Encodes the specified NormalizedCoordinate message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate + * @static + * @param {google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate} message NormalizedCoordinate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NormalizedCoordinate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NormalizedCoordinate message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate} NormalizedCoordinate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NormalizedCoordinate.decode = function 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.transcoder.v1beta1.Overlay.NormalizedCoordinate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.x = reader.double(); + break; + case 2: + message.y = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NormalizedCoordinate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate} NormalizedCoordinate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NormalizedCoordinate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NormalizedCoordinate message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NormalizedCoordinate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.x != null && message.hasOwnProperty("x")) + if (typeof message.x !== "number") + return "x: number expected"; + if (message.y != null && message.hasOwnProperty("y")) + if (typeof message.y !== "number") + return "y: number expected"; + return null; + }; + + /** + * Creates a NormalizedCoordinate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate} NormalizedCoordinate + */ + NormalizedCoordinate.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate(); + if (object.x != null) + message.x = Number(object.x); + if (object.y != null) + message.y = Number(object.y); + return message; + }; + + /** + * Creates a plain object from a NormalizedCoordinate message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate + * @static + * @param {google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate} message NormalizedCoordinate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NormalizedCoordinate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.x = 0; + object.y = 0; + } + if (message.x != null && message.hasOwnProperty("x")) + object.x = options.json && !isFinite(message.x) ? String(message.x) : message.x; + if (message.y != null && message.hasOwnProperty("y")) + object.y = options.json && !isFinite(message.y) ? String(message.y) : message.y; + return object; + }; + + /** + * Converts this NormalizedCoordinate to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate + * @instance + * @returns {Object.} JSON object + */ + NormalizedCoordinate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NormalizedCoordinate; + })(); + + Overlay.Image = (function() { + + /** + * Properties of an Image. + * @memberof google.cloud.video.transcoder.v1beta1.Overlay + * @interface IImage + * @property {string|null} [uri] Image uri + * @property {google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate|null} [resolution] Image resolution + * @property {number|null} [alpha] Image alpha + */ + + /** + * Constructs a new Image. + * @memberof google.cloud.video.transcoder.v1beta1.Overlay + * @classdesc Represents an Image. + * @implements IImage + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.Overlay.IImage=} [properties] Properties to set + */ + function Image(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Image uri. + * @member {string} uri + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Image + * @instance + */ + Image.prototype.uri = ""; + + /** + * Image resolution. + * @member {google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate|null|undefined} resolution + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Image + * @instance + */ + Image.prototype.resolution = null; + + /** + * Image alpha. + * @member {number} alpha + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Image + * @instance + */ + Image.prototype.alpha = 0; + + /** + * Creates a new Image instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Image + * @static + * @param {google.cloud.video.transcoder.v1beta1.Overlay.IImage=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.Overlay.Image} Image instance + */ + Image.create = function create(properties) { + return new Image(properties); + }; + + /** + * Encodes the specified Image message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.Image.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Image + * @static + * @param {google.cloud.video.transcoder.v1beta1.Overlay.IImage} message Image message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Image.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.resolution != null && Object.hasOwnProperty.call(message, "resolution")) + $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.encode(message.resolution, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.alpha != null && Object.hasOwnProperty.call(message, "alpha")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.alpha); + return writer; + }; + + /** + * Encodes the specified Image message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.Image.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Image + * @static + * @param {google.cloud.video.transcoder.v1beta1.Overlay.IImage} message Image message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Image.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Image message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Image + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.Overlay.Image} Image + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Image.decode = function 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.transcoder.v1beta1.Overlay.Image(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.uri = reader.string(); + break; + case 2: + message.resolution = $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.decode(reader, reader.uint32()); + break; + case 3: + message.alpha = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Image message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Image + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.Overlay.Image} Image + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Image.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Image message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Image + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Image.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.resolution != null && message.hasOwnProperty("resolution")) { + var error = $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.verify(message.resolution); + if (error) + return "resolution." + error; + } + if (message.alpha != null && message.hasOwnProperty("alpha")) + if (typeof message.alpha !== "number") + return "alpha: number expected"; + return null; + }; + + /** + * Creates an Image message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Image + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.Overlay.Image} Image + */ + Image.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Overlay.Image) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.Overlay.Image(); + if (object.uri != null) + message.uri = String(object.uri); + if (object.resolution != null) { + if (typeof object.resolution !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.Overlay.Image.resolution: object expected"); + message.resolution = $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.fromObject(object.resolution); + } + if (object.alpha != null) + message.alpha = Number(object.alpha); + return message; + }; + + /** + * Creates a plain object from an Image message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Image + * @static + * @param {google.cloud.video.transcoder.v1beta1.Overlay.Image} message Image + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Image.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.uri = ""; + object.resolution = null; + object.alpha = 0; + } + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.resolution != null && message.hasOwnProperty("resolution")) + object.resolution = $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.toObject(message.resolution, options); + if (message.alpha != null && message.hasOwnProperty("alpha")) + object.alpha = options.json && !isFinite(message.alpha) ? String(message.alpha) : message.alpha; + return object; + }; + + /** + * Converts this Image to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Image + * @instance + * @returns {Object.} JSON object + */ + Image.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Image; + })(); + + Overlay.AnimationStatic = (function() { + + /** + * Properties of an AnimationStatic. + * @memberof google.cloud.video.transcoder.v1beta1.Overlay + * @interface IAnimationStatic + * @property {google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate|null} [xy] AnimationStatic xy + * @property {google.protobuf.IDuration|null} [startTimeOffset] AnimationStatic startTimeOffset + */ + + /** + * Constructs a new AnimationStatic. + * @memberof google.cloud.video.transcoder.v1beta1.Overlay + * @classdesc Represents an AnimationStatic. + * @implements IAnimationStatic + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationStatic=} [properties] Properties to set + */ + function AnimationStatic(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnimationStatic xy. + * @member {google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate|null|undefined} xy + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic + * @instance + */ + AnimationStatic.prototype.xy = null; + + /** + * AnimationStatic startTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} startTimeOffset + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic + * @instance + */ + AnimationStatic.prototype.startTimeOffset = null; + + /** + * Creates a new AnimationStatic instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic + * @static + * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationStatic=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic} AnimationStatic instance + */ + AnimationStatic.create = function create(properties) { + return new AnimationStatic(properties); + }; + + /** + * Encodes the specified AnimationStatic message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic + * @static + * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationStatic} message AnimationStatic message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnimationStatic.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.xy != null && Object.hasOwnProperty.call(message, "xy")) + $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.encode(message.xy, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.startTimeOffset != null && Object.hasOwnProperty.call(message, "startTimeOffset")) + $root.google.protobuf.Duration.encode(message.startTimeOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AnimationStatic message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic + * @static + * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationStatic} message AnimationStatic message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnimationStatic.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnimationStatic message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic} AnimationStatic + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnimationStatic.decode = function 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.transcoder.v1beta1.Overlay.AnimationStatic(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.xy = $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.decode(reader, reader.uint32()); + break; + case 2: + message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnimationStatic message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic} AnimationStatic + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnimationStatic.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnimationStatic message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnimationStatic.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.xy != null && message.hasOwnProperty("xy")) { + var error = $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.verify(message.xy); + if (error) + return "xy." + 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 an AnimationStatic message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic} AnimationStatic + */ + AnimationStatic.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic(); + if (object.xy != null) { + if (typeof object.xy !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic.xy: object expected"); + message.xy = $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.fromObject(object.xy); + } + if (object.startTimeOffset != null) { + if (typeof object.startTimeOffset !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic.startTimeOffset: object expected"); + message.startTimeOffset = $root.google.protobuf.Duration.fromObject(object.startTimeOffset); + } + return message; + }; + + /** + * Creates a plain object from an AnimationStatic message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic + * @static + * @param {google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic} message AnimationStatic + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnimationStatic.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.xy = null; + object.startTimeOffset = null; + } + if (message.xy != null && message.hasOwnProperty("xy")) + object.xy = $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.toObject(message.xy, options); + if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) + object.startTimeOffset = $root.google.protobuf.Duration.toObject(message.startTimeOffset, options); + return object; + }; + + /** + * Converts this AnimationStatic to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic + * @instance + * @returns {Object.} JSON object + */ + AnimationStatic.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AnimationStatic; + })(); + + Overlay.AnimationFade = (function() { + + /** + * Properties of an AnimationFade. + * @memberof google.cloud.video.transcoder.v1beta1.Overlay + * @interface IAnimationFade + * @property {google.cloud.video.transcoder.v1beta1.Overlay.FadeType|null} [fadeType] AnimationFade fadeType + * @property {google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate|null} [xy] AnimationFade xy + * @property {google.protobuf.IDuration|null} [startTimeOffset] AnimationFade startTimeOffset + * @property {google.protobuf.IDuration|null} [endTimeOffset] AnimationFade endTimeOffset + */ + + /** + * Constructs a new AnimationFade. + * @memberof google.cloud.video.transcoder.v1beta1.Overlay + * @classdesc Represents an AnimationFade. + * @implements IAnimationFade + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationFade=} [properties] Properties to set + */ + function AnimationFade(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnimationFade fadeType. + * @member {google.cloud.video.transcoder.v1beta1.Overlay.FadeType} fadeType + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade + * @instance + */ + AnimationFade.prototype.fadeType = 0; + + /** + * AnimationFade xy. + * @member {google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate|null|undefined} xy + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade + * @instance + */ + AnimationFade.prototype.xy = null; + + /** + * AnimationFade startTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} startTimeOffset + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade + * @instance + */ + AnimationFade.prototype.startTimeOffset = null; + + /** + * AnimationFade endTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} endTimeOffset + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade + * @instance + */ + AnimationFade.prototype.endTimeOffset = null; + + /** + * Creates a new AnimationFade instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade + * @static + * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationFade=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade} AnimationFade instance + */ + AnimationFade.create = function create(properties) { + return new AnimationFade(properties); + }; + + /** + * Encodes the specified AnimationFade message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade + * @static + * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationFade} message AnimationFade message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnimationFade.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fadeType != null && Object.hasOwnProperty.call(message, "fadeType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fadeType); + if (message.xy != null && Object.hasOwnProperty.call(message, "xy")) + $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.encode(message.xy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.startTimeOffset != null && Object.hasOwnProperty.call(message, "startTimeOffset")) + $root.google.protobuf.Duration.encode(message.startTimeOffset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endTimeOffset != null && Object.hasOwnProperty.call(message, "endTimeOffset")) + $root.google.protobuf.Duration.encode(message.endTimeOffset, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AnimationFade message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade + * @static + * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationFade} message AnimationFade message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnimationFade.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnimationFade message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade} AnimationFade + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnimationFade.decode = function 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.transcoder.v1beta1.Overlay.AnimationFade(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.fadeType = reader.int32(); + break; + case 2: + message.xy = $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.decode(reader, reader.uint32()); + break; + case 3: + message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 4: + message.endTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnimationFade message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade} AnimationFade + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnimationFade.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnimationFade message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnimationFade.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fadeType != null && message.hasOwnProperty("fadeType")) + switch (message.fadeType) { + default: + return "fadeType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.xy != null && message.hasOwnProperty("xy")) { + var error = $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.verify(message.xy); + if (error) + return "xy." + error; + } + if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.startTimeOffset); + if (error) + return "startTimeOffset." + error; + } + if (message.endTimeOffset != null && message.hasOwnProperty("endTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.endTimeOffset); + if (error) + return "endTimeOffset." + error; + } + return null; + }; + + /** + * Creates an AnimationFade message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade} AnimationFade + */ + AnimationFade.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade(); + switch (object.fadeType) { + case "FADE_TYPE_UNSPECIFIED": + case 0: + message.fadeType = 0; + break; + case "FADE_IN": + case 1: + message.fadeType = 1; + break; + case "FADE_OUT": + case 2: + message.fadeType = 2; + break; + } + if (object.xy != null) { + if (typeof object.xy !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade.xy: object expected"); + message.xy = $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.fromObject(object.xy); + } + if (object.startTimeOffset != null) { + if (typeof object.startTimeOffset !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade.startTimeOffset: object expected"); + message.startTimeOffset = $root.google.protobuf.Duration.fromObject(object.startTimeOffset); + } + if (object.endTimeOffset != null) { + if (typeof object.endTimeOffset !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade.endTimeOffset: object expected"); + message.endTimeOffset = $root.google.protobuf.Duration.fromObject(object.endTimeOffset); + } + return message; + }; + + /** + * Creates a plain object from an AnimationFade message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade + * @static + * @param {google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade} message AnimationFade + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnimationFade.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fadeType = options.enums === String ? "FADE_TYPE_UNSPECIFIED" : 0; + object.xy = null; + object.startTimeOffset = null; + object.endTimeOffset = null; + } + if (message.fadeType != null && message.hasOwnProperty("fadeType")) + object.fadeType = options.enums === String ? $root.google.cloud.video.transcoder.v1beta1.Overlay.FadeType[message.fadeType] : message.fadeType; + if (message.xy != null && message.hasOwnProperty("xy")) + object.xy = $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.toObject(message.xy, options); + if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) + object.startTimeOffset = $root.google.protobuf.Duration.toObject(message.startTimeOffset, options); + if (message.endTimeOffset != null && message.hasOwnProperty("endTimeOffset")) + object.endTimeOffset = $root.google.protobuf.Duration.toObject(message.endTimeOffset, options); + return object; + }; + + /** + * Converts this AnimationFade to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade + * @instance + * @returns {Object.} JSON object + */ + AnimationFade.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AnimationFade; + })(); + + Overlay.AnimationEnd = (function() { + + /** + * Properties of an AnimationEnd. + * @memberof google.cloud.video.transcoder.v1beta1.Overlay + * @interface IAnimationEnd + * @property {google.protobuf.IDuration|null} [startTimeOffset] AnimationEnd startTimeOffset + */ + + /** + * Constructs a new AnimationEnd. + * @memberof google.cloud.video.transcoder.v1beta1.Overlay + * @classdesc Represents an AnimationEnd. + * @implements IAnimationEnd + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationEnd=} [properties] Properties to set + */ + function AnimationEnd(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnimationEnd startTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} startTimeOffset + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd + * @instance + */ + AnimationEnd.prototype.startTimeOffset = null; + + /** + * Creates a new AnimationEnd instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd + * @static + * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationEnd=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd} AnimationEnd instance + */ + AnimationEnd.create = function create(properties) { + return new AnimationEnd(properties); + }; + + /** + * Encodes the specified AnimationEnd message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd + * @static + * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationEnd} message AnimationEnd message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnimationEnd.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTimeOffset != null && Object.hasOwnProperty.call(message, "startTimeOffset")) + $root.google.protobuf.Duration.encode(message.startTimeOffset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AnimationEnd message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd + * @static + * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationEnd} message AnimationEnd message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnimationEnd.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnimationEnd message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd} AnimationEnd + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnimationEnd.decode = function 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.transcoder.v1beta1.Overlay.AnimationEnd(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnimationEnd message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd} AnimationEnd + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnimationEnd.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnimationEnd message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnimationEnd.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.startTimeOffset); + if (error) + return "startTimeOffset." + error; + } + return null; + }; + + /** + * Creates an AnimationEnd message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd} AnimationEnd + */ + AnimationEnd.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd(); + if (object.startTimeOffset != null) { + if (typeof object.startTimeOffset !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd.startTimeOffset: object expected"); + message.startTimeOffset = $root.google.protobuf.Duration.fromObject(object.startTimeOffset); + } + return message; + }; + + /** + * Creates a plain object from an AnimationEnd message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd + * @static + * @param {google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd} message AnimationEnd + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnimationEnd.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.startTimeOffset = null; + if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) + object.startTimeOffset = $root.google.protobuf.Duration.toObject(message.startTimeOffset, options); + return object; + }; + + /** + * Converts this AnimationEnd to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd + * @instance + * @returns {Object.} JSON object + */ + AnimationEnd.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AnimationEnd; + })(); + + Overlay.Animation = (function() { + + /** + * Properties of an Animation. + * @memberof google.cloud.video.transcoder.v1beta1.Overlay + * @interface IAnimation + * @property {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationStatic|null} [animationStatic] Animation animationStatic + * @property {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationFade|null} [animationFade] Animation animationFade + * @property {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationEnd|null} [animationEnd] Animation animationEnd + */ + + /** + * Constructs a new Animation. + * @memberof google.cloud.video.transcoder.v1beta1.Overlay + * @classdesc Represents an Animation. + * @implements IAnimation + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimation=} [properties] Properties to set + */ + function Animation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Animation animationStatic. + * @member {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationStatic|null|undefined} animationStatic + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Animation + * @instance + */ + Animation.prototype.animationStatic = null; + + /** + * Animation animationFade. + * @member {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationFade|null|undefined} animationFade + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Animation + * @instance + */ + Animation.prototype.animationFade = null; + + /** + * Animation animationEnd. + * @member {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationEnd|null|undefined} animationEnd + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Animation + * @instance + */ + Animation.prototype.animationEnd = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Animation animationType. + * @member {"animationStatic"|"animationFade"|"animationEnd"|undefined} animationType + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Animation + * @instance + */ + Object.defineProperty(Animation.prototype, "animationType", { + get: $util.oneOfGetter($oneOfFields = ["animationStatic", "animationFade", "animationEnd"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Animation instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Animation + * @static + * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimation=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.Overlay.Animation} Animation instance + */ + Animation.create = function create(properties) { + return new Animation(properties); + }; + + /** + * Encodes the specified Animation message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.Animation.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Animation + * @static + * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimation} message Animation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Animation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.animationStatic != null && Object.hasOwnProperty.call(message, "animationStatic")) + $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic.encode(message.animationStatic, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.animationFade != null && Object.hasOwnProperty.call(message, "animationFade")) + $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade.encode(message.animationFade, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.animationEnd != null && Object.hasOwnProperty.call(message, "animationEnd")) + $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd.encode(message.animationEnd, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Animation message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.Animation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Animation + * @static + * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimation} message Animation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Animation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Animation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Animation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.Overlay.Animation} Animation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Animation.decode = function 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.transcoder.v1beta1.Overlay.Animation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.animationStatic = $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic.decode(reader, reader.uint32()); + break; + case 2: + message.animationFade = $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade.decode(reader, reader.uint32()); + break; + case 3: + message.animationEnd = $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Animation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Animation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.Overlay.Animation} Animation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Animation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Animation message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Animation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Animation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.animationStatic != null && message.hasOwnProperty("animationStatic")) { + properties.animationType = 1; + { + var error = $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic.verify(message.animationStatic); + if (error) + return "animationStatic." + error; + } + } + if (message.animationFade != null && message.hasOwnProperty("animationFade")) { + if (properties.animationType === 1) + return "animationType: multiple values"; + properties.animationType = 1; + { + var error = $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade.verify(message.animationFade); + if (error) + return "animationFade." + error; + } + } + if (message.animationEnd != null && message.hasOwnProperty("animationEnd")) { + if (properties.animationType === 1) + return "animationType: multiple values"; + properties.animationType = 1; + { + var error = $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd.verify(message.animationEnd); + if (error) + return "animationEnd." + error; + } + } + return null; + }; + + /** + * Creates an Animation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Animation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.Overlay.Animation} Animation + */ + Animation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Overlay.Animation) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.Overlay.Animation(); + if (object.animationStatic != null) { + if (typeof object.animationStatic !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.Overlay.Animation.animationStatic: object expected"); + message.animationStatic = $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic.fromObject(object.animationStatic); + } + if (object.animationFade != null) { + if (typeof object.animationFade !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.Overlay.Animation.animationFade: object expected"); + message.animationFade = $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade.fromObject(object.animationFade); + } + if (object.animationEnd != null) { + if (typeof object.animationEnd !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.Overlay.Animation.animationEnd: object expected"); + message.animationEnd = $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd.fromObject(object.animationEnd); + } + return message; + }; + + /** + * Creates a plain object from an Animation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Animation + * @static + * @param {google.cloud.video.transcoder.v1beta1.Overlay.Animation} message Animation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Animation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.animationStatic != null && message.hasOwnProperty("animationStatic")) { + object.animationStatic = $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic.toObject(message.animationStatic, options); + if (options.oneofs) + object.animationType = "animationStatic"; + } + if (message.animationFade != null && message.hasOwnProperty("animationFade")) { + object.animationFade = $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade.toObject(message.animationFade, options); + if (options.oneofs) + object.animationType = "animationFade"; + } + if (message.animationEnd != null && message.hasOwnProperty("animationEnd")) { + object.animationEnd = $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd.toObject(message.animationEnd, options); + if (options.oneofs) + object.animationType = "animationEnd"; + } + return object; + }; + + /** + * Converts this Animation to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Animation + * @instance + * @returns {Object.} JSON object + */ + Animation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Animation; + })(); + + /** + * FadeType enum. + * @name google.cloud.video.transcoder.v1beta1.Overlay.FadeType + * @enum {number} + * @property {number} FADE_TYPE_UNSPECIFIED=0 FADE_TYPE_UNSPECIFIED value + * @property {number} FADE_IN=1 FADE_IN value + * @property {number} FADE_OUT=2 FADE_OUT value + */ + Overlay.FadeType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FADE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FADE_IN"] = 1; + values[valuesById[2] = "FADE_OUT"] = 2; + return values; + })(); + + return Overlay; + })(); + + v1beta1.PreprocessingConfig = (function() { + + /** + * Properties of a PreprocessingConfig. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface IPreprocessingConfig + * @property {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IColor|null} [color] PreprocessingConfig color + * @property {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDenoise|null} [denoise] PreprocessingConfig denoise + * @property {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDeblock|null} [deblock] PreprocessingConfig deblock + * @property {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IAudio|null} [audio] PreprocessingConfig audio + */ + + /** + * Constructs a new PreprocessingConfig. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents a PreprocessingConfig. + * @implements IPreprocessingConfig + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.IPreprocessingConfig=} [properties] Properties to set + */ + function PreprocessingConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PreprocessingConfig color. + * @member {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IColor|null|undefined} color + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig + * @instance + */ + PreprocessingConfig.prototype.color = null; + + /** + * PreprocessingConfig denoise. + * @member {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDenoise|null|undefined} denoise + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig + * @instance + */ + PreprocessingConfig.prototype.denoise = null; + + /** + * PreprocessingConfig deblock. + * @member {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDeblock|null|undefined} deblock + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig + * @instance + */ + PreprocessingConfig.prototype.deblock = null; + + /** + * PreprocessingConfig audio. + * @member {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IAudio|null|undefined} audio + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig + * @instance + */ + PreprocessingConfig.prototype.audio = null; + + /** + * Creates a new PreprocessingConfig instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig + * @static + * @param {google.cloud.video.transcoder.v1beta1.IPreprocessingConfig=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig} PreprocessingConfig instance + */ + PreprocessingConfig.create = function create(properties) { + return new PreprocessingConfig(properties); + }; + + /** + * Encodes the specified PreprocessingConfig message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig + * @static + * @param {google.cloud.video.transcoder.v1beta1.IPreprocessingConfig} message PreprocessingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PreprocessingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.color != null && Object.hasOwnProperty.call(message, "color")) + $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color.encode(message.color, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.denoise != null && Object.hasOwnProperty.call(message, "denoise")) + $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise.encode(message.denoise, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.deblock != null && Object.hasOwnProperty.call(message, "deblock")) + $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock.encode(message.deblock, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) + $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio.encode(message.audio, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PreprocessingConfig message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig + * @static + * @param {google.cloud.video.transcoder.v1beta1.IPreprocessingConfig} message PreprocessingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PreprocessingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PreprocessingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig} PreprocessingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PreprocessingConfig.decode = function 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.transcoder.v1beta1.PreprocessingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.color = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color.decode(reader, reader.uint32()); + break; + case 2: + message.denoise = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise.decode(reader, reader.uint32()); + break; + case 3: + message.deblock = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock.decode(reader, reader.uint32()); + break; + case 4: + message.audio = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PreprocessingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig} PreprocessingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PreprocessingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PreprocessingConfig message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PreprocessingConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.color != null && message.hasOwnProperty("color")) { + var error = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color.verify(message.color); + if (error) + return "color." + error; + } + if (message.denoise != null && message.hasOwnProperty("denoise")) { + var error = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise.verify(message.denoise); + if (error) + return "denoise." + error; + } + if (message.deblock != null && message.hasOwnProperty("deblock")) { + var error = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock.verify(message.deblock); + if (error) + return "deblock." + error; + } + if (message.audio != null && message.hasOwnProperty("audio")) { + var error = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio.verify(message.audio); + if (error) + return "audio." + error; + } + return null; + }; + + /** + * Creates a PreprocessingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig} PreprocessingConfig + */ + PreprocessingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig(); + if (object.color != null) { + if (typeof object.color !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.PreprocessingConfig.color: object expected"); + message.color = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color.fromObject(object.color); + } + if (object.denoise != null) { + if (typeof object.denoise !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.PreprocessingConfig.denoise: object expected"); + message.denoise = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise.fromObject(object.denoise); + } + if (object.deblock != null) { + if (typeof object.deblock !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.PreprocessingConfig.deblock: object expected"); + message.deblock = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock.fromObject(object.deblock); + } + if (object.audio != null) { + if (typeof object.audio !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.PreprocessingConfig.audio: object expected"); + message.audio = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio.fromObject(object.audio); + } + return message; + }; + + /** + * Creates a plain object from a PreprocessingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig + * @static + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig} message PreprocessingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PreprocessingConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.color = null; + object.denoise = null; + object.deblock = null; + object.audio = null; + } + if (message.color != null && message.hasOwnProperty("color")) + object.color = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color.toObject(message.color, options); + if (message.denoise != null && message.hasOwnProperty("denoise")) + object.denoise = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise.toObject(message.denoise, options); + if (message.deblock != null && message.hasOwnProperty("deblock")) + object.deblock = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock.toObject(message.deblock, options); + if (message.audio != null && message.hasOwnProperty("audio")) + object.audio = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio.toObject(message.audio, options); + return object; + }; + + /** + * Converts this PreprocessingConfig to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig + * @instance + * @returns {Object.} JSON object + */ + PreprocessingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + PreprocessingConfig.Color = (function() { + + /** + * Properties of a Color. + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig + * @interface IColor + * @property {number|null} [saturation] Color saturation + * @property {number|null} [contrast] Color contrast + * @property {number|null} [brightness] Color brightness + */ + + /** + * Constructs a new Color. + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig + * @classdesc Represents a Color. + * @implements IColor + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IColor=} [properties] Properties to set + */ + function Color(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Color saturation. + * @member {number} saturation + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color + * @instance + */ + Color.prototype.saturation = 0; + + /** + * Color contrast. + * @member {number} contrast + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color + * @instance + */ + Color.prototype.contrast = 0; + + /** + * Color brightness. + * @member {number} brightness + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color + * @instance + */ + Color.prototype.brightness = 0; + + /** + * Creates a new Color instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color + * @static + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IColor=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color} Color instance + */ + Color.create = function create(properties) { + return new Color(properties); + }; + + /** + * Encodes the specified Color message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color + * @static + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IColor} message Color message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Color.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.saturation != null && Object.hasOwnProperty.call(message, "saturation")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.saturation); + if (message.contrast != null && Object.hasOwnProperty.call(message, "contrast")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.contrast); + if (message.brightness != null && Object.hasOwnProperty.call(message, "brightness")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.brightness); + return writer; + }; + + /** + * Encodes the specified Color message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color + * @static + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IColor} message Color message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Color.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Color message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color} Color + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Color.decode = function 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.transcoder.v1beta1.PreprocessingConfig.Color(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.saturation = reader.double(); + break; + case 2: + message.contrast = reader.double(); + break; + case 3: + message.brightness = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Color message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color} Color + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Color.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Color message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Color.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.saturation != null && message.hasOwnProperty("saturation")) + if (typeof message.saturation !== "number") + return "saturation: number expected"; + if (message.contrast != null && message.hasOwnProperty("contrast")) + if (typeof message.contrast !== "number") + return "contrast: number expected"; + if (message.brightness != null && message.hasOwnProperty("brightness")) + if (typeof message.brightness !== "number") + return "brightness: number expected"; + return null; + }; + + /** + * Creates a Color message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color} Color + */ + Color.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color(); + if (object.saturation != null) + message.saturation = Number(object.saturation); + if (object.contrast != null) + message.contrast = Number(object.contrast); + if (object.brightness != null) + message.brightness = Number(object.brightness); + return message; + }; + + /** + * Creates a plain object from a Color message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color + * @static + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color} message Color + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Color.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.saturation = 0; + object.contrast = 0; + object.brightness = 0; + } + if (message.saturation != null && message.hasOwnProperty("saturation")) + object.saturation = options.json && !isFinite(message.saturation) ? String(message.saturation) : message.saturation; + if (message.contrast != null && message.hasOwnProperty("contrast")) + object.contrast = options.json && !isFinite(message.contrast) ? String(message.contrast) : message.contrast; + if (message.brightness != null && message.hasOwnProperty("brightness")) + object.brightness = options.json && !isFinite(message.brightness) ? String(message.brightness) : message.brightness; + return object; + }; + + /** + * Converts this Color to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color + * @instance + * @returns {Object.} JSON object + */ + Color.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Color; + })(); + + PreprocessingConfig.Denoise = (function() { + + /** + * Properties of a Denoise. + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig + * @interface IDenoise + * @property {number|null} [strength] Denoise strength + * @property {string|null} [tune] Denoise tune + */ + + /** + * Constructs a new Denoise. + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig + * @classdesc Represents a Denoise. + * @implements IDenoise + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDenoise=} [properties] Properties to set + */ + function Denoise(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Denoise strength. + * @member {number} strength + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise + * @instance + */ + Denoise.prototype.strength = 0; + + /** + * Denoise tune. + * @member {string} tune + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise + * @instance + */ + Denoise.prototype.tune = ""; + + /** + * Creates a new Denoise instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise + * @static + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDenoise=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise} Denoise instance + */ + Denoise.create = function create(properties) { + return new Denoise(properties); + }; + + /** + * Encodes the specified Denoise message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise + * @static + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDenoise} message Denoise message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Denoise.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.strength != null && Object.hasOwnProperty.call(message, "strength")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.strength); + if (message.tune != null && Object.hasOwnProperty.call(message, "tune")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.tune); + return writer; + }; + + /** + * Encodes the specified Denoise message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise + * @static + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDenoise} message Denoise message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Denoise.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Denoise message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise} Denoise + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Denoise.decode = function 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.transcoder.v1beta1.PreprocessingConfig.Denoise(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.strength = reader.double(); + break; + case 2: + message.tune = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Denoise message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise} Denoise + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Denoise.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Denoise message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Denoise.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.strength != null && message.hasOwnProperty("strength")) + if (typeof message.strength !== "number") + return "strength: number expected"; + if (message.tune != null && message.hasOwnProperty("tune")) + if (!$util.isString(message.tune)) + return "tune: string expected"; + return null; + }; + + /** + * Creates a Denoise message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise} Denoise + */ + Denoise.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise(); + if (object.strength != null) + message.strength = Number(object.strength); + if (object.tune != null) + message.tune = String(object.tune); + return message; + }; + + /** + * Creates a plain object from a Denoise message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise + * @static + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise} message Denoise + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Denoise.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.strength = 0; + object.tune = ""; + } + if (message.strength != null && message.hasOwnProperty("strength")) + object.strength = options.json && !isFinite(message.strength) ? String(message.strength) : message.strength; + if (message.tune != null && message.hasOwnProperty("tune")) + object.tune = message.tune; + return object; + }; + + /** + * Converts this Denoise to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise + * @instance + * @returns {Object.} JSON object + */ + Denoise.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Denoise; + })(); + + PreprocessingConfig.Deblock = (function() { + + /** + * Properties of a Deblock. + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig + * @interface IDeblock + * @property {number|null} [strength] Deblock strength + * @property {boolean|null} [enabled] Deblock enabled + */ + + /** + * Constructs a new Deblock. + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig + * @classdesc Represents a Deblock. + * @implements IDeblock + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDeblock=} [properties] Properties to set + */ + function Deblock(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Deblock strength. + * @member {number} strength + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock + * @instance + */ + Deblock.prototype.strength = 0; + + /** + * Deblock enabled. + * @member {boolean} enabled + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock + * @instance + */ + Deblock.prototype.enabled = false; + + /** + * Creates a new Deblock instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock + * @static + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDeblock=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock} Deblock instance + */ + Deblock.create = function create(properties) { + return new Deblock(properties); + }; + + /** + * Encodes the specified Deblock message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock + * @static + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDeblock} message Deblock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Deblock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.strength != null && Object.hasOwnProperty.call(message, "strength")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.strength); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified Deblock message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock + * @static + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDeblock} message Deblock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Deblock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Deblock message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock} Deblock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Deblock.decode = function 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.transcoder.v1beta1.PreprocessingConfig.Deblock(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.strength = reader.double(); + break; + case 2: + message.enabled = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Deblock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock} Deblock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Deblock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Deblock message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Deblock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.strength != null && message.hasOwnProperty("strength")) + if (typeof message.strength !== "number") + return "strength: number expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a Deblock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock} Deblock + */ + Deblock.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock(); + if (object.strength != null) + message.strength = Number(object.strength); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a Deblock message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock + * @static + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock} message Deblock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Deblock.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.strength = 0; + object.enabled = false; + } + if (message.strength != null && message.hasOwnProperty("strength")) + object.strength = options.json && !isFinite(message.strength) ? String(message.strength) : message.strength; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this Deblock to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock + * @instance + * @returns {Object.} JSON object + */ + Deblock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Deblock; + })(); + + PreprocessingConfig.Audio = (function() { + + /** + * Properties of an Audio. + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig + * @interface IAudio + * @property {number|null} [lufs] Audio lufs + * @property {boolean|null} [highBoost] Audio highBoost + * @property {boolean|null} [lowBoost] Audio lowBoost + */ + + /** + * Constructs a new Audio. + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig + * @classdesc Represents an Audio. + * @implements IAudio + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IAudio=} [properties] Properties to set + */ + function Audio(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Audio lufs. + * @member {number} lufs + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio + * @instance + */ + Audio.prototype.lufs = 0; + + /** + * Audio highBoost. + * @member {boolean} highBoost + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio + * @instance + */ + Audio.prototype.highBoost = false; + + /** + * Audio lowBoost. + * @member {boolean} lowBoost + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio + * @instance + */ + Audio.prototype.lowBoost = false; + + /** + * Creates a new Audio instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio + * @static + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IAudio=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio} Audio instance + */ + Audio.create = function create(properties) { + return new Audio(properties); + }; + + /** + * Encodes the specified Audio message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio + * @static + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IAudio} message Audio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Audio.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lufs != null && Object.hasOwnProperty.call(message, "lufs")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.lufs); + if (message.highBoost != null && Object.hasOwnProperty.call(message, "highBoost")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.highBoost); + if (message.lowBoost != null && Object.hasOwnProperty.call(message, "lowBoost")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.lowBoost); + return writer; + }; + + /** + * Encodes the specified Audio message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio + * @static + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IAudio} message Audio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Audio.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Audio message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio} Audio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Audio.decode = function 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.transcoder.v1beta1.PreprocessingConfig.Audio(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.lufs = reader.double(); + break; + case 2: + message.highBoost = reader.bool(); + break; + case 3: + message.lowBoost = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Audio message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio} Audio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Audio.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Audio message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Audio.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lufs != null && message.hasOwnProperty("lufs")) + if (typeof message.lufs !== "number") + return "lufs: number expected"; + if (message.highBoost != null && message.hasOwnProperty("highBoost")) + if (typeof message.highBoost !== "boolean") + return "highBoost: boolean expected"; + if (message.lowBoost != null && message.hasOwnProperty("lowBoost")) + if (typeof message.lowBoost !== "boolean") + return "lowBoost: boolean expected"; + return null; + }; + + /** + * Creates an Audio message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio} Audio + */ + Audio.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio(); + if (object.lufs != null) + message.lufs = Number(object.lufs); + if (object.highBoost != null) + message.highBoost = Boolean(object.highBoost); + if (object.lowBoost != null) + message.lowBoost = Boolean(object.lowBoost); + return message; + }; + + /** + * Creates a plain object from an Audio message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio + * @static + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio} message Audio + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Audio.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.lufs = 0; + object.highBoost = false; + object.lowBoost = false; + } + if (message.lufs != null && message.hasOwnProperty("lufs")) + object.lufs = options.json && !isFinite(message.lufs) ? String(message.lufs) : message.lufs; + if (message.highBoost != null && message.hasOwnProperty("highBoost")) + object.highBoost = message.highBoost; + if (message.lowBoost != null && message.hasOwnProperty("lowBoost")) + object.lowBoost = message.lowBoost; + return object; + }; + + /** + * Converts this Audio to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio + * @instance + * @returns {Object.} JSON object + */ + Audio.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Audio; + })(); + + return PreprocessingConfig; + })(); + + v1beta1.VideoStream = (function() { + + /** + * Properties of a VideoStream. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface IVideoStream + * @property {string|null} [codec] VideoStream codec + * @property {string|null} [profile] VideoStream profile + * @property {string|null} [tune] VideoStream tune + * @property {string|null} [preset] VideoStream preset + * @property {number|null} [heightPixels] VideoStream heightPixels + * @property {number|null} [widthPixels] VideoStream widthPixels + * @property {string|null} [pixelFormat] VideoStream pixelFormat + * @property {number|null} [bitrateBps] VideoStream bitrateBps + * @property {string|null} [rateControlMode] VideoStream rateControlMode + * @property {boolean|null} [enableTwoPass] VideoStream enableTwoPass + * @property {number|null} [crfLevel] VideoStream crfLevel + * @property {number|null} [vbvSizeBits] VideoStream vbvSizeBits + * @property {number|null} [vbvFullnessBits] VideoStream vbvFullnessBits + * @property {boolean|null} [allowOpenGop] VideoStream allowOpenGop + * @property {number|null} [gopFrameCount] VideoStream gopFrameCount + * @property {google.protobuf.IDuration|null} [gopDuration] VideoStream gopDuration + * @property {string|null} [entropyCoder] VideoStream entropyCoder + * @property {boolean|null} [bPyramid] VideoStream bPyramid + * @property {number|null} [bFrameCount] VideoStream bFrameCount + * @property {number|null} [frameRate] VideoStream frameRate + * @property {number|null} [aqStrength] VideoStream aqStrength + */ + + /** + * Constructs a new VideoStream. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents a VideoStream. + * @implements IVideoStream + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.IVideoStream=} [properties] Properties to set + */ + function VideoStream(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VideoStream codec. + * @member {string} codec + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @instance + */ + VideoStream.prototype.codec = ""; + + /** + * VideoStream profile. + * @member {string} profile + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @instance + */ + VideoStream.prototype.profile = ""; + + /** + * VideoStream tune. + * @member {string} tune + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @instance + */ + VideoStream.prototype.tune = ""; + + /** + * VideoStream preset. + * @member {string} preset + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @instance + */ + VideoStream.prototype.preset = ""; + + /** + * VideoStream heightPixels. + * @member {number} heightPixels + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @instance + */ + VideoStream.prototype.heightPixels = 0; + + /** + * VideoStream widthPixels. + * @member {number} widthPixels + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @instance + */ + VideoStream.prototype.widthPixels = 0; + + /** + * VideoStream pixelFormat. + * @member {string} pixelFormat + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @instance + */ + VideoStream.prototype.pixelFormat = ""; + + /** + * VideoStream bitrateBps. + * @member {number} bitrateBps + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @instance + */ + VideoStream.prototype.bitrateBps = 0; + + /** + * VideoStream rateControlMode. + * @member {string} rateControlMode + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @instance + */ + VideoStream.prototype.rateControlMode = ""; + + /** + * VideoStream enableTwoPass. + * @member {boolean} enableTwoPass + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @instance + */ + VideoStream.prototype.enableTwoPass = false; + + /** + * VideoStream crfLevel. + * @member {number} crfLevel + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @instance + */ + VideoStream.prototype.crfLevel = 0; + + /** + * VideoStream vbvSizeBits. + * @member {number} vbvSizeBits + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @instance + */ + VideoStream.prototype.vbvSizeBits = 0; + + /** + * VideoStream vbvFullnessBits. + * @member {number} vbvFullnessBits + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @instance + */ + VideoStream.prototype.vbvFullnessBits = 0; + + /** + * VideoStream allowOpenGop. + * @member {boolean} allowOpenGop + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @instance + */ + VideoStream.prototype.allowOpenGop = false; + + /** + * VideoStream gopFrameCount. + * @member {number} gopFrameCount + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @instance + */ + VideoStream.prototype.gopFrameCount = 0; + + /** + * VideoStream gopDuration. + * @member {google.protobuf.IDuration|null|undefined} gopDuration + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @instance + */ + VideoStream.prototype.gopDuration = null; + + /** + * VideoStream entropyCoder. + * @member {string} entropyCoder + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @instance + */ + VideoStream.prototype.entropyCoder = ""; + + /** + * VideoStream bPyramid. + * @member {boolean} bPyramid + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @instance + */ + VideoStream.prototype.bPyramid = false; + + /** + * VideoStream bFrameCount. + * @member {number} bFrameCount + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @instance + */ + VideoStream.prototype.bFrameCount = 0; + + /** + * VideoStream frameRate. + * @member {number} frameRate + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @instance + */ + VideoStream.prototype.frameRate = 0; + + /** + * VideoStream aqStrength. + * @member {number} aqStrength + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @instance + */ + VideoStream.prototype.aqStrength = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * VideoStream gopMode. + * @member {"gopFrameCount"|"gopDuration"|undefined} gopMode + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @instance + */ + Object.defineProperty(VideoStream.prototype, "gopMode", { + get: $util.oneOfGetter($oneOfFields = ["gopFrameCount", "gopDuration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new VideoStream instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @static + * @param {google.cloud.video.transcoder.v1beta1.IVideoStream=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.VideoStream} VideoStream instance + */ + VideoStream.create = function create(properties) { + return new VideoStream(properties); + }; + + /** + * Encodes the specified VideoStream message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.VideoStream.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @static + * @param {google.cloud.video.transcoder.v1beta1.IVideoStream} message VideoStream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VideoStream.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.codec != null && Object.hasOwnProperty.call(message, "codec")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.codec); + if (message.profile != null && Object.hasOwnProperty.call(message, "profile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.profile); + if (message.tune != null && Object.hasOwnProperty.call(message, "tune")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tune); + if (message.preset != null && Object.hasOwnProperty.call(message, "preset")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.preset); + if (message.heightPixels != null && Object.hasOwnProperty.call(message, "heightPixels")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.heightPixels); + if (message.widthPixels != null && Object.hasOwnProperty.call(message, "widthPixels")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.widthPixels); + if (message.pixelFormat != null && Object.hasOwnProperty.call(message, "pixelFormat")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.pixelFormat); + if (message.bitrateBps != null && Object.hasOwnProperty.call(message, "bitrateBps")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.bitrateBps); + if (message.rateControlMode != null && Object.hasOwnProperty.call(message, "rateControlMode")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.rateControlMode); + if (message.enableTwoPass != null && Object.hasOwnProperty.call(message, "enableTwoPass")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.enableTwoPass); + if (message.crfLevel != null && Object.hasOwnProperty.call(message, "crfLevel")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.crfLevel); + if (message.vbvSizeBits != null && Object.hasOwnProperty.call(message, "vbvSizeBits")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.vbvSizeBits); + if (message.vbvFullnessBits != null && Object.hasOwnProperty.call(message, "vbvFullnessBits")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.vbvFullnessBits); + if (message.allowOpenGop != null && Object.hasOwnProperty.call(message, "allowOpenGop")) + writer.uint32(/* id 14, wireType 0 =*/112).bool(message.allowOpenGop); + if (message.gopFrameCount != null && Object.hasOwnProperty.call(message, "gopFrameCount")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.gopFrameCount); + if (message.gopDuration != null && Object.hasOwnProperty.call(message, "gopDuration")) + $root.google.protobuf.Duration.encode(message.gopDuration, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.entropyCoder != null && Object.hasOwnProperty.call(message, "entropyCoder")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.entropyCoder); + if (message.bPyramid != null && Object.hasOwnProperty.call(message, "bPyramid")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.bPyramid); + if (message.bFrameCount != null && Object.hasOwnProperty.call(message, "bFrameCount")) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.bFrameCount); + if (message.frameRate != null && Object.hasOwnProperty.call(message, "frameRate")) + writer.uint32(/* id 20, wireType 1 =*/161).double(message.frameRate); + if (message.aqStrength != null && Object.hasOwnProperty.call(message, "aqStrength")) + writer.uint32(/* id 21, wireType 1 =*/169).double(message.aqStrength); + return writer; + }; + + /** + * Encodes the specified VideoStream message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.VideoStream.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @static + * @param {google.cloud.video.transcoder.v1beta1.IVideoStream} message VideoStream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VideoStream.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VideoStream message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.VideoStream} VideoStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VideoStream.decode = function 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.transcoder.v1beta1.VideoStream(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.codec = reader.string(); + break; + case 2: + message.profile = reader.string(); + break; + case 3: + message.tune = reader.string(); + break; + case 4: + message.preset = reader.string(); + break; + case 5: + message.heightPixels = reader.int32(); + break; + case 6: + message.widthPixels = reader.int32(); + break; + case 7: + message.pixelFormat = reader.string(); + break; + case 8: + message.bitrateBps = reader.int32(); + break; + case 9: + message.rateControlMode = reader.string(); + break; + case 10: + message.enableTwoPass = reader.bool(); + break; + case 11: + message.crfLevel = reader.int32(); + break; + case 12: + message.vbvSizeBits = reader.int32(); + break; + case 13: + message.vbvFullnessBits = reader.int32(); + break; + case 14: + message.allowOpenGop = reader.bool(); + break; + case 15: + message.gopFrameCount = reader.int32(); + break; + case 16: + message.gopDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 17: + message.entropyCoder = reader.string(); + break; + case 18: + message.bPyramid = reader.bool(); + break; + case 19: + message.bFrameCount = reader.int32(); + break; + case 20: + message.frameRate = reader.double(); + break; + case 21: + message.aqStrength = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VideoStream message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.VideoStream} VideoStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VideoStream.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VideoStream message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VideoStream.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.codec != null && message.hasOwnProperty("codec")) + if (!$util.isString(message.codec)) + return "codec: string expected"; + if (message.profile != null && message.hasOwnProperty("profile")) + if (!$util.isString(message.profile)) + return "profile: string expected"; + if (message.tune != null && message.hasOwnProperty("tune")) + if (!$util.isString(message.tune)) + return "tune: string expected"; + if (message.preset != null && message.hasOwnProperty("preset")) + if (!$util.isString(message.preset)) + return "preset: string expected"; + if (message.heightPixels != null && message.hasOwnProperty("heightPixels")) + if (!$util.isInteger(message.heightPixels)) + return "heightPixels: integer expected"; + if (message.widthPixels != null && message.hasOwnProperty("widthPixels")) + if (!$util.isInteger(message.widthPixels)) + return "widthPixels: integer expected"; + if (message.pixelFormat != null && message.hasOwnProperty("pixelFormat")) + if (!$util.isString(message.pixelFormat)) + return "pixelFormat: string expected"; + if (message.bitrateBps != null && message.hasOwnProperty("bitrateBps")) + if (!$util.isInteger(message.bitrateBps)) + return "bitrateBps: integer expected"; + if (message.rateControlMode != null && message.hasOwnProperty("rateControlMode")) + if (!$util.isString(message.rateControlMode)) + return "rateControlMode: string expected"; + if (message.enableTwoPass != null && message.hasOwnProperty("enableTwoPass")) + if (typeof message.enableTwoPass !== "boolean") + return "enableTwoPass: boolean expected"; + if (message.crfLevel != null && message.hasOwnProperty("crfLevel")) + if (!$util.isInteger(message.crfLevel)) + return "crfLevel: integer expected"; + if (message.vbvSizeBits != null && message.hasOwnProperty("vbvSizeBits")) + if (!$util.isInteger(message.vbvSizeBits)) + return "vbvSizeBits: integer expected"; + if (message.vbvFullnessBits != null && message.hasOwnProperty("vbvFullnessBits")) + if (!$util.isInteger(message.vbvFullnessBits)) + return "vbvFullnessBits: integer expected"; + if (message.allowOpenGop != null && message.hasOwnProperty("allowOpenGop")) + if (typeof message.allowOpenGop !== "boolean") + return "allowOpenGop: boolean expected"; + if (message.gopFrameCount != null && message.hasOwnProperty("gopFrameCount")) { + properties.gopMode = 1; + if (!$util.isInteger(message.gopFrameCount)) + return "gopFrameCount: integer expected"; + } + if (message.gopDuration != null && message.hasOwnProperty("gopDuration")) { + if (properties.gopMode === 1) + return "gopMode: multiple values"; + properties.gopMode = 1; + { + var error = $root.google.protobuf.Duration.verify(message.gopDuration); + if (error) + return "gopDuration." + error; + } + } + if (message.entropyCoder != null && message.hasOwnProperty("entropyCoder")) + if (!$util.isString(message.entropyCoder)) + return "entropyCoder: string expected"; + if (message.bPyramid != null && message.hasOwnProperty("bPyramid")) + if (typeof message.bPyramid !== "boolean") + return "bPyramid: boolean expected"; + if (message.bFrameCount != null && message.hasOwnProperty("bFrameCount")) + if (!$util.isInteger(message.bFrameCount)) + return "bFrameCount: integer expected"; + if (message.frameRate != null && message.hasOwnProperty("frameRate")) + if (typeof message.frameRate !== "number") + return "frameRate: number expected"; + if (message.aqStrength != null && message.hasOwnProperty("aqStrength")) + if (typeof message.aqStrength !== "number") + return "aqStrength: number expected"; + return null; + }; + + /** + * Creates a VideoStream message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.VideoStream} VideoStream + */ + VideoStream.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.VideoStream) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.VideoStream(); + if (object.codec != null) + message.codec = String(object.codec); + if (object.profile != null) + message.profile = String(object.profile); + if (object.tune != null) + message.tune = String(object.tune); + if (object.preset != null) + message.preset = String(object.preset); + if (object.heightPixels != null) + message.heightPixels = object.heightPixels | 0; + if (object.widthPixels != null) + message.widthPixels = object.widthPixels | 0; + if (object.pixelFormat != null) + message.pixelFormat = String(object.pixelFormat); + if (object.bitrateBps != null) + message.bitrateBps = object.bitrateBps | 0; + if (object.rateControlMode != null) + message.rateControlMode = String(object.rateControlMode); + if (object.enableTwoPass != null) + message.enableTwoPass = Boolean(object.enableTwoPass); + if (object.crfLevel != null) + message.crfLevel = object.crfLevel | 0; + if (object.vbvSizeBits != null) + message.vbvSizeBits = object.vbvSizeBits | 0; + if (object.vbvFullnessBits != null) + message.vbvFullnessBits = object.vbvFullnessBits | 0; + if (object.allowOpenGop != null) + message.allowOpenGop = Boolean(object.allowOpenGop); + if (object.gopFrameCount != null) + message.gopFrameCount = object.gopFrameCount | 0; + if (object.gopDuration != null) { + if (typeof object.gopDuration !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.VideoStream.gopDuration: object expected"); + message.gopDuration = $root.google.protobuf.Duration.fromObject(object.gopDuration); + } + if (object.entropyCoder != null) + message.entropyCoder = String(object.entropyCoder); + if (object.bPyramid != null) + message.bPyramid = Boolean(object.bPyramid); + if (object.bFrameCount != null) + message.bFrameCount = object.bFrameCount | 0; + if (object.frameRate != null) + message.frameRate = Number(object.frameRate); + if (object.aqStrength != null) + message.aqStrength = Number(object.aqStrength); + return message; + }; + + /** + * Creates a plain object from a VideoStream message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @static + * @param {google.cloud.video.transcoder.v1beta1.VideoStream} message VideoStream + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VideoStream.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.codec = ""; + object.profile = ""; + object.tune = ""; + object.preset = ""; + object.heightPixels = 0; + object.widthPixels = 0; + object.pixelFormat = ""; + object.bitrateBps = 0; + object.rateControlMode = ""; + object.enableTwoPass = false; + object.crfLevel = 0; + object.vbvSizeBits = 0; + object.vbvFullnessBits = 0; + object.allowOpenGop = false; + object.entropyCoder = ""; + object.bPyramid = false; + object.bFrameCount = 0; + object.frameRate = 0; + object.aqStrength = 0; + } + if (message.codec != null && message.hasOwnProperty("codec")) + object.codec = message.codec; + if (message.profile != null && message.hasOwnProperty("profile")) + object.profile = message.profile; + if (message.tune != null && message.hasOwnProperty("tune")) + object.tune = message.tune; + if (message.preset != null && message.hasOwnProperty("preset")) + object.preset = message.preset; + if (message.heightPixels != null && message.hasOwnProperty("heightPixels")) + object.heightPixels = message.heightPixels; + if (message.widthPixels != null && message.hasOwnProperty("widthPixels")) + object.widthPixels = message.widthPixels; + if (message.pixelFormat != null && message.hasOwnProperty("pixelFormat")) + object.pixelFormat = message.pixelFormat; + if (message.bitrateBps != null && message.hasOwnProperty("bitrateBps")) + object.bitrateBps = message.bitrateBps; + if (message.rateControlMode != null && message.hasOwnProperty("rateControlMode")) + object.rateControlMode = message.rateControlMode; + if (message.enableTwoPass != null && message.hasOwnProperty("enableTwoPass")) + object.enableTwoPass = message.enableTwoPass; + if (message.crfLevel != null && message.hasOwnProperty("crfLevel")) + object.crfLevel = message.crfLevel; + if (message.vbvSizeBits != null && message.hasOwnProperty("vbvSizeBits")) + object.vbvSizeBits = message.vbvSizeBits; + if (message.vbvFullnessBits != null && message.hasOwnProperty("vbvFullnessBits")) + object.vbvFullnessBits = message.vbvFullnessBits; + if (message.allowOpenGop != null && message.hasOwnProperty("allowOpenGop")) + object.allowOpenGop = message.allowOpenGop; + if (message.gopFrameCount != null && message.hasOwnProperty("gopFrameCount")) { + object.gopFrameCount = message.gopFrameCount; + if (options.oneofs) + object.gopMode = "gopFrameCount"; + } + if (message.gopDuration != null && message.hasOwnProperty("gopDuration")) { + object.gopDuration = $root.google.protobuf.Duration.toObject(message.gopDuration, options); + if (options.oneofs) + object.gopMode = "gopDuration"; + } + if (message.entropyCoder != null && message.hasOwnProperty("entropyCoder")) + object.entropyCoder = message.entropyCoder; + if (message.bPyramid != null && message.hasOwnProperty("bPyramid")) + object.bPyramid = message.bPyramid; + if (message.bFrameCount != null && message.hasOwnProperty("bFrameCount")) + object.bFrameCount = message.bFrameCount; + if (message.frameRate != null && message.hasOwnProperty("frameRate")) + object.frameRate = options.json && !isFinite(message.frameRate) ? String(message.frameRate) : message.frameRate; + if (message.aqStrength != null && message.hasOwnProperty("aqStrength")) + object.aqStrength = options.json && !isFinite(message.aqStrength) ? String(message.aqStrength) : message.aqStrength; + return object; + }; + + /** + * Converts this VideoStream to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.VideoStream + * @instance + * @returns {Object.} JSON object + */ + VideoStream.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return VideoStream; + })(); + + v1beta1.AudioStream = (function() { + + /** + * Properties of an AudioStream. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface IAudioStream + * @property {string|null} [codec] AudioStream codec + * @property {number|null} [bitrateBps] AudioStream bitrateBps + * @property {number|null} [channelCount] AudioStream channelCount + * @property {Array.|null} [channelLayout] AudioStream channelLayout + * @property {Array.|null} [mapping] AudioStream mapping + * @property {number|null} [sampleRateHertz] AudioStream sampleRateHertz + */ + + /** + * Constructs a new AudioStream. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents an AudioStream. + * @implements IAudioStream + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.IAudioStream=} [properties] Properties to set + */ + function AudioStream(properties) { + this.channelLayout = []; + this.mapping = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AudioStream codec. + * @member {string} codec + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream + * @instance + */ + AudioStream.prototype.codec = ""; + + /** + * AudioStream bitrateBps. + * @member {number} bitrateBps + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream + * @instance + */ + AudioStream.prototype.bitrateBps = 0; + + /** + * AudioStream channelCount. + * @member {number} channelCount + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream + * @instance + */ + AudioStream.prototype.channelCount = 0; + + /** + * AudioStream channelLayout. + * @member {Array.} channelLayout + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream + * @instance + */ + AudioStream.prototype.channelLayout = $util.emptyArray; + + /** + * AudioStream mapping. + * @member {Array.} mapping + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream + * @instance + */ + AudioStream.prototype.mapping = $util.emptyArray; + + /** + * AudioStream sampleRateHertz. + * @member {number} sampleRateHertz + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream + * @instance + */ + AudioStream.prototype.sampleRateHertz = 0; + + /** + * Creates a new AudioStream instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream + * @static + * @param {google.cloud.video.transcoder.v1beta1.IAudioStream=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.AudioStream} AudioStream instance + */ + AudioStream.create = function create(properties) { + return new AudioStream(properties); + }; + + /** + * Encodes the specified AudioStream message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream + * @static + * @param {google.cloud.video.transcoder.v1beta1.IAudioStream} message AudioStream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudioStream.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.codec != null && Object.hasOwnProperty.call(message, "codec")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.codec); + if (message.bitrateBps != null && Object.hasOwnProperty.call(message, "bitrateBps")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.bitrateBps); + if (message.channelCount != null && Object.hasOwnProperty.call(message, "channelCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.channelCount); + if (message.channelLayout != null && message.channelLayout.length) + for (var i = 0; i < message.channelLayout.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.channelLayout[i]); + if (message.mapping != null && message.mapping.length) + for (var i = 0; i < message.mapping.length; ++i) + $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.encode(message.mapping[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.sampleRateHertz); + return writer; + }; + + /** + * Encodes the specified AudioStream message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream + * @static + * @param {google.cloud.video.transcoder.v1beta1.IAudioStream} message AudioStream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudioStream.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudioStream message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.AudioStream} AudioStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudioStream.decode = function 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.transcoder.v1beta1.AudioStream(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.codec = reader.string(); + break; + case 2: + message.bitrateBps = reader.int32(); + break; + case 3: + message.channelCount = reader.int32(); + break; + case 4: + if (!(message.channelLayout && message.channelLayout.length)) + message.channelLayout = []; + message.channelLayout.push(reader.string()); + break; + case 5: + if (!(message.mapping && message.mapping.length)) + message.mapping = []; + message.mapping.push($root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.decode(reader, reader.uint32())); + break; + case 6: + message.sampleRateHertz = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudioStream message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.AudioStream} AudioStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudioStream.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudioStream message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudioStream.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.codec != null && message.hasOwnProperty("codec")) + if (!$util.isString(message.codec)) + return "codec: string expected"; + if (message.bitrateBps != null && message.hasOwnProperty("bitrateBps")) + if (!$util.isInteger(message.bitrateBps)) + return "bitrateBps: integer expected"; + if (message.channelCount != null && message.hasOwnProperty("channelCount")) + if (!$util.isInteger(message.channelCount)) + return "channelCount: integer expected"; + if (message.channelLayout != null && message.hasOwnProperty("channelLayout")) { + if (!Array.isArray(message.channelLayout)) + return "channelLayout: array expected"; + for (var i = 0; i < message.channelLayout.length; ++i) + if (!$util.isString(message.channelLayout[i])) + return "channelLayout: string[] expected"; + } + if (message.mapping != null && message.hasOwnProperty("mapping")) { + if (!Array.isArray(message.mapping)) + return "mapping: array expected"; + for (var i = 0; i < message.mapping.length; ++i) { + var error = $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.verify(message.mapping[i]); + if (error) + return "mapping." + error; + } + } + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + if (!$util.isInteger(message.sampleRateHertz)) + return "sampleRateHertz: integer expected"; + return null; + }; + + /** + * Creates an AudioStream message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.AudioStream} AudioStream + */ + AudioStream.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.AudioStream) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.AudioStream(); + if (object.codec != null) + message.codec = String(object.codec); + if (object.bitrateBps != null) + message.bitrateBps = object.bitrateBps | 0; + if (object.channelCount != null) + message.channelCount = object.channelCount | 0; + if (object.channelLayout) { + if (!Array.isArray(object.channelLayout)) + throw TypeError(".google.cloud.video.transcoder.v1beta1.AudioStream.channelLayout: array expected"); + message.channelLayout = []; + for (var i = 0; i < object.channelLayout.length; ++i) + message.channelLayout[i] = String(object.channelLayout[i]); + } + if (object.mapping) { + if (!Array.isArray(object.mapping)) + throw TypeError(".google.cloud.video.transcoder.v1beta1.AudioStream.mapping: array expected"); + message.mapping = []; + for (var i = 0; i < object.mapping.length; ++i) { + if (typeof object.mapping[i] !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.AudioStream.mapping: object expected"); + message.mapping[i] = $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.fromObject(object.mapping[i]); + } + } + if (object.sampleRateHertz != null) + message.sampleRateHertz = object.sampleRateHertz | 0; + return message; + }; + + /** + * Creates a plain object from an AudioStream message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream + * @static + * @param {google.cloud.video.transcoder.v1beta1.AudioStream} message AudioStream + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudioStream.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.channelLayout = []; + object.mapping = []; + } + if (options.defaults) { + object.codec = ""; + object.bitrateBps = 0; + object.channelCount = 0; + object.sampleRateHertz = 0; + } + if (message.codec != null && message.hasOwnProperty("codec")) + object.codec = message.codec; + if (message.bitrateBps != null && message.hasOwnProperty("bitrateBps")) + object.bitrateBps = message.bitrateBps; + if (message.channelCount != null && message.hasOwnProperty("channelCount")) + object.channelCount = message.channelCount; + if (message.channelLayout && message.channelLayout.length) { + object.channelLayout = []; + for (var j = 0; j < message.channelLayout.length; ++j) + object.channelLayout[j] = message.channelLayout[j]; + } + if (message.mapping && message.mapping.length) { + object.mapping = []; + for (var j = 0; j < message.mapping.length; ++j) + object.mapping[j] = $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.toObject(message.mapping[j], options); + } + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + object.sampleRateHertz = message.sampleRateHertz; + return object; + }; + + /** + * Converts this AudioStream to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream + * @instance + * @returns {Object.} JSON object + */ + AudioStream.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + AudioStream.AudioAtom = (function() { + + /** + * Properties of an AudioAtom. + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream + * @interface IAudioAtom + * @property {string|null} [key] AudioAtom key + * @property {Array.|null} [channels] AudioAtom channels + */ + + /** + * Constructs a new AudioAtom. + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream + * @classdesc Represents an AudioAtom. + * @implements IAudioAtom + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.AudioStream.IAudioAtom=} [properties] Properties to set + */ + function AudioAtom(properties) { + this.channels = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AudioAtom key. + * @member {string} key + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom + * @instance + */ + AudioAtom.prototype.key = ""; + + /** + * AudioAtom channels. + * @member {Array.} channels + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom + * @instance + */ + AudioAtom.prototype.channels = $util.emptyArray; + + /** + * Creates a new AudioAtom instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom + * @static + * @param {google.cloud.video.transcoder.v1beta1.AudioStream.IAudioAtom=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom} AudioAtom instance + */ + AudioAtom.create = function create(properties) { + return new AudioAtom(properties); + }; + + /** + * Encodes the specified AudioAtom message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom + * @static + * @param {google.cloud.video.transcoder.v1beta1.AudioStream.IAudioAtom} message AudioAtom message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudioAtom.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.channels != null && message.channels.length) + for (var i = 0; i < message.channels.length; ++i) + $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.encode(message.channels[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AudioAtom message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom + * @static + * @param {google.cloud.video.transcoder.v1beta1.AudioStream.IAudioAtom} message AudioAtom message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudioAtom.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudioAtom message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom} AudioAtom + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudioAtom.decode = function 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.transcoder.v1beta1.AudioStream.AudioAtom(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.string(); + break; + case 2: + if (!(message.channels && message.channels.length)) + message.channels = []; + message.channels.push($root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudioAtom message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom} AudioAtom + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudioAtom.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudioAtom message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudioAtom.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.channels != null && message.hasOwnProperty("channels")) { + if (!Array.isArray(message.channels)) + return "channels: array expected"; + for (var i = 0; i < message.channels.length; ++i) { + var error = $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.verify(message.channels[i]); + if (error) + return "channels." + error; + } + } + return null; + }; + + /** + * Creates an AudioAtom message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom} AudioAtom + */ + AudioAtom.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom(); + if (object.key != null) + message.key = String(object.key); + if (object.channels) { + if (!Array.isArray(object.channels)) + throw TypeError(".google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.channels: array expected"); + message.channels = []; + for (var i = 0; i < object.channels.length; ++i) { + if (typeof object.channels[i] !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.channels: object expected"); + message.channels[i] = $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.fromObject(object.channels[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AudioAtom message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom + * @static + * @param {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom} message AudioAtom + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudioAtom.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.channels = []; + if (options.defaults) + object.key = ""; + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.channels && message.channels.length) { + object.channels = []; + for (var j = 0; j < message.channels.length; ++j) + object.channels[j] = $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.toObject(message.channels[j], options); + } + return object; + }; + + /** + * Converts this AudioAtom to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom + * @instance + * @returns {Object.} JSON object + */ + AudioAtom.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + AudioAtom.AudioChannel = (function() { + + /** + * Properties of an AudioChannel. + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom + * @interface IAudioChannel + * @property {Array.|null} [inputs] AudioChannel inputs + */ + + /** + * Constructs a new AudioChannel. + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom + * @classdesc Represents an AudioChannel. + * @implements IAudioChannel + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.IAudioChannel=} [properties] Properties to set + */ + function AudioChannel(properties) { + this.inputs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AudioChannel inputs. + * @member {Array.} inputs + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel + * @instance + */ + AudioChannel.prototype.inputs = $util.emptyArray; + + /** + * Creates a new AudioChannel instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel + * @static + * @param {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.IAudioChannel=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel} AudioChannel instance + */ + AudioChannel.create = function create(properties) { + return new AudioChannel(properties); + }; + + /** + * Encodes the specified AudioChannel message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel + * @static + * @param {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.IAudioChannel} message AudioChannel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudioChannel.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inputs != null && message.inputs.length) + for (var i = 0; i < message.inputs.length; ++i) + $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput.encode(message.inputs[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AudioChannel message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel + * @static + * @param {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.IAudioChannel} message AudioChannel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudioChannel.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudioChannel message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel} AudioChannel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudioChannel.decode = function 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.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (!(message.inputs && message.inputs.length)) + message.inputs = []; + message.inputs.push($root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudioChannel message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel} AudioChannel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudioChannel.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudioChannel message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudioChannel.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.inputs != null && message.hasOwnProperty("inputs")) { + if (!Array.isArray(message.inputs)) + return "inputs: array expected"; + for (var i = 0; i < message.inputs.length; ++i) { + var error = $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput.verify(message.inputs[i]); + if (error) + return "inputs." + error; + } + } + return null; + }; + + /** + * Creates an AudioChannel message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel} AudioChannel + */ + AudioChannel.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel(); + if (object.inputs) { + if (!Array.isArray(object.inputs)) + throw TypeError(".google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.inputs: array expected"); + message.inputs = []; + for (var i = 0; i < object.inputs.length; ++i) { + if (typeof object.inputs[i] !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.inputs: object expected"); + message.inputs[i] = $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput.fromObject(object.inputs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AudioChannel message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel + * @static + * @param {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel} message AudioChannel + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudioChannel.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.inputs = []; + if (message.inputs && message.inputs.length) { + object.inputs = []; + for (var j = 0; j < message.inputs.length; ++j) + object.inputs[j] = $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput.toObject(message.inputs[j], options); + } + return object; + }; + + /** + * Converts this AudioChannel to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel + * @instance + * @returns {Object.} JSON object + */ + AudioChannel.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + AudioChannel.AudioChannelInput = (function() { + + /** + * Properties of an AudioChannelInput. + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel + * @interface IAudioChannelInput + * @property {string|null} [key] AudioChannelInput key + * @property {number|null} [track] AudioChannelInput track + * @property {number|null} [channel] AudioChannelInput channel + * @property {number|null} [gainDb] AudioChannelInput gainDb + */ + + /** + * Constructs a new AudioChannelInput. + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel + * @classdesc Represents an AudioChannelInput. + * @implements IAudioChannelInput + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.IAudioChannelInput=} [properties] Properties to set + */ + function AudioChannelInput(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AudioChannelInput key. + * @member {string} key + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput + * @instance + */ + AudioChannelInput.prototype.key = ""; + + /** + * AudioChannelInput track. + * @member {number} track + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput + * @instance + */ + AudioChannelInput.prototype.track = 0; + + /** + * AudioChannelInput channel. + * @member {number} channel + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput + * @instance + */ + AudioChannelInput.prototype.channel = 0; + + /** + * AudioChannelInput gainDb. + * @member {number} gainDb + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput + * @instance + */ + AudioChannelInput.prototype.gainDb = 0; + + /** + * Creates a new AudioChannelInput instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput + * @static + * @param {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.IAudioChannelInput=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput} AudioChannelInput instance + */ + AudioChannelInput.create = function create(properties) { + return new AudioChannelInput(properties); + }; + + /** + * Encodes the specified AudioChannelInput message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput + * @static + * @param {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.IAudioChannelInput} message AudioChannelInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudioChannelInput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.track != null && Object.hasOwnProperty.call(message, "track")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.track); + if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.channel); + if (message.gainDb != null && Object.hasOwnProperty.call(message, "gainDb")) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.gainDb); + return writer; + }; + + /** + * Encodes the specified AudioChannelInput message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput + * @static + * @param {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.IAudioChannelInput} message AudioChannelInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudioChannelInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudioChannelInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput} AudioChannelInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudioChannelInput.decode = function 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.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.string(); + break; + case 2: + message.track = reader.int32(); + break; + case 3: + message.channel = reader.int32(); + break; + case 4: + message.gainDb = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudioChannelInput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput} AudioChannelInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudioChannelInput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudioChannelInput message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudioChannelInput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.track != null && message.hasOwnProperty("track")) + if (!$util.isInteger(message.track)) + return "track: integer expected"; + if (message.channel != null && message.hasOwnProperty("channel")) + if (!$util.isInteger(message.channel)) + return "channel: integer expected"; + if (message.gainDb != null && message.hasOwnProperty("gainDb")) + if (typeof message.gainDb !== "number") + return "gainDb: number expected"; + return null; + }; + + /** + * Creates an AudioChannelInput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput} AudioChannelInput + */ + AudioChannelInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput(); + if (object.key != null) + message.key = String(object.key); + if (object.track != null) + message.track = object.track | 0; + if (object.channel != null) + message.channel = object.channel | 0; + if (object.gainDb != null) + message.gainDb = Number(object.gainDb); + return message; + }; + + /** + * Creates a plain object from an AudioChannelInput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput + * @static + * @param {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput} message AudioChannelInput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudioChannelInput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = ""; + object.track = 0; + object.channel = 0; + object.gainDb = 0; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.track != null && message.hasOwnProperty("track")) + object.track = message.track; + if (message.channel != null && message.hasOwnProperty("channel")) + object.channel = message.channel; + if (message.gainDb != null && message.hasOwnProperty("gainDb")) + object.gainDb = options.json && !isFinite(message.gainDb) ? String(message.gainDb) : message.gainDb; + return object; + }; + + /** + * Converts this AudioChannelInput to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput + * @instance + * @returns {Object.} JSON object + */ + AudioChannelInput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AudioChannelInput; + })(); + + return AudioChannel; + })(); + + return AudioAtom; + })(); + + return AudioStream; + })(); + + v1beta1.TextStream = (function() { + + /** + * Properties of a TextStream. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface ITextStream + * @property {string|null} [codec] TextStream codec + * @property {string|null} [languageCode] TextStream languageCode + * @property {Array.|null} [mapping] TextStream mapping + */ + + /** + * Constructs a new TextStream. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents a TextStream. + * @implements ITextStream + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.ITextStream=} [properties] Properties to set + */ + function TextStream(properties) { + this.mapping = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TextStream codec. + * @member {string} codec + * @memberof google.cloud.video.transcoder.v1beta1.TextStream + * @instance + */ + TextStream.prototype.codec = ""; + + /** + * TextStream languageCode. + * @member {string} languageCode + * @memberof google.cloud.video.transcoder.v1beta1.TextStream + * @instance + */ + TextStream.prototype.languageCode = ""; + + /** + * TextStream mapping. + * @member {Array.} mapping + * @memberof google.cloud.video.transcoder.v1beta1.TextStream + * @instance + */ + TextStream.prototype.mapping = $util.emptyArray; + + /** + * Creates a new TextStream instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.TextStream + * @static + * @param {google.cloud.video.transcoder.v1beta1.ITextStream=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.TextStream} TextStream instance + */ + TextStream.create = function create(properties) { + return new TextStream(properties); + }; + + /** + * Encodes the specified TextStream message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.TextStream.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.TextStream + * @static + * @param {google.cloud.video.transcoder.v1beta1.ITextStream} message TextStream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextStream.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.codec != null && Object.hasOwnProperty.call(message, "codec")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.codec); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.mapping != null && message.mapping.length) + for (var i = 0; i < message.mapping.length; ++i) + $root.google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.encode(message.mapping[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TextStream message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.TextStream.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.TextStream + * @static + * @param {google.cloud.video.transcoder.v1beta1.ITextStream} message TextStream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextStream.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TextStream message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.TextStream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.TextStream} TextStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextStream.decode = function 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.transcoder.v1beta1.TextStream(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.codec = reader.string(); + break; + case 2: + message.languageCode = reader.string(); + break; + case 3: + if (!(message.mapping && message.mapping.length)) + message.mapping = []; + message.mapping.push($root.google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TextStream message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.TextStream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.TextStream} TextStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextStream.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TextStream message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.TextStream + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TextStream.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.codec != null && message.hasOwnProperty("codec")) + if (!$util.isString(message.codec)) + return "codec: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.mapping != null && message.hasOwnProperty("mapping")) { + if (!Array.isArray(message.mapping)) + return "mapping: array expected"; + for (var i = 0; i < message.mapping.length; ++i) { + var error = $root.google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.verify(message.mapping[i]); + if (error) + return "mapping." + error; + } + } + return null; + }; + + /** + * Creates a TextStream message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.TextStream + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.TextStream} TextStream + */ + TextStream.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.TextStream) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.TextStream(); + if (object.codec != null) + message.codec = String(object.codec); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.mapping) { + if (!Array.isArray(object.mapping)) + throw TypeError(".google.cloud.video.transcoder.v1beta1.TextStream.mapping: array expected"); + message.mapping = []; + for (var i = 0; i < object.mapping.length; ++i) { + if (typeof object.mapping[i] !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.TextStream.mapping: object expected"); + message.mapping[i] = $root.google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.fromObject(object.mapping[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a TextStream message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.TextStream + * @static + * @param {google.cloud.video.transcoder.v1beta1.TextStream} message TextStream + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TextStream.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.mapping = []; + if (options.defaults) { + object.codec = ""; + object.languageCode = ""; + } + if (message.codec != null && message.hasOwnProperty("codec")) + object.codec = message.codec; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.mapping && message.mapping.length) { + object.mapping = []; + for (var j = 0; j < message.mapping.length; ++j) + object.mapping[j] = $root.google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.toObject(message.mapping[j], options); + } + return object; + }; + + /** + * Converts this TextStream to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.TextStream + * @instance + * @returns {Object.} JSON object + */ + TextStream.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + TextStream.TextAtom = (function() { + + /** + * Properties of a TextAtom. + * @memberof google.cloud.video.transcoder.v1beta1.TextStream + * @interface ITextAtom + * @property {string|null} [key] TextAtom key + * @property {Array.|null} [inputs] TextAtom inputs + */ + + /** + * Constructs a new TextAtom. + * @memberof google.cloud.video.transcoder.v1beta1.TextStream + * @classdesc Represents a TextAtom. + * @implements ITextAtom + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.TextStream.ITextAtom=} [properties] Properties to set + */ + function TextAtom(properties) { + this.inputs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TextAtom key. + * @member {string} key + * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom + * @instance + */ + TextAtom.prototype.key = ""; + + /** + * TextAtom inputs. + * @member {Array.} inputs + * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom + * @instance + */ + TextAtom.prototype.inputs = $util.emptyArray; + + /** + * Creates a new TextAtom instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom + * @static + * @param {google.cloud.video.transcoder.v1beta1.TextStream.ITextAtom=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.TextStream.TextAtom} TextAtom instance + */ + TextAtom.create = function create(properties) { + return new TextAtom(properties); + }; + + /** + * Encodes the specified TextAtom message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom + * @static + * @param {google.cloud.video.transcoder.v1beta1.TextStream.ITextAtom} message TextAtom message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextAtom.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.inputs != null && message.inputs.length) + for (var i = 0; i < message.inputs.length; ++i) + $root.google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput.encode(message.inputs[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TextAtom message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom + * @static + * @param {google.cloud.video.transcoder.v1beta1.TextStream.ITextAtom} message TextAtom message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextAtom.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TextAtom message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.TextStream.TextAtom} TextAtom + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextAtom.decode = function 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.transcoder.v1beta1.TextStream.TextAtom(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.string(); + break; + case 2: + if (!(message.inputs && message.inputs.length)) + message.inputs = []; + message.inputs.push($root.google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TextAtom message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.TextStream.TextAtom} TextAtom + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextAtom.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TextAtom message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TextAtom.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.inputs != null && message.hasOwnProperty("inputs")) { + if (!Array.isArray(message.inputs)) + return "inputs: array expected"; + for (var i = 0; i < message.inputs.length; ++i) { + var error = $root.google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput.verify(message.inputs[i]); + if (error) + return "inputs." + error; + } + } + return null; + }; + + /** + * Creates a TextAtom message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.TextStream.TextAtom} TextAtom + */ + TextAtom.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.TextStream.TextAtom) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.TextStream.TextAtom(); + if (object.key != null) + message.key = String(object.key); + if (object.inputs) { + if (!Array.isArray(object.inputs)) + throw TypeError(".google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.inputs: array expected"); + message.inputs = []; + for (var i = 0; i < object.inputs.length; ++i) { + if (typeof object.inputs[i] !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.inputs: object expected"); + message.inputs[i] = $root.google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput.fromObject(object.inputs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a TextAtom message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom + * @static + * @param {google.cloud.video.transcoder.v1beta1.TextStream.TextAtom} message TextAtom + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TextAtom.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.inputs = []; + if (options.defaults) + object.key = ""; + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.inputs && message.inputs.length) { + object.inputs = []; + for (var j = 0; j < message.inputs.length; ++j) + object.inputs[j] = $root.google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput.toObject(message.inputs[j], options); + } + return object; + }; + + /** + * Converts this TextAtom to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom + * @instance + * @returns {Object.} JSON object + */ + TextAtom.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + TextAtom.TextInput = (function() { + + /** + * Properties of a TextInput. + * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom + * @interface ITextInput + * @property {string|null} [key] TextInput key + * @property {number|null} [track] TextInput track + */ + + /** + * Constructs a new TextInput. + * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom + * @classdesc Represents a TextInput. + * @implements ITextInput + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.ITextInput=} [properties] Properties to set + */ + function TextInput(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TextInput key. + * @member {string} key + * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput + * @instance + */ + TextInput.prototype.key = ""; + + /** + * TextInput track. + * @member {number} track + * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput + * @instance + */ + TextInput.prototype.track = 0; + + /** + * Creates a new TextInput instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput + * @static + * @param {google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.ITextInput=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput} TextInput instance + */ + TextInput.create = function create(properties) { + return new TextInput(properties); + }; + + /** + * Encodes the specified TextInput message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput + * @static + * @param {google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.ITextInput} message TextInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextInput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.track != null && Object.hasOwnProperty.call(message, "track")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.track); + return writer; + }; + + /** + * Encodes the specified TextInput message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput + * @static + * @param {google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.ITextInput} message TextInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TextInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput} TextInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextInput.decode = function 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.transcoder.v1beta1.TextStream.TextAtom.TextInput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.string(); + break; + case 2: + message.track = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TextInput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput} TextInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextInput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TextInput message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TextInput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.track != null && message.hasOwnProperty("track")) + if (!$util.isInteger(message.track)) + return "track: integer expected"; + return null; + }; + + /** + * Creates a TextInput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput} TextInput + */ + TextInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput(); + if (object.key != null) + message.key = String(object.key); + if (object.track != null) + message.track = object.track | 0; + return message; + }; + + /** + * Creates a plain object from a TextInput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput + * @static + * @param {google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput} message TextInput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TextInput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = ""; + object.track = 0; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.track != null && message.hasOwnProperty("track")) + object.track = message.track; + return object; + }; + + /** + * Converts this TextInput to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput + * @instance + * @returns {Object.} JSON object + */ + TextInput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TextInput; + })(); + + return TextAtom; + })(); + + return TextStream; + })(); + + v1beta1.SegmentSettings = (function() { + + /** + * Properties of a SegmentSettings. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface ISegmentSettings + * @property {google.protobuf.IDuration|null} [segmentDuration] SegmentSettings segmentDuration + * @property {boolean|null} [individualSegments] SegmentSettings individualSegments + */ + + /** + * Constructs a new SegmentSettings. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents a SegmentSettings. + * @implements ISegmentSettings + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.ISegmentSettings=} [properties] Properties to set + */ + function SegmentSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SegmentSettings segmentDuration. + * @member {google.protobuf.IDuration|null|undefined} segmentDuration + * @memberof google.cloud.video.transcoder.v1beta1.SegmentSettings + * @instance + */ + SegmentSettings.prototype.segmentDuration = null; + + /** + * SegmentSettings individualSegments. + * @member {boolean} individualSegments + * @memberof google.cloud.video.transcoder.v1beta1.SegmentSettings + * @instance + */ + SegmentSettings.prototype.individualSegments = false; + + /** + * Creates a new SegmentSettings instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.SegmentSettings + * @static + * @param {google.cloud.video.transcoder.v1beta1.ISegmentSettings=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.SegmentSettings} SegmentSettings instance + */ + SegmentSettings.create = function create(properties) { + return new SegmentSettings(properties); + }; + + /** + * Encodes the specified SegmentSettings message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.SegmentSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.SegmentSettings + * @static + * @param {google.cloud.video.transcoder.v1beta1.ISegmentSettings} message SegmentSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.segmentDuration != null && Object.hasOwnProperty.call(message, "segmentDuration")) + $root.google.protobuf.Duration.encode(message.segmentDuration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.individualSegments != null && Object.hasOwnProperty.call(message, "individualSegments")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.individualSegments); + return writer; + }; + + /** + * Encodes the specified SegmentSettings message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.SegmentSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.SegmentSettings + * @static + * @param {google.cloud.video.transcoder.v1beta1.ISegmentSettings} message SegmentSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SegmentSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.SegmentSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.SegmentSettings} SegmentSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentSettings.decode = function 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.transcoder.v1beta1.SegmentSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.segmentDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 3: + message.individualSegments = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SegmentSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.SegmentSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.SegmentSettings} SegmentSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SegmentSettings message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.SegmentSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SegmentSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.segmentDuration != null && message.hasOwnProperty("segmentDuration")) { + var error = $root.google.protobuf.Duration.verify(message.segmentDuration); + if (error) + return "segmentDuration." + error; + } + if (message.individualSegments != null && message.hasOwnProperty("individualSegments")) + if (typeof message.individualSegments !== "boolean") + return "individualSegments: boolean expected"; + return null; + }; + + /** + * Creates a SegmentSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.SegmentSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.SegmentSettings} SegmentSettings + */ + SegmentSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.SegmentSettings) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.SegmentSettings(); + if (object.segmentDuration != null) { + if (typeof object.segmentDuration !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.SegmentSettings.segmentDuration: object expected"); + message.segmentDuration = $root.google.protobuf.Duration.fromObject(object.segmentDuration); + } + if (object.individualSegments != null) + message.individualSegments = Boolean(object.individualSegments); + return message; + }; + + /** + * Creates a plain object from a SegmentSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.SegmentSettings + * @static + * @param {google.cloud.video.transcoder.v1beta1.SegmentSettings} message SegmentSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SegmentSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.segmentDuration = null; + object.individualSegments = false; + } + if (message.segmentDuration != null && message.hasOwnProperty("segmentDuration")) + object.segmentDuration = $root.google.protobuf.Duration.toObject(message.segmentDuration, options); + if (message.individualSegments != null && message.hasOwnProperty("individualSegments")) + object.individualSegments = message.individualSegments; + return object; + }; + + /** + * Converts this SegmentSettings to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.SegmentSettings + * @instance + * @returns {Object.} JSON object + */ + SegmentSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SegmentSettings; + })(); + + v1beta1.Encryption = (function() { + + /** + * Properties of an Encryption. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface IEncryption + * @property {string|null} [key] Encryption key + * @property {string|null} [iv] Encryption iv + * @property {google.cloud.video.transcoder.v1beta1.Encryption.IAes128Encryption|null} [aes_128] Encryption aes_128 + * @property {google.cloud.video.transcoder.v1beta1.Encryption.ISampleAesEncryption|null} [sampleAes] Encryption sampleAes + * @property {google.cloud.video.transcoder.v1beta1.Encryption.IMpegCommonEncryption|null} [mpegCenc] Encryption mpegCenc + */ + + /** + * Constructs a new Encryption. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents an Encryption. + * @implements IEncryption + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.IEncryption=} [properties] Properties to set + */ + function Encryption(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Encryption key. + * @member {string} key + * @memberof google.cloud.video.transcoder.v1beta1.Encryption + * @instance + */ + Encryption.prototype.key = ""; + + /** + * Encryption iv. + * @member {string} iv + * @memberof google.cloud.video.transcoder.v1beta1.Encryption + * @instance + */ + Encryption.prototype.iv = ""; + + /** + * Encryption aes_128. + * @member {google.cloud.video.transcoder.v1beta1.Encryption.IAes128Encryption|null|undefined} aes_128 + * @memberof google.cloud.video.transcoder.v1beta1.Encryption + * @instance + */ + Encryption.prototype.aes_128 = null; + + /** + * Encryption sampleAes. + * @member {google.cloud.video.transcoder.v1beta1.Encryption.ISampleAesEncryption|null|undefined} sampleAes + * @memberof google.cloud.video.transcoder.v1beta1.Encryption + * @instance + */ + Encryption.prototype.sampleAes = null; + + /** + * Encryption mpegCenc. + * @member {google.cloud.video.transcoder.v1beta1.Encryption.IMpegCommonEncryption|null|undefined} mpegCenc + * @memberof google.cloud.video.transcoder.v1beta1.Encryption + * @instance + */ + Encryption.prototype.mpegCenc = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Encryption encryptionMode. + * @member {"aes_128"|"sampleAes"|"mpegCenc"|undefined} encryptionMode + * @memberof google.cloud.video.transcoder.v1beta1.Encryption + * @instance + */ + Object.defineProperty(Encryption.prototype, "encryptionMode", { + get: $util.oneOfGetter($oneOfFields = ["aes_128", "sampleAes", "mpegCenc"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Encryption instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.Encryption + * @static + * @param {google.cloud.video.transcoder.v1beta1.IEncryption=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.Encryption} Encryption instance + */ + Encryption.create = function create(properties) { + return new Encryption(properties); + }; + + /** + * Encodes the specified Encryption message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.Encryption + * @static + * @param {google.cloud.video.transcoder.v1beta1.IEncryption} message Encryption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encryption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.iv != null && Object.hasOwnProperty.call(message, "iv")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.iv); + if (message.aes_128 != null && Object.hasOwnProperty.call(message, "aes_128")) + $root.google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption.encode(message.aes_128, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.sampleAes != null && Object.hasOwnProperty.call(message, "sampleAes")) + $root.google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption.encode(message.sampleAes, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.mpegCenc != null && Object.hasOwnProperty.call(message, "mpegCenc")) + $root.google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption.encode(message.mpegCenc, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Encryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Encryption + * @static + * @param {google.cloud.video.transcoder.v1beta1.IEncryption} message Encryption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encryption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Encryption message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.Encryption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.Encryption} Encryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encryption.decode = function 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.transcoder.v1beta1.Encryption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.string(); + break; + case 2: + message.iv = reader.string(); + break; + case 3: + message.aes_128 = $root.google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption.decode(reader, reader.uint32()); + break; + case 4: + message.sampleAes = $root.google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption.decode(reader, reader.uint32()); + break; + case 5: + message.mpegCenc = $root.google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Encryption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Encryption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.Encryption} Encryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encryption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Encryption message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.Encryption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Encryption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.iv != null && message.hasOwnProperty("iv")) + if (!$util.isString(message.iv)) + return "iv: string expected"; + if (message.aes_128 != null && message.hasOwnProperty("aes_128")) { + properties.encryptionMode = 1; + { + var error = $root.google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption.verify(message.aes_128); + if (error) + return "aes_128." + error; + } + } + if (message.sampleAes != null && message.hasOwnProperty("sampleAes")) { + if (properties.encryptionMode === 1) + return "encryptionMode: multiple values"; + properties.encryptionMode = 1; + { + var error = $root.google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption.verify(message.sampleAes); + if (error) + return "sampleAes." + error; + } + } + if (message.mpegCenc != null && message.hasOwnProperty("mpegCenc")) { + if (properties.encryptionMode === 1) + return "encryptionMode: multiple values"; + properties.encryptionMode = 1; + { + var error = $root.google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption.verify(message.mpegCenc); + if (error) + return "mpegCenc." + error; + } + } + return null; + }; + + /** + * Creates an Encryption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.Encryption + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.Encryption} Encryption + */ + Encryption.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Encryption) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.Encryption(); + if (object.key != null) + message.key = String(object.key); + if (object.iv != null) + message.iv = String(object.iv); + if (object.aes_128 != null) { + if (typeof object.aes_128 !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.Encryption.aes_128: object expected"); + message.aes_128 = $root.google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption.fromObject(object.aes_128); + } + if (object.sampleAes != null) { + if (typeof object.sampleAes !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.Encryption.sampleAes: object expected"); + message.sampleAes = $root.google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption.fromObject(object.sampleAes); + } + if (object.mpegCenc != null) { + if (typeof object.mpegCenc !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.Encryption.mpegCenc: object expected"); + message.mpegCenc = $root.google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption.fromObject(object.mpegCenc); + } + return message; + }; + + /** + * Creates a plain object from an Encryption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.Encryption + * @static + * @param {google.cloud.video.transcoder.v1beta1.Encryption} message Encryption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Encryption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = ""; + object.iv = ""; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.iv != null && message.hasOwnProperty("iv")) + object.iv = message.iv; + if (message.aes_128 != null && message.hasOwnProperty("aes_128")) { + object.aes_128 = $root.google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption.toObject(message.aes_128, options); + if (options.oneofs) + object.encryptionMode = "aes_128"; + } + if (message.sampleAes != null && message.hasOwnProperty("sampleAes")) { + object.sampleAes = $root.google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption.toObject(message.sampleAes, options); + if (options.oneofs) + object.encryptionMode = "sampleAes"; + } + if (message.mpegCenc != null && message.hasOwnProperty("mpegCenc")) { + object.mpegCenc = $root.google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption.toObject(message.mpegCenc, options); + if (options.oneofs) + object.encryptionMode = "mpegCenc"; + } + return object; + }; + + /** + * Converts this Encryption to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.Encryption + * @instance + * @returns {Object.} JSON object + */ + Encryption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Encryption.Aes128Encryption = (function() { + + /** + * Properties of an Aes128Encryption. + * @memberof google.cloud.video.transcoder.v1beta1.Encryption + * @interface IAes128Encryption + * @property {string|null} [keyUri] Aes128Encryption keyUri + */ + + /** + * Constructs a new Aes128Encryption. + * @memberof google.cloud.video.transcoder.v1beta1.Encryption + * @classdesc Represents an Aes128Encryption. + * @implements IAes128Encryption + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.Encryption.IAes128Encryption=} [properties] Properties to set + */ + function Aes128Encryption(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Aes128Encryption keyUri. + * @member {string} keyUri + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption + * @instance + */ + Aes128Encryption.prototype.keyUri = ""; + + /** + * Creates a new Aes128Encryption instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption + * @static + * @param {google.cloud.video.transcoder.v1beta1.Encryption.IAes128Encryption=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption} Aes128Encryption instance + */ + Aes128Encryption.create = function create(properties) { + return new Aes128Encryption(properties); + }; + + /** + * Encodes the specified Aes128Encryption message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption + * @static + * @param {google.cloud.video.transcoder.v1beta1.Encryption.IAes128Encryption} message Aes128Encryption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Aes128Encryption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyUri != null && Object.hasOwnProperty.call(message, "keyUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyUri); + return writer; + }; + + /** + * Encodes the specified Aes128Encryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption + * @static + * @param {google.cloud.video.transcoder.v1beta1.Encryption.IAes128Encryption} message Aes128Encryption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Aes128Encryption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Aes128Encryption message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption} Aes128Encryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Aes128Encryption.decode = function 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.transcoder.v1beta1.Encryption.Aes128Encryption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.keyUri = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Aes128Encryption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption} Aes128Encryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Aes128Encryption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Aes128Encryption message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Aes128Encryption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyUri != null && message.hasOwnProperty("keyUri")) + if (!$util.isString(message.keyUri)) + return "keyUri: string expected"; + return null; + }; + + /** + * Creates an Aes128Encryption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption} Aes128Encryption + */ + Aes128Encryption.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption(); + if (object.keyUri != null) + message.keyUri = String(object.keyUri); + return message; + }; + + /** + * Creates a plain object from an Aes128Encryption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption + * @static + * @param {google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption} message Aes128Encryption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Aes128Encryption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.keyUri = ""; + if (message.keyUri != null && message.hasOwnProperty("keyUri")) + object.keyUri = message.keyUri; + return object; + }; + + /** + * Converts this Aes128Encryption to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption + * @instance + * @returns {Object.} JSON object + */ + Aes128Encryption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Aes128Encryption; + })(); + + Encryption.SampleAesEncryption = (function() { + + /** + * Properties of a SampleAesEncryption. + * @memberof google.cloud.video.transcoder.v1beta1.Encryption + * @interface ISampleAesEncryption + * @property {string|null} [keyUri] SampleAesEncryption keyUri + */ + + /** + * Constructs a new SampleAesEncryption. + * @memberof google.cloud.video.transcoder.v1beta1.Encryption + * @classdesc Represents a SampleAesEncryption. + * @implements ISampleAesEncryption + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.Encryption.ISampleAesEncryption=} [properties] Properties to set + */ + function SampleAesEncryption(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SampleAesEncryption keyUri. + * @member {string} keyUri + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption + * @instance + */ + SampleAesEncryption.prototype.keyUri = ""; + + /** + * Creates a new SampleAesEncryption instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption + * @static + * @param {google.cloud.video.transcoder.v1beta1.Encryption.ISampleAesEncryption=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption} SampleAesEncryption instance + */ + SampleAesEncryption.create = function create(properties) { + return new SampleAesEncryption(properties); + }; + + /** + * Encodes the specified SampleAesEncryption message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption + * @static + * @param {google.cloud.video.transcoder.v1beta1.Encryption.ISampleAesEncryption} message SampleAesEncryption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SampleAesEncryption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyUri != null && Object.hasOwnProperty.call(message, "keyUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyUri); + return writer; + }; + + /** + * Encodes the specified SampleAesEncryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption + * @static + * @param {google.cloud.video.transcoder.v1beta1.Encryption.ISampleAesEncryption} message SampleAesEncryption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SampleAesEncryption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SampleAesEncryption message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption} SampleAesEncryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SampleAesEncryption.decode = function 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.transcoder.v1beta1.Encryption.SampleAesEncryption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.keyUri = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SampleAesEncryption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption} SampleAesEncryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SampleAesEncryption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SampleAesEncryption message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SampleAesEncryption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyUri != null && message.hasOwnProperty("keyUri")) + if (!$util.isString(message.keyUri)) + return "keyUri: string expected"; + return null; + }; + + /** + * Creates a SampleAesEncryption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption} SampleAesEncryption + */ + SampleAesEncryption.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption(); + if (object.keyUri != null) + message.keyUri = String(object.keyUri); + return message; + }; + + /** + * Creates a plain object from a SampleAesEncryption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption + * @static + * @param {google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption} message SampleAesEncryption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SampleAesEncryption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.keyUri = ""; + if (message.keyUri != null && message.hasOwnProperty("keyUri")) + object.keyUri = message.keyUri; + return object; + }; + + /** + * Converts this SampleAesEncryption to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption + * @instance + * @returns {Object.} JSON object + */ + SampleAesEncryption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SampleAesEncryption; + })(); + + Encryption.MpegCommonEncryption = (function() { + + /** + * Properties of a MpegCommonEncryption. + * @memberof google.cloud.video.transcoder.v1beta1.Encryption + * @interface IMpegCommonEncryption + * @property {string|null} [keyId] MpegCommonEncryption keyId + * @property {string|null} [scheme] MpegCommonEncryption scheme + */ + + /** + * Constructs a new MpegCommonEncryption. + * @memberof google.cloud.video.transcoder.v1beta1.Encryption + * @classdesc Represents a MpegCommonEncryption. + * @implements IMpegCommonEncryption + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.Encryption.IMpegCommonEncryption=} [properties] Properties to set + */ + function MpegCommonEncryption(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MpegCommonEncryption keyId. + * @member {string} keyId + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption + * @instance + */ + MpegCommonEncryption.prototype.keyId = ""; + + /** + * MpegCommonEncryption scheme. + * @member {string} scheme + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption + * @instance + */ + MpegCommonEncryption.prototype.scheme = ""; + + /** + * Creates a new MpegCommonEncryption instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption + * @static + * @param {google.cloud.video.transcoder.v1beta1.Encryption.IMpegCommonEncryption=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption} MpegCommonEncryption instance + */ + MpegCommonEncryption.create = function create(properties) { + return new MpegCommonEncryption(properties); + }; + + /** + * Encodes the specified MpegCommonEncryption message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption + * @static + * @param {google.cloud.video.transcoder.v1beta1.Encryption.IMpegCommonEncryption} message MpegCommonEncryption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MpegCommonEncryption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyId != null && Object.hasOwnProperty.call(message, "keyId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyId); + if (message.scheme != null && Object.hasOwnProperty.call(message, "scheme")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.scheme); + return writer; + }; + + /** + * Encodes the specified MpegCommonEncryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption + * @static + * @param {google.cloud.video.transcoder.v1beta1.Encryption.IMpegCommonEncryption} message MpegCommonEncryption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MpegCommonEncryption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MpegCommonEncryption message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption} MpegCommonEncryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MpegCommonEncryption.decode = function 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.transcoder.v1beta1.Encryption.MpegCommonEncryption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.keyId = reader.string(); + break; + case 2: + message.scheme = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MpegCommonEncryption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption} MpegCommonEncryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MpegCommonEncryption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MpegCommonEncryption message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MpegCommonEncryption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyId != null && message.hasOwnProperty("keyId")) + if (!$util.isString(message.keyId)) + return "keyId: string expected"; + if (message.scheme != null && message.hasOwnProperty("scheme")) + if (!$util.isString(message.scheme)) + return "scheme: string expected"; + return null; + }; + + /** + * Creates a MpegCommonEncryption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption} MpegCommonEncryption + */ + MpegCommonEncryption.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption(); + if (object.keyId != null) + message.keyId = String(object.keyId); + if (object.scheme != null) + message.scheme = String(object.scheme); + return message; + }; + + /** + * Creates a plain object from a MpegCommonEncryption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption + * @static + * @param {google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption} message MpegCommonEncryption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MpegCommonEncryption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.keyId = ""; + object.scheme = ""; + } + if (message.keyId != null && message.hasOwnProperty("keyId")) + object.keyId = message.keyId; + if (message.scheme != null && message.hasOwnProperty("scheme")) + object.scheme = message.scheme; + return object; + }; + + /** + * Converts this MpegCommonEncryption to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption + * @instance + * @returns {Object.} JSON object + */ + MpegCommonEncryption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MpegCommonEncryption; + })(); + + return Encryption; + })(); + + v1beta1.Progress = (function() { + + /** + * Properties of a Progress. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface IProgress + * @property {number|null} [analyzed] Progress analyzed + * @property {number|null} [encoded] Progress encoded + * @property {number|null} [uploaded] Progress uploaded + * @property {number|null} [notified] Progress notified + */ + + /** + * Constructs a new Progress. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents a Progress. + * @implements IProgress + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.IProgress=} [properties] Properties to set + */ + function Progress(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Progress analyzed. + * @member {number} analyzed + * @memberof google.cloud.video.transcoder.v1beta1.Progress + * @instance + */ + Progress.prototype.analyzed = 0; + + /** + * Progress encoded. + * @member {number} encoded + * @memberof google.cloud.video.transcoder.v1beta1.Progress + * @instance + */ + Progress.prototype.encoded = 0; + + /** + * Progress uploaded. + * @member {number} uploaded + * @memberof google.cloud.video.transcoder.v1beta1.Progress + * @instance + */ + Progress.prototype.uploaded = 0; + + /** + * Progress notified. + * @member {number} notified + * @memberof google.cloud.video.transcoder.v1beta1.Progress + * @instance + */ + Progress.prototype.notified = 0; + + /** + * Creates a new Progress instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.Progress + * @static + * @param {google.cloud.video.transcoder.v1beta1.IProgress=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.Progress} Progress instance + */ + Progress.create = function create(properties) { + return new Progress(properties); + }; + + /** + * Encodes the specified Progress message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Progress.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.Progress + * @static + * @param {google.cloud.video.transcoder.v1beta1.IProgress} message Progress message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Progress.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.analyzed != null && Object.hasOwnProperty.call(message, "analyzed")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.analyzed); + if (message.encoded != null && Object.hasOwnProperty.call(message, "encoded")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.encoded); + if (message.uploaded != null && Object.hasOwnProperty.call(message, "uploaded")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.uploaded); + if (message.notified != null && Object.hasOwnProperty.call(message, "notified")) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.notified); + return writer; + }; + + /** + * Encodes the specified Progress message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Progress.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Progress + * @static + * @param {google.cloud.video.transcoder.v1beta1.IProgress} message Progress message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Progress.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Progress message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.Progress + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.Progress} Progress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Progress.decode = function 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.transcoder.v1beta1.Progress(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.analyzed = reader.double(); + break; + case 2: + message.encoded = reader.double(); + break; + case 3: + message.uploaded = reader.double(); + break; + case 4: + message.notified = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Progress message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Progress + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.Progress} Progress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Progress.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Progress message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.Progress + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Progress.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.analyzed != null && message.hasOwnProperty("analyzed")) + if (typeof message.analyzed !== "number") + return "analyzed: number expected"; + if (message.encoded != null && message.hasOwnProperty("encoded")) + if (typeof message.encoded !== "number") + return "encoded: number expected"; + if (message.uploaded != null && message.hasOwnProperty("uploaded")) + if (typeof message.uploaded !== "number") + return "uploaded: number expected"; + if (message.notified != null && message.hasOwnProperty("notified")) + if (typeof message.notified !== "number") + return "notified: number expected"; + return null; + }; + + /** + * Creates a Progress message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.Progress + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.Progress} Progress + */ + Progress.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Progress) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.Progress(); + if (object.analyzed != null) + message.analyzed = Number(object.analyzed); + if (object.encoded != null) + message.encoded = Number(object.encoded); + if (object.uploaded != null) + message.uploaded = Number(object.uploaded); + if (object.notified != null) + message.notified = Number(object.notified); + return message; + }; + + /** + * Creates a plain object from a Progress message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.Progress + * @static + * @param {google.cloud.video.transcoder.v1beta1.Progress} message Progress + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Progress.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.analyzed = 0; + object.encoded = 0; + object.uploaded = 0; + object.notified = 0; + } + if (message.analyzed != null && message.hasOwnProperty("analyzed")) + object.analyzed = options.json && !isFinite(message.analyzed) ? String(message.analyzed) : message.analyzed; + if (message.encoded != null && message.hasOwnProperty("encoded")) + object.encoded = options.json && !isFinite(message.encoded) ? String(message.encoded) : message.encoded; + if (message.uploaded != null && message.hasOwnProperty("uploaded")) + object.uploaded = options.json && !isFinite(message.uploaded) ? String(message.uploaded) : message.uploaded; + if (message.notified != null && message.hasOwnProperty("notified")) + object.notified = options.json && !isFinite(message.notified) ? String(message.notified) : message.notified; + return object; + }; + + /** + * Converts this Progress to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.Progress + * @instance + * @returns {Object.} JSON object + */ + Progress.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Progress; + })(); + + v1beta1.FailureDetail = (function() { + + /** + * Properties of a FailureDetail. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface IFailureDetail + * @property {string|null} [description] FailureDetail description + */ + + /** + * Constructs a new FailureDetail. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents a FailureDetail. + * @implements IFailureDetail + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.IFailureDetail=} [properties] Properties to set + */ + function FailureDetail(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FailureDetail description. + * @member {string} description + * @memberof google.cloud.video.transcoder.v1beta1.FailureDetail + * @instance + */ + FailureDetail.prototype.description = ""; + + /** + * Creates a new FailureDetail instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.FailureDetail + * @static + * @param {google.cloud.video.transcoder.v1beta1.IFailureDetail=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.FailureDetail} FailureDetail instance + */ + FailureDetail.create = function create(properties) { + return new FailureDetail(properties); + }; + + /** + * Encodes the specified FailureDetail message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.FailureDetail.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.FailureDetail + * @static + * @param {google.cloud.video.transcoder.v1beta1.IFailureDetail} message FailureDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FailureDetail.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); + return writer; + }; + + /** + * Encodes the specified FailureDetail message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.FailureDetail.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.FailureDetail + * @static + * @param {google.cloud.video.transcoder.v1beta1.IFailureDetail} message FailureDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FailureDetail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FailureDetail message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.FailureDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.FailureDetail} FailureDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FailureDetail.decode = function 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.transcoder.v1beta1.FailureDetail(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.description = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FailureDetail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.FailureDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.FailureDetail} FailureDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FailureDetail.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FailureDetail message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.FailureDetail + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FailureDetail.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates a FailureDetail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.FailureDetail + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.FailureDetail} FailureDetail + */ + FailureDetail.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.FailureDetail) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.FailureDetail(); + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from a FailureDetail message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.FailureDetail + * @static + * @param {google.cloud.video.transcoder.v1beta1.FailureDetail} message FailureDetail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FailureDetail.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.description = ""; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this FailureDetail to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.FailureDetail + * @instance + * @returns {Object.} JSON object + */ + FailureDetail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FailureDetail; + })(); + + v1beta1.TranscoderService = (function() { + + /** + * Constructs a new TranscoderService service. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents a TranscoderService + * @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 TranscoderService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (TranscoderService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = TranscoderService; + + /** + * Creates new TranscoderService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService + * @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 {TranscoderService} RPC service. Useful where requests and/or responses are streamed. + */ + TranscoderService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#createJob}. + * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService + * @typedef CreateJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.transcoder.v1beta1.Job} [response] Job + */ + + /** + * Calls CreateJob. + * @function createJob + * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1beta1.ICreateJobRequest} request CreateJobRequest message or plain object + * @param {google.cloud.video.transcoder.v1beta1.TranscoderService.CreateJobCallback} callback Node-style callback called with the error, if any, and Job + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TranscoderService.prototype.createJob = function createJob(request, callback) { + return this.rpcCall(createJob, $root.google.cloud.video.transcoder.v1beta1.CreateJobRequest, $root.google.cloud.video.transcoder.v1beta1.Job, request, callback); + }, "name", { value: "CreateJob" }); + + /** + * Calls CreateJob. + * @function createJob + * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1beta1.ICreateJobRequest} request CreateJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#listJobs}. + * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService + * @typedef ListJobsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.transcoder.v1beta1.ListJobsResponse} [response] ListJobsResponse + */ + + /** + * Calls ListJobs. + * @function listJobs + * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1beta1.IListJobsRequest} request ListJobsRequest message or plain object + * @param {google.cloud.video.transcoder.v1beta1.TranscoderService.ListJobsCallback} callback Node-style callback called with the error, if any, and ListJobsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TranscoderService.prototype.listJobs = function listJobs(request, callback) { + return this.rpcCall(listJobs, $root.google.cloud.video.transcoder.v1beta1.ListJobsRequest, $root.google.cloud.video.transcoder.v1beta1.ListJobsResponse, request, callback); + }, "name", { value: "ListJobs" }); + + /** + * Calls ListJobs. + * @function listJobs + * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1beta1.IListJobsRequest} request ListJobsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#getJob}. + * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService + * @typedef GetJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.transcoder.v1beta1.Job} [response] Job + */ + + /** + * Calls GetJob. + * @function getJob + * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1beta1.IGetJobRequest} request GetJobRequest message or plain object + * @param {google.cloud.video.transcoder.v1beta1.TranscoderService.GetJobCallback} callback Node-style callback called with the error, if any, and Job + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TranscoderService.prototype.getJob = function getJob(request, callback) { + return this.rpcCall(getJob, $root.google.cloud.video.transcoder.v1beta1.GetJobRequest, $root.google.cloud.video.transcoder.v1beta1.Job, request, callback); + }, "name", { value: "GetJob" }); + + /** + * Calls GetJob. + * @function getJob + * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1beta1.IGetJobRequest} request GetJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#deleteJob}. + * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService + * @typedef DeleteJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteJob. + * @function deleteJob + * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1beta1.IDeleteJobRequest} request DeleteJobRequest message or plain object + * @param {google.cloud.video.transcoder.v1beta1.TranscoderService.DeleteJobCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TranscoderService.prototype.deleteJob = function deleteJob(request, callback) { + return this.rpcCall(deleteJob, $root.google.cloud.video.transcoder.v1beta1.DeleteJobRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteJob" }); + + /** + * Calls DeleteJob. + * @function deleteJob + * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1beta1.IDeleteJobRequest} request DeleteJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#createJobTemplate}. + * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService + * @typedef CreateJobTemplateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.transcoder.v1beta1.JobTemplate} [response] JobTemplate + */ + + /** + * Calls CreateJobTemplate. + * @function createJobTemplate + * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest} request CreateJobTemplateRequest message or plain object + * @param {google.cloud.video.transcoder.v1beta1.TranscoderService.CreateJobTemplateCallback} callback Node-style callback called with the error, if any, and JobTemplate + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TranscoderService.prototype.createJobTemplate = function createJobTemplate(request, callback) { + return this.rpcCall(createJobTemplate, $root.google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest, $root.google.cloud.video.transcoder.v1beta1.JobTemplate, request, callback); + }, "name", { value: "CreateJobTemplate" }); + + /** + * Calls CreateJobTemplate. + * @function createJobTemplate + * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest} request CreateJobTemplateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#listJobTemplates}. + * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService + * @typedef ListJobTemplatesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse} [response] ListJobTemplatesResponse + */ + + /** + * Calls ListJobTemplates. + * @function listJobTemplates + * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest} request ListJobTemplatesRequest message or plain object + * @param {google.cloud.video.transcoder.v1beta1.TranscoderService.ListJobTemplatesCallback} callback Node-style callback called with the error, if any, and ListJobTemplatesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TranscoderService.prototype.listJobTemplates = function listJobTemplates(request, callback) { + return this.rpcCall(listJobTemplates, $root.google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest, $root.google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse, request, callback); + }, "name", { value: "ListJobTemplates" }); + + /** + * Calls ListJobTemplates. + * @function listJobTemplates + * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest} request ListJobTemplatesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#getJobTemplate}. + * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService + * @typedef GetJobTemplateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.transcoder.v1beta1.JobTemplate} [response] JobTemplate + */ + + /** + * Calls GetJobTemplate. + * @function getJobTemplate + * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest} request GetJobTemplateRequest message or plain object + * @param {google.cloud.video.transcoder.v1beta1.TranscoderService.GetJobTemplateCallback} callback Node-style callback called with the error, if any, and JobTemplate + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TranscoderService.prototype.getJobTemplate = function getJobTemplate(request, callback) { + return this.rpcCall(getJobTemplate, $root.google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest, $root.google.cloud.video.transcoder.v1beta1.JobTemplate, request, callback); + }, "name", { value: "GetJobTemplate" }); + + /** + * Calls GetJobTemplate. + * @function getJobTemplate + * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest} request GetJobTemplateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#deleteJobTemplate}. + * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService + * @typedef DeleteJobTemplateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteJobTemplate. + * @function deleteJobTemplate + * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest} request DeleteJobTemplateRequest message or plain object + * @param {google.cloud.video.transcoder.v1beta1.TranscoderService.DeleteJobTemplateCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TranscoderService.prototype.deleteJobTemplate = function deleteJobTemplate(request, callback) { + return this.rpcCall(deleteJobTemplate, $root.google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteJobTemplate" }); + + /** + * Calls DeleteJobTemplate. + * @function deleteJobTemplate + * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest} request DeleteJobTemplateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return TranscoderService; + })(); + + v1beta1.CreateJobRequest = (function() { + + /** + * Properties of a CreateJobRequest. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface ICreateJobRequest + * @property {string|null} [parent] CreateJobRequest parent + * @property {google.cloud.video.transcoder.v1beta1.IJob|null} [job] CreateJobRequest job + */ + + /** + * Constructs a new CreateJobRequest. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents a CreateJobRequest. + * @implements ICreateJobRequest + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.ICreateJobRequest=} [properties] Properties to set + */ + function CreateJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateJobRequest parent. + * @member {string} parent + * @memberof google.cloud.video.transcoder.v1beta1.CreateJobRequest + * @instance + */ + CreateJobRequest.prototype.parent = ""; + + /** + * CreateJobRequest job. + * @member {google.cloud.video.transcoder.v1beta1.IJob|null|undefined} job + * @memberof google.cloud.video.transcoder.v1beta1.CreateJobRequest + * @instance + */ + CreateJobRequest.prototype.job = null; + + /** + * Creates a new CreateJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.CreateJobRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.ICreateJobRequest=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.CreateJobRequest} CreateJobRequest instance + */ + CreateJobRequest.create = function create(properties) { + return new CreateJobRequest(properties); + }; + + /** + * Encodes the specified CreateJobRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.CreateJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.CreateJobRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.ICreateJobRequest} message CreateJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateJobRequest.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.job != null && Object.hasOwnProperty.call(message, "job")) + $root.google.cloud.video.transcoder.v1beta1.Job.encode(message.job, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateJobRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.CreateJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.CreateJobRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.ICreateJobRequest} message CreateJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.CreateJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.CreateJobRequest} CreateJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateJobRequest.decode = function 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.transcoder.v1beta1.CreateJobRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.job = $root.google.cloud.video.transcoder.v1beta1.Job.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.CreateJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.CreateJobRequest} CreateJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateJobRequest message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.CreateJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateJobRequest.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.job != null && message.hasOwnProperty("job")) { + var error = $root.google.cloud.video.transcoder.v1beta1.Job.verify(message.job); + if (error) + return "job." + error; + } + return null; + }; + + /** + * Creates a CreateJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.CreateJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.CreateJobRequest} CreateJobRequest + */ + CreateJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.CreateJobRequest) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.CreateJobRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.job != null) { + if (typeof object.job !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.CreateJobRequest.job: object expected"); + message.job = $root.google.cloud.video.transcoder.v1beta1.Job.fromObject(object.job); + } + return message; + }; + + /** + * Creates a plain object from a CreateJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.CreateJobRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.CreateJobRequest} message CreateJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateJobRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.job = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.job != null && message.hasOwnProperty("job")) + object.job = $root.google.cloud.video.transcoder.v1beta1.Job.toObject(message.job, options); + return object; + }; + + /** + * Converts this CreateJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.CreateJobRequest + * @instance + * @returns {Object.} JSON object + */ + CreateJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateJobRequest; + })(); + + v1beta1.ListJobsRequest = (function() { + + /** + * Properties of a ListJobsRequest. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface IListJobsRequest + * @property {string|null} [parent] ListJobsRequest parent + * @property {number|null} [pageSize] ListJobsRequest pageSize + * @property {string|null} [pageToken] ListJobsRequest pageToken + */ + + /** + * Constructs a new ListJobsRequest. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents a ListJobsRequest. + * @implements IListJobsRequest + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.IListJobsRequest=} [properties] Properties to set + */ + function ListJobsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListJobsRequest parent. + * @member {string} parent + * @memberof google.cloud.video.transcoder.v1beta1.ListJobsRequest + * @instance + */ + ListJobsRequest.prototype.parent = ""; + + /** + * ListJobsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.video.transcoder.v1beta1.ListJobsRequest + * @instance + */ + ListJobsRequest.prototype.pageSize = 0; + + /** + * ListJobsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.video.transcoder.v1beta1.ListJobsRequest + * @instance + */ + ListJobsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListJobsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.ListJobsRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.IListJobsRequest=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.ListJobsRequest} ListJobsRequest instance + */ + ListJobsRequest.create = function create(properties) { + return new ListJobsRequest(properties); + }; + + /** + * Encodes the specified ListJobsRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.ListJobsRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.IListJobsRequest} message ListJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobsRequest.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 ListJobsRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.ListJobsRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.IListJobsRequest} message ListJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListJobsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.ListJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.ListJobsRequest} ListJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobsRequest.decode = function 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.transcoder.v1beta1.ListJobsRequest(); + 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 ListJobsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.ListJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.ListJobsRequest} ListJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListJobsRequest message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.ListJobsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListJobsRequest.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 ListJobsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.ListJobsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.ListJobsRequest} ListJobsRequest + */ + ListJobsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.ListJobsRequest) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.ListJobsRequest(); + 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 ListJobsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.ListJobsRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.ListJobsRequest} message ListJobsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListJobsRequest.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 ListJobsRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.ListJobsRequest + * @instance + * @returns {Object.} JSON object + */ + ListJobsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListJobsRequest; + })(); + + v1beta1.GetJobRequest = (function() { + + /** + * Properties of a GetJobRequest. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface IGetJobRequest + * @property {string|null} [name] GetJobRequest name + */ + + /** + * Constructs a new GetJobRequest. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents a GetJobRequest. + * @implements IGetJobRequest + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.IGetJobRequest=} [properties] Properties to set + */ + function GetJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetJobRequest name. + * @member {string} name + * @memberof google.cloud.video.transcoder.v1beta1.GetJobRequest + * @instance + */ + GetJobRequest.prototype.name = ""; + + /** + * Creates a new GetJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.GetJobRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.IGetJobRequest=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.GetJobRequest} GetJobRequest instance + */ + GetJobRequest.create = function create(properties) { + return new GetJobRequest(properties); + }; + + /** + * Encodes the specified GetJobRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.GetJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.GetJobRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.IGetJobRequest} message GetJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetJobRequest.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 GetJobRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.GetJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.GetJobRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.IGetJobRequest} message GetJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.GetJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.GetJobRequest} GetJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetJobRequest.decode = function 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.transcoder.v1beta1.GetJobRequest(); + 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 GetJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.GetJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.GetJobRequest} GetJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetJobRequest message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.GetJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetJobRequest.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 GetJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.GetJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.GetJobRequest} GetJobRequest + */ + GetJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.GetJobRequest) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.GetJobRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.GetJobRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.GetJobRequest} message GetJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetJobRequest.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 GetJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.GetJobRequest + * @instance + * @returns {Object.} JSON object + */ + GetJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetJobRequest; + })(); + + v1beta1.DeleteJobRequest = (function() { + + /** + * Properties of a DeleteJobRequest. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface IDeleteJobRequest + * @property {string|null} [name] DeleteJobRequest name + */ + + /** + * Constructs a new DeleteJobRequest. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents a DeleteJobRequest. + * @implements IDeleteJobRequest + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.IDeleteJobRequest=} [properties] Properties to set + */ + function DeleteJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteJobRequest name. + * @member {string} name + * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobRequest + * @instance + */ + DeleteJobRequest.prototype.name = ""; + + /** + * Creates a new DeleteJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.IDeleteJobRequest=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.DeleteJobRequest} DeleteJobRequest instance + */ + DeleteJobRequest.create = function create(properties) { + return new DeleteJobRequest(properties); + }; + + /** + * Encodes the specified DeleteJobRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.DeleteJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.IDeleteJobRequest} message DeleteJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteJobRequest.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 DeleteJobRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.DeleteJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.IDeleteJobRequest} message DeleteJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.DeleteJobRequest} DeleteJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteJobRequest.decode = function 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.transcoder.v1beta1.DeleteJobRequest(); + 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 DeleteJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.DeleteJobRequest} DeleteJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteJobRequest message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteJobRequest.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 DeleteJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.DeleteJobRequest} DeleteJobRequest + */ + DeleteJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.DeleteJobRequest) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.DeleteJobRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.DeleteJobRequest} message DeleteJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteJobRequest.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 DeleteJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteJobRequest; + })(); + + v1beta1.ListJobsResponse = (function() { + + /** + * Properties of a ListJobsResponse. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface IListJobsResponse + * @property {Array.|null} [jobs] ListJobsResponse jobs + * @property {string|null} [nextPageToken] ListJobsResponse nextPageToken + */ + + /** + * Constructs a new ListJobsResponse. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents a ListJobsResponse. + * @implements IListJobsResponse + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.IListJobsResponse=} [properties] Properties to set + */ + function ListJobsResponse(properties) { + this.jobs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListJobsResponse jobs. + * @member {Array.} jobs + * @memberof google.cloud.video.transcoder.v1beta1.ListJobsResponse + * @instance + */ + ListJobsResponse.prototype.jobs = $util.emptyArray; + + /** + * ListJobsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.video.transcoder.v1beta1.ListJobsResponse + * @instance + */ + ListJobsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListJobsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.ListJobsResponse + * @static + * @param {google.cloud.video.transcoder.v1beta1.IListJobsResponse=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.ListJobsResponse} ListJobsResponse instance + */ + ListJobsResponse.create = function create(properties) { + return new ListJobsResponse(properties); + }; + + /** + * Encodes the specified ListJobsResponse message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.ListJobsResponse + * @static + * @param {google.cloud.video.transcoder.v1beta1.IListJobsResponse} message ListJobsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.jobs != null && message.jobs.length) + for (var i = 0; i < message.jobs.length; ++i) + $root.google.cloud.video.transcoder.v1beta1.Job.encode(message.jobs[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 ListJobsResponse message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.ListJobsResponse + * @static + * @param {google.cloud.video.transcoder.v1beta1.IListJobsResponse} message ListJobsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListJobsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.ListJobsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.ListJobsResponse} ListJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobsResponse.decode = function 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.transcoder.v1beta1.ListJobsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.jobs && message.jobs.length)) + message.jobs = []; + message.jobs.push($root.google.cloud.video.transcoder.v1beta1.Job.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListJobsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.ListJobsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.ListJobsResponse} ListJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListJobsResponse message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.ListJobsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListJobsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.jobs != null && message.hasOwnProperty("jobs")) { + if (!Array.isArray(message.jobs)) + return "jobs: array expected"; + for (var i = 0; i < message.jobs.length; ++i) { + var error = $root.google.cloud.video.transcoder.v1beta1.Job.verify(message.jobs[i]); + if (error) + return "jobs." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListJobsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.ListJobsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.ListJobsResponse} ListJobsResponse + */ + ListJobsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.ListJobsResponse) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.ListJobsResponse(); + if (object.jobs) { + if (!Array.isArray(object.jobs)) + throw TypeError(".google.cloud.video.transcoder.v1beta1.ListJobsResponse.jobs: array expected"); + message.jobs = []; + for (var i = 0; i < object.jobs.length; ++i) { + if (typeof object.jobs[i] !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.ListJobsResponse.jobs: object expected"); + message.jobs[i] = $root.google.cloud.video.transcoder.v1beta1.Job.fromObject(object.jobs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListJobsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.ListJobsResponse + * @static + * @param {google.cloud.video.transcoder.v1beta1.ListJobsResponse} message ListJobsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListJobsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.jobs = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.jobs && message.jobs.length) { + object.jobs = []; + for (var j = 0; j < message.jobs.length; ++j) + object.jobs[j] = $root.google.cloud.video.transcoder.v1beta1.Job.toObject(message.jobs[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListJobsResponse to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.ListJobsResponse + * @instance + * @returns {Object.} JSON object + */ + ListJobsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListJobsResponse; + })(); + + v1beta1.CreateJobTemplateRequest = (function() { + + /** + * Properties of a CreateJobTemplateRequest. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface ICreateJobTemplateRequest + * @property {string|null} [parent] CreateJobTemplateRequest parent + * @property {google.cloud.video.transcoder.v1beta1.IJobTemplate|null} [jobTemplate] CreateJobTemplateRequest jobTemplate + * @property {string|null} [jobTemplateId] CreateJobTemplateRequest jobTemplateId + */ + + /** + * Constructs a new CreateJobTemplateRequest. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents a CreateJobTemplateRequest. + * @implements ICreateJobTemplateRequest + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest=} [properties] Properties to set + */ + function CreateJobTemplateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateJobTemplateRequest parent. + * @member {string} parent + * @memberof google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest + * @instance + */ + CreateJobTemplateRequest.prototype.parent = ""; + + /** + * CreateJobTemplateRequest jobTemplate. + * @member {google.cloud.video.transcoder.v1beta1.IJobTemplate|null|undefined} jobTemplate + * @memberof google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest + * @instance + */ + CreateJobTemplateRequest.prototype.jobTemplate = null; + + /** + * CreateJobTemplateRequest jobTemplateId. + * @member {string} jobTemplateId + * @memberof google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest + * @instance + */ + CreateJobTemplateRequest.prototype.jobTemplateId = ""; + + /** + * Creates a new CreateJobTemplateRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest} CreateJobTemplateRequest instance + */ + CreateJobTemplateRequest.create = function create(properties) { + return new CreateJobTemplateRequest(properties); + }; + + /** + * Encodes the specified CreateJobTemplateRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest} message CreateJobTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateJobTemplateRequest.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.jobTemplate != null && Object.hasOwnProperty.call(message, "jobTemplate")) + $root.google.cloud.video.transcoder.v1beta1.JobTemplate.encode(message.jobTemplate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.jobTemplateId != null && Object.hasOwnProperty.call(message, "jobTemplateId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.jobTemplateId); + return writer; + }; + + /** + * Encodes the specified CreateJobTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest} message CreateJobTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateJobTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateJobTemplateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest} CreateJobTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateJobTemplateRequest.decode = function 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.transcoder.v1beta1.CreateJobTemplateRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.jobTemplate = $root.google.cloud.video.transcoder.v1beta1.JobTemplate.decode(reader, reader.uint32()); + break; + case 3: + message.jobTemplateId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateJobTemplateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest} CreateJobTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateJobTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateJobTemplateRequest message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateJobTemplateRequest.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.jobTemplate != null && message.hasOwnProperty("jobTemplate")) { + var error = $root.google.cloud.video.transcoder.v1beta1.JobTemplate.verify(message.jobTemplate); + if (error) + return "jobTemplate." + error; + } + if (message.jobTemplateId != null && message.hasOwnProperty("jobTemplateId")) + if (!$util.isString(message.jobTemplateId)) + return "jobTemplateId: string expected"; + return null; + }; + + /** + * Creates a CreateJobTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest} CreateJobTemplateRequest + */ + CreateJobTemplateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.jobTemplate != null) { + if (typeof object.jobTemplate !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest.jobTemplate: object expected"); + message.jobTemplate = $root.google.cloud.video.transcoder.v1beta1.JobTemplate.fromObject(object.jobTemplate); + } + if (object.jobTemplateId != null) + message.jobTemplateId = String(object.jobTemplateId); + return message; + }; + + /** + * Creates a plain object from a CreateJobTemplateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest} message CreateJobTemplateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateJobTemplateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.jobTemplate = null; + object.jobTemplateId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.jobTemplate != null && message.hasOwnProperty("jobTemplate")) + object.jobTemplate = $root.google.cloud.video.transcoder.v1beta1.JobTemplate.toObject(message.jobTemplate, options); + if (message.jobTemplateId != null && message.hasOwnProperty("jobTemplateId")) + object.jobTemplateId = message.jobTemplateId; + return object; + }; + + /** + * Converts this CreateJobTemplateRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest + * @instance + * @returns {Object.} JSON object + */ + CreateJobTemplateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateJobTemplateRequest; + })(); + + v1beta1.ListJobTemplatesRequest = (function() { + + /** + * Properties of a ListJobTemplatesRequest. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface IListJobTemplatesRequest + * @property {string|null} [parent] ListJobTemplatesRequest parent + * @property {number|null} [pageSize] ListJobTemplatesRequest pageSize + * @property {string|null} [pageToken] ListJobTemplatesRequest pageToken + */ + + /** + * Constructs a new ListJobTemplatesRequest. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents a ListJobTemplatesRequest. + * @implements IListJobTemplatesRequest + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest=} [properties] Properties to set + */ + function ListJobTemplatesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListJobTemplatesRequest parent. + * @member {string} parent + * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest + * @instance + */ + ListJobTemplatesRequest.prototype.parent = ""; + + /** + * ListJobTemplatesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest + * @instance + */ + ListJobTemplatesRequest.prototype.pageSize = 0; + + /** + * ListJobTemplatesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest + * @instance + */ + ListJobTemplatesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListJobTemplatesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest} ListJobTemplatesRequest instance + */ + ListJobTemplatesRequest.create = function create(properties) { + return new ListJobTemplatesRequest(properties); + }; + + /** + * Encodes the specified ListJobTemplatesRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest} message ListJobTemplatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobTemplatesRequest.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 ListJobTemplatesRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest} message ListJobTemplatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobTemplatesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListJobTemplatesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest} ListJobTemplatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobTemplatesRequest.decode = function 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.transcoder.v1beta1.ListJobTemplatesRequest(); + 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 ListJobTemplatesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest} ListJobTemplatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobTemplatesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListJobTemplatesRequest message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListJobTemplatesRequest.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 ListJobTemplatesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest} ListJobTemplatesRequest + */ + ListJobTemplatesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest(); + 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 ListJobTemplatesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest} message ListJobTemplatesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListJobTemplatesRequest.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 ListJobTemplatesRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest + * @instance + * @returns {Object.} JSON object + */ + ListJobTemplatesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListJobTemplatesRequest; + })(); + + v1beta1.GetJobTemplateRequest = (function() { + + /** + * Properties of a GetJobTemplateRequest. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface IGetJobTemplateRequest + * @property {string|null} [name] GetJobTemplateRequest name + */ + + /** + * Constructs a new GetJobTemplateRequest. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents a GetJobTemplateRequest. + * @implements IGetJobTemplateRequest + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest=} [properties] Properties to set + */ + function GetJobTemplateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetJobTemplateRequest name. + * @member {string} name + * @memberof google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest + * @instance + */ + GetJobTemplateRequest.prototype.name = ""; + + /** + * Creates a new GetJobTemplateRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest} GetJobTemplateRequest instance + */ + GetJobTemplateRequest.create = function create(properties) { + return new GetJobTemplateRequest(properties); + }; + + /** + * Encodes the specified GetJobTemplateRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest} message GetJobTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetJobTemplateRequest.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 GetJobTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest} message GetJobTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetJobTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetJobTemplateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest} GetJobTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetJobTemplateRequest.decode = function 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.transcoder.v1beta1.GetJobTemplateRequest(); + 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 GetJobTemplateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest} GetJobTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetJobTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetJobTemplateRequest message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetJobTemplateRequest.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 GetJobTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest} GetJobTemplateRequest + */ + GetJobTemplateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetJobTemplateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest} message GetJobTemplateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetJobTemplateRequest.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 GetJobTemplateRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest + * @instance + * @returns {Object.} JSON object + */ + GetJobTemplateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetJobTemplateRequest; + })(); + + v1beta1.DeleteJobTemplateRequest = (function() { + + /** + * Properties of a DeleteJobTemplateRequest. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface IDeleteJobTemplateRequest + * @property {string|null} [name] DeleteJobTemplateRequest name + */ + + /** + * Constructs a new DeleteJobTemplateRequest. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents a DeleteJobTemplateRequest. + * @implements IDeleteJobTemplateRequest + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest=} [properties] Properties to set + */ + function DeleteJobTemplateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteJobTemplateRequest name. + * @member {string} name + * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest + * @instance + */ + DeleteJobTemplateRequest.prototype.name = ""; + + /** + * Creates a new DeleteJobTemplateRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest} DeleteJobTemplateRequest instance + */ + DeleteJobTemplateRequest.create = function create(properties) { + return new DeleteJobTemplateRequest(properties); + }; + + /** + * Encodes the specified DeleteJobTemplateRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest} message DeleteJobTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteJobTemplateRequest.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 DeleteJobTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest} message DeleteJobTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteJobTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteJobTemplateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest} DeleteJobTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteJobTemplateRequest.decode = function 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.transcoder.v1beta1.DeleteJobTemplateRequest(); + 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 DeleteJobTemplateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest} DeleteJobTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteJobTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteJobTemplateRequest message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteJobTemplateRequest.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 DeleteJobTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest} DeleteJobTemplateRequest + */ + DeleteJobTemplateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteJobTemplateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest + * @static + * @param {google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest} message DeleteJobTemplateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteJobTemplateRequest.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 DeleteJobTemplateRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteJobTemplateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteJobTemplateRequest; + })(); + + v1beta1.ListJobTemplatesResponse = (function() { + + /** + * Properties of a ListJobTemplatesResponse. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface IListJobTemplatesResponse + * @property {Array.|null} [jobTemplates] ListJobTemplatesResponse jobTemplates + * @property {string|null} [nextPageToken] ListJobTemplatesResponse nextPageToken + */ + + /** + * Constructs a new ListJobTemplatesResponse. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents a ListJobTemplatesResponse. + * @implements IListJobTemplatesResponse + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.IListJobTemplatesResponse=} [properties] Properties to set + */ + function ListJobTemplatesResponse(properties) { + this.jobTemplates = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListJobTemplatesResponse jobTemplates. + * @member {Array.} jobTemplates + * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse + * @instance + */ + ListJobTemplatesResponse.prototype.jobTemplates = $util.emptyArray; + + /** + * ListJobTemplatesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse + * @instance + */ + ListJobTemplatesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListJobTemplatesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse + * @static + * @param {google.cloud.video.transcoder.v1beta1.IListJobTemplatesResponse=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse} ListJobTemplatesResponse instance + */ + ListJobTemplatesResponse.create = function create(properties) { + return new ListJobTemplatesResponse(properties); + }; + + /** + * Encodes the specified ListJobTemplatesResponse message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse + * @static + * @param {google.cloud.video.transcoder.v1beta1.IListJobTemplatesResponse} message ListJobTemplatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobTemplatesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.jobTemplates != null && message.jobTemplates.length) + for (var i = 0; i < message.jobTemplates.length; ++i) + $root.google.cloud.video.transcoder.v1beta1.JobTemplate.encode(message.jobTemplates[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 ListJobTemplatesResponse message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse + * @static + * @param {google.cloud.video.transcoder.v1beta1.IListJobTemplatesResponse} message ListJobTemplatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobTemplatesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListJobTemplatesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse} ListJobTemplatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobTemplatesResponse.decode = function 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.transcoder.v1beta1.ListJobTemplatesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.jobTemplates && message.jobTemplates.length)) + message.jobTemplates = []; + message.jobTemplates.push($root.google.cloud.video.transcoder.v1beta1.JobTemplate.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListJobTemplatesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse} ListJobTemplatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobTemplatesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListJobTemplatesResponse message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListJobTemplatesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.jobTemplates != null && message.hasOwnProperty("jobTemplates")) { + if (!Array.isArray(message.jobTemplates)) + return "jobTemplates: array expected"; + for (var i = 0; i < message.jobTemplates.length; ++i) { + var error = $root.google.cloud.video.transcoder.v1beta1.JobTemplate.verify(message.jobTemplates[i]); + if (error) + return "jobTemplates." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListJobTemplatesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse} ListJobTemplatesResponse + */ + ListJobTemplatesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse(); + if (object.jobTemplates) { + if (!Array.isArray(object.jobTemplates)) + throw TypeError(".google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse.jobTemplates: array expected"); + message.jobTemplates = []; + for (var i = 0; i < object.jobTemplates.length; ++i) { + if (typeof object.jobTemplates[i] !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse.jobTemplates: object expected"); + message.jobTemplates[i] = $root.google.cloud.video.transcoder.v1beta1.JobTemplate.fromObject(object.jobTemplates[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListJobTemplatesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse + * @static + * @param {google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse} message ListJobTemplatesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListJobTemplatesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.jobTemplates = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.jobTemplates && message.jobTemplates.length) { + object.jobTemplates = []; + for (var j = 0; j < message.jobTemplates.length; ++j) + object.jobTemplates[j] = $root.google.cloud.video.transcoder.v1beta1.JobTemplate.toObject(message.jobTemplates[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListJobTemplatesResponse to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse + * @instance + * @returns {Object.} JSON object + */ + ListJobTemplatesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListJobTemplatesResponse; + })(); + + return v1beta1; + })(); + + return transcoder; + })(); + + return video; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + */ + 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; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + */ + + /** + * 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 = []; + if (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 = ""; + + /** + * 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); + 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; + 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"; + 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) { + 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); + 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 = []; + 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] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + 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); + }; + + /** + * 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; + })(); + + 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); + }; + + return ResourceReference; + })(); + + 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); + }; + + 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} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = ""; + + /** + * HttpRule put. + * @member {string} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = ""; + + /** + * HttpRule post. + * @member {string} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = ""; + + /** + * HttpRule delete. + * @member {string} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = ""; + + /** + * HttpRule patch. + * @member {string} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = ""; + + /** + * 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); + }; + + 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); + }; + + 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); + }; + + 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 + */ + + /** + * 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 = ""; + + /** + * 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); + 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; + 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"; + 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); + 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 = ""; + } + 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; + 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); + }; + + 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); + }; + + 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); + }; + + 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); + }; + + 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); + }; + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.number = reader.int32(); + break; + case 4: + message.label = reader.int32(); + break; + case 5: + message.type = reader.int32(); + break; + case 6: + message.typeName = reader.string(); + break; + case 2: + message.extendee = reader.string(); + break; + case 7: + message.defaultValue = reader.string(); + break; + case 9: + message.oneofIndex = reader.int32(); + break; + case 10: + message.jsonName = reader.string(); + break; + case 8: + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + case 17: + message.proto3Optional = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + } + switch (object.type) { + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * 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); + }; + + 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); + }; + + 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); + }; + + 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); + }; + + 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); + }; + + 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); + }; + + 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) { + 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] : 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); + }; + + /** + * 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); + }; + + 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} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.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 deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.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 3: + message.deprecated = reader.bool(); + break; + case 10: + message.weak = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1052: + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + case 1055: + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.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[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + 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); + }; + + /** + * 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); + }; + + 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); + }; + + 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); + }; + + 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); + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 34: + message.idempotencyLevel = reader.int32(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 72295728: + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + case 1051: + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * 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) + 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); + }; + + 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); + }; + + 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); + }; + + 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); + }; + + 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); + }; + + 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 + */ + + /** + * 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; + + /** + * 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); + 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; + 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"; + 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; + 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; + } + 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; + 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); + }; + + 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); + }; + + return Duration; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Timestamp; + })(); + + 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); + }; + + return Empty; + })(); + + return protobuf; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-cloud-video-transcoder/protos/protos.json b/packages/google-cloud-video-transcoder/protos/protos.json new file mode 100644 index 00000000000..f3a227d200f --- /dev/null +++ b/packages/google-cloud-video-transcoder/protos/protos.json @@ -0,0 +1,2369 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "video": { + "nested": { + "transcoder": { + "nested": { + "v1beta1": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/cloud/video/transcoder/v1beta1;transcoder", + "java_multiple_files": true, + "java_outer_classname": "ServicesProto", + "java_package": "com.google.cloud.video.transcoder.v1beta1" + }, + "nested": { + "Job": { + "options": { + "(google.api.resource).type": "transcoder.googleapis.com/Job", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/jobs/{job}" + }, + "oneofs": { + "jobConfig": { + "oneof": [ + "templateId", + "config" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputUri": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY" + } + }, + "outputUri": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY" + } + }, + "templateId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY" + } + }, + "config": { + "type": "JobConfig", + "id": 5 + }, + "priority": { + "type": "int32", + "id": 6 + }, + "originUri": { + "type": "OriginUri", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "ProcessingState", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "progress": { + "type": "Progress", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "failureReason": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "failureDetails": { + "rule": "repeated", + "type": "FailureDetail", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "OriginUri": { + "fields": { + "hls": { + "type": "string", + "id": 1 + }, + "dash": { + "type": "string", + "id": 2 + } + } + }, + "ProcessingState": { + "values": { + "PROCESSING_STATE_UNSPECIFIED": 0, + "PENDING": 1, + "RUNNING": 2, + "SUCCEEDED": 3, + "FAILED": 4 + } + } + } + }, + "JobTemplate": { + "options": { + "(google.api.resource).type": "transcoder.googleapis.com/JobTemplate", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/jobTemplates/{job_template}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "config": { + "type": "JobConfig", + "id": 2 + } + } + }, + "JobConfig": { + "fields": { + "inputs": { + "rule": "repeated", + "type": "Input", + "id": 1 + }, + "editList": { + "rule": "repeated", + "type": "EditAtom", + "id": 2 + }, + "elementaryStreams": { + "rule": "repeated", + "type": "ElementaryStream", + "id": 3 + }, + "muxStreams": { + "rule": "repeated", + "type": "MuxStream", + "id": 4 + }, + "manifests": { + "rule": "repeated", + "type": "Manifest", + "id": 5 + }, + "output": { + "type": "Output", + "id": 6 + }, + "adBreaks": { + "rule": "repeated", + "type": "AdBreak", + "id": 7 + }, + "pubsubDestination": { + "type": "PubsubDestination", + "id": 8 + }, + "spriteSheets": { + "rule": "repeated", + "type": "SpriteSheet", + "id": 9 + }, + "overlays": { + "rule": "repeated", + "type": "Overlay", + "id": 10 + } + } + }, + "Input": { + "fields": { + "key": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "preprocessingConfig": { + "type": "PreprocessingConfig", + "id": 3 + } + } + }, + "Output": { + "fields": { + "uri": { + "type": "string", + "id": 1 + } + } + }, + "EditAtom": { + "fields": { + "key": { + "type": "string", + "id": 1 + }, + "inputs": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "endTimeOffset": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "startTimeOffset": { + "type": "google.protobuf.Duration", + "id": 4 + } + } + }, + "AdBreak": { + "fields": { + "startTimeOffset": { + "type": "google.protobuf.Duration", + "id": 1 + } + } + }, + "ElementaryStream": { + "oneofs": { + "elementaryStream": { + "oneof": [ + "videoStream", + "audioStream", + "textStream" + ] + } + }, + "fields": { + "key": { + "type": "string", + "id": 4 + }, + "videoStream": { + "type": "VideoStream", + "id": 1 + }, + "audioStream": { + "type": "AudioStream", + "id": 2 + }, + "textStream": { + "type": "TextStream", + "id": 3 + } + } + }, + "MuxStream": { + "fields": { + "key": { + "type": "string", + "id": 1 + }, + "fileName": { + "type": "string", + "id": 2 + }, + "container": { + "type": "string", + "id": 3 + }, + "elementaryStreams": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "segmentSettings": { + "type": "SegmentSettings", + "id": 5 + }, + "encryption": { + "type": "Encryption", + "id": 6 + } + } + }, + "Manifest": { + "fields": { + "fileName": { + "type": "string", + "id": 1 + }, + "type": { + "type": "ManifestType", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "muxStreams": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "ManifestType": { + "values": { + "MANIFEST_TYPE_UNSPECIFIED": 0, + "HLS": 1, + "DASH": 2 + } + } + } + }, + "PubsubDestination": { + "fields": { + "topic": { + "type": "string", + "id": 1 + } + } + }, + "SpriteSheet": { + "oneofs": { + "extractionStrategy": { + "oneof": [ + "totalCount", + "interval" + ] + } + }, + "fields": { + "format": { + "type": "string", + "id": 1 + }, + "filePrefix": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "spriteWidthPixels": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "spriteHeightPixels": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "columnCount": { + "type": "int32", + "id": 5 + }, + "rowCount": { + "type": "int32", + "id": 6 + }, + "startTimeOffset": { + "type": "google.protobuf.Duration", + "id": 7 + }, + "endTimeOffset": { + "type": "google.protobuf.Duration", + "id": 8 + }, + "totalCount": { + "type": "int32", + "id": 9 + }, + "interval": { + "type": "google.protobuf.Duration", + "id": 10 + } + } + }, + "Overlay": { + "fields": { + "image": { + "type": "Image", + "id": 1 + }, + "animations": { + "rule": "repeated", + "type": "Animation", + "id": 2 + } + }, + "nested": { + "NormalizedCoordinate": { + "fields": { + "x": { + "type": "double", + "id": 1 + }, + "y": { + "type": "double", + "id": 2 + } + } + }, + "Image": { + "fields": { + "uri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "resolution": { + "type": "NormalizedCoordinate", + "id": 2 + }, + "alpha": { + "type": "double", + "id": 3 + } + } + }, + "AnimationStatic": { + "fields": { + "xy": { + "type": "NormalizedCoordinate", + "id": 1 + }, + "startTimeOffset": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "AnimationFade": { + "fields": { + "fadeType": { + "type": "FadeType", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "xy": { + "type": "NormalizedCoordinate", + "id": 2 + }, + "startTimeOffset": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "endTimeOffset": { + "type": "google.protobuf.Duration", + "id": 4 + } + } + }, + "AnimationEnd": { + "fields": { + "startTimeOffset": { + "type": "google.protobuf.Duration", + "id": 1 + } + } + }, + "Animation": { + "oneofs": { + "animationType": { + "oneof": [ + "animationStatic", + "animationFade", + "animationEnd" + ] + } + }, + "fields": { + "animationStatic": { + "type": "AnimationStatic", + "id": 1 + }, + "animationFade": { + "type": "AnimationFade", + "id": 2 + }, + "animationEnd": { + "type": "AnimationEnd", + "id": 3 + } + } + }, + "FadeType": { + "values": { + "FADE_TYPE_UNSPECIFIED": 0, + "FADE_IN": 1, + "FADE_OUT": 2 + } + } + } + }, + "PreprocessingConfig": { + "fields": { + "color": { + "type": "Color", + "id": 1 + }, + "denoise": { + "type": "Denoise", + "id": 2 + }, + "deblock": { + "type": "Deblock", + "id": 3 + }, + "audio": { + "type": "Audio", + "id": 4 + } + }, + "nested": { + "Color": { + "fields": { + "saturation": { + "type": "double", + "id": 1 + }, + "contrast": { + "type": "double", + "id": 2 + }, + "brightness": { + "type": "double", + "id": 3 + } + } + }, + "Denoise": { + "fields": { + "strength": { + "type": "double", + "id": 1 + }, + "tune": { + "type": "string", + "id": 2 + } + } + }, + "Deblock": { + "fields": { + "strength": { + "type": "double", + "id": 1 + }, + "enabled": { + "type": "bool", + "id": 2 + } + } + }, + "Audio": { + "fields": { + "lufs": { + "type": "double", + "id": 1 + }, + "highBoost": { + "type": "bool", + "id": 2 + }, + "lowBoost": { + "type": "bool", + "id": 3 + } + } + } + } + }, + "VideoStream": { + "oneofs": { + "gopMode": { + "oneof": [ + "gopFrameCount", + "gopDuration" + ] + } + }, + "fields": { + "codec": { + "type": "string", + "id": 1 + }, + "profile": { + "type": "string", + "id": 2 + }, + "tune": { + "type": "string", + "id": 3 + }, + "preset": { + "type": "string", + "id": 4 + }, + "heightPixels": { + "type": "int32", + "id": 5 + }, + "widthPixels": { + "type": "int32", + "id": 6 + }, + "pixelFormat": { + "type": "string", + "id": 7 + }, + "bitrateBps": { + "type": "int32", + "id": 8, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "rateControlMode": { + "type": "string", + "id": 9 + }, + "enableTwoPass": { + "type": "bool", + "id": 10 + }, + "crfLevel": { + "type": "int32", + "id": 11 + }, + "vbvSizeBits": { + "type": "int32", + "id": 12 + }, + "vbvFullnessBits": { + "type": "int32", + "id": 13 + }, + "allowOpenGop": { + "type": "bool", + "id": 14 + }, + "gopFrameCount": { + "type": "int32", + "id": 15 + }, + "gopDuration": { + "type": "google.protobuf.Duration", + "id": 16 + }, + "entropyCoder": { + "type": "string", + "id": 17 + }, + "bPyramid": { + "type": "bool", + "id": 18 + }, + "bFrameCount": { + "type": "int32", + "id": 19 + }, + "frameRate": { + "type": "double", + "id": 20, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "aqStrength": { + "type": "double", + "id": 21 + } + } + }, + "AudioStream": { + "fields": { + "codec": { + "type": "string", + "id": 1 + }, + "bitrateBps": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "channelCount": { + "type": "int32", + "id": 3 + }, + "channelLayout": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "mapping": { + "rule": "repeated", + "type": "AudioAtom", + "id": 5 + }, + "sampleRateHertz": { + "type": "int32", + "id": 6 + } + }, + "nested": { + "AudioAtom": { + "fields": { + "key": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "channels": { + "rule": "repeated", + "type": "AudioChannel", + "id": 2 + } + }, + "nested": { + "AudioChannel": { + "fields": { + "inputs": { + "rule": "repeated", + "type": "AudioChannelInput", + "id": 2 + } + }, + "nested": { + "AudioChannelInput": { + "fields": { + "key": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "track": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "channel": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "gainDb": { + "type": "double", + "id": 4 + } + } + } + } + } + } + } + } + }, + "TextStream": { + "fields": { + "codec": { + "type": "string", + "id": 1 + }, + "languageCode": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "mapping": { + "rule": "repeated", + "type": "TextAtom", + "id": 3 + } + }, + "nested": { + "TextAtom": { + "fields": { + "key": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "inputs": { + "rule": "repeated", + "type": "TextInput", + "id": 2 + } + }, + "nested": { + "TextInput": { + "fields": { + "key": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "track": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + } + } + }, + "SegmentSettings": { + "fields": { + "segmentDuration": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "individualSegments": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Encryption": { + "oneofs": { + "encryptionMode": { + "oneof": [ + "aes_128", + "sampleAes", + "mpegCenc" + ] + } + }, + "fields": { + "key": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "iv": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "aes_128": { + "type": "Aes128Encryption", + "id": 3 + }, + "sampleAes": { + "type": "SampleAesEncryption", + "id": 4 + }, + "mpegCenc": { + "type": "MpegCommonEncryption", + "id": 5 + } + }, + "nested": { + "Aes128Encryption": { + "fields": { + "keyUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "SampleAesEncryption": { + "fields": { + "keyUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MpegCommonEncryption": { + "fields": { + "keyId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "scheme": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "Progress": { + "fields": { + "analyzed": { + "type": "double", + "id": 1 + }, + "encoded": { + "type": "double", + "id": 2 + }, + "uploaded": { + "type": "double", + "id": 3 + }, + "notified": { + "type": "double", + "id": 4 + } + } + }, + "FailureDetail": { + "fields": { + "description": { + "type": "string", + "id": 1 + } + } + }, + "TranscoderService": { + "options": { + "(google.api.default_host)": "transcoder.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateJob": { + "requestType": "CreateJobRequest", + "responseType": "Job", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/jobs", + "(google.api.http).body": "job", + "(google.api.method_signature)": "parent,job" + } + }, + "ListJobs": { + "requestType": "ListJobsRequest", + "responseType": "ListJobsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/jobs", + "(google.api.method_signature)": "parent" + } + }, + "GetJob": { + "requestType": "GetJobRequest", + "responseType": "Job", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/jobs/*}", + "(google.api.method_signature)": "name" + } + }, + "DeleteJob": { + "requestType": "DeleteJobRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/jobs/*}", + "(google.api.method_signature)": "name" + } + }, + "CreateJobTemplate": { + "requestType": "CreateJobTemplateRequest", + "responseType": "JobTemplate", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/jobTemplates", + "(google.api.http).body": "job_template", + "(google.api.method_signature)": "parent,job_template,job_template_id" + } + }, + "ListJobTemplates": { + "requestType": "ListJobTemplatesRequest", + "responseType": "ListJobTemplatesResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/jobTemplates", + "(google.api.method_signature)": "parent" + } + }, + "GetJobTemplate": { + "requestType": "GetJobTemplateRequest", + "responseType": "JobTemplate", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/jobTemplates/*}", + "(google.api.method_signature)": "name" + } + }, + "DeleteJobTemplate": { + "requestType": "DeleteJobTemplateRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/jobTemplates/*}", + "(google.api.method_signature)": "name" + } + } + } + }, + "CreateJobRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "job": { + "type": "Job", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListJobsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "GetJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "transcoder.googleapis.com/Job" + } + } + } + }, + "DeleteJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "transcoder.googleapis.com/Job" + } + } + } + }, + "ListJobsResponse": { + "fields": { + "jobs": { + "rule": "repeated", + "type": "Job", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CreateJobTemplateRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "jobTemplate": { + "type": "JobTemplate", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "jobTemplateId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListJobTemplatesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "GetJobTemplateRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "transcoder.googleapis.com/JobTemplate" + } + } + } + }, + "DeleteJobTemplateRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "transcoder.googleapis.com/JobTemplate" + } + } + } + }, + "ListJobTemplatesResponse": { + "fields": { + "jobTemplates": { + "rule": "repeated", + "type": "JobTemplate", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "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", + "cc_enable_arenas": true + }, + "nested": { + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5 + } + }, + "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 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + }, + "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": "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor", + "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 + } + } + }, + "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": [ + [ + 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 + } + }, + "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 + } + } + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-cloud-video-transcoder/samples/README.md b/packages/google-cloud-video-transcoder/samples/README.md new file mode 100644 index 00000000000..faa2ae89d85 --- /dev/null +++ b/packages/google-cloud-video-transcoder/samples/README.md @@ -0,0 +1,50 @@ +[//]: # "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 + +# [Transcoder API: Node.js Samples](https://github.com/googleapis/nodejs-video-transcoder) + +[![Open in Cloud Shell][shell_img]][shell_link] + + + +## Table of Contents + +* [Before you begin](#before-you-begin) +* [Samples](#samples) + * [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/nodejs-video-transcoder#using-the-client-library). + +`cd samples` + +`npm install` + +`cd ..` + +## Samples + + + +### Quickstart + +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node samples/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/nodejs-video-transcoder&page=editor&open_in_editor=samples/README.md +[product-docs]: https://googleapis.dev/nodejs/transcoder/latest diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json new file mode 100644 index 00000000000..fa7bc5133ec --- /dev/null +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -0,0 +1,22 @@ +{ + "name": "nodejs-video-transcoder-samples", + "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-transcoder": "^0.1.0" + }, + "devDependencies": { + "c8": "^7.3.0", + "mocha": "^8.1.1" + } +} diff --git a/packages/google-cloud-video-transcoder/samples/quickstart.js b/packages/google-cloud-video-transcoder/samples/quickstart.js new file mode 100644 index 00000000000..797c0523f14 --- /dev/null +++ b/packages/google-cloud-video-transcoder/samples/quickstart.js @@ -0,0 +1,43 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +async function main(projectId, location) { + // [START video_transcoder_quickstart] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + // const projectId = 'my-project'; + // const location = 'us-central1'; + const {TranscoderServiceClient} = require('@google-cloud/video-transcoder'); + const client = new TranscoderServiceClient(); + async function listJobs() { + const [jobs] = await client.listJobs({ + parent: client.locationPath(projectId, location), + }); + console.info('jobs:'); + for (const job of jobs) { + console.info(job); + } + } + listJobs(); + // [END video_transcoder_quickstart] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-transcoder/samples/test/quickstart.js b/packages/google-cloud-video-transcoder/samples/test/quickstart.js new file mode 100644 index 00000000000..e9a98ad11e6 --- /dev/null +++ b/packages/google-cloud-video-transcoder/samples/test/quickstart.js @@ -0,0 +1,35 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +const path = require('path'); +const assert = require('assert'); +const cp = require('child_process'); +const {describe, it} = require('mocha'); + +const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); + +const cwd = path.join(__dirname, '..'); + +const project = process.env.GCLOUD_PROJECT; + +describe('Quickstart', () => { + it('should run quickstart', async () => { + const output = execSync(`node ./quickstart.js ${project} us-west1`, { + cwd, + }); + assert(output.match(/jobs:/)); + }); +}); diff --git a/packages/google-cloud-video-transcoder/src/index.ts b/packages/google-cloud-video-transcoder/src/index.ts new file mode 100644 index 00000000000..ae255154bf4 --- /dev/null +++ b/packages/google-cloud-video-transcoder/src/index.ts @@ -0,0 +1,24 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 v1beta1 from './v1beta1'; +const TranscoderServiceClient = v1beta1.TranscoderServiceClient; +export {v1beta1, TranscoderServiceClient}; +export default {v1beta1, TranscoderServiceClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-cloud-video-transcoder/src/v1beta1/index.ts b/packages/google-cloud-video-transcoder/src/v1beta1/index.ts new file mode 100644 index 00000000000..9c59933c561 --- /dev/null +++ b/packages/google-cloud-video-transcoder/src/v1beta1/index.ts @@ -0,0 +1,19 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 {TranscoderServiceClient} from './transcoder_service_client'; diff --git a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts new file mode 100644 index 00000000000..3b797457dba --- /dev/null +++ b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts @@ -0,0 +1,1457 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 gax from 'google-gax'; +import { + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + GaxCall, +} from 'google-gax'; +import * as path from 'path'; + +import {Transform} from 'stream'; +import {RequestType} from 'google-gax/build/src/apitypes'; +import * as protos from '../../protos/protos'; +import * as gapicConfig from './transcoder_service_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * Using the Transcoder API, you can queue asynchronous jobs for transcoding + * media into various output formats. Output formats may include different + * streaming standards such as HTTP Live Streaming (HLS) and Dynamic Adaptive + * Streaming over HTTP (DASH). You can also customize jobs using advanced + * features such as Digital Rights Management (DRM), audio equalization, content + * concatenation, and digital ad-stitch ready content generation. + * @class + * @memberof v1beta1 + */ +export class TranscoderServiceClient { + private _terminated = false; + private _opts: ClientOptions; + 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: {}, + }; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + transcoderServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of TranscoderServiceClient. + * + * @param {object} [options] - The configuration object. See the subsequent + * parameters for more details. + * @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. + */ + + constructor(opts?: ClientOptions) { + // Ensure that options include the service address and port. + const staticMembers = this.constructor as typeof TranscoderServiceClient; + const servicePath = + opts && opts.servicePath + ? opts.servicePath + : opts && opts.apiEndpoint + ? opts.apiEndpoint + : staticMembers.servicePath; + const port = opts && opts.port ? opts.port : staticMembers.port; + + if (!opts) { + opts = {servicePath, port}; + } + opts.servicePath = opts.servicePath || servicePath; + opts.port = opts.port || port; + + // users can override the config from client side, like retry codes name. + // The detailed structure of the clientConfig can be found here: https://github.com/googleapis/gax-nodejs/blob/master/src/gax.ts#L546 + // The way to override client config for Showcase API: + // + // const customConfig = {"interfaces": {"google.showcase.v1beta1.Echo": {"methods": {"Echo": {"retry_codes_name": "idempotent", "retry_params_name": "default"}}}}} + // const showcaseClient = new showcaseClient({ projectId, customConfig }); + opts.clientConfig = opts.clientConfig || {}; + + // If we're running in browser, it's OK to omit `fallback` since + // google-gax has `browser` field in its `package.json`. + // For Electron (which does not respect `browser` field), + // pass `{fallback: true}` to the TranscoderServiceClient constructor. + this._gaxModule = opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options + // sent to the client. + opts.scopes = (this.constructor as typeof TranscoderServiceClient).scopes; + 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; + + // 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}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + // For Node.js, pass the path to JSON proto file. + // For browsers, pass the JSON content. + + const nodejsProtoPath = path.join( + __dirname, + '..', + '..', + 'protos', + 'protos.json' + ); + this._protos = this._gaxGrpc.loadProto( + opts.fallback + ? // eslint-disable-next-line @typescript-eslint/no-var-requires + require('../../protos/protos.json') + : nodejsProtoPath + ); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + jobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/jobs/{job}' + ), + jobTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/jobTemplates/{job_template}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + }; + + // 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 = { + listJobs: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'jobs' + ), + listJobTemplates: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'jobTemplates' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.video.transcoder.v1beta1.TranscoderService', + 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 = {}; + } + + /** + * 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.transcoderServiceStub) { + return this.transcoderServiceStub; + } + + // Put together the "service stub" for + // google.cloud.video.transcoder.v1beta1.TranscoderService. + this.transcoderServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.video.transcoder.v1beta1.TranscoderService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.video.transcoder.v1beta1 + .TranscoderService, + this._opts + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const transcoderServiceStubMethods = [ + 'createJob', + 'listJobs', + 'getJob', + 'deleteJob', + 'createJobTemplate', + 'listJobTemplates', + 'getJobTemplate', + 'deleteJobTemplate', + ]; + for (const methodName of transcoderServiceStubMethods) { + const callPromise = this.transcoderServiceStub.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.innerApiCalls[methodName] = apiCall; + } + + return this.transcoderServiceStub; + } + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'transcoder.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'transcoder.googleapis.com'; + } + + /** + * The port for this API service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + */ + 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. + * @param {function(Error, string)} callback - the callback to + * be called with the current project Id. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + createJob( + request: protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.video.transcoder.v1beta1.IJob, + ( + | protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest + | undefined + ), + {} | undefined + ] + >; + createJob( + request: protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.video.transcoder.v1beta1.IJob, + | protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createJob( + request: protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest, + callback: Callback< + protos.google.cloud.video.transcoder.v1beta1.IJob, + | protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Creates a job in the specified region. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location to create and process this job. + * Format: `projects/{project}/locations/{location}` + * @param {google.cloud.video.transcoder.v1beta1.Job} request.job + * Required. Parameters for creating transcoding job. + * @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 [Job]{@link google.cloud.video.transcoder.v1beta1.Job}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createJob( + request: protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.cloud.video.transcoder.v1beta1.IJob, + | protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.video.transcoder.v1beta1.IJob, + | protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.video.transcoder.v1beta1.IJob, + ( + | protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createJob(request, options, callback); + } + getJob( + request: protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.video.transcoder.v1beta1.IJob, + protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest | undefined, + {} | undefined + ] + >; + getJob( + request: protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.video.transcoder.v1beta1.IJob, + | protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getJob( + request: protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest, + callback: Callback< + protos.google.cloud.video.transcoder.v1beta1.IJob, + | protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Returns the job data. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the job to retrieve. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * @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 [Job]{@link google.cloud.video.transcoder.v1beta1.Job}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getJob( + request: protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.cloud.video.transcoder.v1beta1.IJob, + | protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.video.transcoder.v1beta1.IJob, + | protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.video.transcoder.v1beta1.IJob, + protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getJob(request, options, callback); + } + deleteJob( + request: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest + | undefined + ), + {} | undefined + ] + >; + deleteJob( + request: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteJob( + request: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Deletes a job. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the job to delete. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * @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}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + deleteJob( + request: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteJob(request, options, callback); + } + createJobTemplate( + request: protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.video.transcoder.v1beta1.IJobTemplate, + ( + | protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest + | undefined + ), + {} | undefined + ] + >; + createJobTemplate( + request: protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.video.transcoder.v1beta1.IJobTemplate, + | protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createJobTemplate( + request: protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest, + callback: Callback< + protos.google.cloud.video.transcoder.v1beta1.IJobTemplate, + | protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Creates a job template in the specified region. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location to create this job template. + * Format: `projects/{project}/locations/{location}` + * @param {google.cloud.video.transcoder.v1beta1.JobTemplate} request.jobTemplate + * Required. Parameters for creating job template. + * @param {string} request.jobTemplateId + * Required. The ID to use for the job template, which will become the final component + * of the job template's resource name. + * + * This value should be 4-63 characters, and valid characters must match the + * regular expression `{@link a-zA-Z0-9_-|a-zA-Z}*`. + * @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 [JobTemplate]{@link google.cloud.video.transcoder.v1beta1.JobTemplate}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createJobTemplate( + request: protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.cloud.video.transcoder.v1beta1.IJobTemplate, + | protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.video.transcoder.v1beta1.IJobTemplate, + | protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.video.transcoder.v1beta1.IJobTemplate, + ( + | protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createJobTemplate(request, options, callback); + } + getJobTemplate( + request: protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.video.transcoder.v1beta1.IJobTemplate, + ( + | protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest + | undefined + ), + {} | undefined + ] + >; + getJobTemplate( + request: protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.video.transcoder.v1beta1.IJobTemplate, + | protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getJobTemplate( + request: protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest, + callback: Callback< + protos.google.cloud.video.transcoder.v1beta1.IJobTemplate, + | protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Returns the job template data. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the job template to retrieve. + * Format: + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * @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 [JobTemplate]{@link google.cloud.video.transcoder.v1beta1.JobTemplate}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getJobTemplate( + request: protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.cloud.video.transcoder.v1beta1.IJobTemplate, + | protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.video.transcoder.v1beta1.IJobTemplate, + | protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.video.transcoder.v1beta1.IJobTemplate, + ( + | protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getJobTemplate(request, options, callback); + } + deleteJobTemplate( + request: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest + | undefined + ), + {} | undefined + ] + >; + deleteJobTemplate( + request: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteJobTemplate( + request: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Deletes a job template. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the job template to delete. + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * @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}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + deleteJobTemplate( + request: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteJobTemplate(request, options, callback); + } + + listJobs( + request: protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.video.transcoder.v1beta1.IJob[], + protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest | null, + protos.google.cloud.video.transcoder.v1beta1.IListJobsResponse + ] + >; + listJobs( + request: protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, + options: gax.CallOptions, + callback: PaginationCallback< + protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, + | protos.google.cloud.video.transcoder.v1beta1.IListJobsResponse + | null + | undefined, + protos.google.cloud.video.transcoder.v1beta1.IJob + > + ): void; + listJobs( + request: protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, + callback: PaginationCallback< + protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, + | protos.google.cloud.video.transcoder.v1beta1.IListJobsResponse + | null + | undefined, + protos.google.cloud.video.transcoder.v1beta1.IJob + > + ): void; + /** + * Lists jobs in the specified region. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Format: `projects/{project}/locations/{location}` + * @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 [Job]{@link google.cloud.video.transcoder.v1beta1.Job}. + * The client library support 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. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [Job]{@link google.cloud.video.transcoder.v1beta1.Job} that corresponds to + * the one page received from the API server. + * If the second element is not null it contains the request object of type [ListJobsRequest]{@link google.cloud.video.transcoder.v1beta1.ListJobsRequest} + * that can be used to obtain the next page of the results. + * If it is null, the next page does not exist. + * The third element contains the raw response received from the API server. Its type is + * [ListJobsResponse]{@link google.cloud.video.transcoder.v1beta1.ListJobsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listJobs( + request: protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, + optionsOrCallback?: + | gax.CallOptions + | PaginationCallback< + protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, + | protos.google.cloud.video.transcoder.v1beta1.IListJobsResponse + | null + | undefined, + protos.google.cloud.video.transcoder.v1beta1.IJob + >, + callback?: PaginationCallback< + protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, + | protos.google.cloud.video.transcoder.v1beta1.IListJobsResponse + | null + | undefined, + protos.google.cloud.video.transcoder.v1beta1.IJob + > + ): Promise< + [ + protos.google.cloud.video.transcoder.v1beta1.IJob[], + protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest | null, + protos.google.cloud.video.transcoder.v1beta1.IListJobsResponse + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listJobs(request, options, callback); + } + + /** + * Equivalent to {@link listJobs}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listJobs} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Format: `projects/{project}/locations/{location}` + * @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 [Job]{@link google.cloud.video.transcoder.v1beta1.Job} on 'data' event. + */ + listJobsStream( + request?: protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, + options?: gax.CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listJobs.createStream( + this.innerApiCalls.listJobs as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to {@link listJobs}, but returns an iterable object. + * + * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Format: `projects/{project}/locations/{location}` + * @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 conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + */ + listJobsAsync( + request?: protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, + options?: gax.CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listJobs.asyncIterate( + this.innerApiCalls['listJobs'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } + listJobTemplates( + request: protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.video.transcoder.v1beta1.IJobTemplate[], + protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest | null, + protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesResponse + ] + >; + listJobTemplates( + request: protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, + options: gax.CallOptions, + callback: PaginationCallback< + protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, + | protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesResponse + | null + | undefined, + protos.google.cloud.video.transcoder.v1beta1.IJobTemplate + > + ): void; + listJobTemplates( + request: protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, + callback: PaginationCallback< + protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, + | protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesResponse + | null + | undefined, + protos.google.cloud.video.transcoder.v1beta1.IJobTemplate + > + ): void; + /** + * Lists job templates in the specified region. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location from which to retrieve the collection of job templates. + * Format: `projects/{project}/locations/{location}` + * @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 [JobTemplate]{@link google.cloud.video.transcoder.v1beta1.JobTemplate}. + * The client library support 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. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [JobTemplate]{@link google.cloud.video.transcoder.v1beta1.JobTemplate} that corresponds to + * the one page received from the API server. + * If the second element is not null it contains the request object of type [ListJobTemplatesRequest]{@link google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest} + * that can be used to obtain the next page of the results. + * If it is null, the next page does not exist. + * The third element contains the raw response received from the API server. Its type is + * [ListJobTemplatesResponse]{@link google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listJobTemplates( + request: protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, + optionsOrCallback?: + | gax.CallOptions + | PaginationCallback< + protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, + | protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesResponse + | null + | undefined, + protos.google.cloud.video.transcoder.v1beta1.IJobTemplate + >, + callback?: PaginationCallback< + protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, + | protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesResponse + | null + | undefined, + protos.google.cloud.video.transcoder.v1beta1.IJobTemplate + > + ): Promise< + [ + protos.google.cloud.video.transcoder.v1beta1.IJobTemplate[], + protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest | null, + protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesResponse + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listJobTemplates(request, options, callback); + } + + /** + * Equivalent to {@link listJobTemplates}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listJobTemplates} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location from which to retrieve the collection of job templates. + * Format: `projects/{project}/locations/{location}` + * @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 [JobTemplate]{@link google.cloud.video.transcoder.v1beta1.JobTemplate} on 'data' event. + */ + listJobTemplatesStream( + request?: protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, + options?: gax.CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listJobTemplates.createStream( + this.innerApiCalls.listJobTemplates as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to {@link listJobTemplates}, but returns an iterable object. + * + * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location from which to retrieve the collection of job templates. + * Format: `projects/{project}/locations/{location}` + * @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 conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + */ + listJobTemplatesAsync( + request?: protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, + options?: gax.CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listJobTemplates.asyncIterate( + this.innerApiCalls['listJobTemplates'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable< + protos.google.cloud.video.transcoder.v1beta1.IJobTemplate + >; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified job resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} job + * @returns {string} Resource name string. + */ + jobPath(project: string, location: string, job: string) { + return this.pathTemplates.jobPathTemplate.render({ + project: project, + location: location, + job: job, + }); + } + + /** + * Parse the project from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the project. + */ + matchProjectFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).project; + } + + /** + * Parse the location from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the location. + */ + matchLocationFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).location; + } + + /** + * Parse the job from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the job. + */ + matchJobFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).job; + } + + /** + * Return a fully-qualified jobTemplate resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} job_template + * @returns {string} Resource name string. + */ + jobTemplatePath(project: string, location: string, jobTemplate: string) { + return this.pathTemplates.jobTemplatePathTemplate.render({ + project: project, + location: location, + job_template: jobTemplate, + }); + } + + /** + * Parse the project from JobTemplate resource. + * + * @param {string} jobTemplateName + * A fully-qualified path representing JobTemplate resource. + * @returns {string} A string representing the project. + */ + matchProjectFromJobTemplateName(jobTemplateName: string) { + return this.pathTemplates.jobTemplatePathTemplate.match(jobTemplateName) + .project; + } + + /** + * Parse the location from JobTemplate resource. + * + * @param {string} jobTemplateName + * A fully-qualified path representing JobTemplate resource. + * @returns {string} A string representing the location. + */ + matchLocationFromJobTemplateName(jobTemplateName: string) { + return this.pathTemplates.jobTemplatePathTemplate.match(jobTemplateName) + .location; + } + + /** + * Parse the job_template from JobTemplate resource. + * + * @param {string} jobTemplateName + * A fully-qualified path representing JobTemplate resource. + * @returns {string} A string representing the job_template. + */ + matchJobTemplateFromJobTemplateName(jobTemplateName: string) { + return this.pathTemplates.jobTemplatePathTemplate.match(jobTemplateName) + .job_template; + } + + /** + * 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; + } + + /** + * Terminate the GRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + */ + close(): Promise { + this.initialize(); + if (!this._terminated) { + return this.transcoderServiceStub!.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client_config.json b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client_config.json new file mode 100644 index 00000000000..5de820c1ca4 --- /dev/null +++ b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client_config.json @@ -0,0 +1,66 @@ +{ + "interfaces": { + "google.cloud.video.transcoder.v1beta1.TranscoderService": { + "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": { + "CreateJob": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListJobs": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetJob": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteJob": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateJobTemplate": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListJobTemplates": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetJobTemplate": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteJobTemplate": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_proto_list.json b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_proto_list.json new file mode 100644 index 00000000000..19545da7692 --- /dev/null +++ b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_proto_list.json @@ -0,0 +1,4 @@ +[ + "../../protos/google/cloud/video/transcoder/v1beta1/resources.proto", + "../../protos/google/cloud/video/transcoder/v1beta1/services.proto" +] diff --git a/packages/google-cloud-video-transcoder/synth.metadata b/packages/google-cloud-video-transcoder/synth.metadata new file mode 100644 index 00000000000..88242ebd746 --- /dev/null +++ b/packages/google-cloud-video-transcoder/synth.metadata @@ -0,0 +1,102 @@ +{ + "sources": [ + { + "git": { + "name": ".", + "remote": "git@github.com:googleapis/nodejs-video-transcoder.git", + "sha": "1dc9fc0190f66324421204f388e155c5f62b821d" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "00bbad4dfd6633cf4b5f9596c1f93b756bb5c776", + "internalRef": "339708980" + } + } + ], + "destinations": [ + { + "client": { + "source": "googleapis", + "apiName": "transcoder", + "apiVersion": "v1beta1", + "language": "nodejs", + "generator": "bazel" + } + } + ], + "generatedFiles": [ + ".eslintignore", + ".eslintrc.json", + ".gitattributes", + ".github/ISSUE_TEMPLATE/bug_report.md", + ".github/ISSUE_TEMPLATE/feature_request.md", + ".github/ISSUE_TEMPLATE/support_request.md", + ".github/PULL_REQUEST_TEMPLATE.md", + ".github/release-please.yml", + ".github/workflows/ci.yaml", + ".gitignore", + ".jsdoc.js", + ".kokoro/.gitattributes", + ".kokoro/common.cfg", + ".kokoro/continuous/node10/common.cfg", + ".kokoro/continuous/node10/docs.cfg", + ".kokoro/continuous/node10/test.cfg", + ".kokoro/continuous/node12/common.cfg", + ".kokoro/continuous/node12/lint.cfg", + ".kokoro/continuous/node12/samples-test.cfg", + ".kokoro/continuous/node12/system-test.cfg", + ".kokoro/continuous/node12/test.cfg", + ".kokoro/docs.sh", + ".kokoro/lint.sh", + ".kokoro/populate-secrets.sh", + ".kokoro/presubmit/node10/common.cfg", + ".kokoro/presubmit/node12/common.cfg", + ".kokoro/presubmit/node12/samples-test.cfg", + ".kokoro/presubmit/node12/system-test.cfg", + ".kokoro/presubmit/node12/test.cfg", + ".kokoro/publish.sh", + ".kokoro/release/docs-devsite.cfg", + ".kokoro/release/docs-devsite.sh", + ".kokoro/release/docs.cfg", + ".kokoro/release/docs.sh", + ".kokoro/release/publish.cfg", + ".kokoro/samples-test.sh", + ".kokoro/system-test.sh", + ".kokoro/test.bat", + ".kokoro/test.sh", + ".kokoro/trampoline.sh", + ".kokoro/trampoline_v2.sh", + ".mocharc.js", + ".nycrc", + ".prettierignore", + ".prettierrc.js", + ".trampolinerc", + "CODE_OF_CONDUCT.md", + "CONTRIBUTING.md", + "LICENSE", + "README.md", + "api-extractor.json", + "linkinator.config.json", + "protos/google/cloud/video/transcoder/v1beta1/resources.proto", + "protos/google/cloud/video/transcoder/v1beta1/services.proto", + "protos/protos.d.ts", + "protos/protos.js", + "protos/protos.json", + "renovate.json", + "samples/README.md", + "src/index.ts", + "src/v1beta1/index.ts", + "src/v1beta1/transcoder_service_client.ts", + "src/v1beta1/transcoder_service_client_config.json", + "src/v1beta1/transcoder_service_proto_list.json", + "system-test/fixtures/sample/src/index.js", + "system-test/fixtures/sample/src/index.ts", + "system-test/install.ts", + "test/gapic_transcoder_service_v1beta1.ts", + "tsconfig.json", + "webpack.config.js" + ] +} \ No newline at end of file diff --git a/packages/google-cloud-video-transcoder/synth.py b/packages/google-cloud-video-transcoder/synth.py index aea6f23fa63..16087979494 100644 --- a/packages/google-cloud-video-transcoder/synth.py +++ b/packages/google-cloud-video-transcoder/synth.py @@ -26,16 +26,16 @@ versions = ['v1beta1'] for version in versions: library = gapic.node_library( - 'policytroubleshooter', + 'transcoder', version, bazel_target=f"//google/cloud/video/transcoder/{version}:video-transcoder-{version}-nodejs" ) - s.copy(library, excludes=[]) + s.copy(library, excludes=["package.json", "README.md"]) # Copy common templates common_templates = gcp.CommonTemplates() templates = common_templates.node_library( - source_location='build/src', versions=['v1']) + source_location='build/src', versions=['v1beta1']) s.copy(templates, excludes=[]) node.postprocess_gapic_library() diff --git a/packages/google-cloud-video-transcoder/system-test/fixtures/sample/src/index.js b/packages/google-cloud-video-transcoder/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..fd6f2058c09 --- /dev/null +++ b/packages/google-cloud-video-transcoder/system-test/fixtures/sample/src/index.js @@ -0,0 +1,26 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 transcoder = require('@google-cloud/video-transcoder'); + +function main() { + const transcoderServiceClient = new transcoder.TranscoderServiceClient(); +} + +main(); diff --git a/packages/google-cloud-video-transcoder/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-video-transcoder/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..1ccbc92de1e --- /dev/null +++ b/packages/google-cloud-video-transcoder/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,25 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 {TranscoderServiceClient} from '@google-cloud/video-transcoder'; + +function main() { + new TranscoderServiceClient(); +} + +main(); diff --git a/packages/google-cloud-video-transcoder/system-test/install.ts b/packages/google-cloud-video-transcoder/system-test/install.ts new file mode 100644 index 00000000000..4c1ba3eb79a --- /dev/null +++ b/packages/google-cloud-video-transcoder/system-test/install.ts @@ -0,0 +1,51 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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('typescript consumer tests', () => { + it('should have correct type signature for typescript users', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), // path to your module. + sample: { + description: 'typescript based user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts' + ).toString(), + }, + }; + await packNTest(options); // will throw upon error. + }); + + it('should have correct type signature for javascript users', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), // path to your module. + sample: { + description: 'typescript based user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.js' + ).toString(), + }, + }; + await packNTest(options); // will throw upon error. + }); +}); diff --git a/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1beta1.ts b/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1beta1.ts new file mode 100644 index 00000000000..fa70d185b12 --- /dev/null +++ b/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1beta1.ts @@ -0,0 +1,1733 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 transcoderserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf} from 'google-gax'; + +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('v1beta1.TranscoderServiceClient', () => { + it('has servicePath', () => { + const servicePath = + transcoderserviceModule.v1beta1.TranscoderServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + transcoderserviceModule.v1beta1.TranscoderServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = transcoderserviceModule.v1beta1.TranscoderServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.transcoderServiceStub, undefined); + await client.initialize(); + assert(client.transcoderServiceStub); + }); + + it('has close method', () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient({ + 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 transcoderserviceModule.v1beta1.TranscoderServiceClient({ + 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('createJob', () => { + it('invokes createJob without error', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.CreateJobRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.Job() + ); + client.innerApiCalls.createJob = stubSimpleCall(expectedResponse); + const [response] = await client.createJob(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createJob without error using callback', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.CreateJobRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.Job() + ); + client.innerApiCalls.createJob = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createJob( + request, + ( + err?: Error | null, + result?: protos.google.cloud.video.transcoder.v1beta1.IJob | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createJob with error', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.CreateJobRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createJob = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createJob(request), expectedError); + assert( + (client.innerApiCalls.createJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getJob', () => { + it('invokes getJob without error', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.GetJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.Job() + ); + client.innerApiCalls.getJob = stubSimpleCall(expectedResponse); + const [response] = await client.getJob(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getJob without error using callback', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.GetJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.Job() + ); + client.innerApiCalls.getJob = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getJob( + request, + ( + err?: Error | null, + result?: protos.google.cloud.video.transcoder.v1beta1.IJob | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getJob with error', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.GetJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getJob = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getJob(request), expectedError); + assert( + (client.innerApiCalls.getJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('deleteJob', () => { + it('invokes deleteJob without error', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.DeleteJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteJob = stubSimpleCall(expectedResponse); + const [response] = await client.deleteJob(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteJob without error using callback', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.DeleteJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteJob = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deleteJob( + 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); + assert( + (client.innerApiCalls.deleteJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteJob with error', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.DeleteJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteJob = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteJob(request), expectedError); + assert( + (client.innerApiCalls.deleteJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createJobTemplate', () => { + it('invokes createJobTemplate without error', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() + ); + client.innerApiCalls.createJobTemplate = stubSimpleCall(expectedResponse); + const [response] = await client.createJobTemplate(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createJobTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createJobTemplate without error using callback', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() + ); + client.innerApiCalls.createJobTemplate = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createJobTemplate( + request, + ( + err?: Error | null, + result?: protos.google.cloud.video.transcoder.v1beta1.IJobTemplate | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createJobTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createJobTemplate with error', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createJobTemplate = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createJobTemplate(request), expectedError); + assert( + (client.innerApiCalls.createJobTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getJobTemplate', () => { + it('invokes getJobTemplate without error', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() + ); + client.innerApiCalls.getJobTemplate = stubSimpleCall(expectedResponse); + const [response] = await client.getJobTemplate(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getJobTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getJobTemplate without error using callback', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() + ); + client.innerApiCalls.getJobTemplate = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getJobTemplate( + request, + ( + err?: Error | null, + result?: protos.google.cloud.video.transcoder.v1beta1.IJobTemplate | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getJobTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getJobTemplate with error', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getJobTemplate = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getJobTemplate(request), expectedError); + assert( + (client.innerApiCalls.getJobTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('deleteJobTemplate', () => { + it('invokes deleteJobTemplate without error', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteJobTemplate = stubSimpleCall(expectedResponse); + const [response] = await client.deleteJobTemplate(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteJobTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteJobTemplate without error using callback', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteJobTemplate = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deleteJobTemplate( + 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); + assert( + (client.innerApiCalls.deleteJobTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteJobTemplate with error', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteJobTemplate = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteJobTemplate(request), expectedError); + assert( + (client.innerApiCalls.deleteJobTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('listJobs', () => { + it('invokes listJobs without error', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.ListJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.Job() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.Job() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.Job() + ), + ]; + client.innerApiCalls.listJobs = stubSimpleCall(expectedResponse); + const [response] = await client.listJobs(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listJobs as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listJobs without error using callback', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.ListJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.Job() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.Job() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.Job() + ), + ]; + client.innerApiCalls.listJobs = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listJobs( + request, + ( + err?: Error | null, + result?: protos.google.cloud.video.transcoder.v1beta1.IJob[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listJobs as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listJobs with error', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.ListJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listJobs = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listJobs(request), expectedError); + assert( + (client.innerApiCalls.listJobs as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listJobsStream without error', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.ListJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.Job() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.Job() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.Job() + ), + ]; + client.descriptors.page.listJobs.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listJobsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.video.transcoder.v1beta1.Job[] = []; + stream.on( + 'data', + (response: protos.google.cloud.video.transcoder.v1beta1.Job) => { + 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.listJobs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listJobs, request) + ); + assert.strictEqual( + (client.descriptors.page.listJobs.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listJobsStream with error', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.ListJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listJobs.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listJobsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.video.transcoder.v1beta1.Job[] = []; + stream.on( + 'data', + (response: protos.google.cloud.video.transcoder.v1beta1.Job) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listJobs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listJobs, request) + ); + assert.strictEqual( + (client.descriptors.page.listJobs.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listJobs without error', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.ListJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.Job() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.Job() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.Job() + ), + ]; + client.descriptors.page.listJobs.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.cloud.video.transcoder.v1beta1.IJob[] = []; + const iterable = client.listJobsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listJobs with error', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.ListJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listJobs.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listJobsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.video.transcoder.v1beta1.IJob[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listJobTemplates', () => { + it('invokes listJobTemplates without error', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() + ), + ]; + client.innerApiCalls.listJobTemplates = stubSimpleCall(expectedResponse); + const [response] = await client.listJobTemplates(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listJobTemplates as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listJobTemplates without error using callback', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() + ), + ]; + client.innerApiCalls.listJobTemplates = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listJobTemplates( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.video.transcoder.v1beta1.IJobTemplate[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listJobTemplates as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listJobTemplates with error', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listJobTemplates = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listJobTemplates(request), expectedError); + assert( + (client.innerApiCalls.listJobTemplates as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listJobTemplatesStream without error', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() + ), + ]; + client.descriptors.page.listJobTemplates.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listJobTemplatesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.video.transcoder.v1beta1.JobTemplate[] = []; + stream.on( + 'data', + ( + response: protos.google.cloud.video.transcoder.v1beta1.JobTemplate + ) => { + 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.listJobTemplates.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listJobTemplates, request) + ); + assert.strictEqual( + (client.descriptors.page.listJobTemplates + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listJobTemplatesStream with error', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listJobTemplates.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listJobTemplatesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.video.transcoder.v1beta1.JobTemplate[] = []; + stream.on( + 'data', + ( + response: protos.google.cloud.video.transcoder.v1beta1.JobTemplate + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listJobTemplates.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listJobTemplates, request) + ); + assert.strictEqual( + (client.descriptors.page.listJobTemplates + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listJobTemplates without error', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() + ), + ]; + client.descriptors.page.listJobTemplates.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.cloud.video.transcoder.v1beta1.IJobTemplate[] = []; + const iterable = client.listJobTemplatesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listJobTemplates + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listJobTemplates + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listJobTemplates with error', async () => { + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listJobTemplates.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listJobTemplatesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.video.transcoder.v1beta1.IJobTemplate[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listJobTemplates + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listJobTemplates + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('job', () => { + const fakePath = '/rendered/path/job'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + job: 'jobValue', + }; + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.jobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.jobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('jobPath', () => { + const result = client.jobPath( + 'projectValue', + 'locationValue', + 'jobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.jobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromJobName', () => { + const result = client.matchProjectFromJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromJobName', () => { + const result = client.matchLocationFromJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchJobFromJobName', () => { + const result = client.matchJobFromJobName(fakePath); + assert.strictEqual(result, 'jobValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('jobTemplate', () => { + const fakePath = '/rendered/path/jobTemplate'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + job_template: 'jobTemplateValue', + }; + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.jobTemplatePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.jobTemplatePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('jobTemplatePath', () => { + const result = client.jobTemplatePath( + 'projectValue', + 'locationValue', + 'jobTemplateValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.jobTemplatePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromJobTemplateName', () => { + const result = client.matchProjectFromJobTemplateName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.jobTemplatePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromJobTemplateName', () => { + const result = client.matchLocationFromJobTemplateName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.jobTemplatePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchJobTemplateFromJobTemplateName', () => { + const result = client.matchJobTemplateFromJobTemplateName(fakePath); + assert.strictEqual(result, 'jobTemplateValue'); + assert( + (client.pathTemplates.jobTemplatePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( + { + 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) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-video-transcoder/tsconfig.json b/packages/google-cloud-video-transcoder/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/packages/google-cloud-video-transcoder/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-transcoder/webpack.config.js b/packages/google-cloud-video-transcoder/webpack.config.js new file mode 100644 index 00000000000..f6e4c031bce --- /dev/null +++ b/packages/google-cloud-video-transcoder/webpack.config.js @@ -0,0 +1,64 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'TranscoderService', + filename: './transcoder-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', +}; From c1992e8269594649795b5d3c032ab8fb40488b6f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 29 Oct 2020 22:58:02 +0000 Subject: [PATCH 003/116] chore: release 1.0.0 (#3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit :robot: I have created a release \*beep\* \*boop\* --- ## 1.0.0 (2020-10-29) ### โš  BREAKING CHANGES * initial release of @google-cloud/video-transcoder (#1) ### Features * initial release of @google-cloud/video-transcoder ([#1](https://www.github.com/googleapis/nodejs-video-transcoder/issues/1)) ([2d70e9d](https://www.github.com/googleapis/nodejs-video-transcoder/commit/2d70e9d68f2feb41c59f55f6e736d2a9d07eee9e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- packages/google-cloud-video-transcoder/CHANGELOG.md | 12 ++++++++++++ packages/google-cloud-video-transcoder/package.json | 2 +- .../samples/package.json | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 packages/google-cloud-video-transcoder/CHANGELOG.md diff --git a/packages/google-cloud-video-transcoder/CHANGELOG.md b/packages/google-cloud-video-transcoder/CHANGELOG.md new file mode 100644 index 00000000000..72c91f90c7d --- /dev/null +++ b/packages/google-cloud-video-transcoder/CHANGELOG.md @@ -0,0 +1,12 @@ +# Changelog + +## 1.0.0 (2020-10-29) + + +### โš  BREAKING CHANGES + +* initial release of @google-cloud/video-transcoder (#1) + +### Features + +* initial release of @google-cloud/video-transcoder ([#1](https://www.github.com/googleapis/nodejs-video-transcoder/issues/1)) ([2d70e9d](https://www.github.com/googleapis/nodejs-video-transcoder/commit/2d70e9d68f2feb41c59f55f6e736d2a9d07eee9e)) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 81ef922ebe0..da5c5a30993 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/video-transcoder", - "version": "0.1.0", + "version": "1.0.0", "description": "Transcoder client for Node.js", "repository": "googleapis/nodejs-video-transcoder", "license": "Apache-2.0", diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index fa7bc5133ec..6980b46254b 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/video-transcoder": "^0.1.0" + "@google-cloud/video-transcoder": "^1.0.0" }, "devDependencies": { "c8": "^7.3.0", From efcd95496182a90d6fb76c324f19d73091500736 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 2 Nov 2020 10:47:08 -0800 Subject: [PATCH 004/116] build: stop ignoring docs now that they're generated --- .../linkinator.config.json | 6 +----- packages/google-cloud-video-transcoder/synth.metadata | 11 +++++++++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-video-transcoder/linkinator.config.json b/packages/google-cloud-video-transcoder/linkinator.config.json index 4e6801326b6..29a223b6db6 100644 --- a/packages/google-cloud-video-transcoder/linkinator.config.json +++ b/packages/google-cloud-video-transcoder/linkinator.config.json @@ -3,11 +3,7 @@ "skip": [ "https://codecov.io/gh/googleapis/", "www.googleapis.com", - "img.shields.io", - "https://googleapis.dev/nodejs/transcoder/latest", - "https://github.com/googleapis/nodejs-video-transcoder/blob/master/CHANGELOG.md", - "https://github.com/googleapis/nodejs-video-transcoder/tree/master/samples", - "https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/quickstart.js" + "img.shields.io" ], "silent": true, "concurrency": 10 diff --git a/packages/google-cloud-video-transcoder/synth.metadata b/packages/google-cloud-video-transcoder/synth.metadata index 88242ebd746..b5f8438a448 100644 --- a/packages/google-cloud-video-transcoder/synth.metadata +++ b/packages/google-cloud-video-transcoder/synth.metadata @@ -3,8 +3,8 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-video-transcoder.git", - "sha": "1dc9fc0190f66324421204f388e155c5f62b821d" + "remote": "https://github.com/googleapis/nodejs-video-transcoder.git", + "sha": "d4c1d9cc6dd46d9b235054c5a1a9ff94878cfbb7" } }, { @@ -14,6 +14,13 @@ "sha": "00bbad4dfd6633cf4b5f9596c1f93b756bb5c776", "internalRef": "339708980" } + }, + { + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "6542bd723403513626f61642fc02ddca528409aa" + } } ], "destinations": [ From eecee314fc65d46c0ddc82ffbcee4152ae1b232f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 2 Nov 2020 15:58:45 -0800 Subject: [PATCH 005/116] build(node): add KOKORO_BUILD_ARTIFACTS_SUBDIR to env (#5) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/0d0efc4e-9ccd-472b-a303-4bbf020fc2e0/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/ba9918cd22874245b55734f57470c719b577e591 --- packages/google-cloud-video-transcoder/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-video-transcoder/synth.metadata b/packages/google-cloud-video-transcoder/synth.metadata index b5f8438a448..0c0cf6c020b 100644 --- a/packages/google-cloud-video-transcoder/synth.metadata +++ b/packages/google-cloud-video-transcoder/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-video-transcoder.git", - "sha": "d4c1d9cc6dd46d9b235054c5a1a9ff94878cfbb7" + "sha": "05a6913a04e12e6a6d3bb88a633b41c09da786c7" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "6542bd723403513626f61642fc02ddca528409aa" + "sha": "ba9918cd22874245b55734f57470c719b577e591" } } ], From 22e95b855005c4d7c0200808af64d2627376afa0 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Fri, 6 Nov 2020 15:42:27 -0800 Subject: [PATCH 006/116] fix: do not modify options object, use defaultScopes (#6) Regenerated the library using [gapic-generator-typescript](https://github.com/googleapis/gapic-generator-typescript) v1.2.1. --- .../package.json | 2 +- .../src/index.ts | 1 + .../src/v1beta1/transcoder_service_client.ts | 216 ++++++++++-------- .../synth.metadata | 16 +- .../system-test/fixtures/sample/src/index.ts | 9 +- .../system-test/install.ts | 18 +- 6 files changed, 146 insertions(+), 116 deletions(-) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index da5c5a30993..ebe8b10242b 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -39,7 +39,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^2.7.0" + "google-gax": "^2.9.2" }, "devDependencies": { "@types/mocha": "^8.0.3", diff --git a/packages/google-cloud-video-transcoder/src/index.ts b/packages/google-cloud-video-transcoder/src/index.ts index ae255154bf4..bcd7386706f 100644 --- a/packages/google-cloud-video-transcoder/src/index.ts +++ b/packages/google-cloud-video-transcoder/src/index.ts @@ -18,6 +18,7 @@ import * as v1beta1 from './v1beta1'; const TranscoderServiceClient = v1beta1.TranscoderServiceClient; +type TranscoderServiceClient = v1beta1.TranscoderServiceClient; export {v1beta1, TranscoderServiceClient}; export default {v1beta1, TranscoderServiceClient}; import * as protos from '../protos/protos'; diff --git a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts index 3b797457dba..175f19a93e4 100644 --- a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts +++ b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts @@ -65,8 +65,10 @@ export class TranscoderServiceClient { /** * Construct an instance of TranscoderServiceClient. * - * @param {object} [options] - The configuration object. See the subsequent - * parameters for more details. + * @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/master/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] @@ -86,42 +88,33 @@ export class TranscoderServiceClient { * 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. + * TODO(@alexander-fenster): link to gax documentation. + * @param {boolean} fallback - Use HTTP fallback mode. + * In fallback mode, a special browser-compatible transport implementation is used + * instead of gRPC transport. In browser context (if the `window` object is defined) + * the fallback mode is enabled automatically; set `options.fallback` to `false` + * if you need to override this behavior. */ - constructor(opts?: ClientOptions) { - // Ensure that options include the service address and port. + // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof TranscoderServiceClient; const servicePath = - opts && opts.servicePath - ? opts.servicePath - : opts && opts.apiEndpoint - ? opts.apiEndpoint - : staticMembers.servicePath; - const port = opts && opts.port ? opts.port : staticMembers.port; + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? typeof window !== 'undefined'; + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - if (!opts) { - opts = {servicePath, port}; + // 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; } - opts.servicePath = opts.servicePath || servicePath; - opts.port = opts.port || port; - - // users can override the config from client side, like retry codes name. - // The detailed structure of the clientConfig can be found here: https://github.com/googleapis/gax-nodejs/blob/master/src/gax.ts#L546 - // The way to override client config for Showcase API: - // - // const customConfig = {"interfaces": {"google.showcase.v1beta1.Echo": {"methods": {"Echo": {"retry_codes_name": "idempotent", "retry_params_name": "default"}}}}} - // const showcaseClient = new showcaseClient({ projectId, customConfig }); - opts.clientConfig = opts.clientConfig || {}; - // If we're running in browser, it's OK to omit `fallback` since - // google-gax has `browser` field in its `package.json`. - // For Electron (which does not respect `browser` field), - // pass `{fallback: true}` to the TranscoderServiceClient constructor. + // Choose either gRPC or proto-over-HTTP implementation of google-gax. this._gaxModule = opts.fallback ? gax.fallback : gax; - // Create a `gaxGrpc` object, with any grpc-specific options - // sent to the client. - opts.scopes = (this.constructor as typeof TranscoderServiceClient).scopes; + // 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. @@ -130,6 +123,11 @@ export class TranscoderServiceClient { // Save the auth object to the client, for use by other methods. this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + // 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) { @@ -277,6 +275,7 @@ export class TranscoderServiceClient { /** * The DNS address for this API service. + * @returns {string} The DNS address for this service. */ static get servicePath() { return 'transcoder.googleapis.com'; @@ -285,6 +284,7 @@ export class TranscoderServiceClient { /** * 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 'transcoder.googleapis.com'; @@ -292,6 +292,7 @@ export class TranscoderServiceClient { /** * The port for this API service. + * @returns {number} The default port for this service. */ static get port() { return 443; @@ -300,6 +301,7 @@ export class TranscoderServiceClient { /** * 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']; @@ -309,8 +311,7 @@ export class TranscoderServiceClient { getProjectId(callback: Callback): void; /** * Return the project ID used by this class. - * @param {function(Error, string)} callback - the callback to - * be called with the current project Id. + * @returns {Promise} A promise that resolves to string containing the project ID. */ getProjectId( callback?: Callback @@ -373,7 +374,11 @@ export class TranscoderServiceClient { * 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 [Job]{@link google.cloud.video.transcoder.v1beta1.Job}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.createJob(request); */ createJob( request: protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest, @@ -465,7 +470,11 @@ export class TranscoderServiceClient { * 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 [Job]{@link google.cloud.video.transcoder.v1beta1.Job}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getJob(request); */ getJob( request: protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest, @@ -557,7 +566,11 @@ export class TranscoderServiceClient { * 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}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.deleteJob(request); */ deleteJob( request: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest, @@ -660,7 +673,11 @@ export class TranscoderServiceClient { * 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 [JobTemplate]{@link google.cloud.video.transcoder.v1beta1.JobTemplate}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.createJobTemplate(request); */ createJobTemplate( request: protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest, @@ -756,7 +773,11 @@ export class TranscoderServiceClient { * 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 [JobTemplate]{@link google.cloud.video.transcoder.v1beta1.JobTemplate}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getJobTemplate(request); */ getJobTemplate( request: protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest, @@ -851,7 +872,11 @@ export class TranscoderServiceClient { * 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}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.deleteJobTemplate(request); */ deleteJobTemplate( request: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest, @@ -948,19 +973,14 @@ export class TranscoderServiceClient { * 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 [Job]{@link google.cloud.video.transcoder.v1beta1.Job}. - * The client library support auto-pagination by default: it will call the API as many + * 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. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [Job]{@link google.cloud.video.transcoder.v1beta1.Job} that corresponds to - * the one page received from the API server. - * If the second element is not null it contains the request object of type [ListJobsRequest]{@link google.cloud.video.transcoder.v1beta1.ListJobsRequest} - * that can be used to obtain the next page of the results. - * If it is null, the next page does not exist. - * The third element contains the raw response received from the API server. Its type is - * [ListJobsResponse]{@link google.cloud.video.transcoder.v1beta1.ListJobsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listJobsAsync()` + * 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. */ listJobs( request: protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, @@ -1008,18 +1028,7 @@ export class TranscoderServiceClient { } /** - * Equivalent to {@link listJobs}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listJobs} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * + * 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 @@ -1033,6 +1042,13 @@ export class TranscoderServiceClient { * 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 [Job]{@link google.cloud.video.transcoder.v1beta1.Job} 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 `listJobsAsync()` + * 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. */ listJobsStream( request?: protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, @@ -1057,10 +1073,9 @@ export class TranscoderServiceClient { } /** - * Equivalent to {@link listJobs}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listJobs`, 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 @@ -1073,7 +1088,18 @@ export class TranscoderServiceClient { * @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 conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + * 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 + * [Job]{@link google.cloud.video.transcoder.v1beta1.Job}. 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 + * const iterable = client.listJobsAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listJobsAsync( request?: protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, @@ -1145,19 +1171,14 @@ export class TranscoderServiceClient { * 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 [JobTemplate]{@link google.cloud.video.transcoder.v1beta1.JobTemplate}. - * The client library support auto-pagination by default: it will call the API as many + * 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. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [JobTemplate]{@link google.cloud.video.transcoder.v1beta1.JobTemplate} that corresponds to - * the one page received from the API server. - * If the second element is not null it contains the request object of type [ListJobTemplatesRequest]{@link google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest} - * that can be used to obtain the next page of the results. - * If it is null, the next page does not exist. - * The third element contains the raw response received from the API server. Its type is - * [ListJobTemplatesResponse]{@link google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listJobTemplatesAsync()` + * 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. */ listJobTemplates( request: protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, @@ -1205,18 +1226,7 @@ export class TranscoderServiceClient { } /** - * Equivalent to {@link listJobTemplates}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listJobTemplates} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * + * 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 @@ -1231,6 +1241,13 @@ export class TranscoderServiceClient { * 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 [JobTemplate]{@link google.cloud.video.transcoder.v1beta1.JobTemplate} 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 `listJobTemplatesAsync()` + * 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. */ listJobTemplatesStream( request?: protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, @@ -1255,10 +1272,9 @@ export class TranscoderServiceClient { } /** - * Equivalent to {@link listJobTemplates}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listJobTemplates`, 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 @@ -1272,7 +1288,18 @@ export class TranscoderServiceClient { * @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 conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + * 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 + * [JobTemplate]{@link google.cloud.video.transcoder.v1beta1.JobTemplate}. 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 + * const iterable = client.listJobTemplatesAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listJobTemplatesAsync( request?: protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, @@ -1440,9 +1467,10 @@ export class TranscoderServiceClient { } /** - * Terminate the GRPC channel and close the client. + * 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 { this.initialize(); diff --git a/packages/google-cloud-video-transcoder/synth.metadata b/packages/google-cloud-video-transcoder/synth.metadata index 0c0cf6c020b..73adb909cd5 100644 --- a/packages/google-cloud-video-transcoder/synth.metadata +++ b/packages/google-cloud-video-transcoder/synth.metadata @@ -3,23 +3,15 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/nodejs-video-transcoder.git", - "sha": "05a6913a04e12e6a6d3bb88a633b41c09da786c7" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "00bbad4dfd6633cf4b5f9596c1f93b756bb5c776", - "internalRef": "339708980" + "remote": "git@github.com:googleapis/nodejs-video-transcoder.git", + "sha": "ceb82ad669a4ac0dfabbf0bbbaff847c31ad4029" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "ba9918cd22874245b55734f57470c719b577e591" + "sha": "1f1148d3c7a7a52f0c98077f976bd9b3c948ee2b" } } ], @@ -87,6 +79,7 @@ "README.md", "api-extractor.json", "linkinator.config.json", + "package-lock.json.3601604791", "protos/google/cloud/video/transcoder/v1beta1/resources.proto", "protos/google/cloud/video/transcoder/v1beta1/services.proto", "protos/protos.d.ts", @@ -94,6 +87,7 @@ "protos/protos.json", "renovate.json", "samples/README.md", + "samples/package-lock.json.2940811242", "src/index.ts", "src/v1beta1/index.ts", "src/v1beta1/transcoder_service_client.ts", diff --git a/packages/google-cloud-video-transcoder/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-video-transcoder/system-test/fixtures/sample/src/index.ts index 1ccbc92de1e..f5f7f88db0c 100644 --- a/packages/google-cloud-video-transcoder/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-video-transcoder/system-test/fixtures/sample/src/index.ts @@ -18,8 +18,15 @@ import {TranscoderServiceClient} from '@google-cloud/video-transcoder'; +// check that the client class type name can be used +function doStuffWithTranscoderServiceClient(client: TranscoderServiceClient) { + client.close(); +} + function main() { - new TranscoderServiceClient(); + // check that the client instance can be created + const transcoderServiceClient = new TranscoderServiceClient(); + doStuffWithTranscoderServiceClient(transcoderServiceClient); } main(); diff --git a/packages/google-cloud-video-transcoder/system-test/install.ts b/packages/google-cloud-video-transcoder/system-test/install.ts index 4c1ba3eb79a..39d90f771de 100644 --- a/packages/google-cloud-video-transcoder/system-test/install.ts +++ b/packages/google-cloud-video-transcoder/system-test/install.ts @@ -20,32 +20,32 @@ import {packNTest} from 'pack-n-play'; import {readFileSync} from 'fs'; import {describe, it} from 'mocha'; -describe('typescript consumer tests', () => { - it('should have correct type signature for typescript users', async function () { +describe('๐Ÿ“ฆ pack-n-play test', () => { + it('TypeScript code', async function () { this.timeout(300000); const options = { - packageDir: process.cwd(), // path to your module. + packageDir: process.cwd(), sample: { - description: 'typescript based user can use the type definitions', + description: 'TypeScript user can use the type definitions', ts: readFileSync( './system-test/fixtures/sample/src/index.ts' ).toString(), }, }; - await packNTest(options); // will throw upon error. + await packNTest(options); }); - it('should have correct type signature for javascript users', async function () { + it('JavaScript code', async function () { this.timeout(300000); const options = { - packageDir: process.cwd(), // path to your module. + packageDir: process.cwd(), sample: { - description: 'typescript based user can use the type definitions', + description: 'JavaScript user can use the library', ts: readFileSync( './system-test/fixtures/sample/src/index.js' ).toString(), }, }; - await packNTest(options); // will throw upon error. + await packNTest(options); }); }); From ac12fe4e13137ef446e8412ebbeb9ea1e492ca56 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 11 Nov 2020 12:55:59 -0800 Subject: [PATCH 007/116] chore: release 1.0.1 (#7) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-video-transcoder/CHANGELOG.md | 7 +++++++ packages/google-cloud-video-transcoder/package.json | 2 +- .../google-cloud-video-transcoder/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-video-transcoder/CHANGELOG.md b/packages/google-cloud-video-transcoder/CHANGELOG.md index 72c91f90c7d..6316fb42768 100644 --- a/packages/google-cloud-video-transcoder/CHANGELOG.md +++ b/packages/google-cloud-video-transcoder/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.0.1](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.0.0...v1.0.1) (2020-11-06) + + +### Bug Fixes + +* do not modify options object, use defaultScopes ([#6](https://www.github.com/googleapis/nodejs-video-transcoder/issues/6)) ([256e65b](https://www.github.com/googleapis/nodejs-video-transcoder/commit/256e65b78b11257ffd499f8cac1d01701419162d)) + ## 1.0.0 (2020-10-29) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index ebe8b10242b..4ba2cc67b3e 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/video-transcoder", - "version": "1.0.0", + "version": "1.0.1", "description": "Transcoder client for Node.js", "repository": "googleapis/nodejs-video-transcoder", "license": "Apache-2.0", diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index 6980b46254b..e009fd8929b 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/video-transcoder": "^1.0.0" + "@google-cloud/video-transcoder": "^1.0.1" }, "devDependencies": { "c8": "^7.3.0", From 8e4f489302d6eaf9cc67ab0a5c8630a9f364b4a5 Mon Sep 17 00:00:00 2001 From: Nicholas Cook Date: Wed, 18 Nov 2020 11:19:40 -0800 Subject: [PATCH 008/116] feat(samples): add Transcoder samples (#8) Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- packages/google-cloud-video-transcoder/package.json | 2 +- .../google-cloud-video-transcoder/samples/package.json | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 4ba2cc67b3e..9c499b1a157 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -51,7 +51,7 @@ "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.4", "linkinator": "^2.1.2", - "mocha": "^8.1.2", + "mocha": "^8.2.1", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "sinon": "^9.0.3", diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index e009fd8929b..d4d05f48bb1 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -7,7 +7,8 @@ "node": ">=10" }, "files": [ - "*.js" + "*.js", + "!test" ], "scripts": { "test": "c8 mocha --timeout 600000 test/*.js" @@ -16,7 +17,9 @@ "@google-cloud/video-transcoder": "^1.0.1" }, "devDependencies": { + "@google-cloud/storage": "^5.4.0", "c8": "^7.3.0", - "mocha": "^8.1.1" + "mocha": "^8.1.1", + "uuid": "^8.0.0" } } From 0ef3126dab9616cdb90a2462813a3a210c83adc8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 24 Nov 2020 07:01:31 +0100 Subject: [PATCH 009/116] chore(deps): update dependency gts to v3 (#11) --- packages/google-cloud-video-transcoder/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 9c499b1a157..7e0498bbf3a 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -46,7 +46,7 @@ "@types/node": "^14.6.1", "@types/sinon": "^9.0.5", "c8": "^7.3.0", - "gts": "^2.0.2", + "gts": "^3.0.0", "jsdoc": "^3.6.5", "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.4", From fc46f855013b4dab9457f0239ea77dd636536abd Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 24 Nov 2020 07:01:05 -0800 Subject: [PATCH 010/116] docs: add samples to README --- .../google-cloud-video-transcoder/README.md | 11 + .../protos/protos.json | 98 ++++++++- .../samples/README.md | 198 ++++++++++++++++++ .../src/v1beta1/transcoder_service_client.ts | 108 +++++----- .../synth.metadata | 86 +------- 5 files changed, 366 insertions(+), 135 deletions(-) diff --git a/packages/google-cloud-video-transcoder/README.md b/packages/google-cloud-video-transcoder/README.md index 5483e868abe..ac70da47480 100644 --- a/packages/google-cloud-video-transcoder/README.md +++ b/packages/google-cloud-video-transcoder/README.md @@ -87,6 +87,17 @@ has instructions for running the samples. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | +| Create Job From Ad Hoc | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobFromAdHoc.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobFromAdHoc.js,samples/README.md) | +| Create Job From Preset | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobFromPreset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobFromPreset.js,samples/README.md) | +| Create Job From Template | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobFromTemplate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobFromTemplate.js,samples/README.md) | +| Create Job Template | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobTemplate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobTemplate.js,samples/README.md) | +| Delete Job | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/deleteJob.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/deleteJob.js,samples/README.md) | +| Delete Job Template | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/deleteJobTemplate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/deleteJobTemplate.js,samples/README.md) | +| Get Job | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/getJob.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/getJob.js,samples/README.md) | +| Get Job State | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/getJobState.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/getJobState.js,samples/README.md) | +| Get Job Template | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/getJobTemplate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/getJobTemplate.js,samples/README.md) | +| List Job Templates | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/listJobTemplates.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/listJobTemplates.js,samples/README.md) | +| List Jobs | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/listJobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/listJobs.js,samples/README.md) | | Quickstart | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | diff --git a/packages/google-cloud-video-transcoder/protos/protos.json b/packages/google-cloud-video-transcoder/protos/protos.json index f3a227d200f..33108b8e4d4 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.json +++ b/packages/google-cloud-video-transcoder/protos/protos.json @@ -1014,7 +1014,18 @@ "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/jobs", "(google.api.http).body": "job", "(google.api.method_signature)": "parent,job" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*/locations/*}/jobs", + "body": "job" + } + }, + { + "(google.api.method_signature)": "parent,job" + } + ] }, "ListJobs": { "requestType": "ListJobsRequest", @@ -1022,7 +1033,17 @@ "options": { "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/jobs", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*}/jobs" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "GetJob": { "requestType": "GetJobRequest", @@ -1030,7 +1051,17 @@ "options": { "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/jobs/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/jobs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "DeleteJob": { "requestType": "DeleteJobRequest", @@ -1038,7 +1069,17 @@ "options": { "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/jobs/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta1/{name=projects/*/locations/*/jobs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CreateJobTemplate": { "requestType": "CreateJobTemplateRequest", @@ -1047,7 +1088,18 @@ "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/jobTemplates", "(google.api.http).body": "job_template", "(google.api.method_signature)": "parent,job_template,job_template_id" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*/locations/*}/jobTemplates", + "body": "job_template" + } + }, + { + "(google.api.method_signature)": "parent,job_template,job_template_id" + } + ] }, "ListJobTemplates": { "requestType": "ListJobTemplatesRequest", @@ -1055,7 +1107,17 @@ "options": { "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/jobTemplates", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*}/jobTemplates" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "GetJobTemplate": { "requestType": "GetJobTemplateRequest", @@ -1063,7 +1125,17 @@ "options": { "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/jobTemplates/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/jobTemplates/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "DeleteJobTemplate": { "requestType": "DeleteJobTemplateRequest", @@ -1071,7 +1143,17 @@ "options": { "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/jobTemplates/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta1/{name=projects/*/locations/*/jobTemplates/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] } } }, diff --git a/packages/google-cloud-video-transcoder/samples/README.md b/packages/google-cloud-video-transcoder/samples/README.md index faa2ae89d85..9174d4d12d1 100644 --- a/packages/google-cloud-video-transcoder/samples/README.md +++ b/packages/google-cloud-video-transcoder/samples/README.md @@ -12,6 +12,17 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) + * [Create Job From Ad Hoc](#create-job-from-ad-hoc) + * [Create Job From Preset](#create-job-from-preset) + * [Create Job From Template](#create-job-from-template) + * [Create Job Template](#create-job-template) + * [Delete Job](#delete-job) + * [Delete Job Template](#delete-job-template) + * [Get Job](#get-job) + * [Get Job State](#get-job-state) + * [Get Job Template](#get-job-template) + * [List Job Templates](#list-job-templates) + * [List Jobs](#list-jobs) * [Quickstart](#quickstart) ## Before you begin @@ -29,6 +40,193 @@ Before running the samples, make sure you've followed the steps outlined in +### Create Job From Ad Hoc + +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobFromAdHoc.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobFromAdHoc.js,samples/README.md) + +__Usage:__ + + +`node samples/createJobFromAdHoc.js` + + +----- + + + + +### Create Job From Preset + +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobFromPreset.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobFromPreset.js,samples/README.md) + +__Usage:__ + + +`node samples/createJobFromPreset.js` + + +----- + + + + +### Create Job From Template + +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobFromTemplate.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobFromTemplate.js,samples/README.md) + +__Usage:__ + + +`node samples/createJobFromTemplate.js` + + +----- + + + + +### Create Job Template + +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobTemplate.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobTemplate.js,samples/README.md) + +__Usage:__ + + +`node samples/createJobTemplate.js` + + +----- + + + + +### Delete Job + +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/deleteJob.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/deleteJob.js,samples/README.md) + +__Usage:__ + + +`node samples/deleteJob.js` + + +----- + + + + +### Delete Job Template + +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/deleteJobTemplate.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/deleteJobTemplate.js,samples/README.md) + +__Usage:__ + + +`node samples/deleteJobTemplate.js` + + +----- + + + + +### Get Job + +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/getJob.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/getJob.js,samples/README.md) + +__Usage:__ + + +`node samples/getJob.js` + + +----- + + + + +### Get Job State + +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/getJobState.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/getJobState.js,samples/README.md) + +__Usage:__ + + +`node samples/getJobState.js` + + +----- + + + + +### Get Job Template + +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/getJobTemplate.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/getJobTemplate.js,samples/README.md) + +__Usage:__ + + +`node samples/getJobTemplate.js` + + +----- + + + + +### List Job Templates + +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/listJobTemplates.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/listJobTemplates.js,samples/README.md) + +__Usage:__ + + +`node samples/listJobTemplates.js` + + +----- + + + + +### List Jobs + +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/listJobs.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/listJobs.js,samples/README.md) + +__Usage:__ + + +`node samples/listJobs.js` + + +----- + + + + ### Quickstart View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/quickstart.js). diff --git a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts index 175f19a93e4..84639509af2 100644 --- a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts +++ b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts @@ -16,6 +16,7 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** +/* global window */ import * as gax from 'google-gax'; import { Callback, @@ -30,6 +31,11 @@ import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; +/** + * Client JSON configuration object, loaded from + * `src/v1beta1/transcoder_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './transcoder_service_client_config.json'; const version = require('../../../package.json').version; @@ -88,9 +94,9 @@ export class TranscoderServiceClient { * 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. - * TODO(@alexander-fenster): link to gax documentation. - * @param {boolean} fallback - Use HTTP fallback mode. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. * In fallback mode, a special browser-compatible transport implementation is used * instead of gRPC transport. In browser context (if the `window` object is defined) * the fallback mode is enabled automatically; set `options.fallback` to `false` @@ -103,7 +109,9 @@ export class TranscoderServiceClient { opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? typeof window !== 'undefined'; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. @@ -328,7 +336,7 @@ export class TranscoderServiceClient { // ------------------- createJob( request: protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.video.transcoder.v1beta1.IJob, @@ -341,7 +349,7 @@ export class TranscoderServiceClient { >; createJob( request: protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.video.transcoder.v1beta1.IJob, | protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest @@ -383,7 +391,7 @@ export class TranscoderServiceClient { createJob( request: protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.video.transcoder.v1beta1.IJob, | protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest @@ -409,12 +417,12 @@ export class TranscoderServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -429,7 +437,7 @@ export class TranscoderServiceClient { } getJob( request: protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.video.transcoder.v1beta1.IJob, @@ -439,7 +447,7 @@ export class TranscoderServiceClient { >; getJob( request: protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.video.transcoder.v1beta1.IJob, | protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest @@ -479,7 +487,7 @@ export class TranscoderServiceClient { getJob( request: protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.video.transcoder.v1beta1.IJob, | protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest @@ -502,12 +510,12 @@ export class TranscoderServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -522,7 +530,7 @@ export class TranscoderServiceClient { } deleteJob( request: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -535,7 +543,7 @@ export class TranscoderServiceClient { >; deleteJob( request: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, | protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest @@ -575,7 +583,7 @@ export class TranscoderServiceClient { deleteJob( request: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, | protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest @@ -601,12 +609,12 @@ export class TranscoderServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -621,7 +629,7 @@ export class TranscoderServiceClient { } createJobTemplate( request: protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.video.transcoder.v1beta1.IJobTemplate, @@ -634,7 +642,7 @@ export class TranscoderServiceClient { >; createJobTemplate( request: protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.video.transcoder.v1beta1.IJobTemplate, | protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest @@ -682,7 +690,7 @@ export class TranscoderServiceClient { createJobTemplate( request: protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.video.transcoder.v1beta1.IJobTemplate, | protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest @@ -708,12 +716,12 @@ export class TranscoderServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -728,7 +736,7 @@ export class TranscoderServiceClient { } getJobTemplate( request: protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.video.transcoder.v1beta1.IJobTemplate, @@ -741,7 +749,7 @@ export class TranscoderServiceClient { >; getJobTemplate( request: protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.video.transcoder.v1beta1.IJobTemplate, | protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest @@ -782,7 +790,7 @@ export class TranscoderServiceClient { getJobTemplate( request: protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.video.transcoder.v1beta1.IJobTemplate, | protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest @@ -808,12 +816,12 @@ export class TranscoderServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -828,7 +836,7 @@ export class TranscoderServiceClient { } deleteJobTemplate( request: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -841,7 +849,7 @@ export class TranscoderServiceClient { >; deleteJobTemplate( request: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, | protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest @@ -881,7 +889,7 @@ export class TranscoderServiceClient { deleteJobTemplate( request: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, | protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest @@ -907,12 +915,12 @@ export class TranscoderServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -928,7 +936,7 @@ export class TranscoderServiceClient { listJobs( request: protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.video.transcoder.v1beta1.IJob[], @@ -938,7 +946,7 @@ export class TranscoderServiceClient { >; listJobs( request: protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, | protos.google.cloud.video.transcoder.v1beta1.IListJobsResponse @@ -985,7 +993,7 @@ export class TranscoderServiceClient { listJobs( request: protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, | protos.google.cloud.video.transcoder.v1beta1.IListJobsResponse @@ -1008,12 +1016,12 @@ export class TranscoderServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1052,7 +1060,7 @@ export class TranscoderServiceClient { */ listJobsStream( request?: protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1103,7 +1111,7 @@ export class TranscoderServiceClient { */ listJobsAsync( request?: protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; @@ -1125,7 +1133,7 @@ export class TranscoderServiceClient { } listJobTemplates( request: protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.video.transcoder.v1beta1.IJobTemplate[], @@ -1135,7 +1143,7 @@ export class TranscoderServiceClient { >; listJobTemplates( request: protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, | protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesResponse @@ -1183,7 +1191,7 @@ export class TranscoderServiceClient { listJobTemplates( request: protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, | protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesResponse @@ -1206,12 +1214,12 @@ export class TranscoderServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1251,7 +1259,7 @@ export class TranscoderServiceClient { */ listJobTemplatesStream( request?: protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1303,7 +1311,7 @@ export class TranscoderServiceClient { */ listJobTemplatesAsync( request?: protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; @@ -1321,9 +1329,7 @@ export class TranscoderServiceClient { this.innerApiCalls['listJobTemplates'] as GaxCall, (request as unknown) as RequestType, callSettings - ) as AsyncIterable< - protos.google.cloud.video.transcoder.v1beta1.IJobTemplate - >; + ) as AsyncIterable; } // -------------------- // -- Path templates -- diff --git a/packages/google-cloud-video-transcoder/synth.metadata b/packages/google-cloud-video-transcoder/synth.metadata index 73adb909cd5..b1dc9a09ab5 100644 --- a/packages/google-cloud-video-transcoder/synth.metadata +++ b/packages/google-cloud-video-transcoder/synth.metadata @@ -3,8 +3,16 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-video-transcoder.git", - "sha": "ceb82ad669a4ac0dfabbf0bbbaff847c31ad4029" + "remote": "https://github.com/googleapis/nodejs-video-transcoder.git", + "sha": "42fc504a457feb90aa69f89a853ba5518db7eeae" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "37ba54d7ed4da3052ceff96292631c3b6aae0e63", + "internalRef": "343563501" } }, { @@ -25,79 +33,5 @@ "generator": "bazel" } } - ], - "generatedFiles": [ - ".eslintignore", - ".eslintrc.json", - ".gitattributes", - ".github/ISSUE_TEMPLATE/bug_report.md", - ".github/ISSUE_TEMPLATE/feature_request.md", - ".github/ISSUE_TEMPLATE/support_request.md", - ".github/PULL_REQUEST_TEMPLATE.md", - ".github/release-please.yml", - ".github/workflows/ci.yaml", - ".gitignore", - ".jsdoc.js", - ".kokoro/.gitattributes", - ".kokoro/common.cfg", - ".kokoro/continuous/node10/common.cfg", - ".kokoro/continuous/node10/docs.cfg", - ".kokoro/continuous/node10/test.cfg", - ".kokoro/continuous/node12/common.cfg", - ".kokoro/continuous/node12/lint.cfg", - ".kokoro/continuous/node12/samples-test.cfg", - ".kokoro/continuous/node12/system-test.cfg", - ".kokoro/continuous/node12/test.cfg", - ".kokoro/docs.sh", - ".kokoro/lint.sh", - ".kokoro/populate-secrets.sh", - ".kokoro/presubmit/node10/common.cfg", - ".kokoro/presubmit/node12/common.cfg", - ".kokoro/presubmit/node12/samples-test.cfg", - ".kokoro/presubmit/node12/system-test.cfg", - ".kokoro/presubmit/node12/test.cfg", - ".kokoro/publish.sh", - ".kokoro/release/docs-devsite.cfg", - ".kokoro/release/docs-devsite.sh", - ".kokoro/release/docs.cfg", - ".kokoro/release/docs.sh", - ".kokoro/release/publish.cfg", - ".kokoro/samples-test.sh", - ".kokoro/system-test.sh", - ".kokoro/test.bat", - ".kokoro/test.sh", - ".kokoro/trampoline.sh", - ".kokoro/trampoline_v2.sh", - ".mocharc.js", - ".nycrc", - ".prettierignore", - ".prettierrc.js", - ".trampolinerc", - "CODE_OF_CONDUCT.md", - "CONTRIBUTING.md", - "LICENSE", - "README.md", - "api-extractor.json", - "linkinator.config.json", - "package-lock.json.3601604791", - "protos/google/cloud/video/transcoder/v1beta1/resources.proto", - "protos/google/cloud/video/transcoder/v1beta1/services.proto", - "protos/protos.d.ts", - "protos/protos.js", - "protos/protos.json", - "renovate.json", - "samples/README.md", - "samples/package-lock.json.2940811242", - "src/index.ts", - "src/v1beta1/index.ts", - "src/v1beta1/transcoder_service_client.ts", - "src/v1beta1/transcoder_service_client_config.json", - "src/v1beta1/transcoder_service_proto_list.json", - "system-test/fixtures/sample/src/index.js", - "system-test/fixtures/sample/src/index.ts", - "system-test/install.ts", - "test/gapic_transcoder_service_v1beta1.ts", - "tsconfig.json", - "webpack.config.js" ] } \ No newline at end of file From ce4ebf707662402a1e7e45203e8ed65abf853ce2 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 24 Nov 2020 16:15:31 +0100 Subject: [PATCH 011/116] chore(deps): update dependency webpack to v5 (#12) --- packages/google-cloud-video-transcoder/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 7e0498bbf3a..6162fa6a1d6 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -57,7 +57,6 @@ "sinon": "^9.0.3", "ts-loader": "^8.0.3", "typescript": "^3.9.7", - "webpack": "^4.44.1", "webpack-cli": "^3.3.12" }, "engines": { From 02bf7deacf6332c253d56295f70d49f43e774301 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 25 Nov 2020 08:36:22 -0800 Subject: [PATCH 012/116] docs: spelling correction for "targetting" (#16) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/f9f34ae0-d83d-4c7a-a197-54a0a7255ebc/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/15013eff642a7e7e855aed5a29e6e83c39beba2a --- packages/google-cloud-video-transcoder/README.md | 2 +- packages/google-cloud-video-transcoder/synth.metadata | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-video-transcoder/README.md b/packages/google-cloud-video-transcoder/README.md index ac70da47480..99506dd30a6 100644 --- a/packages/google-cloud-video-transcoder/README.md +++ b/packages/google-cloud-video-transcoder/README.md @@ -111,7 +111,7 @@ Our client libraries follow the [Node.js release schedule](https://nodejs.org/en Libraries are compatible with all current _active_ and _maintenance_ versions of Node.js. -Client libraries targetting some end-of-life versions of Node.js are available, and +Client libraries targeting some end-of-life versions of Node.js are available, and can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). The dist-tags follow the naming convention `legacy-(version)`. diff --git a/packages/google-cloud-video-transcoder/synth.metadata b/packages/google-cloud-video-transcoder/synth.metadata index b1dc9a09ab5..c3cb1279e51 100644 --- a/packages/google-cloud-video-transcoder/synth.metadata +++ b/packages/google-cloud-video-transcoder/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-video-transcoder.git", - "sha": "42fc504a457feb90aa69f89a853ba5518db7eeae" + "sha": "a568a4726cc5674d7e442abeab72783402f1b338" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "1f1148d3c7a7a52f0c98077f976bd9b3c948ee2b" + "sha": "15013eff642a7e7e855aed5a29e6e83c39beba2a" } } ], From df44ef0314ec182984d618bc596cb12796abca93 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 30 Nov 2020 19:12:26 +0100 Subject: [PATCH 013/116] chore: drop unused webpack dep (#13) --- packages/google-cloud-video-transcoder/package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 6162fa6a1d6..6d909c85ff3 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -56,8 +56,7 @@ "pack-n-play": "^1.0.0-2", "sinon": "^9.0.3", "ts-loader": "^8.0.3", - "typescript": "^3.9.7", - "webpack-cli": "^3.3.12" + "typescript": "^3.9.7" }, "engines": { "node": ">=10.0.0" From 97a9a4e09dcc56fd5efd5f6f0abfd9400bf0111c Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 2 Dec 2020 19:42:23 +0000 Subject: [PATCH 014/116] chore: release 1.1.0 (#10) :robot: I have created a release \*beep\* \*boop\* --- ## [1.1.0](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.0.1...v1.1.0) (2020-11-30) ### Features * **samples:** add Transcoder samples ([#8](https://www.github.com/googleapis/nodejs-video-transcoder/issues/8)) ([7bf59c3](https://www.github.com/googleapis/nodejs-video-transcoder/commit/7bf59c3c9defa1675d07083578b3d3acc9f3fca8)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- packages/google-cloud-video-transcoder/CHANGELOG.md | 7 +++++++ packages/google-cloud-video-transcoder/package.json | 2 +- .../google-cloud-video-transcoder/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-video-transcoder/CHANGELOG.md b/packages/google-cloud-video-transcoder/CHANGELOG.md index 6316fb42768..4bd07288871 100644 --- a/packages/google-cloud-video-transcoder/CHANGELOG.md +++ b/packages/google-cloud-video-transcoder/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.1.0](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.0.1...v1.1.0) (2020-11-30) + + +### Features + +* **samples:** add Transcoder samples ([#8](https://www.github.com/googleapis/nodejs-video-transcoder/issues/8)) ([7bf59c3](https://www.github.com/googleapis/nodejs-video-transcoder/commit/7bf59c3c9defa1675d07083578b3d3acc9f3fca8)) + ### [1.0.1](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.0.0...v1.0.1) (2020-11-06) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 6d909c85ff3..d3c58d5cd1a 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/video-transcoder", - "version": "1.0.1", + "version": "1.1.0", "description": "Transcoder client for Node.js", "repository": "googleapis/nodejs-video-transcoder", "license": "Apache-2.0", diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index d4d05f48bb1..3737b161397 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/video-transcoder": "^1.0.1" + "@google-cloud/video-transcoder": "^1.1.0" }, "devDependencies": { "@google-cloud/storage": "^5.4.0", From 17283e629aa3f490c4652c37ad30b4bfa377bdc8 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 4 Dec 2020 08:58:25 -0800 Subject: [PATCH 015/116] chore: generate GAPIC metadata JSON file (#17) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/9777e4fc-493b-4824-939e-2bf12cea9581/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 345596855 Source-Link: https://github.com/googleapis/googleapis/commit/d189e871205fea665a9648f7c4676f027495ccaf --- .../src/v1beta1/gapic_metadata.json | 111 ++++++++++++++++++ .../synth.metadata | 6 +- 2 files changed, 114 insertions(+), 3 deletions(-) create mode 100644 packages/google-cloud-video-transcoder/src/v1beta1/gapic_metadata.json diff --git a/packages/google-cloud-video-transcoder/src/v1beta1/gapic_metadata.json b/packages/google-cloud-video-transcoder/src/v1beta1/gapic_metadata.json new file mode 100644 index 00000000000..33e2cddaea4 --- /dev/null +++ b/packages/google-cloud-video-transcoder/src/v1beta1/gapic_metadata.json @@ -0,0 +1,111 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.video.transcoder.v1beta1", + "libraryPackage": "@google-cloud/video-transcoder", + "services": { + "TranscoderService": { + "clients": { + "grpc": { + "libraryClient": "TranscoderServiceClient", + "rpcs": { + "CreateJob": { + "methods": [ + "createJob" + ] + }, + "GetJob": { + "methods": [ + "getJob" + ] + }, + "DeleteJob": { + "methods": [ + "deleteJob" + ] + }, + "CreateJobTemplate": { + "methods": [ + "createJobTemplate" + ] + }, + "GetJobTemplate": { + "methods": [ + "getJobTemplate" + ] + }, + "DeleteJobTemplate": { + "methods": [ + "deleteJobTemplate" + ] + }, + "ListJobs": { + "methods": [ + "listJobs", + "listJobsStream", + "listJobsAsync" + ] + }, + "ListJobTemplates": { + "methods": [ + "listJobTemplates", + "listJobTemplatesStream", + "listJobTemplatesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "TranscoderServiceClient", + "rpcs": { + "CreateJob": { + "methods": [ + "createJob" + ] + }, + "GetJob": { + "methods": [ + "getJob" + ] + }, + "DeleteJob": { + "methods": [ + "deleteJob" + ] + }, + "CreateJobTemplate": { + "methods": [ + "createJobTemplate" + ] + }, + "GetJobTemplate": { + "methods": [ + "getJobTemplate" + ] + }, + "DeleteJobTemplate": { + "methods": [ + "deleteJobTemplate" + ] + }, + "ListJobs": { + "methods": [ + "listJobs", + "listJobsStream", + "listJobsAsync" + ] + }, + "ListJobTemplates": { + "methods": [ + "listJobTemplates", + "listJobTemplatesStream", + "listJobTemplatesAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-video-transcoder/synth.metadata b/packages/google-cloud-video-transcoder/synth.metadata index c3cb1279e51..d8c77f25dce 100644 --- a/packages/google-cloud-video-transcoder/synth.metadata +++ b/packages/google-cloud-video-transcoder/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-video-transcoder.git", - "sha": "a568a4726cc5674d7e442abeab72783402f1b338" + "sha": "96a64935a99bc00e2f850791487e4a6e5060741a" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "37ba54d7ed4da3052ceff96292631c3b6aae0e63", - "internalRef": "343563501" + "sha": "d189e871205fea665a9648f7c4676f027495ccaf", + "internalRef": "345596855" } }, { From 64086b355441899c157719f2bd37861e7ed68e55 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 22 Dec 2020 11:46:19 -0800 Subject: [PATCH 016/116] docs: add instructions for authenticating for system tests (#19) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/959b7829-922a-41dc-a5a7-1178c3a8f0e7/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/363fe305e9ce34a6cd53951c6ee5f997094b54ee --- .../google-cloud-video-transcoder/CONTRIBUTING.md | 15 +++++++++++++-- packages/google-cloud-video-transcoder/README.md | 3 +-- .../google-cloud-video-transcoder/synth.metadata | 4 ++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-video-transcoder/CONTRIBUTING.md b/packages/google-cloud-video-transcoder/CONTRIBUTING.md index f6c4cf010e3..9f2dd0bbaa9 100644 --- a/packages/google-cloud-video-transcoder/CONTRIBUTING.md +++ b/packages/google-cloud-video-transcoder/CONTRIBUTING.md @@ -37,6 +37,15 @@ accept your pull requests. 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 Transcoder 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]. @@ -51,11 +60,9 @@ accept your pull requests. npm test # Run sample integration tests. - gcloud auth application-default login npm run samples-test # Run all system tests. - gcloud auth application-default login npm run system-test 1. Lint (and maybe fix) any changes: @@ -63,3 +70,7 @@ accept your pull requests. 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=transcoder.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-video-transcoder/README.md b/packages/google-cloud-video-transcoder/README.md index 99506dd30a6..c13a031b58b 100644 --- a/packages/google-cloud-video-transcoder/README.md +++ b/packages/google-cloud-video-transcoder/README.md @@ -82,8 +82,7 @@ listJobs(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-video-transcoder/tree/master/samples) directory. The samples' `README.md` -has instructions for running the samples. +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-video-transcoder/tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | diff --git a/packages/google-cloud-video-transcoder/synth.metadata b/packages/google-cloud-video-transcoder/synth.metadata index d8c77f25dce..20fc63f4c48 100644 --- a/packages/google-cloud-video-transcoder/synth.metadata +++ b/packages/google-cloud-video-transcoder/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-video-transcoder.git", - "sha": "96a64935a99bc00e2f850791487e4a6e5060741a" + "sha": "d9956ea1a263ef388c724d4ab36787b2670400f9" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "15013eff642a7e7e855aed5a29e6e83c39beba2a" + "sha": "363fe305e9ce34a6cd53951c6ee5f997094b54ee" } } ], From a56e7fce3038253de5dad8a74a2489628467d1be Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 28 Dec 2020 13:18:23 -0800 Subject: [PATCH 017/116] docs: put FPS table in code block (#20) PiperOrigin-RevId: 348857882 Source-Author: Google APIs Source-Date: Wed Dec 23 15:47:05 2020 -0800 Source-Repo: googleapis/googleapis Source-Sha: 2ccf8f460800e98884d1aa4ba61e344ad4cd5d04 Source-Link: https://github.com/googleapis/googleapis/commit/2ccf8f460800e98884d1aa4ba61e344ad4cd5d04 --- .../google/cloud/video/transcoder/v1beta1/resources.proto | 3 ++- packages/google-cloud-video-transcoder/synth.metadata | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1beta1/resources.proto b/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1beta1/resources.proto index 4e2163c9dbc..71ba38f9752 100644 --- a/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1beta1/resources.proto +++ b/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1beta1/resources.proto @@ -654,7 +654,7 @@ message VideoStream { // // The following table shows the computed video FPS given the target FPS (in // parenthesis) and input FPS (in the first column): - // + // ``` // | | (30) | (60) | (25) | (50) | // |--------|--------|--------|------|------| // | 240 | Fail | Fail | Fail | Fail | @@ -671,6 +671,7 @@ message VideoStream { // | 15 | 15 | 15 | 20 | 30 | // | 12 | 12 | 12 | 20 | 30 | // | 10 | 10 | 10 | 20 | 30 | + // ``` double frame_rate = 20 [(google.api.field_behavior) = REQUIRED]; // Specify the intensity of the adaptive quantizer (AQ). Must be between 0 and diff --git a/packages/google-cloud-video-transcoder/synth.metadata b/packages/google-cloud-video-transcoder/synth.metadata index 20fc63f4c48..148caa475a4 100644 --- a/packages/google-cloud-video-transcoder/synth.metadata +++ b/packages/google-cloud-video-transcoder/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-video-transcoder.git", - "sha": "d9956ea1a263ef388c724d4ab36787b2670400f9" + "sha": "155cf578eb97e7b32c8d5fff73e7a5dda996dc07" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "d189e871205fea665a9648f7c4676f027495ccaf", - "internalRef": "345596855" + "sha": "2ccf8f460800e98884d1aa4ba61e344ad4cd5d04", + "internalRef": "348857882" } }, { From 485215ef25772b78cdc204e5a6890b725668bf90 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 7 Jan 2021 11:42:12 -0800 Subject: [PATCH 018/116] docs: update dates (#21) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/000b31a7-d841-4bba-9f39-9c136bef31bc/targets - [ ] To automatically regenerate this PR, check this box. --- packages/google-cloud-video-transcoder/.jsdoc.js | 4 ++-- packages/google-cloud-video-transcoder/protos/protos.d.ts | 2 +- packages/google-cloud-video-transcoder/protos/protos.js | 2 +- packages/google-cloud-video-transcoder/src/index.ts | 2 +- packages/google-cloud-video-transcoder/src/v1beta1/index.ts | 2 +- .../src/v1beta1/transcoder_service_client.ts | 2 +- packages/google-cloud-video-transcoder/synth.metadata | 2 +- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- packages/google-cloud-video-transcoder/system-test/install.ts | 2 +- .../test/gapic_transcoder_service_v1beta1.ts | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-video-transcoder/.jsdoc.js b/packages/google-cloud-video-transcoder/.jsdoc.js index ce0870843c7..f1ef2c70909 100644 --- a/packages/google-cloud-video-transcoder/.jsdoc.js +++ b/packages/google-cloud-video-transcoder/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2020 Google LLC', + copyright: 'Copyright 2021 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/video-transcoder', diff --git a/packages/google-cloud-video-transcoder/protos/protos.d.ts b/packages/google-cloud-video-transcoder/protos/protos.d.ts index fbf0b25a415..6b7049a55bd 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.d.ts +++ b/packages/google-cloud-video-transcoder/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. diff --git a/packages/google-cloud-video-transcoder/protos/protos.js b/packages/google-cloud-video-transcoder/protos/protos.js index 79982156a5b..13df8d40201 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.js +++ b/packages/google-cloud-video-transcoder/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. diff --git a/packages/google-cloud-video-transcoder/src/index.ts b/packages/google-cloud-video-transcoder/src/index.ts index bcd7386706f..c6dceb4813a 100644 --- a/packages/google-cloud-video-transcoder/src/index.ts +++ b/packages/google-cloud-video-transcoder/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. diff --git a/packages/google-cloud-video-transcoder/src/v1beta1/index.ts b/packages/google-cloud-video-transcoder/src/v1beta1/index.ts index 9c59933c561..337677124be 100644 --- a/packages/google-cloud-video-transcoder/src/v1beta1/index.ts +++ b/packages/google-cloud-video-transcoder/src/v1beta1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. diff --git a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts index 84639509af2..a153a59f9de 100644 --- a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts +++ b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. diff --git a/packages/google-cloud-video-transcoder/synth.metadata b/packages/google-cloud-video-transcoder/synth.metadata index 148caa475a4..8c0392c1c50 100644 --- a/packages/google-cloud-video-transcoder/synth.metadata +++ b/packages/google-cloud-video-transcoder/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-video-transcoder.git", - "sha": "155cf578eb97e7b32c8d5fff73e7a5dda996dc07" + "sha": "e87663595f45ee80329120a28ad6d25c55d83768" } }, { diff --git a/packages/google-cloud-video-transcoder/system-test/fixtures/sample/src/index.js b/packages/google-cloud-video-transcoder/system-test/fixtures/sample/src/index.js index fd6f2058c09..a190b727ce9 100644 --- a/packages/google-cloud-video-transcoder/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-video-transcoder/system-test/fixtures/sample/src/index.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. diff --git a/packages/google-cloud-video-transcoder/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-video-transcoder/system-test/fixtures/sample/src/index.ts index f5f7f88db0c..4f97d1ade59 100644 --- a/packages/google-cloud-video-transcoder/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-video-transcoder/system-test/fixtures/sample/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. diff --git a/packages/google-cloud-video-transcoder/system-test/install.ts b/packages/google-cloud-video-transcoder/system-test/install.ts index 39d90f771de..d2d61c0396f 100644 --- a/packages/google-cloud-video-transcoder/system-test/install.ts +++ b/packages/google-cloud-video-transcoder/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. diff --git a/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1beta1.ts b/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1beta1.ts index fa70d185b12..ec7be09add7 100644 --- a/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1beta1.ts +++ b/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. From 7e8f1bec8e242a039ea3537b450543e7c1dd011d Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 8 Jan 2021 18:42:32 -0800 Subject: [PATCH 019/116] feat: adds style enumeration (#22) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/3cbe2688-2bdb-41ef-9967-e7d03a185d83/targets - [ ] To automatically regenerate this PR, check this box. --- .../protos/protos.d.ts | 12 +++ .../protos/protos.js | 78 ++++++++++++++++++- .../protos/protos.json | 13 +++- .../synth.metadata | 2 +- 4 files changed, 102 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-video-transcoder/protos/protos.d.ts b/packages/google-cloud-video-transcoder/protos/protos.d.ts index 6b7049a55bd..f7709464a06 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.d.ts +++ b/packages/google-cloud-video-transcoder/protos/protos.d.ts @@ -5537,6 +5537,9 @@ export namespace google { /** ResourceDescriptor singular */ singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); } /** Represents a ResourceDescriptor. */ @@ -5566,6 +5569,9 @@ export namespace google { /** 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 @@ -5645,6 +5651,12 @@ export namespace google { ORIGINALLY_SINGLE_PATTERN = 1, FUTURE_MULTI_PATTERN = 2 } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } } /** Properties of a ResourceReference. */ diff --git a/packages/google-cloud-video-transcoder/protos/protos.js b/packages/google-cloud-video-transcoder/protos/protos.js index 13df8d40201..b98914c0268 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.js +++ b/packages/google-cloud-video-transcoder/protos/protos.js @@ -13351,6 +13351,7 @@ * @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 */ /** @@ -13363,6 +13364,7 @@ */ 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) @@ -13417,6 +13419,14 @@ */ 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 @@ -13454,6 +13464,12 @@ 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; }; @@ -13508,6 +13524,16 @@ 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; @@ -13571,6 +13597,18 @@ 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; }; @@ -13615,6 +13653,23 @@ 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: + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } return message; }; @@ -13631,8 +13686,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.pattern = []; + object.style = []; + } if (options.defaults) { object.type = ""; object.nameField = ""; @@ -13655,6 +13712,11 @@ 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]] : message.style[j]; + } return object; }; @@ -13685,6 +13747,20 @@ 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; })(); diff --git a/packages/google-cloud-video-transcoder/protos/protos.json b/packages/google-cloud-video-transcoder/protos/protos.json index 33108b8e4d4..bed4c618182 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.json +++ b/packages/google-cloud-video-transcoder/protos/protos.json @@ -1392,6 +1392,11 @@ "singular": { "type": "string", "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 } }, "nested": { @@ -1401,6 +1406,12 @@ "ORIGINALLY_SINGLE_PATTERN": 1, "FUTURE_MULTI_PATTERN": 2 } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } } } }, @@ -1523,7 +1534,7 @@ }, "protobuf": { "options": { - "go_package": "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor", + "go_package": "google.golang.org/protobuf/types/descriptorpb", "java_package": "com.google.protobuf", "java_outer_classname": "DescriptorProtos", "csharp_namespace": "Google.Protobuf.Reflection", diff --git a/packages/google-cloud-video-transcoder/synth.metadata b/packages/google-cloud-video-transcoder/synth.metadata index 8c0392c1c50..4f164e2b56b 100644 --- a/packages/google-cloud-video-transcoder/synth.metadata +++ b/packages/google-cloud-video-transcoder/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-video-transcoder.git", - "sha": "e87663595f45ee80329120a28ad6d25c55d83768" + "sha": "c4062fda1fb19ac3dccdfd2b8ca76dee23bb7891" } }, { From c94387704bb2c5449b34fb8d3a29dcaddf1a0029 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 12 Jan 2021 18:38:14 +0000 Subject: [PATCH 020/116] chore: release 1.2.0 (#23) :robot: I have created a release \*beep\* \*boop\* --- ## [1.2.0](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.1.0...v1.2.0) (2021-01-09) ### Features * adds style enumeration ([#22](https://www.github.com/googleapis/nodejs-video-transcoder/issues/22)) ([9b9ca5d](https://www.github.com/googleapis/nodejs-video-transcoder/commit/9b9ca5db8168d70b8afb7dc994659ed92d6a645a)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-video-transcoder/CHANGELOG.md | 7 +++++++ packages/google-cloud-video-transcoder/package.json | 2 +- .../google-cloud-video-transcoder/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-video-transcoder/CHANGELOG.md b/packages/google-cloud-video-transcoder/CHANGELOG.md index 4bd07288871..01efbfef79b 100644 --- a/packages/google-cloud-video-transcoder/CHANGELOG.md +++ b/packages/google-cloud-video-transcoder/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.2.0](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.1.0...v1.2.0) (2021-01-09) + + +### Features + +* adds style enumeration ([#22](https://www.github.com/googleapis/nodejs-video-transcoder/issues/22)) ([9b9ca5d](https://www.github.com/googleapis/nodejs-video-transcoder/commit/9b9ca5db8168d70b8afb7dc994659ed92d6a645a)) + ## [1.1.0](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.0.1...v1.1.0) (2020-11-30) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index d3c58d5cd1a..18262b94aad 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/video-transcoder", - "version": "1.1.0", + "version": "1.2.0", "description": "Transcoder client for Node.js", "repository": "googleapis/nodejs-video-transcoder", "license": "Apache-2.0", diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index 3737b161397..5af2cc5eea4 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/video-transcoder": "^1.1.0" + "@google-cloud/video-transcoder": "^1.2.0" }, "devDependencies": { "@google-cloud/storage": "^5.4.0", From 8268e3a1db36d488d624cd2696d7062da70e10ed Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 27 Jan 2021 09:44:02 -0800 Subject: [PATCH 021/116] refactor(nodejs): move build cop to flakybot (#26) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/1bcecc39-aa5c-40f4-9453-955704c7ca01/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/57c23fa5705499a4181095ced81f0ee0933b64f6 --- packages/google-cloud-video-transcoder/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-video-transcoder/synth.metadata b/packages/google-cloud-video-transcoder/synth.metadata index 4f164e2b56b..3cc228aff51 100644 --- a/packages/google-cloud-video-transcoder/synth.metadata +++ b/packages/google-cloud-video-transcoder/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-video-transcoder.git", - "sha": "c4062fda1fb19ac3dccdfd2b8ca76dee23bb7891" + "sha": "139b47af2245bf64ad57e60daedd7fa44dba58d3" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "363fe305e9ce34a6cd53951c6ee5f997094b54ee" + "sha": "57c23fa5705499a4181095ced81f0ee0933b64f6" } } ], From e69ece7108bd69f6c81dbecd03eb26f080efd249 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 1 Mar 2021 18:01:39 -0800 Subject: [PATCH 022/116] build: adds UNORDERED_LIST enum (#29) --- packages/google-cloud-video-transcoder/protos/protos.d.ts | 3 ++- packages/google-cloud-video-transcoder/protos/protos.js | 7 +++++++ packages/google-cloud-video-transcoder/protos/protos.json | 3 ++- packages/google-cloud-video-transcoder/synth.metadata | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-video-transcoder/protos/protos.d.ts b/packages/google-cloud-video-transcoder/protos/protos.d.ts index f7709464a06..3924593e9c9 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.d.ts +++ b/packages/google-cloud-video-transcoder/protos/protos.d.ts @@ -5514,7 +5514,8 @@ export namespace google { REQUIRED = 2, OUTPUT_ONLY = 3, INPUT_ONLY = 4, - IMMUTABLE = 5 + IMMUTABLE = 5, + UNORDERED_LIST = 6 } /** Properties of a ResourceDescriptor. */ diff --git a/packages/google-cloud-video-transcoder/protos/protos.js b/packages/google-cloud-video-transcoder/protos/protos.js index b98914c0268..07c9ffe7020 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.js +++ b/packages/google-cloud-video-transcoder/protos/protos.js @@ -13327,6 +13327,7 @@ * @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 */ api.FieldBehavior = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -13336,6 +13337,7 @@ values[valuesById[3] = "OUTPUT_ONLY"] = 3; values[valuesById[4] = "INPUT_ONLY"] = 4; values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; return values; })(); @@ -20407,6 +20409,7 @@ case 3: case 4: case 5: + case 6: break; } } @@ -20507,6 +20510,10 @@ case 5: message[".google.api.fieldBehavior"][i] = 5; break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; } } if (object[".google.api.resourceReference"] != null) { diff --git a/packages/google-cloud-video-transcoder/protos/protos.json b/packages/google-cloud-video-transcoder/protos/protos.json index bed4c618182..0b4af31da95 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.json +++ b/packages/google-cloud-video-transcoder/protos/protos.json @@ -1347,7 +1347,8 @@ "REQUIRED": 2, "OUTPUT_ONLY": 3, "INPUT_ONLY": 4, - "IMMUTABLE": 5 + "IMMUTABLE": 5, + "UNORDERED_LIST": 6 } }, "resourceReference": { diff --git a/packages/google-cloud-video-transcoder/synth.metadata b/packages/google-cloud-video-transcoder/synth.metadata index 3cc228aff51..0297c988079 100644 --- a/packages/google-cloud-video-transcoder/synth.metadata +++ b/packages/google-cloud-video-transcoder/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-video-transcoder.git", - "sha": "139b47af2245bf64ad57e60daedd7fa44dba58d3" + "sha": "085318c37e4fd8a76ffed21a5970669e3be5f7ad" } }, { From 286f752ba3d54e7a065dac683ff158b3ab8e3e03 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 7 Mar 2021 09:00:47 -0800 Subject: [PATCH 023/116] build: update gapic-generator-typescript to v1.2.10. (#38) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/2812cef8-9404-4275-bb51-8c6dafc1bc6f/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 361273630 Source-Link: https://github.com/googleapis/googleapis/commit/5477122b3e8037a1dc5bc920536158edbd151dc4 --- packages/google-cloud-video-transcoder/synth.metadata | 6 +++--- packages/google-cloud-video-transcoder/webpack.config.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-video-transcoder/synth.metadata b/packages/google-cloud-video-transcoder/synth.metadata index 0297c988079..1693609addf 100644 --- a/packages/google-cloud-video-transcoder/synth.metadata +++ b/packages/google-cloud-video-transcoder/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-video-transcoder.git", - "sha": "085318c37e4fd8a76ffed21a5970669e3be5f7ad" + "sha": "6d17e3826038e12e35cc08aab04f8af78bb09f1b" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "2ccf8f460800e98884d1aa4ba61e344ad4cd5d04", - "internalRef": "348857882" + "sha": "5477122b3e8037a1dc5bc920536158edbd151dc4", + "internalRef": "361273630" } }, { diff --git a/packages/google-cloud-video-transcoder/webpack.config.js b/packages/google-cloud-video-transcoder/webpack.config.js index f6e4c031bce..4b7a68a3237 100644 --- a/packages/google-cloud-video-transcoder/webpack.config.js +++ b/packages/google-cloud-video-transcoder/webpack.config.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. From 7c5f40789af78a1156bb3ea33859ea4990052f2d Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 8 Mar 2021 10:29:09 -0800 Subject: [PATCH 024/116] meta: exclude custom CODEOWNERS (#32) Co-authored-by: Justin Beckwith --- packages/google-cloud-video-transcoder/synth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-video-transcoder/synth.py b/packages/google-cloud-video-transcoder/synth.py index 16087979494..21c9358886d 100644 --- a/packages/google-cloud-video-transcoder/synth.py +++ b/packages/google-cloud-video-transcoder/synth.py @@ -36,7 +36,7 @@ common_templates = gcp.CommonTemplates() templates = common_templates.node_library( source_location='build/src', versions=['v1beta1']) -s.copy(templates, excludes=[]) +s.copy(templates, excludes=[".github/CODEOWNERS"]) node.postprocess_gapic_library() From d2d9e5ccc7f28e140a1bb68a1ed4d9c117cda895 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 15 Mar 2021 11:48:00 -0700 Subject: [PATCH 025/116] docs: add new samples to README --- .../google-cloud-video-transcoder/README.md | 2 ++ .../samples/README.md | 36 +++++++++++++++++++ .../synth.metadata | 2 +- 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-video-transcoder/README.md b/packages/google-cloud-video-transcoder/README.md index c13a031b58b..f3fc80e594c 100644 --- a/packages/google-cloud-video-transcoder/README.md +++ b/packages/google-cloud-video-transcoder/README.md @@ -90,6 +90,8 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-video-trans | Create Job From Preset | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobFromPreset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobFromPreset.js,samples/README.md) | | Create Job From Template | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobFromTemplate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobFromTemplate.js,samples/README.md) | | Create Job Template | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobTemplate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobTemplate.js,samples/README.md) | +| Create Job With Animated Overlay | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobWithAnimatedOverlay.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithAnimatedOverlay.js,samples/README.md) | +| Create Job With Static Overlay | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobWithStaticOverlay.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithStaticOverlay.js,samples/README.md) | | Delete Job | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/deleteJob.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/deleteJob.js,samples/README.md) | | Delete Job Template | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/deleteJobTemplate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/deleteJobTemplate.js,samples/README.md) | | Get Job | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/getJob.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/getJob.js,samples/README.md) | diff --git a/packages/google-cloud-video-transcoder/samples/README.md b/packages/google-cloud-video-transcoder/samples/README.md index 9174d4d12d1..a9099041ce9 100644 --- a/packages/google-cloud-video-transcoder/samples/README.md +++ b/packages/google-cloud-video-transcoder/samples/README.md @@ -16,6 +16,8 @@ * [Create Job From Preset](#create-job-from-preset) * [Create Job From Template](#create-job-from-template) * [Create Job Template](#create-job-template) + * [Create Job With Animated Overlay](#create-job-with-animated-overlay) + * [Create Job With Static Overlay](#create-job-with-static-overlay) * [Delete Job](#delete-job) * [Delete Job Template](#delete-job-template) * [Get Job](#get-job) @@ -108,6 +110,40 @@ __Usage:__ +### Create Job With Animated Overlay + +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobWithAnimatedOverlay.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithAnimatedOverlay.js,samples/README.md) + +__Usage:__ + + +`node samples/createJobWithAnimatedOverlay.js` + + +----- + + + + +### Create Job With Static Overlay + +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobWithStaticOverlay.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithStaticOverlay.js,samples/README.md) + +__Usage:__ + + +`node samples/createJobWithStaticOverlay.js` + + +----- + + + + ### Delete Job View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/deleteJob.js). diff --git a/packages/google-cloud-video-transcoder/synth.metadata b/packages/google-cloud-video-transcoder/synth.metadata index 1693609addf..73b82ac8616 100644 --- a/packages/google-cloud-video-transcoder/synth.metadata +++ b/packages/google-cloud-video-transcoder/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-video-transcoder.git", - "sha": "6d17e3826038e12e35cc08aab04f8af78bb09f1b" + "sha": "47686fa17c5e5164f6d5f5f37f09d37bd9844cc3" } }, { From fdf7ed0fb2aa1d9377474e76f0871744c55949ff Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 15 Mar 2021 19:06:06 +0000 Subject: [PATCH 026/116] chore: release 1.3.0 (#41) :robot: I have created a release \*beep\* \*boop\* --- ## [1.3.0](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.2.0...v1.3.0) (2021-03-15) ### Features * **samples:** add code samples and tests for overlay creation ([#39](https://www.github.com/googleapis/nodejs-video-transcoder/issues/39)) ([47686fa](https://www.github.com/googleapis/nodejs-video-transcoder/commit/47686fa17c5e5164f6d5f5f37f09d37bd9844cc3)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-video-transcoder/CHANGELOG.md | 7 +++++++ packages/google-cloud-video-transcoder/package.json | 2 +- .../google-cloud-video-transcoder/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-video-transcoder/CHANGELOG.md b/packages/google-cloud-video-transcoder/CHANGELOG.md index 01efbfef79b..7f408f6ed48 100644 --- a/packages/google-cloud-video-transcoder/CHANGELOG.md +++ b/packages/google-cloud-video-transcoder/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.3.0](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.2.0...v1.3.0) (2021-03-15) + + +### Features + +* **samples:** add code samples and tests for overlay creation ([#39](https://www.github.com/googleapis/nodejs-video-transcoder/issues/39)) ([47686fa](https://www.github.com/googleapis/nodejs-video-transcoder/commit/47686fa17c5e5164f6d5f5f37f09d37bd9844cc3)) + ## [1.2.0](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.1.0...v1.2.0) (2021-01-09) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 18262b94aad..502bf5ee50b 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/video-transcoder", - "version": "1.2.0", + "version": "1.3.0", "description": "Transcoder client for Node.js", "repository": "googleapis/nodejs-video-transcoder", "license": "Apache-2.0", diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index 5af2cc5eea4..7f1672aa69d 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/video-transcoder": "^1.2.0" + "@google-cloud/video-transcoder": "^1.3.0" }, "devDependencies": { "@google-cloud/storage": "^5.4.0", From 897660f3a7a80a3dab5fba7990262e776fa0efe0 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 31 Mar 2021 12:56:14 -0700 Subject: [PATCH 027/116] docs: additional samples added to README --- .../google-cloud-video-transcoder/README.md | 2 ++ .../samples/README.md | 36 +++++++++++++++++++ .../synth.metadata | 2 +- 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-video-transcoder/README.md b/packages/google-cloud-video-transcoder/README.md index f3fc80e594c..704d4b2fb48 100644 --- a/packages/google-cloud-video-transcoder/README.md +++ b/packages/google-cloud-video-transcoder/README.md @@ -91,6 +91,8 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-video-trans | Create Job From Template | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobFromTemplate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobFromTemplate.js,samples/README.md) | | Create Job Template | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobTemplate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobTemplate.js,samples/README.md) | | Create Job With Animated Overlay | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobWithAnimatedOverlay.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithAnimatedOverlay.js,samples/README.md) | +| Create Job With Periodic Images Spritesheet | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobWithPeriodicImagesSpritesheet.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithPeriodicImagesSpritesheet.js,samples/README.md) | +| Create Job With Set Number Images Spritesheet | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobWithSetNumberImagesSpritesheet.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithSetNumberImagesSpritesheet.js,samples/README.md) | | Create Job With Static Overlay | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobWithStaticOverlay.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithStaticOverlay.js,samples/README.md) | | Delete Job | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/deleteJob.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/deleteJob.js,samples/README.md) | | Delete Job Template | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/deleteJobTemplate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/deleteJobTemplate.js,samples/README.md) | diff --git a/packages/google-cloud-video-transcoder/samples/README.md b/packages/google-cloud-video-transcoder/samples/README.md index a9099041ce9..5baa65de620 100644 --- a/packages/google-cloud-video-transcoder/samples/README.md +++ b/packages/google-cloud-video-transcoder/samples/README.md @@ -17,6 +17,8 @@ * [Create Job From Template](#create-job-from-template) * [Create Job Template](#create-job-template) * [Create Job With Animated Overlay](#create-job-with-animated-overlay) + * [Create Job With Periodic Images Spritesheet](#create-job-with-periodic-images-spritesheet) + * [Create Job With Set Number Images Spritesheet](#create-job-with-set-number-images-spritesheet) * [Create Job With Static Overlay](#create-job-with-static-overlay) * [Delete Job](#delete-job) * [Delete Job Template](#delete-job-template) @@ -127,6 +129,40 @@ __Usage:__ +### Create Job With Periodic Images Spritesheet + +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobWithPeriodicImagesSpritesheet.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithPeriodicImagesSpritesheet.js,samples/README.md) + +__Usage:__ + + +`node samples/createJobWithPeriodicImagesSpritesheet.js` + + +----- + + + + +### Create Job With Set Number Images Spritesheet + +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobWithSetNumberImagesSpritesheet.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithSetNumberImagesSpritesheet.js,samples/README.md) + +__Usage:__ + + +`node samples/createJobWithSetNumberImagesSpritesheet.js` + + +----- + + + + ### Create Job With Static Overlay View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobWithStaticOverlay.js). diff --git a/packages/google-cloud-video-transcoder/synth.metadata b/packages/google-cloud-video-transcoder/synth.metadata index 73b82ac8616..6bd5dc3d250 100644 --- a/packages/google-cloud-video-transcoder/synth.metadata +++ b/packages/google-cloud-video-transcoder/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-video-transcoder.git", - "sha": "47686fa17c5e5164f6d5f5f37f09d37bd9844cc3" + "sha": "7508d646c099ef278a402b5a7ad76c3ce926e25f" } }, { From 2ec237fcbdb1b213aeefbbc30efc890ccb0f24d6 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 5 Apr 2021 10:00:13 -0700 Subject: [PATCH 028/116] chore: release 1.4.0 (#45) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-video-transcoder/CHANGELOG.md | 7 +++++++ packages/google-cloud-video-transcoder/package.json | 2 +- .../google-cloud-video-transcoder/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-video-transcoder/CHANGELOG.md b/packages/google-cloud-video-transcoder/CHANGELOG.md index 7f408f6ed48..1f66ee90245 100644 --- a/packages/google-cloud-video-transcoder/CHANGELOG.md +++ b/packages/google-cloud-video-transcoder/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.4.0](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.3.0...v1.4.0) (2021-03-31) + + +### Features + +* add spritesheet samples and tests. Remove unneeded list jobs caโ€ฆ ([#43](https://www.github.com/googleapis/nodejs-video-transcoder/issues/43)) ([7508d64](https://www.github.com/googleapis/nodejs-video-transcoder/commit/7508d646c099ef278a402b5a7ad76c3ce926e25f)) + ## [1.3.0](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.2.0...v1.3.0) (2021-03-15) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 502bf5ee50b..ff8d82c8e72 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/video-transcoder", - "version": "1.3.0", + "version": "1.4.0", "description": "Transcoder client for Node.js", "repository": "googleapis/nodejs-video-transcoder", "license": "Apache-2.0", diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index 7f1672aa69d..ca0652f1f97 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/video-transcoder": "^1.3.0" + "@google-cloud/video-transcoder": "^1.4.0" }, "devDependencies": { "@google-cloud/storage": "^5.4.0", From 3f0680c6a781030ab689d2b499517f291cbddbb6 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 6 Apr 2021 19:36:07 +0200 Subject: [PATCH 029/116] chore(deps): update dependency sinon to v10 (#47) --- packages/google-cloud-video-transcoder/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index ff8d82c8e72..080b74ae740 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -54,7 +54,7 @@ "mocha": "^8.2.1", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", - "sinon": "^9.0.3", + "sinon": "^10.0.0", "ts-loader": "^8.0.3", "typescript": "^3.9.7" }, From b15bd83e14c53b675bd461a33b7fe28d1926ccf2 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 14 Apr 2021 23:10:35 +0200 Subject: [PATCH 030/116] chore(deps): update dependency @types/sinon to v10 (#51) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/sinon](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^9.0.5` -> `^10.0.0`](https://renovatebot.com/diffs/npm/@types%2fsinon/9.0.11/10.0.0) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fsinon/10.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fsinon/10.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fsinon/10.0.0/compatibility-slim/9.0.11)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fsinon/10.0.0/confidence-slim/9.0.11)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-video-transcoder). --- packages/google-cloud-video-transcoder/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 080b74ae740..cc51db948a0 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -44,7 +44,7 @@ "devDependencies": { "@types/mocha": "^8.0.3", "@types/node": "^14.6.1", - "@types/sinon": "^9.0.5", + "@types/sinon": "^10.0.0", "c8": "^7.3.0", "gts": "^3.0.0", "jsdoc": "^3.6.5", From 31339512bd3591083e714fd150724bdc6ebb77c3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 20 Apr 2021 00:56:07 +0200 Subject: [PATCH 031/116] chore(deps): update dependency ts-loader to v9 (#54) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [ts-loader](https://togithub.com/TypeStrong/ts-loader) | [`^8.0.3` -> `^9.0.0`](https://renovatebot.com/diffs/npm/ts-loader/8.1.0/9.0.0) | [![age](https://badges.renovateapi.com/packages/npm/ts-loader/9.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/ts-loader/9.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/ts-loader/9.0.0/compatibility-slim/8.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/ts-loader/9.0.0/confidence-slim/8.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
TypeStrong/ts-loader ### [`v9.0.0`](https://togithub.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md#v900) [Compare Source](https://togithub.com/TypeStrong/ts-loader/compare/v8.1.0...v9.0.0) Breaking changes: - minimum webpack version: 5 - minimum node version: 12 Changes: - [webpack 5 migration](https://togithub.com/TypeStrong/ts-loader/pull/1251) - thanks [@​johnnyreilly](https://togithub.com/johnnyreilly), [@​jonwallsten](https://togithub.com/jonwallsten), [@​sokra](https://togithub.com/sokra), [@​appzuka](https://togithub.com/appzuka), [@​alexander-akait](https://togithub.com/alexander-akait)
--- ### Configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-video-transcoder). --- packages/google-cloud-video-transcoder/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index cc51db948a0..b054d8112c2 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -55,7 +55,7 @@ "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "sinon": "^10.0.0", - "ts-loader": "^8.0.3", + "ts-loader": "^9.0.0", "typescript": "^3.9.7" }, "engines": { From 40a3ee3fded182f15ec1150d38afdc07bdc82ed8 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 20 Apr 2021 11:10:07 -0700 Subject: [PATCH 032/116] chore: regenerate common templates (#53) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/18b0a4f0-1600-404c-b007-4183fa7fccbb/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) Source-Link: https://github.com/googleapis/synthtool/commit/c6706ee5d693e9ae5967614170732646590d8374 Source-Link: https://github.com/googleapis/synthtool/commit/b33b0e2056a85fc2264b294f2cf47dcd45e95186 Source-Link: https://github.com/googleapis/synthtool/commit/898b38a6f4fab89a76dfb152480bb034a781331b --- packages/google-cloud-video-transcoder/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-video-transcoder/synth.metadata b/packages/google-cloud-video-transcoder/synth.metadata index 6bd5dc3d250..4a0194224cc 100644 --- a/packages/google-cloud-video-transcoder/synth.metadata +++ b/packages/google-cloud-video-transcoder/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-video-transcoder.git", - "sha": "7508d646c099ef278a402b5a7ad76c3ce926e25f" + "sha": "3a3ad9c1f94584f989f53a9b85e43f09afee8fc6" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "57c23fa5705499a4181095ced81f0ee0933b64f6" + "sha": "c6706ee5d693e9ae5967614170732646590d8374" } } ], From 59f29a858ed81699d8e7131dbbc568cdb81086d8 Mon Sep 17 00:00:00 2001 From: Jeffrey Rennie Date: Tue, 20 Apr 2021 17:52:53 -0700 Subject: [PATCH 033/116] chore: migrate to owl bot (#48) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: migrate to owl bot * chore: copy files from googleapis-gen fb91803ccef5d7c695139b22788b309e2197856b * chore: run the post processor * ๐Ÿฆ‰ Updates from OwlBot Co-authored-by: Owl Bot --- .../.github/.OwlBot.yaml | 26 ++++++++++++ .../.repo-metadata.json | 15 +++---- .../google-cloud-video-transcoder/owlbot.py | 20 +++++++++ .../src/index.ts | 8 ++-- .../synth.metadata | 37 ---------------- .../google-cloud-video-transcoder/synth.py | 42 ------------------- 6 files changed, 59 insertions(+), 89 deletions(-) create mode 100644 packages/google-cloud-video-transcoder/.github/.OwlBot.yaml create mode 100644 packages/google-cloud-video-transcoder/owlbot.py delete mode 100644 packages/google-cloud-video-transcoder/synth.metadata delete mode 100644 packages/google-cloud-video-transcoder/synth.py diff --git a/packages/google-cloud-video-transcoder/.github/.OwlBot.yaml b/packages/google-cloud-video-transcoder/.github/.OwlBot.yaml new file mode 100644 index 00000000000..35d34886a77 --- /dev/null +++ b/packages/google-cloud-video-transcoder/.github/.OwlBot.yaml @@ -0,0 +1,26 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +docker: + image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + + +deep-remove-regex: + - /owl-bot-staging + +deep-copy-regex: + - source: /google/cloud/video/transcoder/(v.*)/.*-nodejs/(.*) + dest: /owl-bot-staging/$1/$2 + +begin-after-commit-hash: fb91803ccef5d7c695139b22788b309e2197856b + diff --git a/packages/google-cloud-video-transcoder/.repo-metadata.json b/packages/google-cloud-video-transcoder/.repo-metadata.json index 2d5655b32e5..6022656a642 100644 --- a/packages/google-cloud-video-transcoder/.repo-metadata.json +++ b/packages/google-cloud-video-transcoder/.repo-metadata.json @@ -1,13 +1,14 @@ { - "name": "transcoder", - "name_pretty": "Transcoder API", - "product_documentation": "https://googleapis.dev/nodejs/transcoder/latest", "client_documentation": "https://googleapis.dev/nodejs/transcoder/latest", - "issue_tracker": "https://github.com/googleapis/nodejs-video-transcoder/issues", + "product_documentation": "https://googleapis.dev/nodejs/transcoder/latest", + "name": "transcoder", + "requires_billing": true, "release_level": "beta", "language": "nodejs", - "repo": "googleapis/nodejs-video-transcoder", - "distribution_name": "@google-cloud/video-transcoder", "api_id": "transcoder.googleapis.com", - "requires_billing": true + "distribution_name": "@google-cloud/video-transcoder", + "repo": "googleapis/nodejs-video-transcoder", + "issue_tracker": "https://github.com/googleapis/nodejs-video-transcoder/issues", + "name_pretty": "Transcoder API", + "default_version": "v1beta1" } diff --git a/packages/google-cloud-video-transcoder/owlbot.py b/packages/google-cloud-video-transcoder/owlbot.py new file mode 100644 index 00000000000..194f9157882 --- /dev/null +++ b/packages/google-cloud-video-transcoder/owlbot.py @@ -0,0 +1,20 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""This script is used to synthesize generated parts of this library.""" + +import synthtool.languages.node as node + +node.owlbot_main( + staging_excludes=["package.json", "README.md"], + templates_excludes=[".github/CODEOWNERS"]) diff --git a/packages/google-cloud-video-transcoder/src/index.ts b/packages/google-cloud-video-transcoder/src/index.ts index c6dceb4813a..ee0192e23c0 100644 --- a/packages/google-cloud-video-transcoder/src/index.ts +++ b/packages/google-cloud-video-transcoder/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,13 +12,15 @@ // 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 ** +// ** This file is automatically generated by synthtool. ** +// ** https://github.com/googleapis/synthtool ** // ** All changes to this file may be overwritten. ** import * as v1beta1 from './v1beta1'; + const TranscoderServiceClient = v1beta1.TranscoderServiceClient; type TranscoderServiceClient = v1beta1.TranscoderServiceClient; + export {v1beta1, TranscoderServiceClient}; export default {v1beta1, TranscoderServiceClient}; import * as protos from '../protos/protos'; diff --git a/packages/google-cloud-video-transcoder/synth.metadata b/packages/google-cloud-video-transcoder/synth.metadata deleted file mode 100644 index 4a0194224cc..00000000000 --- a/packages/google-cloud-video-transcoder/synth.metadata +++ /dev/null @@ -1,37 +0,0 @@ -{ - "sources": [ - { - "git": { - "name": ".", - "remote": "https://github.com/googleapis/nodejs-video-transcoder.git", - "sha": "3a3ad9c1f94584f989f53a9b85e43f09afee8fc6" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5477122b3e8037a1dc5bc920536158edbd151dc4", - "internalRef": "361273630" - } - }, - { - "git": { - "name": "synthtool", - "remote": "https://github.com/googleapis/synthtool.git", - "sha": "c6706ee5d693e9ae5967614170732646590d8374" - } - } - ], - "destinations": [ - { - "client": { - "source": "googleapis", - "apiName": "transcoder", - "apiVersion": "v1beta1", - "language": "nodejs", - "generator": "bazel" - } - } - ] -} \ No newline at end of file diff --git a/packages/google-cloud-video-transcoder/synth.py b/packages/google-cloud-video-transcoder/synth.py deleted file mode 100644 index 21c9358886d..00000000000 --- a/packages/google-cloud-video-transcoder/synth.py +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 2020 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -"""This script is used to synthesize generated parts of this library.""" - -import synthtool as s -import synthtool.gcp as gcp -import synthtool.languages.node as node -import subprocess -import logging - -logging.basicConfig(level=logging.DEBUG) - -# run the gapic generator -gapic = gcp.GAPICBazel() -versions = ['v1beta1'] -for version in versions: - library = gapic.node_library( - 'transcoder', - version, - bazel_target=f"//google/cloud/video/transcoder/{version}:video-transcoder-{version}-nodejs" - ) - s.copy(library, excludes=["package.json", "README.md"]) - -# Copy common templates -common_templates = gcp.CommonTemplates() -templates = common_templates.node_library( - source_location='build/src', versions=['v1beta1']) -s.copy(templates, excludes=[".github/CODEOWNERS"]) - -node.postprocess_gapic_library() - From 82e38de25037b4a87e1b5715fdf240ada19037d9 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 6 May 2021 18:06:05 -0700 Subject: [PATCH 034/116] fix(deps): require google-gax v2.12.0 (#58) --- packages/google-cloud-video-transcoder/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index b054d8112c2..71180ce8ef3 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -39,7 +39,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^2.9.2" + "google-gax": "^2.12.0" }, "devDependencies": { "@types/mocha": "^8.0.3", From f5642ce2b33dc58f3b5e4dbe60426863cb946a8e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 10 May 2021 17:00:57 +0000 Subject: [PATCH 035/116] chore: new owl bot post processor docker image (#60) gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:f93bb861d6f12574437bb9aee426b71eafd63b419669ff0ed029f4b7e7162e3f --- .../protos/protos.d.ts | 16 +- .../protos/protos.js | 32 +- .../src/v1beta1/transcoder_service_client.ts | 127 +++--- .../test/gapic_transcoder_service_v1beta1.ts | 386 ++++++++---------- 4 files changed, 252 insertions(+), 309 deletions(-) diff --git a/packages/google-cloud-video-transcoder/protos/protos.d.ts b/packages/google-cloud-video-transcoder/protos/protos.d.ts index 3924593e9c9..9a56865ea02 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.d.ts +++ b/packages/google-cloud-video-transcoder/protos/protos.d.ts @@ -94,7 +94,7 @@ export namespace google { public outputUri: string; /** Job templateId. */ - public templateId: string; + public templateId?: (string|null); /** Job config. */ public config?: (google.cloud.video.transcoder.v1beta1.IJobConfig|null); @@ -1439,7 +1439,7 @@ export namespace google { public endTimeOffset?: (google.protobuf.IDuration|null); /** SpriteSheet totalCount. */ - public totalCount: number; + public totalCount?: (number|null); /** SpriteSheet interval. */ public interval?: (google.protobuf.IDuration|null); @@ -2847,7 +2847,7 @@ export namespace google { public allowOpenGop: boolean; /** VideoStream gopFrameCount. */ - public gopFrameCount: number; + public gopFrameCount?: (number|null); /** VideoStream gopDuration. */ public gopDuration?: (google.protobuf.IDuration|null); @@ -5899,19 +5899,19 @@ export namespace google { public selector: string; /** HttpRule get. */ - public get: string; + public get?: (string|null); /** HttpRule put. */ - public put: string; + public put?: (string|null); /** HttpRule post. */ - public post: string; + public post?: (string|null); /** HttpRule delete. */ - public delete: string; + public delete?: (string|null); /** HttpRule patch. */ - public patch: string; + public patch?: (string|null); /** HttpRule custom. */ public custom?: (google.api.ICustomHttpPattern|null); diff --git a/packages/google-cloud-video-transcoder/protos/protos.js b/packages/google-cloud-video-transcoder/protos/protos.js index 07c9ffe7020..0cd7bae12f8 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.js +++ b/packages/google-cloud-video-transcoder/protos/protos.js @@ -139,11 +139,11 @@ /** * Job templateId. - * @member {string} templateId + * @member {string|null|undefined} templateId * @memberof google.cloud.video.transcoder.v1beta1.Job * @instance */ - Job.prototype.templateId = ""; + Job.prototype.templateId = null; /** * Job config. @@ -3759,11 +3759,11 @@ /** * SpriteSheet totalCount. - * @member {number} totalCount + * @member {number|null|undefined} totalCount * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet * @instance */ - SpriteSheet.prototype.totalCount = 0; + SpriteSheet.prototype.totalCount = null; /** * SpriteSheet interval. @@ -7080,11 +7080,11 @@ /** * VideoStream gopFrameCount. - * @member {number} gopFrameCount + * @member {number|null|undefined} gopFrameCount * @memberof google.cloud.video.transcoder.v1beta1.VideoStream * @instance */ - VideoStream.prototype.gopFrameCount = 0; + VideoStream.prototype.gopFrameCount = null; /** * VideoStream gopDuration. @@ -14251,43 +14251,43 @@ /** * HttpRule get. - * @member {string} get + * @member {string|null|undefined} get * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.get = ""; + HttpRule.prototype.get = null; /** * HttpRule put. - * @member {string} put + * @member {string|null|undefined} put * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.put = ""; + HttpRule.prototype.put = null; /** * HttpRule post. - * @member {string} post + * @member {string|null|undefined} post * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.post = ""; + HttpRule.prototype.post = null; /** * HttpRule delete. - * @member {string} delete + * @member {string|null|undefined} delete * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype["delete"] = ""; + HttpRule.prototype["delete"] = null; /** * HttpRule patch. - * @member {string} patch + * @member {string|null|undefined} patch * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.patch = ""; + HttpRule.prototype.patch = null; /** * HttpRule custom. diff --git a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts index a153a59f9de..893e7136221 100644 --- a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts +++ b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts @@ -256,13 +256,14 @@ export class TranscoderServiceClient { ]; for (const methodName of transcoderServiceStubMethods) { const callPromise = this.transcoderServiceStub.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); - }, + 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; } @@ -427,11 +428,10 @@ export class TranscoderServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); this.initialize(); return this.innerApiCalls.createJob(request, options, callback); } @@ -520,11 +520,10 @@ export class TranscoderServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.getJob(request, options, callback); } @@ -619,11 +618,10 @@ export class TranscoderServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.deleteJob(request, options, callback); } @@ -726,11 +724,10 @@ export class TranscoderServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); this.initialize(); return this.innerApiCalls.createJobTemplate(request, options, callback); } @@ -826,11 +823,10 @@ export class TranscoderServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.getJobTemplate(request, options, callback); } @@ -925,11 +921,10 @@ export class TranscoderServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - name: request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.deleteJobTemplate(request, options, callback); } @@ -1026,11 +1021,10 @@ export class TranscoderServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); this.initialize(); return this.innerApiCalls.listJobs(request, options, callback); } @@ -1066,11 +1060,10 @@ export class TranscoderServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listJobs.createStream( @@ -1117,17 +1110,16 @@ export class TranscoderServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listJobs.asyncIterate( this.innerApiCalls['listJobs'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } @@ -1224,11 +1216,10 @@ export class TranscoderServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); this.initialize(); return this.innerApiCalls.listJobTemplates(request, options, callback); } @@ -1265,11 +1256,10 @@ export class TranscoderServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listJobTemplates.createStream( @@ -1317,17 +1307,16 @@ export class TranscoderServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listJobTemplates.asyncIterate( this.innerApiCalls['listJobTemplates'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } diff --git a/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1beta1.ts b/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1beta1.ts index ec7be09add7..0fb78fe3a3b 100644 --- a/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1beta1.ts +++ b/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1beta1.ts @@ -28,10 +28,9 @@ import {PassThrough} from 'stream'; import {protobuf} from 'google-gax'; function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message).toObject( - instance as protobuf.Message, - {defaults: true} - ); + 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; @@ -133,7 +132,8 @@ describe('v1beta1.TranscoderServiceClient', () => { }); it('should create a client with no option', () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient(); + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient(); assert(client); }); @@ -198,12 +198,11 @@ describe('v1beta1.TranscoderServiceClient', () => { describe('createJob', () => { it('invokes createJob without error', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.CreateJobRequest() @@ -231,12 +230,11 @@ describe('v1beta1.TranscoderServiceClient', () => { }); it('invokes createJob without error using callback', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.CreateJobRequest() @@ -253,9 +251,8 @@ describe('v1beta1.TranscoderServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.Job() ); - client.innerApiCalls.createJob = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createJob = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createJob( request, @@ -281,12 +278,11 @@ describe('v1beta1.TranscoderServiceClient', () => { }); it('invokes createJob with error', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.CreateJobRequest() @@ -313,12 +309,11 @@ describe('v1beta1.TranscoderServiceClient', () => { describe('getJob', () => { it('invokes getJob without error', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.GetJobRequest() @@ -346,12 +341,11 @@ describe('v1beta1.TranscoderServiceClient', () => { }); it('invokes getJob without error using callback', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.GetJobRequest() @@ -368,9 +362,8 @@ describe('v1beta1.TranscoderServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.Job() ); - client.innerApiCalls.getJob = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getJob = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getJob( request, @@ -396,12 +389,11 @@ describe('v1beta1.TranscoderServiceClient', () => { }); it('invokes getJob with error', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.GetJobRequest() @@ -428,12 +420,11 @@ describe('v1beta1.TranscoderServiceClient', () => { describe('deleteJob', () => { it('invokes deleteJob without error', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.DeleteJobRequest() @@ -461,12 +452,11 @@ describe('v1beta1.TranscoderServiceClient', () => { }); it('invokes deleteJob without error using callback', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.DeleteJobRequest() @@ -483,9 +473,8 @@ describe('v1beta1.TranscoderServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.deleteJob = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.deleteJob = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.deleteJob( request, @@ -511,12 +500,11 @@ describe('v1beta1.TranscoderServiceClient', () => { }); it('invokes deleteJob with error', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.DeleteJobRequest() @@ -543,12 +531,11 @@ describe('v1beta1.TranscoderServiceClient', () => { describe('createJobTemplate', () => { it('invokes createJobTemplate without error', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest() @@ -576,12 +563,11 @@ describe('v1beta1.TranscoderServiceClient', () => { }); it('invokes createJobTemplate without error using callback', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest() @@ -598,9 +584,8 @@ describe('v1beta1.TranscoderServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() ); - client.innerApiCalls.createJobTemplate = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createJobTemplate = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createJobTemplate( request, @@ -626,12 +611,11 @@ describe('v1beta1.TranscoderServiceClient', () => { }); it('invokes createJobTemplate with error', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest() @@ -661,12 +645,11 @@ describe('v1beta1.TranscoderServiceClient', () => { describe('getJobTemplate', () => { it('invokes getJobTemplate without error', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest() @@ -694,12 +677,11 @@ describe('v1beta1.TranscoderServiceClient', () => { }); it('invokes getJobTemplate without error using callback', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest() @@ -716,9 +698,8 @@ describe('v1beta1.TranscoderServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() ); - client.innerApiCalls.getJobTemplate = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getJobTemplate = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getJobTemplate( request, @@ -744,12 +725,11 @@ describe('v1beta1.TranscoderServiceClient', () => { }); it('invokes getJobTemplate with error', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest() @@ -779,12 +759,11 @@ describe('v1beta1.TranscoderServiceClient', () => { describe('deleteJobTemplate', () => { it('invokes deleteJobTemplate without error', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest() @@ -812,12 +791,11 @@ describe('v1beta1.TranscoderServiceClient', () => { }); it('invokes deleteJobTemplate without error using callback', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest() @@ -834,9 +812,8 @@ describe('v1beta1.TranscoderServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.deleteJobTemplate = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.deleteJobTemplate = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.deleteJobTemplate( request, @@ -862,12 +839,11 @@ describe('v1beta1.TranscoderServiceClient', () => { }); it('invokes deleteJobTemplate with error', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest() @@ -897,12 +873,11 @@ describe('v1beta1.TranscoderServiceClient', () => { describe('listJobs', () => { it('invokes listJobs without error', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.ListJobsRequest() @@ -938,12 +913,11 @@ describe('v1beta1.TranscoderServiceClient', () => { }); it('invokes listJobs without error using callback', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.ListJobsRequest() @@ -968,9 +942,8 @@ describe('v1beta1.TranscoderServiceClient', () => { new protos.google.cloud.video.transcoder.v1beta1.Job() ), ]; - client.innerApiCalls.listJobs = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listJobs = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listJobs( request, @@ -996,12 +969,11 @@ describe('v1beta1.TranscoderServiceClient', () => { }); it('invokes listJobs with error', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.ListJobsRequest() @@ -1026,12 +998,11 @@ describe('v1beta1.TranscoderServiceClient', () => { }); it('invokes listJobsStream without error', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.ListJobsRequest() @@ -1049,12 +1020,12 @@ describe('v1beta1.TranscoderServiceClient', () => { new protos.google.cloud.video.transcoder.v1beta1.Job() ), ]; - client.descriptors.page.listJobs.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listJobs.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listJobsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.video.transcoder.v1beta1.Job[] = []; + const responses: protos.google.cloud.video.transcoder.v1beta1.Job[] = + []; stream.on( 'data', (response: protos.google.cloud.video.transcoder.v1beta1.Job) => { @@ -1083,12 +1054,11 @@ describe('v1beta1.TranscoderServiceClient', () => { }); it('invokes listJobsStream with error', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.ListJobsRequest() @@ -1102,7 +1072,8 @@ describe('v1beta1.TranscoderServiceClient', () => { ); const stream = client.listJobsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.video.transcoder.v1beta1.Job[] = []; + const responses: protos.google.cloud.video.transcoder.v1beta1.Job[] = + []; stream.on( 'data', (response: protos.google.cloud.video.transcoder.v1beta1.Job) => { @@ -1130,12 +1101,11 @@ describe('v1beta1.TranscoderServiceClient', () => { }); it('uses async iteration with listJobs without error', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.ListJobsRequest() @@ -1153,9 +1123,8 @@ describe('v1beta1.TranscoderServiceClient', () => { new protos.google.cloud.video.transcoder.v1beta1.Job() ), ]; - client.descriptors.page.listJobs.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); + client.descriptors.page.listJobs.asyncIterate = + stubAsyncIterationCall(expectedResponse); const responses: protos.google.cloud.video.transcoder.v1beta1.IJob[] = []; const iterable = client.listJobsAsync(request); for await (const resource of iterable) { @@ -1175,12 +1144,11 @@ describe('v1beta1.TranscoderServiceClient', () => { }); it('uses async iteration with listJobs with error', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.ListJobsRequest() @@ -1194,7 +1162,8 @@ describe('v1beta1.TranscoderServiceClient', () => { ); const iterable = client.listJobsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.video.transcoder.v1beta1.IJob[] = []; + const responses: protos.google.cloud.video.transcoder.v1beta1.IJob[] = + []; for await (const resource of iterable) { responses.push(resource!); } @@ -1214,12 +1183,11 @@ describe('v1beta1.TranscoderServiceClient', () => { describe('listJobTemplates', () => { it('invokes listJobTemplates without error', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest() @@ -1255,12 +1223,11 @@ describe('v1beta1.TranscoderServiceClient', () => { }); it('invokes listJobTemplates without error using callback', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest() @@ -1285,9 +1252,8 @@ describe('v1beta1.TranscoderServiceClient', () => { new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() ), ]; - client.innerApiCalls.listJobTemplates = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listJobTemplates = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listJobTemplates( request, @@ -1315,12 +1281,11 @@ describe('v1beta1.TranscoderServiceClient', () => { }); it('invokes listJobTemplates with error', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest() @@ -1348,12 +1313,11 @@ describe('v1beta1.TranscoderServiceClient', () => { }); it('invokes listJobTemplatesStream without error', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest() @@ -1371,12 +1335,12 @@ describe('v1beta1.TranscoderServiceClient', () => { new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() ), ]; - client.descriptors.page.listJobTemplates.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listJobTemplates.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listJobTemplatesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.video.transcoder.v1beta1.JobTemplate[] = []; + const responses: protos.google.cloud.video.transcoder.v1beta1.JobTemplate[] = + []; stream.on( 'data', ( @@ -1400,21 +1364,19 @@ describe('v1beta1.TranscoderServiceClient', () => { .calledWith(client.innerApiCalls.listJobTemplates, request) ); assert.strictEqual( - (client.descriptors.page.listJobTemplates - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listJobTemplates.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('invokes listJobTemplatesStream with error', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest() @@ -1422,13 +1384,12 @@ describe('v1beta1.TranscoderServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listJobTemplates.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.listJobTemplates.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.listJobTemplatesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.video.transcoder.v1beta1.JobTemplate[] = []; + const responses: protos.google.cloud.video.transcoder.v1beta1.JobTemplate[] = + []; stream.on( 'data', ( @@ -1451,21 +1412,19 @@ describe('v1beta1.TranscoderServiceClient', () => { .calledWith(client.innerApiCalls.listJobTemplates, request) ); assert.strictEqual( - (client.descriptors.page.listJobTemplates - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listJobTemplates.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('uses async iteration with listJobTemplates without error', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest() @@ -1483,36 +1442,35 @@ describe('v1beta1.TranscoderServiceClient', () => { new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() ), ]; - client.descriptors.page.listJobTemplates.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); - const responses: protos.google.cloud.video.transcoder.v1beta1.IJobTemplate[] = []; + client.descriptors.page.listJobTemplates.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.video.transcoder.v1beta1.IJobTemplate[] = + []; const iterable = client.listJobTemplatesAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listJobTemplates - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listJobTemplates.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listJobTemplates - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listJobTemplates.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('uses async iteration with listJobTemplates with error', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest() @@ -1520,27 +1478,26 @@ describe('v1beta1.TranscoderServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listJobTemplates.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listJobTemplates.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listJobTemplatesAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.video.transcoder.v1beta1.IJobTemplate[] = []; + const responses: protos.google.cloud.video.transcoder.v1beta1.IJobTemplate[] = + []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listJobTemplates - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listJobTemplates.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listJobTemplates - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listJobTemplates.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1554,12 +1511,11 @@ describe('v1beta1.TranscoderServiceClient', () => { location: 'locationValue', job: 'jobValue', }; - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); client.pathTemplates.jobPathTemplate.render = sinon .stub() @@ -1620,12 +1576,11 @@ describe('v1beta1.TranscoderServiceClient', () => { location: 'locationValue', job_template: 'jobTemplateValue', }; - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); client.pathTemplates.jobTemplatePathTemplate.render = sinon .stub() @@ -1685,12 +1640,11 @@ describe('v1beta1.TranscoderServiceClient', () => { project: 'projectValue', location: 'locationValue', }; - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient( - { + const client = + new transcoderserviceModule.v1beta1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() From 316f596204549966477e684d01ec937d0e3a3929 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 11 May 2021 21:58:09 +0000 Subject: [PATCH 036/116] fix: use require() to load JSON protos (#61) The library is regenerated with gapic-generator-typescript v1.3.1. Committer: @alexander-fenster PiperOrigin-RevId: 372468161 Source-Link: https://github.com/googleapis/googleapis/commit/75880c3e6a6aa2597400582848e81bbbfac51dea Source-Link: https://github.com/googleapis/googleapis-gen/commit/77b18044813d4c8c415ff9ea68e76e307eb8e904 --- .../src/v1beta1/transcoder_service_client.ts | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts index 893e7136221..86679003120 100644 --- a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts +++ b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts @@ -31,6 +31,7 @@ import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); /** * Client JSON configuration object, loaded from * `src/v1beta1/transcoder_service_client_config.json`. @@ -150,22 +151,7 @@ export class TranscoderServiceClient { clientHeader.push(`${opts.libName}/${opts.libVersion}`); } // Load the applicable protos. - // For Node.js, pass the path to JSON proto file. - // For browsers, pass the JSON content. - - const nodejsProtoPath = path.join( - __dirname, - '..', - '..', - 'protos', - 'protos.json' - ); - this._protos = this._gaxGrpc.loadProto( - opts.fallback - ? // eslint-disable-next-line @typescript-eslint/no-var-requires - require('../../protos/protos.json') - : nodejsProtoPath - ); + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); // This API contains "path templates"; forward-slash-separated // identifiers to uniquely identify resources within the API. From dc4a6147ba3809413cac14ac377741d60ce3fb26 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 11 May 2021 23:12:12 +0000 Subject: [PATCH 037/116] chore: update gapic-generator-typescript to v1.3.2 (#62) Committer: @alexander-fenster PiperOrigin-RevId: 372656503 Source-Link: https://github.com/googleapis/googleapis/commit/6fa858c6489b1bbc505a7d7afe39f2dc45819c38 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d7c95df3ab1ea1b4c22a4542bad4924cc46d1388 --- .../src/v1beta1/transcoder_service_client.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts index 86679003120..95798a6da5c 100644 --- a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts +++ b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts @@ -26,7 +26,6 @@ import { PaginationCallback, GaxCall, } from 'google-gax'; -import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; From ea499d0edde919ac857bf03bfe24cd0199780d68 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 13 May 2021 10:31:57 -0700 Subject: [PATCH 038/116] chore: release 1.4.1 (#59) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-video-transcoder/CHANGELOG.md | 8 ++++++++ packages/google-cloud-video-transcoder/package.json | 2 +- .../google-cloud-video-transcoder/samples/package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-video-transcoder/CHANGELOG.md b/packages/google-cloud-video-transcoder/CHANGELOG.md index 1f66ee90245..27fd778acb1 100644 --- a/packages/google-cloud-video-transcoder/CHANGELOG.md +++ b/packages/google-cloud-video-transcoder/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +### [1.4.1](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.4.0...v1.4.1) (2021-05-12) + + +### Bug Fixes + +* **deps:** require google-gax v2.12.0 ([#58](https://www.github.com/googleapis/nodejs-video-transcoder/issues/58)) ([50f8132](https://www.github.com/googleapis/nodejs-video-transcoder/commit/50f813209878f5c2472bd1b38640341ae5715d33)) +* use require() to load JSON protos ([#61](https://www.github.com/googleapis/nodejs-video-transcoder/issues/61)) ([8f4fab7](https://www.github.com/googleapis/nodejs-video-transcoder/commit/8f4fab7b0b796dc730915ff0f06d0e965f0af915)) + ## [1.4.0](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.3.0...v1.4.0) (2021-03-31) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 71180ce8ef3..afae4ff6323 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/video-transcoder", - "version": "1.4.0", + "version": "1.4.1", "description": "Transcoder client for Node.js", "repository": "googleapis/nodejs-video-transcoder", "license": "Apache-2.0", diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index ca0652f1f97..64d57ca77f6 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/video-transcoder": "^1.4.0" + "@google-cloud/video-transcoder": "^1.4.1" }, "devDependencies": { "@google-cloud/storage": "^5.4.0", From af2792838054f5b6d5acfe39271189c940557c68 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 25 May 2021 17:58:30 +0200 Subject: [PATCH 039/116] chore(deps): update dependency sinon to v11 (#66) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^10.0.0` -> `^11.0.0`](https://renovatebot.com/diffs/npm/sinon/10.0.0/11.1.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/11.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/11.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/11.1.0/compatibility-slim/10.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/11.1.0/confidence-slim/10.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v11.1.0`](https://togithub.com/sinonjs/sinon/blob/master/CHANGELOG.md#​1110--2021-05-25) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v11.0.0...31be9a5d5a4762ef01cb195f29024616dfee9ce8) \================== - Add sinon.promise() implementation ([#​2369](https://togithub.com/sinonjs/sinon/issues/2369)) - Set wrappedMethod on getters/setters ([#​2378](https://togithub.com/sinonjs/sinon/issues/2378)) - \[Docs] Update fake-server usage & descriptions ([#​2365](https://togithub.com/sinonjs/sinon/issues/2365)) - Fake docs improvement ([#​2360](https://togithub.com/sinonjs/sinon/issues/2360)) - Update nise to 5.1.0 (fixed [#​2318](https://togithub.com/sinonjs/sinon/issues/2318)) ### [`v11.0.0`](https://togithub.com/sinonjs/sinon/blob/master/CHANGELOG.md#​1100--2021-05-24) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v10.0.1...v11.0.0) \================== - Explicitly use samsam 6.0.2 with fix for [#​2345](https://togithub.com/sinonjs/sinon/issues/2345) - Update most packages ([#​2371](https://togithub.com/sinonjs/sinon/issues/2371)) - Update compatibility docs ([#​2366](https://togithub.com/sinonjs/sinon/issues/2366)) - Update packages (includes breaking fake-timers change, see [#​2352](https://togithub.com/sinonjs/sinon/issues/2352)) - Warn of potential memory leaks ([#​2357](https://togithub.com/sinonjs/sinon/issues/2357)) - Fix clock test errors ### [`v10.0.1`](https://togithub.com/sinonjs/sinon/blob/master/CHANGELOG.md#​1001--2021-04-08) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v10.0.0...v10.0.1) \================== - Upgrade sinon components (bumps y18n to 4.0.1) - Bump y18n from 4.0.0 to 4.0.1
--- ### Configuration ๐Ÿ“… **Schedule**: "after 9am and before 3pm" (UTC). ๐Ÿšฆ **Automerge**: Disabled by config. Please merge this manually once you are satisfied. โ™ป๏ธ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. ๐Ÿ”• **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-video-transcoder). --- packages/google-cloud-video-transcoder/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index afae4ff6323..8963d0b4aa1 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -54,7 +54,7 @@ "mocha": "^8.2.1", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", - "sinon": "^10.0.0", + "sinon": "^11.0.0", "ts-loader": "^9.0.0", "typescript": "^3.9.7" }, From abbf3051e0a3c3907c2a3ee4edba33d225962a07 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 25 May 2021 22:40:07 +0000 Subject: [PATCH 040/116] fix: GoogleAdsError missing using generator version after 1.3.0 (#67) [PR](https://github.com/googleapis/gapic-generator-typescript/pull/878) within updated gapic-generator-typescript version 1.4.0 Committer: @summer-ji-eng PiperOrigin-RevId: 375759421 Source-Link: https://github.com/googleapis/googleapis/commit/95fa72fdd0d69b02d72c33b37d1e4cc66d4b1446 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f40a34377ad488a7c2bc3992b3c8d5faf5a15c46 --- .../src/v1beta1/transcoder_service_client.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts index 95798a6da5c..c9373d34687 100644 --- a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts +++ b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts @@ -145,6 +145,8 @@ export class TranscoderServiceClient { } 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}`); From 13fc17dfbd2e0321a5a51d906d4a9cbb6b7a6b92 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 25 May 2021 16:08:11 -0700 Subject: [PATCH 041/116] chore: release 1.4.2 (#68) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-video-transcoder/CHANGELOG.md | 7 +++++++ packages/google-cloud-video-transcoder/package.json | 2 +- .../google-cloud-video-transcoder/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-video-transcoder/CHANGELOG.md b/packages/google-cloud-video-transcoder/CHANGELOG.md index 27fd778acb1..cb8ff4a3bde 100644 --- a/packages/google-cloud-video-transcoder/CHANGELOG.md +++ b/packages/google-cloud-video-transcoder/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.4.2](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.4.1...v1.4.2) (2021-05-25) + + +### Bug Fixes + +* GoogleAdsError missing using generator version after 1.3.0 ([#67](https://www.github.com/googleapis/nodejs-video-transcoder/issues/67)) ([6475120](https://www.github.com/googleapis/nodejs-video-transcoder/commit/6475120814774a482655eb3b60e31a7fc00c2504)) + ### [1.4.1](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.4.0...v1.4.1) (2021-05-12) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 8963d0b4aa1..beac0363cbe 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/video-transcoder", - "version": "1.4.1", + "version": "1.4.2", "description": "Transcoder client for Node.js", "repository": "googleapis/nodejs-video-transcoder", "license": "Apache-2.0", diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index 64d57ca77f6..feb3dc6cd11 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/video-transcoder": "^1.4.1" + "@google-cloud/video-transcoder": "^1.4.2" }, "devDependencies": { "@google-cloud/storage": "^5.4.0", From 665c48e40ea4e1c8ccbc1438302917a3e49ed312 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 22 Jun 2021 20:22:40 +0000 Subject: [PATCH 042/116] fix: make request optional in all cases (#74) ... chore: update gapic-generator-ruby to the latest commit chore: release gapic-generator-typescript 1.5.0 Committer: @miraleung PiperOrigin-RevId: 380641501 Source-Link: https://github.com/googleapis/googleapis/commit/076f7e9f0b258bdb54338895d7251b202e8f0de3 Source-Link: https://github.com/googleapis/googleapis-gen/commit/27e4c88b4048e5f56508d4e1aa417d60a3380892 --- .../src/v1beta1/transcoder_service_client.ts | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts index c9373d34687..4866e174512 100644 --- a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts +++ b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts @@ -323,7 +323,7 @@ export class TranscoderServiceClient { // -- Service calls -- // ------------------- createJob( - request: protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest, + request?: protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest, options?: CallOptions ): Promise< [ @@ -377,7 +377,7 @@ export class TranscoderServiceClient { * const [response] = await client.createJob(request); */ createJob( - request: protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest, + request?: protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest, optionsOrCallback?: | CallOptions | Callback< @@ -423,7 +423,7 @@ export class TranscoderServiceClient { return this.innerApiCalls.createJob(request, options, callback); } getJob( - request: protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest, + request?: protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest, options?: CallOptions ): Promise< [ @@ -472,7 +472,7 @@ export class TranscoderServiceClient { * const [response] = await client.getJob(request); */ getJob( - request: protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest, + request?: protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest, optionsOrCallback?: | CallOptions | Callback< @@ -515,7 +515,7 @@ export class TranscoderServiceClient { return this.innerApiCalls.getJob(request, options, callback); } deleteJob( - request: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest, + request?: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest, options?: CallOptions ): Promise< [ @@ -567,7 +567,7 @@ export class TranscoderServiceClient { * const [response] = await client.deleteJob(request); */ deleteJob( - request: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest, + request?: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest, optionsOrCallback?: | CallOptions | Callback< @@ -613,7 +613,7 @@ export class TranscoderServiceClient { return this.innerApiCalls.deleteJob(request, options, callback); } createJobTemplate( - request: protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest, + request?: protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest, options?: CallOptions ): Promise< [ @@ -673,7 +673,7 @@ export class TranscoderServiceClient { * const [response] = await client.createJobTemplate(request); */ createJobTemplate( - request: protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest, + request?: protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest, optionsOrCallback?: | CallOptions | Callback< @@ -719,7 +719,7 @@ export class TranscoderServiceClient { return this.innerApiCalls.createJobTemplate(request, options, callback); } getJobTemplate( - request: protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest, + request?: protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest, options?: CallOptions ): Promise< [ @@ -772,7 +772,7 @@ export class TranscoderServiceClient { * const [response] = await client.getJobTemplate(request); */ getJobTemplate( - request: protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest, + request?: protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest, optionsOrCallback?: | CallOptions | Callback< @@ -818,7 +818,7 @@ export class TranscoderServiceClient { return this.innerApiCalls.getJobTemplate(request, options, callback); } deleteJobTemplate( - request: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest, + request?: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest, options?: CallOptions ): Promise< [ @@ -870,7 +870,7 @@ export class TranscoderServiceClient { * const [response] = await client.deleteJobTemplate(request); */ deleteJobTemplate( - request: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest, + request?: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest, optionsOrCallback?: | CallOptions | Callback< @@ -917,7 +917,7 @@ export class TranscoderServiceClient { } listJobs( - request: protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, + request?: protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, options?: CallOptions ): Promise< [ @@ -973,7 +973,7 @@ export class TranscoderServiceClient { * for more details and examples. */ listJobs( - request: protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, + request?: protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< @@ -1111,7 +1111,7 @@ export class TranscoderServiceClient { ) as AsyncIterable; } listJobTemplates( - request: protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, + request?: protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, options?: CallOptions ): Promise< [ @@ -1168,7 +1168,7 @@ export class TranscoderServiceClient { * for more details and examples. */ listJobTemplates( - request: protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, + request?: protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, optionsOrCallback?: | CallOptions | PaginationCallback< From 8a9a62d9995d6ed86c62db087bf0af267310c210 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Thu, 1 Jul 2021 12:43:07 -0400 Subject: [PATCH 043/116] fix(deps): require google-gax v2.17.0 (#78) --- packages/google-cloud-video-transcoder/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index beac0363cbe..1e7a80c9215 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -39,7 +39,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^2.12.0" + "google-gax": "^2.17.0" }, "devDependencies": { "@types/mocha": "^8.0.3", From b57e93b56a4a084381d7b279bf9f2dd57890a128 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 7 Jul 2021 08:28:43 -0700 Subject: [PATCH 044/116] chore: release 1.4.3 (#75) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-video-transcoder/CHANGELOG.md | 8 ++++++++ packages/google-cloud-video-transcoder/package.json | 2 +- .../google-cloud-video-transcoder/samples/package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-video-transcoder/CHANGELOG.md b/packages/google-cloud-video-transcoder/CHANGELOG.md index cb8ff4a3bde..478a73310a0 100644 --- a/packages/google-cloud-video-transcoder/CHANGELOG.md +++ b/packages/google-cloud-video-transcoder/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +### [1.4.3](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.4.2...v1.4.3) (2021-07-01) + + +### Bug Fixes + +* **deps:** require google-gax v2.17.0 ([#78](https://www.github.com/googleapis/nodejs-video-transcoder/issues/78)) ([cd436f8](https://www.github.com/googleapis/nodejs-video-transcoder/commit/cd436f8198abab33cd9c4fe63d9b64582764ed03)) +* make request optional in all cases ([#74](https://www.github.com/googleapis/nodejs-video-transcoder/issues/74)) ([630b974](https://www.github.com/googleapis/nodejs-video-transcoder/commit/630b974d0e79b805754d2d4f0afc4b7c5ae47f6d)) + ### [1.4.2](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.4.1...v1.4.2) (2021-05-25) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 1e7a80c9215..71869ddb901 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/video-transcoder", - "version": "1.4.2", + "version": "1.4.3", "description": "Transcoder client for Node.js", "repository": "googleapis/nodejs-video-transcoder", "license": "Apache-2.0", diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index feb3dc6cd11..6e9ce796ef3 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/video-transcoder": "^1.4.2" + "@google-cloud/video-transcoder": "^1.4.3" }, "devDependencies": { "@google-cloud/storage": "^5.4.0", From e66d5b1007ff7ede1d564c7df4d39c8b33912c79 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 12 Jul 2021 17:46:40 -0400 Subject: [PATCH 045/116] fix(deps): google-gax v2.17.1 (#83) --- packages/google-cloud-video-transcoder/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 71869ddb901..480a8946c5a 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -39,7 +39,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^2.17.0" + "google-gax": "^2.17.1" }, "devDependencies": { "@types/mocha": "^8.0.3", From de8ca9f610b1d1207fd87263dc1e1ebf5234eecb Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 13 Jul 2021 18:14:32 -0700 Subject: [PATCH 046/116] chore: release 1.4.4 (#84) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-video-transcoder/CHANGELOG.md | 7 +++++++ packages/google-cloud-video-transcoder/package.json | 2 +- .../google-cloud-video-transcoder/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-video-transcoder/CHANGELOG.md b/packages/google-cloud-video-transcoder/CHANGELOG.md index 478a73310a0..d22ca637c21 100644 --- a/packages/google-cloud-video-transcoder/CHANGELOG.md +++ b/packages/google-cloud-video-transcoder/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.4.4](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.4.3...v1.4.4) (2021-07-12) + + +### Bug Fixes + +* **deps:** google-gax v2.17.1 ([#83](https://www.github.com/googleapis/nodejs-video-transcoder/issues/83)) ([d7b29c0](https://www.github.com/googleapis/nodejs-video-transcoder/commit/d7b29c06fcb2a408cf102fa9b1e639c193c70c57)) + ### [1.4.3](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.4.2...v1.4.3) (2021-07-01) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 480a8946c5a..a8a7a21f2bc 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/video-transcoder", - "version": "1.4.3", + "version": "1.4.4", "description": "Transcoder client for Node.js", "repository": "googleapis/nodejs-video-transcoder", "license": "Apache-2.0", diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index 6e9ce796ef3..6e81863901d 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/video-transcoder": "^1.4.3" + "@google-cloud/video-transcoder": "^1.4.4" }, "devDependencies": { "@google-cloud/storage": "^5.4.0", From ecd7b4756e62522211e8392ab03078647ec94fb0 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 15 Jul 2021 17:34:11 +0000 Subject: [PATCH 047/116] feat: Enables generation of client libraries for C#, php and ruby. (#82) PiperOrigin-RevId: 383957820 Source-Link: https://github.com/googleapis/googleapis/commit/2d51c27db9bdbd7cc3a8fbe6c6e27bcca0b06f74 Source-Link: https://github.com/googleapis/googleapis-gen/commit/7fce650f21ca58dfbaa05b272eda3d1b2f4b4b42 --- .../cloud/video/transcoder/v1/resources.proto | 1105 ++ .../cloud/video/transcoder/v1/services.proto | 273 + .../protos/protos.d.ts | 5806 ++++++ .../protos/protos.js | 15024 +++++++++++++++- .../protos/protos.json | 1512 ++ .../src/index.ts | 5 +- .../src/v1/gapic_metadata.json | 111 + .../src/v1/index.ts | 19 + .../src/v1/transcoder_service_client.ts | 1485 ++ .../v1/transcoder_service_client_config.json | 66 + .../src/v1/transcoder_service_proto_list.json | 4 + .../test/gapic_transcoder_service_v1.ts | 1644 ++ 12 files changed, 26733 insertions(+), 321 deletions(-) create mode 100644 packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/resources.proto create mode 100644 packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/services.proto create mode 100644 packages/google-cloud-video-transcoder/src/v1/gapic_metadata.json create mode 100644 packages/google-cloud-video-transcoder/src/v1/index.ts create mode 100644 packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts create mode 100644 packages/google-cloud-video-transcoder/src/v1/transcoder_service_client_config.json create mode 100644 packages/google-cloud-video-transcoder/src/v1/transcoder_service_proto_list.json create mode 100644 packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts diff --git a/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/resources.proto b/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/resources.proto new file mode 100644 index 00000000000..1677868b200 --- /dev/null +++ b/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/resources.proto @@ -0,0 +1,1105 @@ +// 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. + +syntax = "proto3"; + +package google.cloud.video.transcoder.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/video/transcoder/v1;transcoder"; +option java_multiple_files = true; +option java_outer_classname = "ResourcesProto"; +option java_package = "com.google.cloud.video.transcoder.v1"; + +// Transcoding job resource. +message Job { + option (google.api.resource) = { + type: "transcoder.googleapis.com/Job" + pattern: "projects/{project}/locations/{location}/jobs/{job}" + }; + + // The current state of the job. + enum ProcessingState { + // The processing state is not specified. + PROCESSING_STATE_UNSPECIFIED = 0; + + // The job is enqueued and will be picked up for processing soon. + PENDING = 1; + + // The job is being processed. + RUNNING = 2; + + // The job has been completed successfully. + SUCCEEDED = 3; + + // The job has failed. For additional information, see `failure_reason` and + // `failure_details` + FAILED = 4; + } + + // The resource name of the job. + // Format: `projects/{project}/locations/{location}/jobs/{job}` + string name = 1; + + // Input only. Specify the `input_uri` to populate empty `uri` fields in each element of + // `Job.config.inputs` or `JobTemplate.config.inputs` when using template. + // URI of the media. Input files must be at least 5 seconds in duration and + // stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). + string input_uri = 2 [(google.api.field_behavior) = INPUT_ONLY]; + + // Input only. Specify the `output_uri` to populate an empty `Job.config.output.uri` or + // `JobTemplate.config.output.uri` when using template. + // URI for the output file(s). For example, `gs://my-bucket/outputs/`. + string output_uri = 3 [(google.api.field_behavior) = INPUT_ONLY]; + + // Specify the `job_config` for the transcoding job. If you don't specify the + // `job_config`, the API selects `templateId`; this template ID is set to + // `preset/web-hd` by default. When you use a `template_id` to create a job, + // the `Job.config` is populated by the `JobTemplate.config`.
+ oneof job_config { + // Input only. Specify the `template_id` to use for populating `Job.config`. The default + // is `preset/web-hd`. + // + // Preset Transcoder templates: + // - `preset/{preset_id}` + // + // - User defined JobTemplate: + // `{job_template_id}` + string template_id = 4 [(google.api.field_behavior) = INPUT_ONLY]; + + // The configuration for this job. + JobConfig config = 5; + } + + // Output only. The current state of the job. + ProcessingState state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the job was created. + google.protobuf.Timestamp create_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the transcoding started. + google.protobuf.Timestamp start_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the transcoding finished. + google.protobuf.Timestamp end_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Job time to live value in days, which will be effective after job + // completion. Job should be deleted automatically after the given TTL. Enter + // a value between 1 and 90. The default is 30. + int32 ttl_after_completion_days = 15; + + // Output only. An error object that describes the reason for the failure. + // This property is always present when `state` is `FAILED`. + google.rpc.Status error = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Transcoding job template resource. +message JobTemplate { + option (google.api.resource) = { + type: "transcoder.googleapis.com/JobTemplate" + pattern: "projects/{project}/locations/{location}/jobTemplates/{job_template}" + }; + + // The resource name of the job template. + // Format: + // `projects/{project}/locations/{location}/jobTemplates/{job_template}` + string name = 1; + + // The configuration for this template. + JobConfig config = 2; +} + +// Job configuration +message JobConfig { + // List of input assets stored in Cloud Storage. + repeated Input inputs = 1; + + // List of `Edit atom`s. Defines the ultimate timeline of the resulting + // file or manifest. + repeated EditAtom edit_list = 2; + + // List of elementary streams. + repeated ElementaryStream elementary_streams = 3; + + // List of multiplexing settings for output streams. + repeated MuxStream mux_streams = 4; + + // List of output manifests. + repeated Manifest manifests = 5; + + // Output configuration. + Output output = 6; + + // List of ad breaks. Specifies where to insert ad break tags in the output + // manifests. + repeated AdBreak ad_breaks = 7; + + // Destination on Pub/Sub. + PubsubDestination pubsub_destination = 8; + + // List of output sprite sheets. + repeated SpriteSheet sprite_sheets = 9; + + // List of overlays on the output video, in descending Z-order. + repeated Overlay overlays = 10; +} + +// Input asset. +message Input { + // A unique key for this input. Must be specified when using advanced + // mapping and edit lists. + string key = 1; + + // URI of the media. Input files must be at least 5 seconds in duration and + // stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). + // If empty, the value will be populated from `Job.input_uri`. + string uri = 2; + + // Preprocessing configurations. + PreprocessingConfig preprocessing_config = 3; +} + +// Location of output file(s) in a Cloud Storage bucket. +message Output { + // URI for the output file(s). For example, `gs://my-bucket/outputs/`. + // If empty the value is populated from `Job.output_uri`. + string uri = 1; +} + +// Edit atom. +message EditAtom { + // A unique key for this atom. Must be specified when using advanced + // mapping. + string key = 1; + + // List of `Input.key`s identifying files that should be used in this atom. + // The listed `inputs` must have the same timeline. + repeated string inputs = 2; + + // End time in seconds for the atom, relative to the input file timeline. + // When `end_time_offset` is not specified, the `inputs` are used until + // the end of the atom. + google.protobuf.Duration end_time_offset = 3; + + // Start time in seconds for the atom, relative to the input file timeline. + // The default is `0s`. + google.protobuf.Duration start_time_offset = 4; +} + +// Ad break. +message AdBreak { + // Start time in seconds for the ad break, relative to the output file + // timeline. The default is `0s`. + google.protobuf.Duration start_time_offset = 1; +} + +// Encoding of an input file such as an audio, video, or text track. +// Elementary streams must be packaged before +// mapping and sharing between different output formats. +message ElementaryStream { + // A unique key for this elementary stream. + string key = 4; + + // Encoding of an audio, video, or text track. + oneof elementary_stream { + // Encoding of a video stream. + VideoStream video_stream = 1; + + // Encoding of an audio stream. + AudioStream audio_stream = 2; + + // Encoding of a text stream. For example, closed captions or subtitles. + TextStream text_stream = 3; + } +} + +// Multiplexing settings for output stream. +message MuxStream { + // A unique key for this multiplexed stream. HLS media manifests will be + // named `MuxStream.key` with the `".m3u8"` extension suffix. + string key = 1; + + // The name of the generated file. The default is `MuxStream.key` with the + // extension suffix corresponding to the `MuxStream.container`. + // + // Individual segments also have an incremental 10-digit zero-padded suffix + // starting from 0 before the extension, such as `"mux_stream0000000123.ts"`. + string file_name = 2; + + // The container format. The default is `"mp4"` + // + // Supported container formats: + // - 'ts' + // - 'fmp4'- the corresponding file extension is `".m4s"` + // - 'mp4' + // - 'vtt' + string container = 3; + + // List of `ElementaryStream.key`s multiplexed in this stream. + repeated string elementary_streams = 4; + + // Segment settings for `"ts"`, `"fmp4"` and `"vtt"`. + SegmentSettings segment_settings = 5; + + // Encryption settings. + Encryption encryption = 6; +} + +// Manifest configuration. +message Manifest { + // The manifest type can be either `"HLS"` or `"DASH"`. + enum ManifestType { + // The manifest type is not specified. + MANIFEST_TYPE_UNSPECIFIED = 0; + + // Create `"HLS"` manifest. The corresponding file extension is `".m3u8"`. + HLS = 1; + + // Create `"DASH"` manifest. The corresponding file extension is `".mpd"`. + DASH = 2; + } + + // The name of the generated file. The default is `"manifest"` with the + // extension suffix corresponding to the `Manifest.type`. + string file_name = 1; + + // Required. Type of the manifest, can be "HLS" or "DASH". + ManifestType type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. List of user given `MuxStream.key`s that should appear in this manifest. + // + // When `Manifest.type` is `HLS`, a media manifest with name `MuxStream.key` + // and `.m3u8` extension is generated for each element of the + // `Manifest.mux_streams`. + repeated string mux_streams = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// A Pub/Sub destination. +message PubsubDestination { + // The name of the Pub/Sub topic to publish job completion notification + // to. For example: `projects/{project}/topics/{topic}`. + string topic = 1; +} + +// Sprite sheet configuration. +message SpriteSheet { + // Format type. The default is `"jpeg"`. + // + // Supported formats: + // - 'jpeg' + string format = 1; + + // Required. File name prefix for the generated sprite sheets. + // + // Each sprite sheet has an incremental 10-digit zero-padded suffix starting + // from 0 before the extension, such as `"sprite_sheet0000000123.jpeg"`. + string file_prefix = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The width of sprite in pixels. Must be an even integer. To preserve the + // source aspect ratio, set the [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] field or + // the [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] field, but not both (the API will + // automatically calculate the missing field). + int32 sprite_width_pixels = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The height of sprite in pixels. Must be an even integer. To preserve the + // source aspect ratio, set the [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] field or + // the [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] field, but not both (the API will + // automatically calculate the missing field). + int32 sprite_height_pixels = 4 [(google.api.field_behavior) = REQUIRED]; + + // The maximum number of sprites per row in a sprite sheet. The default is 0, + // which indicates no maximum limit. + int32 column_count = 5; + + // The maximum number of rows per sprite sheet. When the sprite sheet is full, + // a new sprite sheet is created. The default is 0, which indicates no maximum + // limit. + int32 row_count = 6; + + // Start time in seconds, relative to the output file timeline. Determines the + // first sprite to pick. The default is `0s`. + google.protobuf.Duration start_time_offset = 7; + + // End time in seconds, relative to the output file timeline. When + // `end_time_offset` is not specified, the sprites are generated until the end + // of the output file. + google.protobuf.Duration end_time_offset = 8; + + // Specify either total number of sprites or interval to create sprites. + oneof extraction_strategy { + // Total number of sprites. Create the specified number of sprites + // distributed evenly across the timeline of the output media. The default + // is 100. + int32 total_count = 9; + + // Starting from `0s`, create sprites at regular intervals. Specify the + // interval value in seconds. + google.protobuf.Duration interval = 10; + } + + // The quality of the generated sprite sheet. Enter a value between 1 + // and 100, where 1 is the lowest quality and 100 is the highest quality. + // The default is 100. A high quality value corresponds to a low image data + // compression ratio. + int32 quality = 11; +} + +// Overlay configuration. +message Overlay { + // 2D normalized coordinates. Default: `{0.0, 0.0}` + message NormalizedCoordinate { + // Normalized x coordinate. + double x = 1; + + // Normalized y coordinate. + double y = 2; + } + + // Overlaid jpeg image. + message Image { + // Required. URI of the JPEG image in Cloud Storage. For example, + // `gs://bucket/inputs/image.jpeg`. JPEG is the only supported image type. + string uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // Normalized image resolution, based on output video resolution. Valid + // values: `0.0`โ€“`1.0`. To respect the original image aspect ratio, set + // either `x` or `y` to `0.0`. To use the original image resolution, set + // both `x` and `y` to `0.0`. + NormalizedCoordinate resolution = 2; + + // Target image opacity. Valid values are from `1.0` (solid, default) to + // `0.0` (transparent), exclusive. Set this to a value greater than `0.0`. + double alpha = 3; + } + + // Display static overlay object. + message AnimationStatic { + // Normalized coordinates based on output video resolution. Valid + // values: `0.0`โ€“`1.0`. `xy` is the upper-left coordinate of the overlay + // object. For example, use the x and y coordinates {0,0} to position the + // top-left corner of the overlay animation in the top-left corner of the + // output video. + NormalizedCoordinate xy = 1; + + // The time to start displaying the overlay object, in seconds. Default: 0 + google.protobuf.Duration start_time_offset = 2; + } + + // Display overlay object with fade animation. + message AnimationFade { + // Required. Type of fade animation: `FADE_IN` or `FADE_OUT`. + FadeType fade_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Normalized coordinates based on output video resolution. Valid + // values: `0.0`โ€“`1.0`. `xy` is the upper-left coordinate of the overlay + // object. For example, use the x and y coordinates {0,0} to position the + // top-left corner of the overlay animation in the top-left corner of the + // output video. + NormalizedCoordinate xy = 2; + + // The time to start the fade animation, in seconds. Default: 0 + google.protobuf.Duration start_time_offset = 3; + + // The time to end the fade animation, in seconds. Default: + // `start_time_offset` + 1s + google.protobuf.Duration end_time_offset = 4; + } + + // End previous overlay animation from the video. Without AnimationEnd, the + // overlay object will keep the state of previous animation until the end of + // the video. + message AnimationEnd { + // The time to end overlay object, in seconds. Default: 0 + google.protobuf.Duration start_time_offset = 1; + } + + // Animation types. + message Animation { + // Animations can be static or fade, or they can end the previous animation. + oneof animation_type { + // Display static overlay object. + AnimationStatic animation_static = 1; + + // Display overlay object with fade animation. + AnimationFade animation_fade = 2; + + // End previous animation. + AnimationEnd animation_end = 3; + } + } + + // Fade type for the overlay: `FADE_IN` or `FADE_OUT`. + enum FadeType { + // The fade type is not specified. + FADE_TYPE_UNSPECIFIED = 0; + + // Fade the overlay object into view. + FADE_IN = 1; + + // Fade the overlay object out of view. + FADE_OUT = 2; + } + + // Image overlay. + Image image = 1; + + // List of Animations. The list should be chronological, without any time + // overlap. + repeated Animation animations = 2; +} + +// Preprocessing configurations. +message PreprocessingConfig { + // Color preprocessing configuration. + message Color { + // Control color saturation of the video. Enter a value between -1 and 1, + // where -1 is fully desaturated and 1 is maximum saturation. 0 is no + // change. The default is 0. + double saturation = 1; + + // Control black and white contrast of the video. Enter a value between -1 + // and 1, where -1 is minimum contrast and 1 is maximum contrast. 0 is no + // change. The default is 0. + double contrast = 2; + + // Control brightness of the video. Enter a value between -1 and 1, where -1 + // is minimum brightness and 1 is maximum brightness. 0 is no change. The + // default is 0. + double brightness = 3; + } + + // Denoise preprocessing configuration. + message Denoise { + // Set strength of the denoise. Enter a value between 0 and 1. The higher + // the value, the smoother the image. 0 is no denoising. The default is 0. + double strength = 1; + + // Set the denoiser mode. The default is `"standard"`. + // + // Supported denoiser modes: + // - 'standard' + // - 'grain' + string tune = 2; + } + + // Deblock preprocessing configuration. + message Deblock { + // Set strength of the deblocker. Enter a value between 0 and 1. The higher + // the value, the stronger the block removal. 0 is no deblocking. The + // default is 0. + double strength = 1; + + // Enable deblocker. The default is `false`. + bool enabled = 2; + } + + // Audio preprocessing configuration. + message Audio { + // Specify audio loudness normalization in loudness units relative to full + // scale (LUFS). Enter a value between -24 and 0 (the default), where: + // + // * -24 is the Advanced Television Systems Committee (ATSC A/85) standard + // * -23 is the EU R128 broadcast standard + // * -19 is the prior standard for online mono audio + // * -18 is the ReplayGain standard + // * -16 is the prior standard for stereo audio + // * -14 is the new online audio standard recommended by Spotify, as well + // as Amazon Echo + // * 0 disables normalization + double lufs = 1; + + // Enable boosting high frequency components. The default is `false`. + bool high_boost = 2; + + // Enable boosting low frequency components. The default is `false`. + bool low_boost = 3; + } + + // Video cropping configuration for the input video. The cropped input video + // is scaled to match the output resolution. + message Crop { + // The number of pixels to crop from the top. The default is 0. + int32 top_pixels = 1; + + // The number of pixels to crop from the bottom. The default is 0. + int32 bottom_pixels = 2; + + // The number of pixels to crop from the left. The default is 0. + int32 left_pixels = 3; + + // The number of pixels to crop from the right. The default is 0. + int32 right_pixels = 4; + } + + // Pad filter configuration for the input video. The padded input video + // is scaled after padding with black to match the output resolution. + message Pad { + // The number of pixels to add to the top. The default is 0. + int32 top_pixels = 1; + + // The number of pixels to add to the bottom. The default is 0. + int32 bottom_pixels = 2; + + // The number of pixels to add to the left. The default is 0. + int32 left_pixels = 3; + + // The number of pixels to add to the right. The default is 0. + int32 right_pixels = 4; + } + + // Color preprocessing configuration. + Color color = 1; + + // Denoise preprocessing configuration. + Denoise denoise = 2; + + // Deblock preprocessing configuration. + Deblock deblock = 3; + + // Audio preprocessing configuration. + Audio audio = 4; + + // Specify the video cropping configuration. + Crop crop = 5; + + // Specify the video pad filter configuration. + Pad pad = 6; +} + +// Video stream resource. +message VideoStream { + // H264 codec settings. + message H264CodecSettings { + // The width of the video in pixels. Must be an even integer. + // When not specified, the width is adjusted to match the specified height + // and input aspect ratio. If both are omitted, the input width is used. + int32 width_pixels = 1; + + // The height of the video in pixels. Must be an even integer. + // When not specified, the height is adjusted to match the specified width + // and input aspect ratio. If both are omitted, the input height is used. + int32 height_pixels = 2; + + // Required. The target video frame rate in frames per second (FPS). Must be less than + // or equal to 120. Will default to the input frame rate if larger than the + // input frame rate. The API will generate an output FPS that is divisible + // by the input FPS, and smaller or equal to the target FPS. See + // [Calculating frame + // rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + // more information. + double frame_rate = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The video bitrate in bits per second. Must be between 1 and + // 1,000,000,000. + int32 bitrate_bps = 4 [(google.api.field_behavior) = REQUIRED]; + + // Pixel format to use. The default is `"yuv420p"`. + // + // Supported pixel formats: + // - 'yuv420p' pixel format. + // - 'yuv422p' pixel format. + // - 'yuv444p' pixel format. + // - 'yuv420p10' 10-bit HDR pixel format. + // - 'yuv422p10' 10-bit HDR pixel format. + // - 'yuv444p10' 10-bit HDR pixel format. + // - 'yuv420p12' 12-bit HDR pixel format. + // - 'yuv422p12' 12-bit HDR pixel format. + // - 'yuv444p12' 12-bit HDR pixel format. + string pixel_format = 5; + + // Specify the `rate_control_mode`. The default is `"vbr"`. + // + // Supported rate control modes: + // - 'vbr' - variable bitrate + // - 'crf' - constant rate factor + string rate_control_mode = 6; + + // Target CRF level. Must be between 10 and 36, where 10 is the highest + // quality and 36 is the most efficient compression. The default is 21. + int32 crf_level = 7; + + // Specifies whether an open Group of Pictures (GOP) structure should be + // allowed or not. The default is `false`. + bool allow_open_gop = 8; + + // GOP mode can be either by frame count or duration. + oneof gop_mode { + // Select the GOP size based on the specified frame count. Must be greater + // than zero. + int32 gop_frame_count = 9; + + // Select the GOP size based on the specified duration. The default is + // `"3s"`. Note that `gopDuration` must be less than or equal to + // [`segmentDuration`](#SegmentSettings), and + // [`segmentDuration`](#SegmentSettings) must be divisible by + // `gopDuration`. + google.protobuf.Duration gop_duration = 10; + } + + // Use two-pass encoding strategy to achieve better video quality. + // `VideoStream.rate_control_mode` must be `"vbr"`. The default is `false`. + bool enable_two_pass = 11; + + // Size of the Video Buffering Verifier (VBV) buffer in bits. Must be + // greater than zero. The default is equal to `VideoStream.bitrate_bps`. + int32 vbv_size_bits = 12; + + // Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. + // Must be greater than zero. The default is equal to 90% of + // `VideoStream.vbv_size_bits`. + int32 vbv_fullness_bits = 13; + + // The entropy coder to use. The default is `"cabac"`. + // + // Supported entropy coders: + // - 'cavlc' + // - 'cabac' + string entropy_coder = 14; + + // Allow B-pyramid for reference frame selection. This may not be supported + // on all decoders. The default is `false`. + bool b_pyramid = 15; + + // The number of consecutive B-frames. Must be greater than or equal to + // zero. Must be less than `VideoStream.gop_frame_count` if set. The default + // is 0. + int32 b_frame_count = 16; + + // Specify the intensity of the adaptive quantizer (AQ). Must be between 0 + // and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A + // higher value equals a lower bitrate but smoother image. The default is 0. + double aq_strength = 17; + + // Enforces the specified codec profile. The following profiles are + // supported: + // + // * `baseline` + // * `main` + // * `high` (default) + // + // The available options are + // [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Profile){: + // class="external" }. Note that certain values for this field may cause the + // transcoder to override other fields you set in the `H264CodecSettings` + // message. + string profile = 18; + + // Enforces the specified codec tune. The available options are + // [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune){: + // class="external" }. Note that certain values for this field may cause the + // transcoder to override other fields you set in the `H264CodecSettings` + // message. + string tune = 19; + + // Enforces the specified codec preset. The default is `veryfast`. The + // available options are + // [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Preset){: + // class="external" }. Note that certain values for this field may cause the + // transcoder to override other fields you set in the `H264CodecSettings` + // message. + string preset = 20; + } + + // H265 codec settings. + message H265CodecSettings { + // The width of the video in pixels. Must be an even integer. + // When not specified, the width is adjusted to match the specified height + // and input aspect ratio. If both are omitted, the input width is used. + int32 width_pixels = 1; + + // The height of the video in pixels. Must be an even integer. + // When not specified, the height is adjusted to match the specified width + // and input aspect ratio. If both are omitted, the input height is used. + int32 height_pixels = 2; + + // Required. The target video frame rate in frames per second (FPS). Must be less than + // or equal to 120. Will default to the input frame rate if larger than the + // input frame rate. The API will generate an output FPS that is divisible + // by the input FPS, and smaller or equal to the target FPS. See + // [Calculating frame + // rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + // more information. + double frame_rate = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The video bitrate in bits per second. Must be between 1 and + // 1,000,000,000. + int32 bitrate_bps = 4 [(google.api.field_behavior) = REQUIRED]; + + // Pixel format to use. The default is `"yuv420p"`. + // + // Supported pixel formats: + // - 'yuv420p' pixel format. + // - 'yuv422p' pixel format. + // - 'yuv444p' pixel format. + // - 'yuv420p10' 10-bit HDR pixel format. + // - 'yuv422p10' 10-bit HDR pixel format. + // - 'yuv444p10' 10-bit HDR pixel format. + // - 'yuv420p12' 12-bit HDR pixel format. + // - 'yuv422p12' 12-bit HDR pixel format. + // - 'yuv444p12' 12-bit HDR pixel format. + string pixel_format = 5; + + // Specify the `rate_control_mode`. The default is `"vbr"`. + // + // Supported rate control modes: + // - 'vbr' - variable bitrate + // - 'crf' - constant rate factor + string rate_control_mode = 6; + + // Target CRF level. Must be between 10 and 36, where 10 is the highest + // quality and 36 is the most efficient compression. The default is 21. + int32 crf_level = 7; + + // Specifies whether an open Group of Pictures (GOP) structure should be + // allowed or not. The default is `false`. + bool allow_open_gop = 8; + + // GOP mode can be either by frame count or duration. + oneof gop_mode { + // Select the GOP size based on the specified frame count. Must be greater + // than zero. + int32 gop_frame_count = 9; + + // Select the GOP size based on the specified duration. The default is + // `"3s"`. Note that `gopDuration` must be less than or equal to + // [`segmentDuration`](#SegmentSettings), and + // [`segmentDuration`](#SegmentSettings) must be divisible by + // `gopDuration`. + google.protobuf.Duration gop_duration = 10; + } + + // Use two-pass encoding strategy to achieve better video quality. + // `VideoStream.rate_control_mode` must be `"vbr"`. The default is `false`. + bool enable_two_pass = 11; + + // Size of the Video Buffering Verifier (VBV) buffer in bits. Must be + // greater than zero. The default is equal to `VideoStream.bitrate_bps`. + int32 vbv_size_bits = 12; + + // Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. + // Must be greater than zero. The default is equal to 90% of + // `VideoStream.vbv_size_bits`. + int32 vbv_fullness_bits = 13; + + // Allow B-pyramid for reference frame selection. This may not be supported + // on all decoders. The default is `false`. + bool b_pyramid = 14; + + // The number of consecutive B-frames. Must be greater than or equal to + // zero. Must be less than `VideoStream.gop_frame_count` if set. The default + // is 0. + int32 b_frame_count = 15; + + // Specify the intensity of the adaptive quantizer (AQ). Must be between 0 + // and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A + // higher value equals a lower bitrate but smoother image. The default is 0. + double aq_strength = 16; + + // Enforces the specified codec profile. The following profiles are + // supported: + // + // 8bit profiles + // * `main` (default) + // * `main-intra` + // * `mainstillpicture` + // + // 10bit profiles + // * `main10` (default) + // * `main10-intra` + // * `main422-10` + // * `main422-10-intra` + // * `main444-10` + // * `main444-10-intra` + // + // 12bit profiles + // * `main12` (default) + // * `main12-intra` + // * `main422-12` + // * `main422-12-intra` + // * `main444-12` + // * `main444-12-intra` + // + // The available options are + // [FFmpeg-compatible](https://x265.readthedocs.io/){: + // class="external" }. Note that certain values for this field may cause the + // transcoder to override other fields you set in the `H265CodecSettings` + // message. + string profile = 17; + + // Enforces the specified codec tune. The available options are + // [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265){: + // class="external" }. Note that certain values for this field may cause the + // transcoder to override other fields you set in the `H265CodecSettings` + // message. + string tune = 18; + + // Enforces the specified codec preset. The default is `veryfast`. The + // available options are + // [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265){: + // class="external" }. Note that certain values for this field may cause the + // transcoder to override other fields you set in the `H265CodecSettings` + // message. + string preset = 19; + } + + // VP9 codec settings. + message Vp9CodecSettings { + // The width of the video in pixels. Must be an even integer. + // When not specified, the width is adjusted to match the specified height + // and input aspect ratio. If both are omitted, the input width is used. + int32 width_pixels = 1; + + // The height of the video in pixels. Must be an even integer. + // When not specified, the height is adjusted to match the specified width + // and input aspect ratio. If both are omitted, the input height is used. + int32 height_pixels = 2; + + // Required. The target video frame rate in frames per second (FPS). Must be less than + // or equal to 120. Will default to the input frame rate if larger than the + // input frame rate. The API will generate an output FPS that is divisible + // by the input FPS, and smaller or equal to the target FPS. See + // [Calculating frame + // rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + // more information. + double frame_rate = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The video bitrate in bits per second. Must be between 1 and + // 1,000,000,000. + int32 bitrate_bps = 4 [(google.api.field_behavior) = REQUIRED]; + + // Pixel format to use. The default is `"yuv420p"`. + // + // Supported pixel formats: + // - 'yuv420p' pixel format. + // - 'yuv422p' pixel format. + // - 'yuv444p' pixel format. + // - 'yuv420p10' 10-bit HDR pixel format. + // - 'yuv422p10' 10-bit HDR pixel format. + // - 'yuv444p10' 10-bit HDR pixel format. + // - 'yuv420p12' 12-bit HDR pixel format. + // - 'yuv422p12' 12-bit HDR pixel format. + // - 'yuv444p12' 12-bit HDR pixel format. + string pixel_format = 5; + + // Specify the `rate_control_mode`. The default is `"vbr"`. + // + // Supported rate control modes: + // - 'vbr' - variable bitrate + // - 'crf' - constant rate factor + string rate_control_mode = 6; + + // Target CRF level. Must be between 10 and 36, where 10 is the highest + // quality and 36 is the most efficient compression. The default is 21. + int32 crf_level = 7; + + // GOP mode can be either by frame count or duration. + oneof gop_mode { + // Select the GOP size based on the specified frame count. Must be greater + // than zero. + int32 gop_frame_count = 8; + + // Select the GOP size based on the specified duration. The default is + // `"3s"`. Note that `gopDuration` must be less than or equal to + // [`segmentDuration`](#SegmentSettings), and + // [`segmentDuration`](#SegmentSettings) must be divisible by + // `gopDuration`. + google.protobuf.Duration gop_duration = 9; + } + + // Enforces the specified codec profile. The following profiles are + // supported: + // + // * `profile0` (default) + // * `profile1` + // * `profile2` + // * `profile3` + // + // The available options are + // [WebM-compatible](https://www.webmproject.org/vp9/profiles/){: + // class="external" }. Note that certain values for this field may cause the + // transcoder to override other fields you set in the `Vp9CodecSettings` + // message. + string profile = 10; + } + + // Codec settings can be h264, h265, or vp9. + oneof codec_settings { + // H264 codec settings. + H264CodecSettings h264 = 1; + + // H265 codec settings. + H265CodecSettings h265 = 2; + + // VP9 codec settings. + Vp9CodecSettings vp9 = 3; + } +} + +// Audio stream resource. +message AudioStream { + // The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`. + message AudioMapping { + // Required. The `EditAtom.key` that references the atom with audio inputs in the + // `Job.edit_list`. + string atom_key = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The `Input.key` that identifies the input file. + string input_key = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The zero-based index of the track in the input file. + int32 input_track = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The zero-based index of the channel in the input audio stream. + int32 input_channel = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. The zero-based index of the channel in the output audio stream. + int32 output_channel = 5 [(google.api.field_behavior) = REQUIRED]; + + // Audio volume control in dB. Negative values decrease volume, + // positive values increase. The default is 0. + double gain_db = 6; + } + + // The codec for this audio stream. The default is `"aac"`. + // + // Supported audio codecs: + // - 'aac' + // - 'aac-he' + // - 'aac-he-v2' + // - 'mp3' + // - 'ac3' + // - 'eac3' + string codec = 1; + + // Required. Audio bitrate in bits per second. Must be between 1 and 10,000,000. + int32 bitrate_bps = 2 [(google.api.field_behavior) = REQUIRED]; + + // Number of audio channels. Must be between 1 and 6. The default is 2. + int32 channel_count = 3; + + // A list of channel names specifying layout of the audio channels. + // This only affects the metadata embedded in the container headers, if + // supported by the specified format. The default is `["fl", "fr"]`. + // + // Supported channel names: + // - 'fl' - Front left channel + // - 'fr' - Front right channel + // - 'sl' - Side left channel + // - 'sr' - Side right channel + // - 'fc' - Front center channel + // - 'lfe' - Low frequency + repeated string channel_layout = 4; + + // The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`. + repeated AudioMapping mapping = 5; + + // The audio sample rate in Hertz. The default is 48000 Hertz. + int32 sample_rate_hertz = 6; +} + +// Encoding of a text stream. For example, closed captions or subtitles. +message TextStream { + // The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`. + message TextMapping { + // Required. The `EditAtom.key` that references atom with text inputs in the + // `Job.edit_list`. + string atom_key = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The `Input.key` that identifies the input file. + string input_key = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The zero-based index of the track in the input file. + int32 input_track = 3 [(google.api.field_behavior) = REQUIRED]; + } + + // The codec for this text stream. The default is `"webvtt"`. + // + // Supported text codecs: + // - 'srt' + // - 'ttml' + // - 'cea608' + // - 'cea708' + // - 'webvtt' + string codec = 1; + + // The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`. + repeated TextMapping mapping = 3; +} + +// Segment settings for `"ts"`, `"fmp4"` and `"vtt"`. +message SegmentSettings { + // Duration of the segments in seconds. The default is `"6.0s"`. Note that + // `segmentDuration` must be greater than or equal to + // [`gopDuration`](#videostream), and `segmentDuration` must be divisible by + // [`gopDuration`](#videostream). + google.protobuf.Duration segment_duration = 1; + + // Required. Create an individual segment file. The default is `false`. + bool individual_segments = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Encryption settings. +message Encryption { + // Configuration for AES-128 encryption. + message Aes128Encryption { + // Required. URI of the key delivery service. This URI is inserted into the M3U8 + // header. + string key_uri = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Configuration for SAMPLE-AES encryption. + message SampleAesEncryption { + // Required. URI of the key delivery service. This URI is inserted into the M3U8 + // header. + string key_uri = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Configuration for MPEG Common Encryption (MPEG-CENC). + message MpegCommonEncryption { + // Required. 128 bit Key ID represented as lowercase hexadecimal digits for use with + // common encryption. + string key_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Specify the encryption scheme. + // + // Supported encryption schemes: + // - 'cenc' + // - 'cbcs' + string scheme = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Required. 128 bit encryption key represented as lowercase hexadecimal digits. + string key = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. 128 bit Initialization Vector (IV) represented as lowercase hexadecimal + // digits. + string iv = 2 [(google.api.field_behavior) = REQUIRED]; + + // Encryption mode can be either `aes` or `cenc`. + oneof encryption_mode { + // Configuration for AES-128 encryption. + Aes128Encryption aes_128 = 3; + + // Configuration for SAMPLE-AES encryption. + SampleAesEncryption sample_aes = 4; + + // Configuration for MPEG Common Encryption (MPEG-CENC). + MpegCommonEncryption mpeg_cenc = 5; + } +} diff --git a/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/services.proto b/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/services.proto new file mode 100644 index 00000000000..1fadf816d41 --- /dev/null +++ b/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/services.proto @@ -0,0 +1,273 @@ +// 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. + +syntax = "proto3"; + +package google.cloud.video.transcoder.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/transcoder/v1/resources.proto"; +import "google/protobuf/empty.proto"; + +option csharp_namespace = "Google.Cloud.Video.Transcoder.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/video/transcoder/v1;transcoder"; +option java_multiple_files = true; +option java_outer_classname = "ServicesProto"; +option java_package = "com.google.cloud.video.transcoder.v1"; +option php_namespace = "Google\\Cloud\\Video\\Transcoder\\V1"; +option ruby_package = "Google::Cloud::Video::Transcoder::V1"; + +// Using the Transcoder API, you can queue asynchronous jobs for transcoding +// media into various output formats. Output formats may include different +// streaming standards such as HTTP Live Streaming (HLS) and Dynamic Adaptive +// Streaming over HTTP (DASH). You can also customize jobs using advanced +// features such as Digital Rights Management (DRM), audio equalization, content +// concatenation, and digital ad-stitch ready content generation. +service TranscoderService { + option (google.api.default_host) = "transcoder.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a job in the specified region. + rpc CreateJob(CreateJobRequest) returns (Job) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/jobs" + body: "job" + }; + option (google.api.method_signature) = "parent,job"; + } + + // Lists jobs in the specified region. + rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/jobs" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the job data. + rpc GetJob(GetJobRequest) returns (Job) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/jobs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes a job. + rpc DeleteJob(DeleteJobRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/jobs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a job template in the specified region. + rpc CreateJobTemplate(CreateJobTemplateRequest) returns (JobTemplate) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/jobTemplates" + body: "job_template" + }; + option (google.api.method_signature) = "parent,job_template,job_template_id"; + } + + // Lists job templates in the specified region. + rpc ListJobTemplates(ListJobTemplatesRequest) returns (ListJobTemplatesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/jobTemplates" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the job template data. + rpc GetJobTemplate(GetJobTemplateRequest) returns (JobTemplate) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/jobTemplates/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes a job template. + rpc DeleteJobTemplate(DeleteJobTemplateRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/jobTemplates/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Request message for `TranscoderService.CreateJob`. +message CreateJobRequest { + // Required. The parent location to create and process this job. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. Parameters for creating transcoding job. + Job job = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for `TranscoderService.ListJobs`. +// The parent location from which to retrieve the collection of jobs. +message ListJobsRequest { + // Required. Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // 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; + + // The filter expression, following the syntax outlined in + // https://google.aip.dev/160. + string filter = 4; + + // One or more fields to compare and use to sort the output. + // See https://google.aip.dev/132#ordering. + string order_by = 5; +} + +// Request message for `TranscoderService.GetJob`. +message GetJobRequest { + // Required. The name of the job to retrieve. + // Format: `projects/{project}/locations/{location}/jobs/{job}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "transcoder.googleapis.com/Job" + } + ]; +} + +// Request message for `TranscoderService.DeleteJob`. +message DeleteJobRequest { + // Required. The name of the job to delete. + // Format: `projects/{project}/locations/{location}/jobs/{job}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "transcoder.googleapis.com/Job" + } + ]; +} + +// Response message for `TranscoderService.ListJobs`. +message ListJobsResponse { + // List of jobs in the specified region. + repeated Job jobs = 1; + + // The pagination token. + string next_page_token = 2; + + // List of regions that could not be reached. + repeated string unreachable = 3; +} + +// Request message for `TranscoderService.CreateJobTemplate`. +message CreateJobTemplateRequest { + // Required. The parent location to create this job template. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. Parameters for creating job template. + JobTemplate job_template = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the job template, which will become the final component + // of the job template's resource name. + // + // This value should be 4-63 characters, and valid characters must match the + // regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. + string job_template_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for `TranscoderService.ListJobTemplates`. +message ListJobTemplatesRequest { + // Required. The parent location from which to retrieve the collection of job templates. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // 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; + + // The filter expression, following the syntax outlined in + // https://google.aip.dev/160. + string filter = 4; + + // One or more fields to compare and use to sort the output. + // See https://google.aip.dev/132#ordering. + string order_by = 5; +} + +// Request message for `TranscoderService.GetJobTemplate`. +message GetJobTemplateRequest { + // Required. The name of the job template to retrieve. + // Format: + // `projects/{project}/locations/{location}/jobTemplates/{job_template}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "transcoder.googleapis.com/JobTemplate" + } + ]; +} + +// Request message for `TranscoderService.DeleteJobTemplate`. +message DeleteJobTemplateRequest { + // Required. The name of the job template to delete. + // `projects/{project}/locations/{location}/jobTemplates/{job_template}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "transcoder.googleapis.com/JobTemplate" + } + ]; +} + +// Response message for `TranscoderService.ListJobTemplates`. +message ListJobTemplatesResponse { + // List of job templates in the specified region. + repeated JobTemplate job_templates = 1; + + // The pagination token. + string next_page_token = 2; + + // List of regions that could not be reached. + repeated string unreachable = 3; +} diff --git a/packages/google-cloud-video-transcoder/protos/protos.d.ts b/packages/google-cloud-video-transcoder/protos/protos.d.ts index 9a56865ea02..1cc5cbc2727 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.d.ts +++ b/packages/google-cloud-video-transcoder/protos/protos.d.ts @@ -26,6 +26,5610 @@ export namespace google { /** Namespace transcoder. */ namespace transcoder { + /** Namespace v1. */ + namespace v1 { + + /** Properties of a Job. */ + interface IJob { + + /** Job name */ + name?: (string|null); + + /** Job inputUri */ + inputUri?: (string|null); + + /** Job outputUri */ + outputUri?: (string|null); + + /** Job templateId */ + templateId?: (string|null); + + /** Job config */ + config?: (google.cloud.video.transcoder.v1.IJobConfig|null); + + /** Job state */ + state?: (google.cloud.video.transcoder.v1.Job.ProcessingState|keyof typeof google.cloud.video.transcoder.v1.Job.ProcessingState|null); + + /** Job createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Job startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** Job endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** Job ttlAfterCompletionDays */ + ttlAfterCompletionDays?: (number|null); + + /** Job error */ + error?: (google.rpc.IStatus|null); + } + + /** Represents a Job. */ + class Job implements IJob { + + /** + * Constructs a new Job. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.IJob); + + /** Job name. */ + public name: string; + + /** Job inputUri. */ + public inputUri: string; + + /** Job outputUri. */ + public outputUri: string; + + /** Job templateId. */ + public templateId?: (string|null); + + /** Job config. */ + public config?: (google.cloud.video.transcoder.v1.IJobConfig|null); + + /** Job state. */ + public state: (google.cloud.video.transcoder.v1.Job.ProcessingState|keyof typeof google.cloud.video.transcoder.v1.Job.ProcessingState); + + /** Job createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Job startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** Job endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** Job ttlAfterCompletionDays. */ + public ttlAfterCompletionDays: number; + + /** Job error. */ + public error?: (google.rpc.IStatus|null); + + /** Job jobConfig. */ + public jobConfig?: ("templateId"|"config"); + + /** + * Creates a new Job instance using the specified properties. + * @param [properties] Properties to set + * @returns Job instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.IJob): google.cloud.video.transcoder.v1.Job; + + /** + * Encodes the specified Job message. Does not implicitly {@link google.cloud.video.transcoder.v1.Job.verify|verify} messages. + * @param message Job message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.IJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Job message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Job.verify|verify} messages. + * @param message Job message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.IJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Job message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Job + * @throws {Error} If the payload is not 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.transcoder.v1.Job; + + /** + * Decodes a Job message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Job + * @throws {Error} If the payload 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.transcoder.v1.Job; + + /** + * Verifies a Job message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Job message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Job + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.Job; + + /** + * Creates a plain object from a Job message. Also converts values to other types if specified. + * @param message Job + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.Job, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Job to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Job { + + /** ProcessingState enum. */ + enum ProcessingState { + PROCESSING_STATE_UNSPECIFIED = 0, + PENDING = 1, + RUNNING = 2, + SUCCEEDED = 3, + FAILED = 4 + } + } + + /** Properties of a JobTemplate. */ + interface IJobTemplate { + + /** JobTemplate name */ + name?: (string|null); + + /** JobTemplate config */ + config?: (google.cloud.video.transcoder.v1.IJobConfig|null); + } + + /** Represents a JobTemplate. */ + class JobTemplate implements IJobTemplate { + + /** + * Constructs a new JobTemplate. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.IJobTemplate); + + /** JobTemplate name. */ + public name: string; + + /** JobTemplate config. */ + public config?: (google.cloud.video.transcoder.v1.IJobConfig|null); + + /** + * Creates a new JobTemplate instance using the specified properties. + * @param [properties] Properties to set + * @returns JobTemplate instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.IJobTemplate): google.cloud.video.transcoder.v1.JobTemplate; + + /** + * Encodes the specified JobTemplate message. Does not implicitly {@link google.cloud.video.transcoder.v1.JobTemplate.verify|verify} messages. + * @param message JobTemplate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.IJobTemplate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JobTemplate message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.JobTemplate.verify|verify} messages. + * @param message JobTemplate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.IJobTemplate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JobTemplate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JobTemplate + * @throws {Error} If the payload is not 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.transcoder.v1.JobTemplate; + + /** + * Decodes a JobTemplate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JobTemplate + * @throws {Error} If the payload 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.transcoder.v1.JobTemplate; + + /** + * Verifies a JobTemplate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JobTemplate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JobTemplate + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.JobTemplate; + + /** + * Creates a plain object from a JobTemplate message. Also converts values to other types if specified. + * @param message JobTemplate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.JobTemplate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JobTemplate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a JobConfig. */ + interface IJobConfig { + + /** JobConfig inputs */ + inputs?: (google.cloud.video.transcoder.v1.IInput[]|null); + + /** JobConfig editList */ + editList?: (google.cloud.video.transcoder.v1.IEditAtom[]|null); + + /** JobConfig elementaryStreams */ + elementaryStreams?: (google.cloud.video.transcoder.v1.IElementaryStream[]|null); + + /** JobConfig muxStreams */ + muxStreams?: (google.cloud.video.transcoder.v1.IMuxStream[]|null); + + /** JobConfig manifests */ + manifests?: (google.cloud.video.transcoder.v1.IManifest[]|null); + + /** JobConfig output */ + output?: (google.cloud.video.transcoder.v1.IOutput|null); + + /** JobConfig adBreaks */ + adBreaks?: (google.cloud.video.transcoder.v1.IAdBreak[]|null); + + /** JobConfig pubsubDestination */ + pubsubDestination?: (google.cloud.video.transcoder.v1.IPubsubDestination|null); + + /** JobConfig spriteSheets */ + spriteSheets?: (google.cloud.video.transcoder.v1.ISpriteSheet[]|null); + + /** JobConfig overlays */ + overlays?: (google.cloud.video.transcoder.v1.IOverlay[]|null); + } + + /** Represents a JobConfig. */ + class JobConfig implements IJobConfig { + + /** + * Constructs a new JobConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.IJobConfig); + + /** JobConfig inputs. */ + public inputs: google.cloud.video.transcoder.v1.IInput[]; + + /** JobConfig editList. */ + public editList: google.cloud.video.transcoder.v1.IEditAtom[]; + + /** JobConfig elementaryStreams. */ + public elementaryStreams: google.cloud.video.transcoder.v1.IElementaryStream[]; + + /** JobConfig muxStreams. */ + public muxStreams: google.cloud.video.transcoder.v1.IMuxStream[]; + + /** JobConfig manifests. */ + public manifests: google.cloud.video.transcoder.v1.IManifest[]; + + /** JobConfig output. */ + public output?: (google.cloud.video.transcoder.v1.IOutput|null); + + /** JobConfig adBreaks. */ + public adBreaks: google.cloud.video.transcoder.v1.IAdBreak[]; + + /** JobConfig pubsubDestination. */ + public pubsubDestination?: (google.cloud.video.transcoder.v1.IPubsubDestination|null); + + /** JobConfig spriteSheets. */ + public spriteSheets: google.cloud.video.transcoder.v1.ISpriteSheet[]; + + /** JobConfig overlays. */ + public overlays: google.cloud.video.transcoder.v1.IOverlay[]; + + /** + * Creates a new JobConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns JobConfig instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.IJobConfig): google.cloud.video.transcoder.v1.JobConfig; + + /** + * Encodes the specified JobConfig message. Does not implicitly {@link google.cloud.video.transcoder.v1.JobConfig.verify|verify} messages. + * @param message JobConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.IJobConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JobConfig message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.JobConfig.verify|verify} messages. + * @param message JobConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.IJobConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JobConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JobConfig + * @throws {Error} If the payload is not 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.transcoder.v1.JobConfig; + + /** + * Decodes a JobConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JobConfig + * @throws {Error} If the payload 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.transcoder.v1.JobConfig; + + /** + * Verifies a JobConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JobConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JobConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.JobConfig; + + /** + * Creates a plain object from a JobConfig message. Also converts values to other types if specified. + * @param message JobConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.JobConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JobConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Input. */ + interface IInput { + + /** Input key */ + key?: (string|null); + + /** Input uri */ + uri?: (string|null); + + /** Input preprocessingConfig */ + preprocessingConfig?: (google.cloud.video.transcoder.v1.IPreprocessingConfig|null); + } + + /** Represents an Input. */ + class Input implements IInput { + + /** + * Constructs a new Input. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.IInput); + + /** Input key. */ + public key: string; + + /** Input uri. */ + public uri: string; + + /** Input preprocessingConfig. */ + public preprocessingConfig?: (google.cloud.video.transcoder.v1.IPreprocessingConfig|null); + + /** + * Creates a new Input instance using the specified properties. + * @param [properties] Properties to set + * @returns Input instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.IInput): google.cloud.video.transcoder.v1.Input; + + /** + * Encodes the specified Input message. Does not implicitly {@link google.cloud.video.transcoder.v1.Input.verify|verify} messages. + * @param message Input message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.IInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Input message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Input.verify|verify} messages. + * @param message Input message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.IInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Input message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Input + * @throws {Error} If the payload is not 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.transcoder.v1.Input; + + /** + * Decodes an Input message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Input + * @throws {Error} If the payload 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.transcoder.v1.Input; + + /** + * Verifies an Input message. + * @param message Plain 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 Input message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Input + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.Input; + + /** + * Creates a plain object from an Input message. Also converts values to other types if specified. + * @param message Input + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.Input, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Input to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Output. */ + interface IOutput { + + /** Output uri */ + uri?: (string|null); + } + + /** Represents an Output. */ + class Output implements IOutput { + + /** + * Constructs a new Output. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.IOutput); + + /** Output uri. */ + public uri: string; + + /** + * Creates a new Output instance using the specified properties. + * @param [properties] Properties to set + * @returns Output instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.IOutput): google.cloud.video.transcoder.v1.Output; + + /** + * Encodes the specified Output message. Does not implicitly {@link google.cloud.video.transcoder.v1.Output.verify|verify} messages. + * @param message Output message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.IOutput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Output message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Output.verify|verify} messages. + * @param message Output message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.IOutput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Output message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Output + * @throws {Error} If the payload is not 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.transcoder.v1.Output; + + /** + * Decodes an Output message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Output + * @throws {Error} If the payload 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.transcoder.v1.Output; + + /** + * Verifies an Output message. + * @param message Plain 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 Output message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Output + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.Output; + + /** + * Creates a plain object from an Output message. Also converts values to other types if specified. + * @param message Output + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.Output, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Output to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EditAtom. */ + interface IEditAtom { + + /** EditAtom key */ + key?: (string|null); + + /** EditAtom inputs */ + inputs?: (string[]|null); + + /** EditAtom endTimeOffset */ + endTimeOffset?: (google.protobuf.IDuration|null); + + /** EditAtom startTimeOffset */ + startTimeOffset?: (google.protobuf.IDuration|null); + } + + /** Represents an EditAtom. */ + class EditAtom implements IEditAtom { + + /** + * Constructs a new EditAtom. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.IEditAtom); + + /** EditAtom key. */ + public key: string; + + /** EditAtom inputs. */ + public inputs: string[]; + + /** EditAtom endTimeOffset. */ + public endTimeOffset?: (google.protobuf.IDuration|null); + + /** EditAtom startTimeOffset. */ + public startTimeOffset?: (google.protobuf.IDuration|null); + + /** + * Creates a new EditAtom instance using the specified properties. + * @param [properties] Properties to set + * @returns EditAtom instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.IEditAtom): google.cloud.video.transcoder.v1.EditAtom; + + /** + * Encodes the specified EditAtom message. Does not implicitly {@link google.cloud.video.transcoder.v1.EditAtom.verify|verify} messages. + * @param message EditAtom message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.IEditAtom, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EditAtom message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.EditAtom.verify|verify} messages. + * @param message EditAtom message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.IEditAtom, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EditAtom message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EditAtom + * @throws {Error} If the payload is not 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.transcoder.v1.EditAtom; + + /** + * Decodes an EditAtom message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EditAtom + * @throws {Error} If the payload 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.transcoder.v1.EditAtom; + + /** + * Verifies an EditAtom message. + * @param message Plain 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 EditAtom message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EditAtom + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.EditAtom; + + /** + * Creates a plain object from an EditAtom message. Also converts values to other types if specified. + * @param message EditAtom + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.EditAtom, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EditAtom to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AdBreak. */ + interface IAdBreak { + + /** AdBreak startTimeOffset */ + startTimeOffset?: (google.protobuf.IDuration|null); + } + + /** Represents an AdBreak. */ + class AdBreak implements IAdBreak { + + /** + * Constructs a new AdBreak. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.IAdBreak); + + /** AdBreak startTimeOffset. */ + public startTimeOffset?: (google.protobuf.IDuration|null); + + /** + * Creates a new AdBreak instance using the specified properties. + * @param [properties] Properties to set + * @returns AdBreak instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.IAdBreak): google.cloud.video.transcoder.v1.AdBreak; + + /** + * Encodes the specified AdBreak message. Does not implicitly {@link google.cloud.video.transcoder.v1.AdBreak.verify|verify} messages. + * @param message AdBreak message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.IAdBreak, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdBreak message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.AdBreak.verify|verify} messages. + * @param message AdBreak message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.IAdBreak, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdBreak message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdBreak + * @throws {Error} If the payload is not 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.transcoder.v1.AdBreak; + + /** + * Decodes an AdBreak message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdBreak + * @throws {Error} If the payload 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.transcoder.v1.AdBreak; + + /** + * Verifies an AdBreak message. + * @param message Plain 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 AdBreak message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdBreak + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.AdBreak; + + /** + * Creates a plain object from an AdBreak message. Also converts values to other types if specified. + * @param message AdBreak + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.AdBreak, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdBreak to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ElementaryStream. */ + interface IElementaryStream { + + /** ElementaryStream key */ + key?: (string|null); + + /** ElementaryStream videoStream */ + videoStream?: (google.cloud.video.transcoder.v1.IVideoStream|null); + + /** ElementaryStream audioStream */ + audioStream?: (google.cloud.video.transcoder.v1.IAudioStream|null); + + /** ElementaryStream textStream */ + textStream?: (google.cloud.video.transcoder.v1.ITextStream|null); + } + + /** Represents an ElementaryStream. */ + class ElementaryStream implements IElementaryStream { + + /** + * Constructs a new ElementaryStream. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.IElementaryStream); + + /** ElementaryStream key. */ + public key: string; + + /** ElementaryStream videoStream. */ + public videoStream?: (google.cloud.video.transcoder.v1.IVideoStream|null); + + /** ElementaryStream audioStream. */ + public audioStream?: (google.cloud.video.transcoder.v1.IAudioStream|null); + + /** ElementaryStream textStream. */ + public textStream?: (google.cloud.video.transcoder.v1.ITextStream|null); + + /** ElementaryStream elementaryStream. */ + public elementaryStream?: ("videoStream"|"audioStream"|"textStream"); + + /** + * Creates a new ElementaryStream instance using the specified properties. + * @param [properties] Properties to set + * @returns ElementaryStream instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.IElementaryStream): google.cloud.video.transcoder.v1.ElementaryStream; + + /** + * Encodes the specified ElementaryStream message. Does not implicitly {@link google.cloud.video.transcoder.v1.ElementaryStream.verify|verify} messages. + * @param message ElementaryStream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.IElementaryStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ElementaryStream message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.ElementaryStream.verify|verify} messages. + * @param message ElementaryStream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.IElementaryStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ElementaryStream message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ElementaryStream + * @throws {Error} If the payload is not 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.transcoder.v1.ElementaryStream; + + /** + * Decodes an ElementaryStream message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ElementaryStream + * @throws {Error} If the payload 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.transcoder.v1.ElementaryStream; + + /** + * Verifies an ElementaryStream message. + * @param message Plain 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 ElementaryStream message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ElementaryStream + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.ElementaryStream; + + /** + * Creates a plain object from an ElementaryStream message. Also converts values to other types if specified. + * @param message ElementaryStream + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.ElementaryStream, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ElementaryStream to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MuxStream. */ + interface IMuxStream { + + /** MuxStream key */ + key?: (string|null); + + /** MuxStream fileName */ + fileName?: (string|null); + + /** MuxStream container */ + container?: (string|null); + + /** MuxStream elementaryStreams */ + elementaryStreams?: (string[]|null); + + /** MuxStream segmentSettings */ + segmentSettings?: (google.cloud.video.transcoder.v1.ISegmentSettings|null); + + /** MuxStream encryption */ + encryption?: (google.cloud.video.transcoder.v1.IEncryption|null); + } + + /** Represents a MuxStream. */ + class MuxStream implements IMuxStream { + + /** + * Constructs a new MuxStream. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.IMuxStream); + + /** MuxStream key. */ + public key: string; + + /** MuxStream fileName. */ + public fileName: string; + + /** MuxStream container. */ + public container: string; + + /** MuxStream elementaryStreams. */ + public elementaryStreams: string[]; + + /** MuxStream segmentSettings. */ + public segmentSettings?: (google.cloud.video.transcoder.v1.ISegmentSettings|null); + + /** MuxStream encryption. */ + public encryption?: (google.cloud.video.transcoder.v1.IEncryption|null); + + /** + * Creates a new MuxStream instance using the specified properties. + * @param [properties] Properties to set + * @returns MuxStream instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.IMuxStream): google.cloud.video.transcoder.v1.MuxStream; + + /** + * Encodes the specified MuxStream message. Does not implicitly {@link google.cloud.video.transcoder.v1.MuxStream.verify|verify} messages. + * @param message MuxStream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.IMuxStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MuxStream message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.MuxStream.verify|verify} messages. + * @param message MuxStream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.IMuxStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MuxStream message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MuxStream + * @throws {Error} If the payload is not 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.transcoder.v1.MuxStream; + + /** + * Decodes a MuxStream message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MuxStream + * @throws {Error} If the payload 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.transcoder.v1.MuxStream; + + /** + * Verifies a MuxStream message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MuxStream message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MuxStream + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.MuxStream; + + /** + * Creates a plain object from a MuxStream message. Also converts values to other types if specified. + * @param message MuxStream + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.MuxStream, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MuxStream to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Manifest. */ + interface IManifest { + + /** Manifest fileName */ + fileName?: (string|null); + + /** Manifest type */ + type?: (google.cloud.video.transcoder.v1.Manifest.ManifestType|keyof typeof google.cloud.video.transcoder.v1.Manifest.ManifestType|null); + + /** Manifest muxStreams */ + muxStreams?: (string[]|null); + } + + /** Represents a Manifest. */ + class Manifest implements IManifest { + + /** + * Constructs a new Manifest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.IManifest); + + /** Manifest fileName. */ + public fileName: string; + + /** Manifest type. */ + public type: (google.cloud.video.transcoder.v1.Manifest.ManifestType|keyof typeof google.cloud.video.transcoder.v1.Manifest.ManifestType); + + /** Manifest muxStreams. */ + public muxStreams: string[]; + + /** + * Creates a new Manifest instance using the specified properties. + * @param [properties] Properties to set + * @returns Manifest instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.IManifest): google.cloud.video.transcoder.v1.Manifest; + + /** + * Encodes the specified Manifest message. Does not implicitly {@link google.cloud.video.transcoder.v1.Manifest.verify|verify} messages. + * @param message Manifest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.IManifest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Manifest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Manifest.verify|verify} messages. + * @param message Manifest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.IManifest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Manifest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Manifest + * @throws {Error} If the payload is not 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.transcoder.v1.Manifest; + + /** + * Decodes a Manifest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Manifest + * @throws {Error} If the payload 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.transcoder.v1.Manifest; + + /** + * Verifies a Manifest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Manifest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Manifest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.Manifest; + + /** + * Creates a plain object from a Manifest message. Also converts values to other types if specified. + * @param message Manifest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.Manifest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Manifest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Manifest { + + /** ManifestType enum. */ + enum ManifestType { + MANIFEST_TYPE_UNSPECIFIED = 0, + HLS = 1, + DASH = 2 + } + } + + /** Properties of a PubsubDestination. */ + interface IPubsubDestination { + + /** PubsubDestination topic */ + topic?: (string|null); + } + + /** Represents a PubsubDestination. */ + class PubsubDestination implements IPubsubDestination { + + /** + * Constructs a new PubsubDestination. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.IPubsubDestination); + + /** PubsubDestination topic. */ + public topic: string; + + /** + * Creates a new PubsubDestination instance using the specified properties. + * @param [properties] Properties to set + * @returns PubsubDestination instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.IPubsubDestination): google.cloud.video.transcoder.v1.PubsubDestination; + + /** + * Encodes the specified PubsubDestination message. Does not implicitly {@link google.cloud.video.transcoder.v1.PubsubDestination.verify|verify} messages. + * @param message PubsubDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.IPubsubDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PubsubDestination message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.PubsubDestination.verify|verify} messages. + * @param message PubsubDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.IPubsubDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PubsubDestination message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PubsubDestination + * @throws {Error} If the payload is not 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.transcoder.v1.PubsubDestination; + + /** + * Decodes a PubsubDestination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PubsubDestination + * @throws {Error} If the payload 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.transcoder.v1.PubsubDestination; + + /** + * Verifies a PubsubDestination message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PubsubDestination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PubsubDestination + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.PubsubDestination; + + /** + * Creates a plain object from a PubsubDestination message. Also converts values to other types if specified. + * @param message PubsubDestination + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.PubsubDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PubsubDestination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SpriteSheet. */ + interface ISpriteSheet { + + /** SpriteSheet format */ + format?: (string|null); + + /** SpriteSheet filePrefix */ + filePrefix?: (string|null); + + /** SpriteSheet spriteWidthPixels */ + spriteWidthPixels?: (number|null); + + /** SpriteSheet spriteHeightPixels */ + spriteHeightPixels?: (number|null); + + /** SpriteSheet columnCount */ + columnCount?: (number|null); + + /** SpriteSheet rowCount */ + rowCount?: (number|null); + + /** SpriteSheet startTimeOffset */ + startTimeOffset?: (google.protobuf.IDuration|null); + + /** SpriteSheet endTimeOffset */ + endTimeOffset?: (google.protobuf.IDuration|null); + + /** SpriteSheet totalCount */ + totalCount?: (number|null); + + /** SpriteSheet interval */ + interval?: (google.protobuf.IDuration|null); + + /** SpriteSheet quality */ + quality?: (number|null); + } + + /** Represents a SpriteSheet. */ + class SpriteSheet implements ISpriteSheet { + + /** + * Constructs a new SpriteSheet. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.ISpriteSheet); + + /** SpriteSheet format. */ + public format: string; + + /** SpriteSheet filePrefix. */ + public filePrefix: string; + + /** SpriteSheet spriteWidthPixels. */ + public spriteWidthPixels: number; + + /** SpriteSheet spriteHeightPixels. */ + public spriteHeightPixels: number; + + /** SpriteSheet columnCount. */ + public columnCount: number; + + /** SpriteSheet rowCount. */ + public rowCount: number; + + /** SpriteSheet startTimeOffset. */ + public startTimeOffset?: (google.protobuf.IDuration|null); + + /** SpriteSheet endTimeOffset. */ + public endTimeOffset?: (google.protobuf.IDuration|null); + + /** SpriteSheet totalCount. */ + public totalCount?: (number|null); + + /** SpriteSheet interval. */ + public interval?: (google.protobuf.IDuration|null); + + /** SpriteSheet quality. */ + public quality: number; + + /** SpriteSheet extractionStrategy. */ + public extractionStrategy?: ("totalCount"|"interval"); + + /** + * Creates a new SpriteSheet instance using the specified properties. + * @param [properties] Properties to set + * @returns SpriteSheet instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.ISpriteSheet): google.cloud.video.transcoder.v1.SpriteSheet; + + /** + * Encodes the specified SpriteSheet message. Does not implicitly {@link google.cloud.video.transcoder.v1.SpriteSheet.verify|verify} messages. + * @param message SpriteSheet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.ISpriteSheet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SpriteSheet message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.SpriteSheet.verify|verify} messages. + * @param message SpriteSheet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.ISpriteSheet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SpriteSheet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SpriteSheet + * @throws {Error} If the payload is not 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.transcoder.v1.SpriteSheet; + + /** + * Decodes a SpriteSheet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SpriteSheet + * @throws {Error} If the payload 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.transcoder.v1.SpriteSheet; + + /** + * Verifies a SpriteSheet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SpriteSheet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SpriteSheet + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.SpriteSheet; + + /** + * Creates a plain object from a SpriteSheet message. Also converts values to other types if specified. + * @param message SpriteSheet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.SpriteSheet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SpriteSheet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Overlay. */ + interface IOverlay { + + /** Overlay image */ + image?: (google.cloud.video.transcoder.v1.Overlay.IImage|null); + + /** Overlay animations */ + animations?: (google.cloud.video.transcoder.v1.Overlay.IAnimation[]|null); + } + + /** Represents an Overlay. */ + class Overlay implements IOverlay { + + /** + * Constructs a new Overlay. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.IOverlay); + + /** Overlay image. */ + public image?: (google.cloud.video.transcoder.v1.Overlay.IImage|null); + + /** Overlay animations. */ + public animations: google.cloud.video.transcoder.v1.Overlay.IAnimation[]; + + /** + * Creates a new Overlay instance using the specified properties. + * @param [properties] Properties to set + * @returns Overlay instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.IOverlay): google.cloud.video.transcoder.v1.Overlay; + + /** + * Encodes the specified Overlay message. Does not implicitly {@link google.cloud.video.transcoder.v1.Overlay.verify|verify} messages. + * @param message Overlay message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.IOverlay, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Overlay message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Overlay.verify|verify} messages. + * @param message Overlay message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.IOverlay, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Overlay message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Overlay + * @throws {Error} If the payload is not 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.transcoder.v1.Overlay; + + /** + * Decodes an Overlay message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Overlay + * @throws {Error} If the payload 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.transcoder.v1.Overlay; + + /** + * Verifies an Overlay message. + * @param message Plain 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 Overlay message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Overlay + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.Overlay; + + /** + * Creates a plain object from an Overlay message. Also converts values to other types if specified. + * @param message Overlay + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.Overlay, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Overlay to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Overlay { + + /** Properties of a NormalizedCoordinate. */ + interface INormalizedCoordinate { + + /** NormalizedCoordinate x */ + x?: (number|null); + + /** NormalizedCoordinate y */ + y?: (number|null); + } + + /** Represents a NormalizedCoordinate. */ + class NormalizedCoordinate implements INormalizedCoordinate { + + /** + * Constructs a new NormalizedCoordinate. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.Overlay.INormalizedCoordinate); + + /** NormalizedCoordinate x. */ + public x: number; + + /** NormalizedCoordinate y. */ + public y: number; + + /** + * Creates a new NormalizedCoordinate instance using the specified properties. + * @param [properties] Properties to set + * @returns NormalizedCoordinate instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.Overlay.INormalizedCoordinate): google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate; + + /** + * Encodes the specified NormalizedCoordinate message. Does not implicitly {@link google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate.verify|verify} messages. + * @param message NormalizedCoordinate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.Overlay.INormalizedCoordinate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NormalizedCoordinate message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate.verify|verify} messages. + * @param message NormalizedCoordinate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.Overlay.INormalizedCoordinate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NormalizedCoordinate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NormalizedCoordinate + * @throws {Error} If the payload is not 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.transcoder.v1.Overlay.NormalizedCoordinate; + + /** + * Decodes a NormalizedCoordinate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NormalizedCoordinate + * @throws {Error} If the payload 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.transcoder.v1.Overlay.NormalizedCoordinate; + + /** + * Verifies a NormalizedCoordinate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NormalizedCoordinate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NormalizedCoordinate + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate; + + /** + * Creates a plain object from a NormalizedCoordinate message. Also converts values to other types if specified. + * @param message NormalizedCoordinate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NormalizedCoordinate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Image. */ + interface IImage { + + /** Image uri */ + uri?: (string|null); + + /** Image resolution */ + resolution?: (google.cloud.video.transcoder.v1.Overlay.INormalizedCoordinate|null); + + /** Image alpha */ + alpha?: (number|null); + } + + /** Represents an Image. */ + class Image implements IImage { + + /** + * Constructs a new Image. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.Overlay.IImage); + + /** Image uri. */ + public uri: string; + + /** Image resolution. */ + public resolution?: (google.cloud.video.transcoder.v1.Overlay.INormalizedCoordinate|null); + + /** Image alpha. */ + public alpha: number; + + /** + * Creates a new Image instance using the specified properties. + * @param [properties] Properties to set + * @returns Image instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.Overlay.IImage): google.cloud.video.transcoder.v1.Overlay.Image; + + /** + * Encodes the specified Image message. Does not implicitly {@link google.cloud.video.transcoder.v1.Overlay.Image.verify|verify} messages. + * @param message Image message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.Overlay.IImage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Image message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Overlay.Image.verify|verify} messages. + * @param message Image message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.Overlay.IImage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Image message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Image + * @throws {Error} If the payload is not 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.transcoder.v1.Overlay.Image; + + /** + * Decodes an Image message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Image + * @throws {Error} If the payload 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.transcoder.v1.Overlay.Image; + + /** + * Verifies an Image message. + * @param message Plain 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 Image message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Image + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.Overlay.Image; + + /** + * Creates a plain object from an Image message. Also converts values to other types if specified. + * @param message Image + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.Overlay.Image, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Image to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AnimationStatic. */ + interface IAnimationStatic { + + /** AnimationStatic xy */ + xy?: (google.cloud.video.transcoder.v1.Overlay.INormalizedCoordinate|null); + + /** AnimationStatic startTimeOffset */ + startTimeOffset?: (google.protobuf.IDuration|null); + } + + /** Represents an AnimationStatic. */ + class AnimationStatic implements IAnimationStatic { + + /** + * Constructs a new AnimationStatic. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.Overlay.IAnimationStatic); + + /** AnimationStatic xy. */ + public xy?: (google.cloud.video.transcoder.v1.Overlay.INormalizedCoordinate|null); + + /** AnimationStatic startTimeOffset. */ + public startTimeOffset?: (google.protobuf.IDuration|null); + + /** + * Creates a new AnimationStatic instance using the specified properties. + * @param [properties] Properties to set + * @returns AnimationStatic instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.Overlay.IAnimationStatic): google.cloud.video.transcoder.v1.Overlay.AnimationStatic; + + /** + * Encodes the specified AnimationStatic message. Does not implicitly {@link google.cloud.video.transcoder.v1.Overlay.AnimationStatic.verify|verify} messages. + * @param message AnimationStatic message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.Overlay.IAnimationStatic, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnimationStatic message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Overlay.AnimationStatic.verify|verify} messages. + * @param message AnimationStatic message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.Overlay.IAnimationStatic, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnimationStatic message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnimationStatic + * @throws {Error} If the payload is not 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.transcoder.v1.Overlay.AnimationStatic; + + /** + * Decodes an AnimationStatic message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnimationStatic + * @throws {Error} If the payload 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.transcoder.v1.Overlay.AnimationStatic; + + /** + * Verifies an AnimationStatic message. + * @param message Plain 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 AnimationStatic message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnimationStatic + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.Overlay.AnimationStatic; + + /** + * Creates a plain object from an AnimationStatic message. Also converts values to other types if specified. + * @param message AnimationStatic + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.Overlay.AnimationStatic, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnimationStatic to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AnimationFade. */ + interface IAnimationFade { + + /** AnimationFade fadeType */ + fadeType?: (google.cloud.video.transcoder.v1.Overlay.FadeType|keyof typeof google.cloud.video.transcoder.v1.Overlay.FadeType|null); + + /** AnimationFade xy */ + xy?: (google.cloud.video.transcoder.v1.Overlay.INormalizedCoordinate|null); + + /** AnimationFade startTimeOffset */ + startTimeOffset?: (google.protobuf.IDuration|null); + + /** AnimationFade endTimeOffset */ + endTimeOffset?: (google.protobuf.IDuration|null); + } + + /** Represents an AnimationFade. */ + class AnimationFade implements IAnimationFade { + + /** + * Constructs a new AnimationFade. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.Overlay.IAnimationFade); + + /** AnimationFade fadeType. */ + public fadeType: (google.cloud.video.transcoder.v1.Overlay.FadeType|keyof typeof google.cloud.video.transcoder.v1.Overlay.FadeType); + + /** AnimationFade xy. */ + public xy?: (google.cloud.video.transcoder.v1.Overlay.INormalizedCoordinate|null); + + /** AnimationFade startTimeOffset. */ + public startTimeOffset?: (google.protobuf.IDuration|null); + + /** AnimationFade endTimeOffset. */ + public endTimeOffset?: (google.protobuf.IDuration|null); + + /** + * Creates a new AnimationFade instance using the specified properties. + * @param [properties] Properties to set + * @returns AnimationFade instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.Overlay.IAnimationFade): google.cloud.video.transcoder.v1.Overlay.AnimationFade; + + /** + * Encodes the specified AnimationFade message. Does not implicitly {@link google.cloud.video.transcoder.v1.Overlay.AnimationFade.verify|verify} messages. + * @param message AnimationFade message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.Overlay.IAnimationFade, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnimationFade message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Overlay.AnimationFade.verify|verify} messages. + * @param message AnimationFade message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.Overlay.IAnimationFade, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnimationFade message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnimationFade + * @throws {Error} If the payload is not 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.transcoder.v1.Overlay.AnimationFade; + + /** + * Decodes an AnimationFade message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnimationFade + * @throws {Error} If the payload 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.transcoder.v1.Overlay.AnimationFade; + + /** + * Verifies an AnimationFade message. + * @param message Plain 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 AnimationFade message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnimationFade + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.Overlay.AnimationFade; + + /** + * Creates a plain object from an AnimationFade message. Also converts values to other types if specified. + * @param message AnimationFade + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.Overlay.AnimationFade, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnimationFade to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AnimationEnd. */ + interface IAnimationEnd { + + /** AnimationEnd startTimeOffset */ + startTimeOffset?: (google.protobuf.IDuration|null); + } + + /** Represents an AnimationEnd. */ + class AnimationEnd implements IAnimationEnd { + + /** + * Constructs a new AnimationEnd. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.Overlay.IAnimationEnd); + + /** AnimationEnd startTimeOffset. */ + public startTimeOffset?: (google.protobuf.IDuration|null); + + /** + * Creates a new AnimationEnd instance using the specified properties. + * @param [properties] Properties to set + * @returns AnimationEnd instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.Overlay.IAnimationEnd): google.cloud.video.transcoder.v1.Overlay.AnimationEnd; + + /** + * Encodes the specified AnimationEnd message. Does not implicitly {@link google.cloud.video.transcoder.v1.Overlay.AnimationEnd.verify|verify} messages. + * @param message AnimationEnd message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.Overlay.IAnimationEnd, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnimationEnd message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Overlay.AnimationEnd.verify|verify} messages. + * @param message AnimationEnd message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.Overlay.IAnimationEnd, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnimationEnd message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnimationEnd + * @throws {Error} If the payload is not 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.transcoder.v1.Overlay.AnimationEnd; + + /** + * Decodes an AnimationEnd message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnimationEnd + * @throws {Error} If the payload 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.transcoder.v1.Overlay.AnimationEnd; + + /** + * Verifies an AnimationEnd message. + * @param message Plain 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 AnimationEnd message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnimationEnd + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.Overlay.AnimationEnd; + + /** + * Creates a plain object from an AnimationEnd message. Also converts values to other types if specified. + * @param message AnimationEnd + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.Overlay.AnimationEnd, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnimationEnd to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Animation. */ + interface IAnimation { + + /** Animation animationStatic */ + animationStatic?: (google.cloud.video.transcoder.v1.Overlay.IAnimationStatic|null); + + /** Animation animationFade */ + animationFade?: (google.cloud.video.transcoder.v1.Overlay.IAnimationFade|null); + + /** Animation animationEnd */ + animationEnd?: (google.cloud.video.transcoder.v1.Overlay.IAnimationEnd|null); + } + + /** Represents an Animation. */ + class Animation implements IAnimation { + + /** + * Constructs a new Animation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.Overlay.IAnimation); + + /** Animation animationStatic. */ + public animationStatic?: (google.cloud.video.transcoder.v1.Overlay.IAnimationStatic|null); + + /** Animation animationFade. */ + public animationFade?: (google.cloud.video.transcoder.v1.Overlay.IAnimationFade|null); + + /** Animation animationEnd. */ + public animationEnd?: (google.cloud.video.transcoder.v1.Overlay.IAnimationEnd|null); + + /** Animation animationType. */ + public animationType?: ("animationStatic"|"animationFade"|"animationEnd"); + + /** + * Creates a new Animation instance using the specified properties. + * @param [properties] Properties to set + * @returns Animation instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.Overlay.IAnimation): google.cloud.video.transcoder.v1.Overlay.Animation; + + /** + * Encodes the specified Animation message. Does not implicitly {@link google.cloud.video.transcoder.v1.Overlay.Animation.verify|verify} messages. + * @param message Animation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.Overlay.IAnimation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Animation message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Overlay.Animation.verify|verify} messages. + * @param message Animation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.Overlay.IAnimation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Animation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Animation + * @throws {Error} If the payload is not 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.transcoder.v1.Overlay.Animation; + + /** + * Decodes an Animation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Animation + * @throws {Error} If the payload 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.transcoder.v1.Overlay.Animation; + + /** + * Verifies an Animation message. + * @param message Plain 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 Animation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Animation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.Overlay.Animation; + + /** + * Creates a plain object from an Animation message. Also converts values to other types if specified. + * @param message Animation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.Overlay.Animation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Animation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** FadeType enum. */ + enum FadeType { + FADE_TYPE_UNSPECIFIED = 0, + FADE_IN = 1, + FADE_OUT = 2 + } + } + + /** Properties of a PreprocessingConfig. */ + interface IPreprocessingConfig { + + /** PreprocessingConfig color */ + color?: (google.cloud.video.transcoder.v1.PreprocessingConfig.IColor|null); + + /** PreprocessingConfig denoise */ + denoise?: (google.cloud.video.transcoder.v1.PreprocessingConfig.IDenoise|null); + + /** PreprocessingConfig deblock */ + deblock?: (google.cloud.video.transcoder.v1.PreprocessingConfig.IDeblock|null); + + /** PreprocessingConfig audio */ + audio?: (google.cloud.video.transcoder.v1.PreprocessingConfig.IAudio|null); + + /** PreprocessingConfig crop */ + crop?: (google.cloud.video.transcoder.v1.PreprocessingConfig.ICrop|null); + + /** PreprocessingConfig pad */ + pad?: (google.cloud.video.transcoder.v1.PreprocessingConfig.IPad|null); + } + + /** Represents a PreprocessingConfig. */ + class PreprocessingConfig implements IPreprocessingConfig { + + /** + * Constructs a new PreprocessingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.IPreprocessingConfig); + + /** PreprocessingConfig color. */ + public color?: (google.cloud.video.transcoder.v1.PreprocessingConfig.IColor|null); + + /** PreprocessingConfig denoise. */ + public denoise?: (google.cloud.video.transcoder.v1.PreprocessingConfig.IDenoise|null); + + /** PreprocessingConfig deblock. */ + public deblock?: (google.cloud.video.transcoder.v1.PreprocessingConfig.IDeblock|null); + + /** PreprocessingConfig audio. */ + public audio?: (google.cloud.video.transcoder.v1.PreprocessingConfig.IAudio|null); + + /** PreprocessingConfig crop. */ + public crop?: (google.cloud.video.transcoder.v1.PreprocessingConfig.ICrop|null); + + /** PreprocessingConfig pad. */ + public pad?: (google.cloud.video.transcoder.v1.PreprocessingConfig.IPad|null); + + /** + * Creates a new PreprocessingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns PreprocessingConfig instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.IPreprocessingConfig): google.cloud.video.transcoder.v1.PreprocessingConfig; + + /** + * Encodes the specified PreprocessingConfig message. Does not implicitly {@link google.cloud.video.transcoder.v1.PreprocessingConfig.verify|verify} messages. + * @param message PreprocessingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.IPreprocessingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PreprocessingConfig message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.PreprocessingConfig.verify|verify} messages. + * @param message PreprocessingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.IPreprocessingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PreprocessingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PreprocessingConfig + * @throws {Error} If the payload is not 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.transcoder.v1.PreprocessingConfig; + + /** + * Decodes a PreprocessingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PreprocessingConfig + * @throws {Error} If the payload 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.transcoder.v1.PreprocessingConfig; + + /** + * Verifies a PreprocessingConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PreprocessingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PreprocessingConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.PreprocessingConfig; + + /** + * Creates a plain object from a PreprocessingConfig message. Also converts values to other types if specified. + * @param message PreprocessingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.PreprocessingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PreprocessingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace PreprocessingConfig { + + /** Properties of a Color. */ + interface IColor { + + /** Color saturation */ + saturation?: (number|null); + + /** Color contrast */ + contrast?: (number|null); + + /** Color brightness */ + brightness?: (number|null); + } + + /** Represents a Color. */ + class Color implements IColor { + + /** + * Constructs a new Color. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.PreprocessingConfig.IColor); + + /** Color saturation. */ + public saturation: number; + + /** Color contrast. */ + public contrast: number; + + /** Color brightness. */ + public brightness: number; + + /** + * Creates a new Color instance using the specified properties. + * @param [properties] Properties to set + * @returns Color instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.PreprocessingConfig.IColor): google.cloud.video.transcoder.v1.PreprocessingConfig.Color; + + /** + * Encodes the specified Color message. Does not implicitly {@link google.cloud.video.transcoder.v1.PreprocessingConfig.Color.verify|verify} messages. + * @param message Color message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.PreprocessingConfig.IColor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Color message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.PreprocessingConfig.Color.verify|verify} messages. + * @param message Color message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.PreprocessingConfig.IColor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Color message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Color + * @throws {Error} If the payload is not 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.transcoder.v1.PreprocessingConfig.Color; + + /** + * Decodes a Color message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Color + * @throws {Error} If the payload 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.transcoder.v1.PreprocessingConfig.Color; + + /** + * Verifies a Color message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Color message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Color + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.PreprocessingConfig.Color; + + /** + * Creates a plain object from a Color message. Also converts values to other types if specified. + * @param message Color + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.PreprocessingConfig.Color, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Color to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Denoise. */ + interface IDenoise { + + /** Denoise strength */ + strength?: (number|null); + + /** Denoise tune */ + tune?: (string|null); + } + + /** Represents a Denoise. */ + class Denoise implements IDenoise { + + /** + * Constructs a new Denoise. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.PreprocessingConfig.IDenoise); + + /** Denoise strength. */ + public strength: number; + + /** Denoise tune. */ + public tune: string; + + /** + * Creates a new Denoise instance using the specified properties. + * @param [properties] Properties to set + * @returns Denoise instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.PreprocessingConfig.IDenoise): google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise; + + /** + * Encodes the specified Denoise message. Does not implicitly {@link google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise.verify|verify} messages. + * @param message Denoise message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.PreprocessingConfig.IDenoise, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Denoise message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise.verify|verify} messages. + * @param message Denoise message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.PreprocessingConfig.IDenoise, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Denoise message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Denoise + * @throws {Error} If the payload is not 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.transcoder.v1.PreprocessingConfig.Denoise; + + /** + * Decodes a Denoise message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Denoise + * @throws {Error} If the payload 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.transcoder.v1.PreprocessingConfig.Denoise; + + /** + * Verifies a Denoise message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Denoise message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Denoise + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise; + + /** + * Creates a plain object from a Denoise message. Also converts values to other types if specified. + * @param message Denoise + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Denoise to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Deblock. */ + interface IDeblock { + + /** Deblock strength */ + strength?: (number|null); + + /** Deblock enabled */ + enabled?: (boolean|null); + } + + /** Represents a Deblock. */ + class Deblock implements IDeblock { + + /** + * Constructs a new Deblock. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.PreprocessingConfig.IDeblock); + + /** Deblock strength. */ + public strength: number; + + /** Deblock enabled. */ + public enabled: boolean; + + /** + * Creates a new Deblock instance using the specified properties. + * @param [properties] Properties to set + * @returns Deblock instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.PreprocessingConfig.IDeblock): google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock; + + /** + * Encodes the specified Deblock message. Does not implicitly {@link google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock.verify|verify} messages. + * @param message Deblock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.PreprocessingConfig.IDeblock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Deblock message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock.verify|verify} messages. + * @param message Deblock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.PreprocessingConfig.IDeblock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Deblock message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Deblock + * @throws {Error} If the payload is not 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.transcoder.v1.PreprocessingConfig.Deblock; + + /** + * Decodes a Deblock message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Deblock + * @throws {Error} If the payload 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.transcoder.v1.PreprocessingConfig.Deblock; + + /** + * Verifies a Deblock message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Deblock message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Deblock + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock; + + /** + * Creates a plain object from a Deblock message. Also converts values to other types if specified. + * @param message Deblock + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Deblock to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Audio. */ + interface IAudio { + + /** Audio lufs */ + lufs?: (number|null); + + /** Audio highBoost */ + highBoost?: (boolean|null); + + /** Audio lowBoost */ + lowBoost?: (boolean|null); + } + + /** Represents an Audio. */ + class Audio implements IAudio { + + /** + * Constructs a new Audio. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.PreprocessingConfig.IAudio); + + /** Audio lufs. */ + public lufs: number; + + /** Audio highBoost. */ + public highBoost: boolean; + + /** Audio lowBoost. */ + public lowBoost: boolean; + + /** + * Creates a new Audio instance using the specified properties. + * @param [properties] Properties to set + * @returns Audio instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.PreprocessingConfig.IAudio): google.cloud.video.transcoder.v1.PreprocessingConfig.Audio; + + /** + * Encodes the specified Audio message. Does not implicitly {@link google.cloud.video.transcoder.v1.PreprocessingConfig.Audio.verify|verify} messages. + * @param message Audio message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.PreprocessingConfig.IAudio, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Audio message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.PreprocessingConfig.Audio.verify|verify} messages. + * @param message Audio message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.PreprocessingConfig.IAudio, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Audio message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Audio + * @throws {Error} If the payload is not 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.transcoder.v1.PreprocessingConfig.Audio; + + /** + * Decodes an Audio message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Audio + * @throws {Error} If the payload 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.transcoder.v1.PreprocessingConfig.Audio; + + /** + * Verifies an Audio message. + * @param message Plain 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 Audio message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Audio + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.PreprocessingConfig.Audio; + + /** + * Creates a plain object from an Audio message. Also converts values to other types if specified. + * @param message Audio + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.PreprocessingConfig.Audio, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Audio to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Crop. */ + interface ICrop { + + /** Crop topPixels */ + topPixels?: (number|null); + + /** Crop bottomPixels */ + bottomPixels?: (number|null); + + /** Crop leftPixels */ + leftPixels?: (number|null); + + /** Crop rightPixels */ + rightPixels?: (number|null); + } + + /** Represents a Crop. */ + class Crop implements ICrop { + + /** + * Constructs a new Crop. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.PreprocessingConfig.ICrop); + + /** Crop topPixels. */ + public topPixels: number; + + /** Crop bottomPixels. */ + public bottomPixels: number; + + /** Crop leftPixels. */ + public leftPixels: number; + + /** Crop rightPixels. */ + public rightPixels: number; + + /** + * Creates a new Crop instance using the specified properties. + * @param [properties] Properties to set + * @returns Crop instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.PreprocessingConfig.ICrop): google.cloud.video.transcoder.v1.PreprocessingConfig.Crop; + + /** + * Encodes the specified Crop message. Does not implicitly {@link google.cloud.video.transcoder.v1.PreprocessingConfig.Crop.verify|verify} messages. + * @param message Crop message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.PreprocessingConfig.ICrop, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Crop message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.PreprocessingConfig.Crop.verify|verify} messages. + * @param message Crop message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.PreprocessingConfig.ICrop, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Crop message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Crop + * @throws {Error} If the payload is not 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.transcoder.v1.PreprocessingConfig.Crop; + + /** + * Decodes a Crop message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Crop + * @throws {Error} If the payload 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.transcoder.v1.PreprocessingConfig.Crop; + + /** + * Verifies a Crop message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Crop message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Crop + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.PreprocessingConfig.Crop; + + /** + * Creates a plain object from a Crop message. Also converts values to other types if specified. + * @param message Crop + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.PreprocessingConfig.Crop, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Crop to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Pad. */ + interface IPad { + + /** Pad topPixels */ + topPixels?: (number|null); + + /** Pad bottomPixels */ + bottomPixels?: (number|null); + + /** Pad leftPixels */ + leftPixels?: (number|null); + + /** Pad rightPixels */ + rightPixels?: (number|null); + } + + /** Represents a Pad. */ + class Pad implements IPad { + + /** + * Constructs a new Pad. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.PreprocessingConfig.IPad); + + /** Pad topPixels. */ + public topPixels: number; + + /** Pad bottomPixels. */ + public bottomPixels: number; + + /** Pad leftPixels. */ + public leftPixels: number; + + /** Pad rightPixels. */ + public rightPixels: number; + + /** + * Creates a new Pad instance using the specified properties. + * @param [properties] Properties to set + * @returns Pad instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.PreprocessingConfig.IPad): google.cloud.video.transcoder.v1.PreprocessingConfig.Pad; + + /** + * Encodes the specified Pad message. Does not implicitly {@link google.cloud.video.transcoder.v1.PreprocessingConfig.Pad.verify|verify} messages. + * @param message Pad message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.PreprocessingConfig.IPad, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Pad message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.PreprocessingConfig.Pad.verify|verify} messages. + * @param message Pad message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.PreprocessingConfig.IPad, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Pad message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Pad + * @throws {Error} If the payload is not 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.transcoder.v1.PreprocessingConfig.Pad; + + /** + * Decodes a Pad message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Pad + * @throws {Error} If the payload 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.transcoder.v1.PreprocessingConfig.Pad; + + /** + * Verifies a Pad message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Pad message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Pad + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.PreprocessingConfig.Pad; + + /** + * Creates a plain object from a Pad message. Also converts values to other types if specified. + * @param message Pad + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.PreprocessingConfig.Pad, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Pad to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a VideoStream. */ + interface IVideoStream { + + /** VideoStream h264 */ + h264?: (google.cloud.video.transcoder.v1.VideoStream.IH264CodecSettings|null); + + /** VideoStream h265 */ + h265?: (google.cloud.video.transcoder.v1.VideoStream.IH265CodecSettings|null); + + /** VideoStream vp9 */ + vp9?: (google.cloud.video.transcoder.v1.VideoStream.IVp9CodecSettings|null); + } + + /** Represents a VideoStream. */ + class VideoStream implements IVideoStream { + + /** + * Constructs a new VideoStream. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.IVideoStream); + + /** VideoStream h264. */ + public h264?: (google.cloud.video.transcoder.v1.VideoStream.IH264CodecSettings|null); + + /** VideoStream h265. */ + public h265?: (google.cloud.video.transcoder.v1.VideoStream.IH265CodecSettings|null); + + /** VideoStream vp9. */ + public vp9?: (google.cloud.video.transcoder.v1.VideoStream.IVp9CodecSettings|null); + + /** VideoStream codecSettings. */ + public codecSettings?: ("h264"|"h265"|"vp9"); + + /** + * Creates a new VideoStream instance using the specified properties. + * @param [properties] Properties to set + * @returns VideoStream instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.IVideoStream): google.cloud.video.transcoder.v1.VideoStream; + + /** + * Encodes the specified VideoStream message. Does not implicitly {@link google.cloud.video.transcoder.v1.VideoStream.verify|verify} messages. + * @param message VideoStream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.IVideoStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VideoStream message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.VideoStream.verify|verify} messages. + * @param message VideoStream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.IVideoStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VideoStream message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VideoStream + * @throws {Error} If the payload is not 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.transcoder.v1.VideoStream; + + /** + * Decodes a VideoStream message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VideoStream + * @throws {Error} If the payload 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.transcoder.v1.VideoStream; + + /** + * Verifies a VideoStream message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VideoStream message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VideoStream + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.VideoStream; + + /** + * Creates a plain object from a VideoStream message. Also converts values to other types if specified. + * @param message VideoStream + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.VideoStream, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VideoStream to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace VideoStream { + + /** Properties of a H264CodecSettings. */ + interface IH264CodecSettings { + + /** H264CodecSettings widthPixels */ + widthPixels?: (number|null); + + /** H264CodecSettings heightPixels */ + heightPixels?: (number|null); + + /** H264CodecSettings frameRate */ + frameRate?: (number|null); + + /** H264CodecSettings bitrateBps */ + bitrateBps?: (number|null); + + /** H264CodecSettings pixelFormat */ + pixelFormat?: (string|null); + + /** H264CodecSettings rateControlMode */ + rateControlMode?: (string|null); + + /** H264CodecSettings crfLevel */ + crfLevel?: (number|null); + + /** H264CodecSettings allowOpenGop */ + allowOpenGop?: (boolean|null); + + /** H264CodecSettings gopFrameCount */ + gopFrameCount?: (number|null); + + /** H264CodecSettings gopDuration */ + gopDuration?: (google.protobuf.IDuration|null); + + /** H264CodecSettings enableTwoPass */ + enableTwoPass?: (boolean|null); + + /** H264CodecSettings vbvSizeBits */ + vbvSizeBits?: (number|null); + + /** H264CodecSettings vbvFullnessBits */ + vbvFullnessBits?: (number|null); + + /** H264CodecSettings entropyCoder */ + entropyCoder?: (string|null); + + /** H264CodecSettings bPyramid */ + bPyramid?: (boolean|null); + + /** H264CodecSettings bFrameCount */ + bFrameCount?: (number|null); + + /** H264CodecSettings aqStrength */ + aqStrength?: (number|null); + + /** H264CodecSettings profile */ + profile?: (string|null); + + /** H264CodecSettings tune */ + tune?: (string|null); + + /** H264CodecSettings preset */ + preset?: (string|null); + } + + /** Represents a H264CodecSettings. */ + class H264CodecSettings implements IH264CodecSettings { + + /** + * Constructs a new H264CodecSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.VideoStream.IH264CodecSettings); + + /** H264CodecSettings widthPixels. */ + public widthPixels: number; + + /** H264CodecSettings heightPixels. */ + public heightPixels: number; + + /** H264CodecSettings frameRate. */ + public frameRate: number; + + /** H264CodecSettings bitrateBps. */ + public bitrateBps: number; + + /** H264CodecSettings pixelFormat. */ + public pixelFormat: string; + + /** H264CodecSettings rateControlMode. */ + public rateControlMode: string; + + /** H264CodecSettings crfLevel. */ + public crfLevel: number; + + /** H264CodecSettings allowOpenGop. */ + public allowOpenGop: boolean; + + /** H264CodecSettings gopFrameCount. */ + public gopFrameCount?: (number|null); + + /** H264CodecSettings gopDuration. */ + public gopDuration?: (google.protobuf.IDuration|null); + + /** H264CodecSettings enableTwoPass. */ + public enableTwoPass: boolean; + + /** H264CodecSettings vbvSizeBits. */ + public vbvSizeBits: number; + + /** H264CodecSettings vbvFullnessBits. */ + public vbvFullnessBits: number; + + /** H264CodecSettings entropyCoder. */ + public entropyCoder: string; + + /** H264CodecSettings bPyramid. */ + public bPyramid: boolean; + + /** H264CodecSettings bFrameCount. */ + public bFrameCount: number; + + /** H264CodecSettings aqStrength. */ + public aqStrength: number; + + /** H264CodecSettings profile. */ + public profile: string; + + /** H264CodecSettings tune. */ + public tune: string; + + /** H264CodecSettings preset. */ + public preset: string; + + /** H264CodecSettings gopMode. */ + public gopMode?: ("gopFrameCount"|"gopDuration"); + + /** + * Creates a new H264CodecSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns H264CodecSettings instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.VideoStream.IH264CodecSettings): google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings; + + /** + * Encodes the specified H264CodecSettings message. Does not implicitly {@link google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings.verify|verify} messages. + * @param message H264CodecSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.VideoStream.IH264CodecSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified H264CodecSettings message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings.verify|verify} messages. + * @param message H264CodecSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.VideoStream.IH264CodecSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a H264CodecSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns H264CodecSettings + * @throws {Error} If the payload is not 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.transcoder.v1.VideoStream.H264CodecSettings; + + /** + * Decodes a H264CodecSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns H264CodecSettings + * @throws {Error} If the payload 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.transcoder.v1.VideoStream.H264CodecSettings; + + /** + * Verifies a H264CodecSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a H264CodecSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns H264CodecSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings; + + /** + * Creates a plain object from a H264CodecSettings message. Also converts values to other types if specified. + * @param message H264CodecSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this H264CodecSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a H265CodecSettings. */ + interface IH265CodecSettings { + + /** H265CodecSettings widthPixels */ + widthPixels?: (number|null); + + /** H265CodecSettings heightPixels */ + heightPixels?: (number|null); + + /** H265CodecSettings frameRate */ + frameRate?: (number|null); + + /** H265CodecSettings bitrateBps */ + bitrateBps?: (number|null); + + /** H265CodecSettings pixelFormat */ + pixelFormat?: (string|null); + + /** H265CodecSettings rateControlMode */ + rateControlMode?: (string|null); + + /** H265CodecSettings crfLevel */ + crfLevel?: (number|null); + + /** H265CodecSettings allowOpenGop */ + allowOpenGop?: (boolean|null); + + /** H265CodecSettings gopFrameCount */ + gopFrameCount?: (number|null); + + /** H265CodecSettings gopDuration */ + gopDuration?: (google.protobuf.IDuration|null); + + /** H265CodecSettings enableTwoPass */ + enableTwoPass?: (boolean|null); + + /** H265CodecSettings vbvSizeBits */ + vbvSizeBits?: (number|null); + + /** H265CodecSettings vbvFullnessBits */ + vbvFullnessBits?: (number|null); + + /** H265CodecSettings bPyramid */ + bPyramid?: (boolean|null); + + /** H265CodecSettings bFrameCount */ + bFrameCount?: (number|null); + + /** H265CodecSettings aqStrength */ + aqStrength?: (number|null); + + /** H265CodecSettings profile */ + profile?: (string|null); + + /** H265CodecSettings tune */ + tune?: (string|null); + + /** H265CodecSettings preset */ + preset?: (string|null); + } + + /** Represents a H265CodecSettings. */ + class H265CodecSettings implements IH265CodecSettings { + + /** + * Constructs a new H265CodecSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.VideoStream.IH265CodecSettings); + + /** H265CodecSettings widthPixels. */ + public widthPixels: number; + + /** H265CodecSettings heightPixels. */ + public heightPixels: number; + + /** H265CodecSettings frameRate. */ + public frameRate: number; + + /** H265CodecSettings bitrateBps. */ + public bitrateBps: number; + + /** H265CodecSettings pixelFormat. */ + public pixelFormat: string; + + /** H265CodecSettings rateControlMode. */ + public rateControlMode: string; + + /** H265CodecSettings crfLevel. */ + public crfLevel: number; + + /** H265CodecSettings allowOpenGop. */ + public allowOpenGop: boolean; + + /** H265CodecSettings gopFrameCount. */ + public gopFrameCount?: (number|null); + + /** H265CodecSettings gopDuration. */ + public gopDuration?: (google.protobuf.IDuration|null); + + /** H265CodecSettings enableTwoPass. */ + public enableTwoPass: boolean; + + /** H265CodecSettings vbvSizeBits. */ + public vbvSizeBits: number; + + /** H265CodecSettings vbvFullnessBits. */ + public vbvFullnessBits: number; + + /** H265CodecSettings bPyramid. */ + public bPyramid: boolean; + + /** H265CodecSettings bFrameCount. */ + public bFrameCount: number; + + /** H265CodecSettings aqStrength. */ + public aqStrength: number; + + /** H265CodecSettings profile. */ + public profile: string; + + /** H265CodecSettings tune. */ + public tune: string; + + /** H265CodecSettings preset. */ + public preset: string; + + /** H265CodecSettings gopMode. */ + public gopMode?: ("gopFrameCount"|"gopDuration"); + + /** + * Creates a new H265CodecSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns H265CodecSettings instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.VideoStream.IH265CodecSettings): google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings; + + /** + * Encodes the specified H265CodecSettings message. Does not implicitly {@link google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings.verify|verify} messages. + * @param message H265CodecSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.VideoStream.IH265CodecSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified H265CodecSettings message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings.verify|verify} messages. + * @param message H265CodecSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.VideoStream.IH265CodecSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a H265CodecSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns H265CodecSettings + * @throws {Error} If the payload is not 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.transcoder.v1.VideoStream.H265CodecSettings; + + /** + * Decodes a H265CodecSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns H265CodecSettings + * @throws {Error} If the payload 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.transcoder.v1.VideoStream.H265CodecSettings; + + /** + * Verifies a H265CodecSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a H265CodecSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns H265CodecSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings; + + /** + * Creates a plain object from a H265CodecSettings message. Also converts values to other types if specified. + * @param message H265CodecSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this H265CodecSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Vp9CodecSettings. */ + interface IVp9CodecSettings { + + /** Vp9CodecSettings widthPixels */ + widthPixels?: (number|null); + + /** Vp9CodecSettings heightPixels */ + heightPixels?: (number|null); + + /** Vp9CodecSettings frameRate */ + frameRate?: (number|null); + + /** Vp9CodecSettings bitrateBps */ + bitrateBps?: (number|null); + + /** Vp9CodecSettings pixelFormat */ + pixelFormat?: (string|null); + + /** Vp9CodecSettings rateControlMode */ + rateControlMode?: (string|null); + + /** Vp9CodecSettings crfLevel */ + crfLevel?: (number|null); + + /** Vp9CodecSettings gopFrameCount */ + gopFrameCount?: (number|null); + + /** Vp9CodecSettings gopDuration */ + gopDuration?: (google.protobuf.IDuration|null); + + /** Vp9CodecSettings profile */ + profile?: (string|null); + } + + /** Represents a Vp9CodecSettings. */ + class Vp9CodecSettings implements IVp9CodecSettings { + + /** + * Constructs a new Vp9CodecSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.VideoStream.IVp9CodecSettings); + + /** Vp9CodecSettings widthPixels. */ + public widthPixels: number; + + /** Vp9CodecSettings heightPixels. */ + public heightPixels: number; + + /** Vp9CodecSettings frameRate. */ + public frameRate: number; + + /** Vp9CodecSettings bitrateBps. */ + public bitrateBps: number; + + /** Vp9CodecSettings pixelFormat. */ + public pixelFormat: string; + + /** Vp9CodecSettings rateControlMode. */ + public rateControlMode: string; + + /** Vp9CodecSettings crfLevel. */ + public crfLevel: number; + + /** Vp9CodecSettings gopFrameCount. */ + public gopFrameCount?: (number|null); + + /** Vp9CodecSettings gopDuration. */ + public gopDuration?: (google.protobuf.IDuration|null); + + /** Vp9CodecSettings profile. */ + public profile: string; + + /** Vp9CodecSettings gopMode. */ + public gopMode?: ("gopFrameCount"|"gopDuration"); + + /** + * Creates a new Vp9CodecSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns Vp9CodecSettings instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.VideoStream.IVp9CodecSettings): google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings; + + /** + * Encodes the specified Vp9CodecSettings message. Does not implicitly {@link google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings.verify|verify} messages. + * @param message Vp9CodecSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.VideoStream.IVp9CodecSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Vp9CodecSettings message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings.verify|verify} messages. + * @param message Vp9CodecSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.VideoStream.IVp9CodecSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Vp9CodecSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Vp9CodecSettings + * @throws {Error} If the payload is not 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.transcoder.v1.VideoStream.Vp9CodecSettings; + + /** + * Decodes a Vp9CodecSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Vp9CodecSettings + * @throws {Error} If the payload 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.transcoder.v1.VideoStream.Vp9CodecSettings; + + /** + * Verifies a Vp9CodecSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Vp9CodecSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Vp9CodecSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings; + + /** + * Creates a plain object from a Vp9CodecSettings message. Also converts values to other types if specified. + * @param message Vp9CodecSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Vp9CodecSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an AudioStream. */ + interface IAudioStream { + + /** AudioStream codec */ + codec?: (string|null); + + /** AudioStream bitrateBps */ + bitrateBps?: (number|null); + + /** AudioStream channelCount */ + channelCount?: (number|null); + + /** AudioStream channelLayout */ + channelLayout?: (string[]|null); + + /** AudioStream mapping */ + mapping?: (google.cloud.video.transcoder.v1.AudioStream.IAudioMapping[]|null); + + /** AudioStream sampleRateHertz */ + sampleRateHertz?: (number|null); + } + + /** Represents an AudioStream. */ + class AudioStream implements IAudioStream { + + /** + * Constructs a new AudioStream. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.IAudioStream); + + /** AudioStream codec. */ + public codec: string; + + /** AudioStream bitrateBps. */ + public bitrateBps: number; + + /** AudioStream channelCount. */ + public channelCount: number; + + /** AudioStream channelLayout. */ + public channelLayout: string[]; + + /** AudioStream mapping. */ + public mapping: google.cloud.video.transcoder.v1.AudioStream.IAudioMapping[]; + + /** AudioStream sampleRateHertz. */ + public sampleRateHertz: number; + + /** + * Creates a new AudioStream instance using the specified properties. + * @param [properties] Properties to set + * @returns AudioStream instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.IAudioStream): google.cloud.video.transcoder.v1.AudioStream; + + /** + * Encodes the specified AudioStream message. Does not implicitly {@link google.cloud.video.transcoder.v1.AudioStream.verify|verify} messages. + * @param message AudioStream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.IAudioStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudioStream message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.AudioStream.verify|verify} messages. + * @param message AudioStream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.IAudioStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudioStream message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudioStream + * @throws {Error} If the payload is not 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.transcoder.v1.AudioStream; + + /** + * Decodes an AudioStream message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudioStream + * @throws {Error} If the payload 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.transcoder.v1.AudioStream; + + /** + * Verifies an AudioStream message. + * @param message Plain 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 AudioStream message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudioStream + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.AudioStream; + + /** + * Creates a plain object from an AudioStream message. Also converts values to other types if specified. + * @param message AudioStream + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.AudioStream, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudioStream to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace AudioStream { + + /** Properties of an AudioMapping. */ + interface IAudioMapping { + + /** AudioMapping atomKey */ + atomKey?: (string|null); + + /** AudioMapping inputKey */ + inputKey?: (string|null); + + /** AudioMapping inputTrack */ + inputTrack?: (number|null); + + /** AudioMapping inputChannel */ + inputChannel?: (number|null); + + /** AudioMapping outputChannel */ + outputChannel?: (number|null); + + /** AudioMapping gainDb */ + gainDb?: (number|null); + } + + /** Represents an AudioMapping. */ + class AudioMapping implements IAudioMapping { + + /** + * Constructs a new AudioMapping. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.AudioStream.IAudioMapping); + + /** AudioMapping atomKey. */ + public atomKey: string; + + /** AudioMapping inputKey. */ + public inputKey: string; + + /** AudioMapping inputTrack. */ + public inputTrack: number; + + /** AudioMapping inputChannel. */ + public inputChannel: number; + + /** AudioMapping outputChannel. */ + public outputChannel: number; + + /** AudioMapping gainDb. */ + public gainDb: number; + + /** + * Creates a new AudioMapping instance using the specified properties. + * @param [properties] Properties to set + * @returns AudioMapping instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.AudioStream.IAudioMapping): google.cloud.video.transcoder.v1.AudioStream.AudioMapping; + + /** + * Encodes the specified AudioMapping message. Does not implicitly {@link google.cloud.video.transcoder.v1.AudioStream.AudioMapping.verify|verify} messages. + * @param message AudioMapping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.AudioStream.IAudioMapping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudioMapping message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.AudioStream.AudioMapping.verify|verify} messages. + * @param message AudioMapping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.AudioStream.IAudioMapping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudioMapping message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudioMapping + * @throws {Error} If the payload is not 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.transcoder.v1.AudioStream.AudioMapping; + + /** + * Decodes an AudioMapping message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudioMapping + * @throws {Error} If the payload 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.transcoder.v1.AudioStream.AudioMapping; + + /** + * Verifies an AudioMapping message. + * @param message Plain 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 AudioMapping message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudioMapping + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.AudioStream.AudioMapping; + + /** + * Creates a plain object from an AudioMapping message. Also converts values to other types if specified. + * @param message AudioMapping + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.AudioStream.AudioMapping, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudioMapping to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a TextStream. */ + interface ITextStream { + + /** TextStream codec */ + codec?: (string|null); + + /** TextStream mapping */ + mapping?: (google.cloud.video.transcoder.v1.TextStream.ITextMapping[]|null); + } + + /** Represents a TextStream. */ + class TextStream implements ITextStream { + + /** + * Constructs a new TextStream. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.ITextStream); + + /** TextStream codec. */ + public codec: string; + + /** TextStream mapping. */ + public mapping: google.cloud.video.transcoder.v1.TextStream.ITextMapping[]; + + /** + * Creates a new TextStream instance using the specified properties. + * @param [properties] Properties to set + * @returns TextStream instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.ITextStream): google.cloud.video.transcoder.v1.TextStream; + + /** + * Encodes the specified TextStream message. Does not implicitly {@link google.cloud.video.transcoder.v1.TextStream.verify|verify} messages. + * @param message TextStream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.ITextStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TextStream message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.TextStream.verify|verify} messages. + * @param message TextStream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.ITextStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TextStream message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TextStream + * @throws {Error} If the payload is not 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.transcoder.v1.TextStream; + + /** + * Decodes a TextStream message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TextStream + * @throws {Error} If the payload 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.transcoder.v1.TextStream; + + /** + * Verifies a TextStream message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TextStream message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TextStream + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.TextStream; + + /** + * Creates a plain object from a TextStream message. Also converts values to other types if specified. + * @param message TextStream + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.TextStream, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TextStream to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace TextStream { + + /** Properties of a TextMapping. */ + interface ITextMapping { + + /** TextMapping atomKey */ + atomKey?: (string|null); + + /** TextMapping inputKey */ + inputKey?: (string|null); + + /** TextMapping inputTrack */ + inputTrack?: (number|null); + } + + /** Represents a TextMapping. */ + class TextMapping implements ITextMapping { + + /** + * Constructs a new TextMapping. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.TextStream.ITextMapping); + + /** TextMapping atomKey. */ + public atomKey: string; + + /** TextMapping inputKey. */ + public inputKey: string; + + /** TextMapping inputTrack. */ + public inputTrack: number; + + /** + * Creates a new TextMapping instance using the specified properties. + * @param [properties] Properties to set + * @returns TextMapping instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.TextStream.ITextMapping): google.cloud.video.transcoder.v1.TextStream.TextMapping; + + /** + * Encodes the specified TextMapping message. Does not implicitly {@link google.cloud.video.transcoder.v1.TextStream.TextMapping.verify|verify} messages. + * @param message TextMapping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.TextStream.ITextMapping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TextMapping message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.TextStream.TextMapping.verify|verify} messages. + * @param message TextMapping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.TextStream.ITextMapping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TextMapping message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TextMapping + * @throws {Error} If the payload is not 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.transcoder.v1.TextStream.TextMapping; + + /** + * Decodes a TextMapping message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TextMapping + * @throws {Error} If the payload 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.transcoder.v1.TextStream.TextMapping; + + /** + * Verifies a TextMapping message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TextMapping message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TextMapping + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.TextStream.TextMapping; + + /** + * Creates a plain object from a TextMapping message. Also converts values to other types if specified. + * @param message TextMapping + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.TextStream.TextMapping, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TextMapping to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a SegmentSettings. */ + interface ISegmentSettings { + + /** SegmentSettings segmentDuration */ + segmentDuration?: (google.protobuf.IDuration|null); + + /** SegmentSettings individualSegments */ + individualSegments?: (boolean|null); + } + + /** Represents a SegmentSettings. */ + class SegmentSettings implements ISegmentSettings { + + /** + * Constructs a new SegmentSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.ISegmentSettings); + + /** SegmentSettings segmentDuration. */ + public segmentDuration?: (google.protobuf.IDuration|null); + + /** SegmentSettings individualSegments. */ + public individualSegments: boolean; + + /** + * Creates a new SegmentSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns SegmentSettings instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.ISegmentSettings): google.cloud.video.transcoder.v1.SegmentSettings; + + /** + * Encodes the specified SegmentSettings message. Does not implicitly {@link google.cloud.video.transcoder.v1.SegmentSettings.verify|verify} messages. + * @param message SegmentSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.ISegmentSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SegmentSettings message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.SegmentSettings.verify|verify} messages. + * @param message SegmentSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.ISegmentSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SegmentSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SegmentSettings + * @throws {Error} If the payload is not 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.transcoder.v1.SegmentSettings; + + /** + * Decodes a SegmentSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SegmentSettings + * @throws {Error} If the payload 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.transcoder.v1.SegmentSettings; + + /** + * Verifies a SegmentSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SegmentSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SegmentSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.SegmentSettings; + + /** + * Creates a plain object from a SegmentSettings message. Also converts values to other types if specified. + * @param message SegmentSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.SegmentSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SegmentSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Encryption. */ + interface IEncryption { + + /** Encryption key */ + key?: (string|null); + + /** Encryption iv */ + iv?: (string|null); + + /** Encryption aes_128 */ + aes_128?: (google.cloud.video.transcoder.v1.Encryption.IAes128Encryption|null); + + /** Encryption sampleAes */ + sampleAes?: (google.cloud.video.transcoder.v1.Encryption.ISampleAesEncryption|null); + + /** Encryption mpegCenc */ + mpegCenc?: (google.cloud.video.transcoder.v1.Encryption.IMpegCommonEncryption|null); + } + + /** Represents an Encryption. */ + class Encryption implements IEncryption { + + /** + * Constructs a new Encryption. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.IEncryption); + + /** Encryption key. */ + public key: string; + + /** Encryption iv. */ + public iv: string; + + /** Encryption aes_128. */ + public aes_128?: (google.cloud.video.transcoder.v1.Encryption.IAes128Encryption|null); + + /** Encryption sampleAes. */ + public sampleAes?: (google.cloud.video.transcoder.v1.Encryption.ISampleAesEncryption|null); + + /** Encryption mpegCenc. */ + public mpegCenc?: (google.cloud.video.transcoder.v1.Encryption.IMpegCommonEncryption|null); + + /** Encryption encryptionMode. */ + public encryptionMode?: ("aes_128"|"sampleAes"|"mpegCenc"); + + /** + * Creates a new Encryption instance using the specified properties. + * @param [properties] Properties to set + * @returns Encryption instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.IEncryption): google.cloud.video.transcoder.v1.Encryption; + + /** + * Encodes the specified Encryption message. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.verify|verify} messages. + * @param message Encryption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.IEncryption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Encryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.verify|verify} messages. + * @param message Encryption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.IEncryption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Encryption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Encryption + * @throws {Error} If the payload is not 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.transcoder.v1.Encryption; + + /** + * Decodes an Encryption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Encryption + * @throws {Error} If the payload 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.transcoder.v1.Encryption; + + /** + * Verifies an Encryption message. + * @param message Plain 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 Encryption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Encryption + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.Encryption; + + /** + * Creates a plain object from an Encryption message. Also converts values to other types if specified. + * @param message Encryption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.Encryption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Encryption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Encryption { + + /** Properties of an Aes128Encryption. */ + interface IAes128Encryption { + + /** Aes128Encryption keyUri */ + keyUri?: (string|null); + } + + /** Represents an Aes128Encryption. */ + class Aes128Encryption implements IAes128Encryption { + + /** + * Constructs a new Aes128Encryption. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.Encryption.IAes128Encryption); + + /** Aes128Encryption keyUri. */ + public keyUri: string; + + /** + * Creates a new Aes128Encryption instance using the specified properties. + * @param [properties] Properties to set + * @returns Aes128Encryption instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.Encryption.IAes128Encryption): google.cloud.video.transcoder.v1.Encryption.Aes128Encryption; + + /** + * Encodes the specified Aes128Encryption message. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.Aes128Encryption.verify|verify} messages. + * @param message Aes128Encryption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.Encryption.IAes128Encryption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Aes128Encryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.Aes128Encryption.verify|verify} messages. + * @param message Aes128Encryption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.Encryption.IAes128Encryption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Aes128Encryption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Aes128Encryption + * @throws {Error} If the payload is not 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.transcoder.v1.Encryption.Aes128Encryption; + + /** + * Decodes an Aes128Encryption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Aes128Encryption + * @throws {Error} If the payload 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.transcoder.v1.Encryption.Aes128Encryption; + + /** + * Verifies an Aes128Encryption message. + * @param message Plain 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 Aes128Encryption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Aes128Encryption + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.Encryption.Aes128Encryption; + + /** + * Creates a plain object from an Aes128Encryption message. Also converts values to other types if specified. + * @param message Aes128Encryption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.Encryption.Aes128Encryption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Aes128Encryption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SampleAesEncryption. */ + interface ISampleAesEncryption { + + /** SampleAesEncryption keyUri */ + keyUri?: (string|null); + } + + /** Represents a SampleAesEncryption. */ + class SampleAesEncryption implements ISampleAesEncryption { + + /** + * Constructs a new SampleAesEncryption. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.Encryption.ISampleAesEncryption); + + /** SampleAesEncryption keyUri. */ + public keyUri: string; + + /** + * Creates a new SampleAesEncryption instance using the specified properties. + * @param [properties] Properties to set + * @returns SampleAesEncryption instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.Encryption.ISampleAesEncryption): google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption; + + /** + * Encodes the specified SampleAesEncryption message. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption.verify|verify} messages. + * @param message SampleAesEncryption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.Encryption.ISampleAesEncryption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SampleAesEncryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption.verify|verify} messages. + * @param message SampleAesEncryption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.Encryption.ISampleAesEncryption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SampleAesEncryption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SampleAesEncryption + * @throws {Error} If the payload is not 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.transcoder.v1.Encryption.SampleAesEncryption; + + /** + * Decodes a SampleAesEncryption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SampleAesEncryption + * @throws {Error} If the payload 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.transcoder.v1.Encryption.SampleAesEncryption; + + /** + * Verifies a SampleAesEncryption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SampleAesEncryption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SampleAesEncryption + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption; + + /** + * Creates a plain object from a SampleAesEncryption message. Also converts values to other types if specified. + * @param message SampleAesEncryption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SampleAesEncryption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MpegCommonEncryption. */ + interface IMpegCommonEncryption { + + /** MpegCommonEncryption keyId */ + keyId?: (string|null); + + /** MpegCommonEncryption scheme */ + scheme?: (string|null); + } + + /** Represents a MpegCommonEncryption. */ + class MpegCommonEncryption implements IMpegCommonEncryption { + + /** + * Constructs a new MpegCommonEncryption. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.Encryption.IMpegCommonEncryption); + + /** MpegCommonEncryption keyId. */ + public keyId: string; + + /** MpegCommonEncryption scheme. */ + public scheme: string; + + /** + * Creates a new MpegCommonEncryption instance using the specified properties. + * @param [properties] Properties to set + * @returns MpegCommonEncryption instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.Encryption.IMpegCommonEncryption): google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption; + + /** + * Encodes the specified MpegCommonEncryption message. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption.verify|verify} messages. + * @param message MpegCommonEncryption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.Encryption.IMpegCommonEncryption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MpegCommonEncryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption.verify|verify} messages. + * @param message MpegCommonEncryption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.Encryption.IMpegCommonEncryption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MpegCommonEncryption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MpegCommonEncryption + * @throws {Error} If the payload is not 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.transcoder.v1.Encryption.MpegCommonEncryption; + + /** + * Decodes a MpegCommonEncryption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MpegCommonEncryption + * @throws {Error} If the payload 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.transcoder.v1.Encryption.MpegCommonEncryption; + + /** + * Verifies a MpegCommonEncryption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MpegCommonEncryption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MpegCommonEncryption + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption; + + /** + * Creates a plain object from a MpegCommonEncryption message. Also converts values to other types if specified. + * @param message MpegCommonEncryption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MpegCommonEncryption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Represents a TranscoderService */ + class TranscoderService extends $protobuf.rpc.Service { + + /** + * Constructs a new TranscoderService 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 TranscoderService 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): TranscoderService; + + /** + * Calls CreateJob. + * @param request CreateJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Job + */ + public createJob(request: google.cloud.video.transcoder.v1.ICreateJobRequest, callback: google.cloud.video.transcoder.v1.TranscoderService.CreateJobCallback): void; + + /** + * Calls CreateJob. + * @param request CreateJobRequest message or plain object + * @returns Promise + */ + public createJob(request: google.cloud.video.transcoder.v1.ICreateJobRequest): Promise; + + /** + * Calls ListJobs. + * @param request ListJobsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListJobsResponse + */ + public listJobs(request: google.cloud.video.transcoder.v1.IListJobsRequest, callback: google.cloud.video.transcoder.v1.TranscoderService.ListJobsCallback): void; + + /** + * Calls ListJobs. + * @param request ListJobsRequest message or plain object + * @returns Promise + */ + public listJobs(request: google.cloud.video.transcoder.v1.IListJobsRequest): Promise; + + /** + * Calls GetJob. + * @param request GetJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Job + */ + public getJob(request: google.cloud.video.transcoder.v1.IGetJobRequest, callback: google.cloud.video.transcoder.v1.TranscoderService.GetJobCallback): void; + + /** + * Calls GetJob. + * @param request GetJobRequest message or plain object + * @returns Promise + */ + public getJob(request: google.cloud.video.transcoder.v1.IGetJobRequest): Promise; + + /** + * Calls DeleteJob. + * @param request DeleteJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteJob(request: google.cloud.video.transcoder.v1.IDeleteJobRequest, callback: google.cloud.video.transcoder.v1.TranscoderService.DeleteJobCallback): void; + + /** + * Calls DeleteJob. + * @param request DeleteJobRequest message or plain object + * @returns Promise + */ + public deleteJob(request: google.cloud.video.transcoder.v1.IDeleteJobRequest): Promise; + + /** + * Calls CreateJobTemplate. + * @param request CreateJobTemplateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and JobTemplate + */ + public createJobTemplate(request: google.cloud.video.transcoder.v1.ICreateJobTemplateRequest, callback: google.cloud.video.transcoder.v1.TranscoderService.CreateJobTemplateCallback): void; + + /** + * Calls CreateJobTemplate. + * @param request CreateJobTemplateRequest message or plain object + * @returns Promise + */ + public createJobTemplate(request: google.cloud.video.transcoder.v1.ICreateJobTemplateRequest): Promise; + + /** + * Calls ListJobTemplates. + * @param request ListJobTemplatesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListJobTemplatesResponse + */ + public listJobTemplates(request: google.cloud.video.transcoder.v1.IListJobTemplatesRequest, callback: google.cloud.video.transcoder.v1.TranscoderService.ListJobTemplatesCallback): void; + + /** + * Calls ListJobTemplates. + * @param request ListJobTemplatesRequest message or plain object + * @returns Promise + */ + public listJobTemplates(request: google.cloud.video.transcoder.v1.IListJobTemplatesRequest): Promise; + + /** + * Calls GetJobTemplate. + * @param request GetJobTemplateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and JobTemplate + */ + public getJobTemplate(request: google.cloud.video.transcoder.v1.IGetJobTemplateRequest, callback: google.cloud.video.transcoder.v1.TranscoderService.GetJobTemplateCallback): void; + + /** + * Calls GetJobTemplate. + * @param request GetJobTemplateRequest message or plain object + * @returns Promise + */ + public getJobTemplate(request: google.cloud.video.transcoder.v1.IGetJobTemplateRequest): Promise; + + /** + * Calls DeleteJobTemplate. + * @param request DeleteJobTemplateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteJobTemplate(request: google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest, callback: google.cloud.video.transcoder.v1.TranscoderService.DeleteJobTemplateCallback): void; + + /** + * Calls DeleteJobTemplate. + * @param request DeleteJobTemplateRequest message or plain object + * @returns Promise + */ + public deleteJobTemplate(request: google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest): Promise; + } + + namespace TranscoderService { + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#createJob}. + * @param error Error, if any + * @param [response] Job + */ + type CreateJobCallback = (error: (Error|null), response?: google.cloud.video.transcoder.v1.Job) => void; + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#listJobs}. + * @param error Error, if any + * @param [response] ListJobsResponse + */ + type ListJobsCallback = (error: (Error|null), response?: google.cloud.video.transcoder.v1.ListJobsResponse) => void; + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#getJob}. + * @param error Error, if any + * @param [response] Job + */ + type GetJobCallback = (error: (Error|null), response?: google.cloud.video.transcoder.v1.Job) => void; + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#deleteJob}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteJobCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#createJobTemplate}. + * @param error Error, if any + * @param [response] JobTemplate + */ + type CreateJobTemplateCallback = (error: (Error|null), response?: google.cloud.video.transcoder.v1.JobTemplate) => void; + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#listJobTemplates}. + * @param error Error, if any + * @param [response] ListJobTemplatesResponse + */ + type ListJobTemplatesCallback = (error: (Error|null), response?: google.cloud.video.transcoder.v1.ListJobTemplatesResponse) => void; + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#getJobTemplate}. + * @param error Error, if any + * @param [response] JobTemplate + */ + type GetJobTemplateCallback = (error: (Error|null), response?: google.cloud.video.transcoder.v1.JobTemplate) => void; + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#deleteJobTemplate}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteJobTemplateCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } + + /** Properties of a CreateJobRequest. */ + interface ICreateJobRequest { + + /** CreateJobRequest parent */ + parent?: (string|null); + + /** CreateJobRequest job */ + job?: (google.cloud.video.transcoder.v1.IJob|null); + } + + /** Represents a CreateJobRequest. */ + class CreateJobRequest implements ICreateJobRequest { + + /** + * Constructs a new CreateJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.ICreateJobRequest); + + /** CreateJobRequest parent. */ + public parent: string; + + /** CreateJobRequest job. */ + public job?: (google.cloud.video.transcoder.v1.IJob|null); + + /** + * Creates a new CreateJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateJobRequest instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.ICreateJobRequest): google.cloud.video.transcoder.v1.CreateJobRequest; + + /** + * Encodes the specified CreateJobRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1.CreateJobRequest.verify|verify} messages. + * @param message CreateJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.ICreateJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateJobRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.CreateJobRequest.verify|verify} messages. + * @param message CreateJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.ICreateJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateJobRequest + * @throws {Error} If the payload is not 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.transcoder.v1.CreateJobRequest; + + /** + * Decodes a CreateJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateJobRequest + * @throws {Error} If the payload 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.transcoder.v1.CreateJobRequest; + + /** + * Verifies a CreateJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.CreateJobRequest; + + /** + * Creates a plain object from a CreateJobRequest message. Also converts values to other types if specified. + * @param message CreateJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.CreateJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListJobsRequest. */ + interface IListJobsRequest { + + /** ListJobsRequest parent */ + parent?: (string|null); + + /** ListJobsRequest pageSize */ + pageSize?: (number|null); + + /** ListJobsRequest pageToken */ + pageToken?: (string|null); + + /** ListJobsRequest filter */ + filter?: (string|null); + + /** ListJobsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListJobsRequest. */ + class ListJobsRequest implements IListJobsRequest { + + /** + * Constructs a new ListJobsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.IListJobsRequest); + + /** ListJobsRequest parent. */ + public parent: string; + + /** ListJobsRequest pageSize. */ + public pageSize: number; + + /** ListJobsRequest pageToken. */ + public pageToken: string; + + /** ListJobsRequest filter. */ + public filter: string; + + /** ListJobsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListJobsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListJobsRequest instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.IListJobsRequest): google.cloud.video.transcoder.v1.ListJobsRequest; + + /** + * Encodes the specified ListJobsRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1.ListJobsRequest.verify|verify} messages. + * @param message ListJobsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.IListJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListJobsRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.ListJobsRequest.verify|verify} messages. + * @param message ListJobsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.IListJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListJobsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListJobsRequest + * @throws {Error} If the payload is not 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.transcoder.v1.ListJobsRequest; + + /** + * Decodes a ListJobsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListJobsRequest + * @throws {Error} If the payload 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.transcoder.v1.ListJobsRequest; + + /** + * Verifies a ListJobsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListJobsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListJobsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.ListJobsRequest; + + /** + * Creates a plain object from a ListJobsRequest message. Also converts values to other types if specified. + * @param message ListJobsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.ListJobsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListJobsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetJobRequest. */ + interface IGetJobRequest { + + /** GetJobRequest name */ + name?: (string|null); + } + + /** Represents a GetJobRequest. */ + class GetJobRequest implements IGetJobRequest { + + /** + * Constructs a new GetJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.IGetJobRequest); + + /** GetJobRequest name. */ + public name: string; + + /** + * Creates a new GetJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetJobRequest instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.IGetJobRequest): google.cloud.video.transcoder.v1.GetJobRequest; + + /** + * Encodes the specified GetJobRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1.GetJobRequest.verify|verify} messages. + * @param message GetJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.IGetJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetJobRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.GetJobRequest.verify|verify} messages. + * @param message GetJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.IGetJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetJobRequest + * @throws {Error} If the payload is not 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.transcoder.v1.GetJobRequest; + + /** + * Decodes a GetJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetJobRequest + * @throws {Error} If the payload 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.transcoder.v1.GetJobRequest; + + /** + * Verifies a GetJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.GetJobRequest; + + /** + * Creates a plain object from a GetJobRequest message. Also converts values to other types if specified. + * @param message GetJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.GetJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteJobRequest. */ + interface IDeleteJobRequest { + + /** DeleteJobRequest name */ + name?: (string|null); + } + + /** Represents a DeleteJobRequest. */ + class DeleteJobRequest implements IDeleteJobRequest { + + /** + * Constructs a new DeleteJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.IDeleteJobRequest); + + /** DeleteJobRequest name. */ + public name: string; + + /** + * Creates a new DeleteJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteJobRequest instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.IDeleteJobRequest): google.cloud.video.transcoder.v1.DeleteJobRequest; + + /** + * Encodes the specified DeleteJobRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1.DeleteJobRequest.verify|verify} messages. + * @param message DeleteJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.IDeleteJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteJobRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.DeleteJobRequest.verify|verify} messages. + * @param message DeleteJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.IDeleteJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteJobRequest + * @throws {Error} If the payload is not 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.transcoder.v1.DeleteJobRequest; + + /** + * Decodes a DeleteJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteJobRequest + * @throws {Error} If the payload 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.transcoder.v1.DeleteJobRequest; + + /** + * Verifies a DeleteJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.DeleteJobRequest; + + /** + * Creates a plain object from a DeleteJobRequest message. Also converts values to other types if specified. + * @param message DeleteJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.DeleteJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListJobsResponse. */ + interface IListJobsResponse { + + /** ListJobsResponse jobs */ + jobs?: (google.cloud.video.transcoder.v1.IJob[]|null); + + /** ListJobsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListJobsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListJobsResponse. */ + class ListJobsResponse implements IListJobsResponse { + + /** + * Constructs a new ListJobsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.IListJobsResponse); + + /** ListJobsResponse jobs. */ + public jobs: google.cloud.video.transcoder.v1.IJob[]; + + /** ListJobsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListJobsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListJobsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListJobsResponse instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.IListJobsResponse): google.cloud.video.transcoder.v1.ListJobsResponse; + + /** + * Encodes the specified ListJobsResponse message. Does not implicitly {@link google.cloud.video.transcoder.v1.ListJobsResponse.verify|verify} messages. + * @param message ListJobsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.IListJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListJobsResponse message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.ListJobsResponse.verify|verify} messages. + * @param message ListJobsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.IListJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListJobsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListJobsResponse + * @throws {Error} If the payload is not 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.transcoder.v1.ListJobsResponse; + + /** + * Decodes a ListJobsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListJobsResponse + * @throws {Error} If the payload 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.transcoder.v1.ListJobsResponse; + + /** + * Verifies a ListJobsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListJobsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListJobsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.ListJobsResponse; + + /** + * Creates a plain object from a ListJobsResponse message. Also converts values to other types if specified. + * @param message ListJobsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.ListJobsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListJobsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateJobTemplateRequest. */ + interface ICreateJobTemplateRequest { + + /** CreateJobTemplateRequest parent */ + parent?: (string|null); + + /** CreateJobTemplateRequest jobTemplate */ + jobTemplate?: (google.cloud.video.transcoder.v1.IJobTemplate|null); + + /** CreateJobTemplateRequest jobTemplateId */ + jobTemplateId?: (string|null); + } + + /** Represents a CreateJobTemplateRequest. */ + class CreateJobTemplateRequest implements ICreateJobTemplateRequest { + + /** + * Constructs a new CreateJobTemplateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.ICreateJobTemplateRequest); + + /** CreateJobTemplateRequest parent. */ + public parent: string; + + /** CreateJobTemplateRequest jobTemplate. */ + public jobTemplate?: (google.cloud.video.transcoder.v1.IJobTemplate|null); + + /** CreateJobTemplateRequest jobTemplateId. */ + public jobTemplateId: string; + + /** + * Creates a new CreateJobTemplateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateJobTemplateRequest instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.ICreateJobTemplateRequest): google.cloud.video.transcoder.v1.CreateJobTemplateRequest; + + /** + * Encodes the specified CreateJobTemplateRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1.CreateJobTemplateRequest.verify|verify} messages. + * @param message CreateJobTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.ICreateJobTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateJobTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.CreateJobTemplateRequest.verify|verify} messages. + * @param message CreateJobTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.ICreateJobTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateJobTemplateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateJobTemplateRequest + * @throws {Error} If the payload is not 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.transcoder.v1.CreateJobTemplateRequest; + + /** + * Decodes a CreateJobTemplateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateJobTemplateRequest + * @throws {Error} If the payload 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.transcoder.v1.CreateJobTemplateRequest; + + /** + * Verifies a CreateJobTemplateRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateJobTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateJobTemplateRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.CreateJobTemplateRequest; + + /** + * Creates a plain object from a CreateJobTemplateRequest message. Also converts values to other types if specified. + * @param message CreateJobTemplateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.CreateJobTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateJobTemplateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListJobTemplatesRequest. */ + interface IListJobTemplatesRequest { + + /** ListJobTemplatesRequest parent */ + parent?: (string|null); + + /** ListJobTemplatesRequest pageSize */ + pageSize?: (number|null); + + /** ListJobTemplatesRequest pageToken */ + pageToken?: (string|null); + + /** ListJobTemplatesRequest filter */ + filter?: (string|null); + + /** ListJobTemplatesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListJobTemplatesRequest. */ + class ListJobTemplatesRequest implements IListJobTemplatesRequest { + + /** + * Constructs a new ListJobTemplatesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.IListJobTemplatesRequest); + + /** ListJobTemplatesRequest parent. */ + public parent: string; + + /** ListJobTemplatesRequest pageSize. */ + public pageSize: number; + + /** ListJobTemplatesRequest pageToken. */ + public pageToken: string; + + /** ListJobTemplatesRequest filter. */ + public filter: string; + + /** ListJobTemplatesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListJobTemplatesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListJobTemplatesRequest instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.IListJobTemplatesRequest): google.cloud.video.transcoder.v1.ListJobTemplatesRequest; + + /** + * Encodes the specified ListJobTemplatesRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1.ListJobTemplatesRequest.verify|verify} messages. + * @param message ListJobTemplatesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.IListJobTemplatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListJobTemplatesRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.ListJobTemplatesRequest.verify|verify} messages. + * @param message ListJobTemplatesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.IListJobTemplatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListJobTemplatesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListJobTemplatesRequest + * @throws {Error} If the payload is not 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.transcoder.v1.ListJobTemplatesRequest; + + /** + * Decodes a ListJobTemplatesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListJobTemplatesRequest + * @throws {Error} If the payload 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.transcoder.v1.ListJobTemplatesRequest; + + /** + * Verifies a ListJobTemplatesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListJobTemplatesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListJobTemplatesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.ListJobTemplatesRequest; + + /** + * Creates a plain object from a ListJobTemplatesRequest message. Also converts values to other types if specified. + * @param message ListJobTemplatesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.ListJobTemplatesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListJobTemplatesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetJobTemplateRequest. */ + interface IGetJobTemplateRequest { + + /** GetJobTemplateRequest name */ + name?: (string|null); + } + + /** Represents a GetJobTemplateRequest. */ + class GetJobTemplateRequest implements IGetJobTemplateRequest { + + /** + * Constructs a new GetJobTemplateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.IGetJobTemplateRequest); + + /** GetJobTemplateRequest name. */ + public name: string; + + /** + * Creates a new GetJobTemplateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetJobTemplateRequest instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.IGetJobTemplateRequest): google.cloud.video.transcoder.v1.GetJobTemplateRequest; + + /** + * Encodes the specified GetJobTemplateRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1.GetJobTemplateRequest.verify|verify} messages. + * @param message GetJobTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.IGetJobTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetJobTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.GetJobTemplateRequest.verify|verify} messages. + * @param message GetJobTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.IGetJobTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetJobTemplateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetJobTemplateRequest + * @throws {Error} If the payload is not 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.transcoder.v1.GetJobTemplateRequest; + + /** + * Decodes a GetJobTemplateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetJobTemplateRequest + * @throws {Error} If the payload 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.transcoder.v1.GetJobTemplateRequest; + + /** + * Verifies a GetJobTemplateRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetJobTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetJobTemplateRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.GetJobTemplateRequest; + + /** + * Creates a plain object from a GetJobTemplateRequest message. Also converts values to other types if specified. + * @param message GetJobTemplateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.GetJobTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetJobTemplateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteJobTemplateRequest. */ + interface IDeleteJobTemplateRequest { + + /** DeleteJobTemplateRequest name */ + name?: (string|null); + } + + /** Represents a DeleteJobTemplateRequest. */ + class DeleteJobTemplateRequest implements IDeleteJobTemplateRequest { + + /** + * Constructs a new DeleteJobTemplateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest); + + /** DeleteJobTemplateRequest name. */ + public name: string; + + /** + * Creates a new DeleteJobTemplateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteJobTemplateRequest instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest): google.cloud.video.transcoder.v1.DeleteJobTemplateRequest; + + /** + * Encodes the specified DeleteJobTemplateRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1.DeleteJobTemplateRequest.verify|verify} messages. + * @param message DeleteJobTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteJobTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.DeleteJobTemplateRequest.verify|verify} messages. + * @param message DeleteJobTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteJobTemplateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteJobTemplateRequest + * @throws {Error} If the payload is not 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.transcoder.v1.DeleteJobTemplateRequest; + + /** + * Decodes a DeleteJobTemplateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteJobTemplateRequest + * @throws {Error} If the payload 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.transcoder.v1.DeleteJobTemplateRequest; + + /** + * Verifies a DeleteJobTemplateRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteJobTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteJobTemplateRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.DeleteJobTemplateRequest; + + /** + * Creates a plain object from a DeleteJobTemplateRequest message. Also converts values to other types if specified. + * @param message DeleteJobTemplateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.DeleteJobTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteJobTemplateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListJobTemplatesResponse. */ + interface IListJobTemplatesResponse { + + /** ListJobTemplatesResponse jobTemplates */ + jobTemplates?: (google.cloud.video.transcoder.v1.IJobTemplate[]|null); + + /** ListJobTemplatesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListJobTemplatesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListJobTemplatesResponse. */ + class ListJobTemplatesResponse implements IListJobTemplatesResponse { + + /** + * Constructs a new ListJobTemplatesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1.IListJobTemplatesResponse); + + /** ListJobTemplatesResponse jobTemplates. */ + public jobTemplates: google.cloud.video.transcoder.v1.IJobTemplate[]; + + /** ListJobTemplatesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListJobTemplatesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListJobTemplatesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListJobTemplatesResponse instance + */ + public static create(properties?: google.cloud.video.transcoder.v1.IListJobTemplatesResponse): google.cloud.video.transcoder.v1.ListJobTemplatesResponse; + + /** + * Encodes the specified ListJobTemplatesResponse message. Does not implicitly {@link google.cloud.video.transcoder.v1.ListJobTemplatesResponse.verify|verify} messages. + * @param message ListJobTemplatesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1.IListJobTemplatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListJobTemplatesResponse message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.ListJobTemplatesResponse.verify|verify} messages. + * @param message ListJobTemplatesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1.IListJobTemplatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListJobTemplatesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListJobTemplatesResponse + * @throws {Error} If the payload is not 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.transcoder.v1.ListJobTemplatesResponse; + + /** + * Decodes a ListJobTemplatesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListJobTemplatesResponse + * @throws {Error} If the payload 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.transcoder.v1.ListJobTemplatesResponse; + + /** + * Verifies a ListJobTemplatesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListJobTemplatesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListJobTemplatesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.ListJobTemplatesResponse; + + /** + * Creates a plain object from a ListJobTemplatesResponse message. Also converts values to other types if specified. + * @param message ListJobTemplatesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1.ListJobTemplatesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListJobTemplatesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + /** Namespace v1beta1. */ namespace v1beta1 { @@ -9417,6 +15021,102 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + + /** + * Verifies an Any message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of an Empty. */ interface IEmpty { } @@ -9501,4 +15201,110 @@ export namespace google { public toJSON(): { [k: string]: any }; } } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; + + /** + * Verifies a Status message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } } diff --git a/packages/google-cloud-video-transcoder/protos/protos.js b/packages/google-cloud-video-transcoder/protos/protos.js index 0cd7bae12f8..cb997d0739a 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.js +++ b/packages/google-cloud-video-transcoder/protos/protos.js @@ -66,47 +66,43 @@ */ var transcoder = {}; - transcoder.v1beta1 = (function() { + transcoder.v1 = (function() { /** - * Namespace v1beta1. + * Namespace v1. * @memberof google.cloud.video.transcoder * @namespace */ - var v1beta1 = {}; + var v1 = {}; - v1beta1.Job = (function() { + v1.Job = (function() { /** * Properties of a Job. - * @memberof google.cloud.video.transcoder.v1beta1 + * @memberof google.cloud.video.transcoder.v1 * @interface IJob * @property {string|null} [name] Job name * @property {string|null} [inputUri] Job inputUri * @property {string|null} [outputUri] Job outputUri * @property {string|null} [templateId] Job templateId - * @property {google.cloud.video.transcoder.v1beta1.IJobConfig|null} [config] Job config - * @property {number|null} [priority] Job priority - * @property {google.cloud.video.transcoder.v1beta1.Job.IOriginUri|null} [originUri] Job originUri - * @property {google.cloud.video.transcoder.v1beta1.Job.ProcessingState|null} [state] Job state - * @property {google.cloud.video.transcoder.v1beta1.IProgress|null} [progress] Job progress - * @property {string|null} [failureReason] Job failureReason - * @property {Array.|null} [failureDetails] Job failureDetails + * @property {google.cloud.video.transcoder.v1.IJobConfig|null} [config] Job config + * @property {google.cloud.video.transcoder.v1.Job.ProcessingState|null} [state] Job state * @property {google.protobuf.ITimestamp|null} [createTime] Job createTime * @property {google.protobuf.ITimestamp|null} [startTime] Job startTime * @property {google.protobuf.ITimestamp|null} [endTime] Job endTime + * @property {number|null} [ttlAfterCompletionDays] Job ttlAfterCompletionDays + * @property {google.rpc.IStatus|null} [error] Job error */ /** * Constructs a new Job. - * @memberof google.cloud.video.transcoder.v1beta1 + * @memberof google.cloud.video.transcoder.v1 * @classdesc Represents a Job. * @implements IJob * @constructor - * @param {google.cloud.video.transcoder.v1beta1.IJob=} [properties] Properties to set + * @param {google.cloud.video.transcoder.v1.IJob=} [properties] Properties to set */ function Job(properties) { - this.failureDetails = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -116,7 +112,7 @@ /** * Job name. * @member {string} name - * @memberof google.cloud.video.transcoder.v1beta1.Job + * @memberof google.cloud.video.transcoder.v1.Job * @instance */ Job.prototype.name = ""; @@ -124,7 +120,7 @@ /** * Job inputUri. * @member {string} inputUri - * @memberof google.cloud.video.transcoder.v1beta1.Job + * @memberof google.cloud.video.transcoder.v1.Job * @instance */ Job.prototype.inputUri = ""; @@ -132,7 +128,7 @@ /** * Job outputUri. * @member {string} outputUri - * @memberof google.cloud.video.transcoder.v1beta1.Job + * @memberof google.cloud.video.transcoder.v1.Job * @instance */ Job.prototype.outputUri = ""; @@ -140,71 +136,31 @@ /** * Job templateId. * @member {string|null|undefined} templateId - * @memberof google.cloud.video.transcoder.v1beta1.Job + * @memberof google.cloud.video.transcoder.v1.Job * @instance */ Job.prototype.templateId = null; /** * Job config. - * @member {google.cloud.video.transcoder.v1beta1.IJobConfig|null|undefined} config - * @memberof google.cloud.video.transcoder.v1beta1.Job + * @member {google.cloud.video.transcoder.v1.IJobConfig|null|undefined} config + * @memberof google.cloud.video.transcoder.v1.Job * @instance */ Job.prototype.config = null; - /** - * Job priority. - * @member {number} priority - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @instance - */ - Job.prototype.priority = 0; - - /** - * Job originUri. - * @member {google.cloud.video.transcoder.v1beta1.Job.IOriginUri|null|undefined} originUri - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @instance - */ - Job.prototype.originUri = null; - /** * Job state. - * @member {google.cloud.video.transcoder.v1beta1.Job.ProcessingState} state - * @memberof google.cloud.video.transcoder.v1beta1.Job + * @member {google.cloud.video.transcoder.v1.Job.ProcessingState} state + * @memberof google.cloud.video.transcoder.v1.Job * @instance */ Job.prototype.state = 0; - /** - * Job progress. - * @member {google.cloud.video.transcoder.v1beta1.IProgress|null|undefined} progress - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @instance - */ - Job.prototype.progress = null; - - /** - * Job failureReason. - * @member {string} failureReason - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @instance - */ - Job.prototype.failureReason = ""; - - /** - * Job failureDetails. - * @member {Array.} failureDetails - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @instance - */ - Job.prototype.failureDetails = $util.emptyArray; - /** * Job createTime. * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.video.transcoder.v1beta1.Job + * @memberof google.cloud.video.transcoder.v1.Job * @instance */ Job.prototype.createTime = null; @@ -212,7 +168,7 @@ /** * Job startTime. * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.video.transcoder.v1beta1.Job + * @memberof google.cloud.video.transcoder.v1.Job * @instance */ Job.prototype.startTime = null; @@ -220,18 +176,34 @@ /** * Job endTime. * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.video.transcoder.v1beta1.Job + * @memberof google.cloud.video.transcoder.v1.Job * @instance */ Job.prototype.endTime = null; + /** + * Job ttlAfterCompletionDays. + * @member {number} ttlAfterCompletionDays + * @memberof google.cloud.video.transcoder.v1.Job + * @instance + */ + Job.prototype.ttlAfterCompletionDays = 0; + + /** + * Job error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.cloud.video.transcoder.v1.Job + * @instance + */ + Job.prototype.error = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * Job jobConfig. * @member {"templateId"|"config"|undefined} jobConfig - * @memberof google.cloud.video.transcoder.v1beta1.Job + * @memberof google.cloud.video.transcoder.v1.Job * @instance */ Object.defineProperty(Job.prototype, "jobConfig", { @@ -242,21 +214,21 @@ /** * Creates a new Job instance using the specified properties. * @function create - * @memberof google.cloud.video.transcoder.v1beta1.Job + * @memberof google.cloud.video.transcoder.v1.Job * @static - * @param {google.cloud.video.transcoder.v1beta1.IJob=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.Job} Job instance + * @param {google.cloud.video.transcoder.v1.IJob=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.Job} Job instance */ Job.create = function create(properties) { return new Job(properties); }; /** - * Encodes the specified Job message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Job.verify|verify} messages. + * Encodes the specified Job message. Does not implicitly {@link google.cloud.video.transcoder.v1.Job.verify|verify} messages. * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.Job + * @memberof google.cloud.video.transcoder.v1.Job * @static - * @param {google.cloud.video.transcoder.v1beta1.IJob} message Job message or plain object to encode + * @param {google.cloud.video.transcoder.v1.IJob} message Job message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ @@ -272,35 +244,28 @@ if (message.templateId != null && Object.hasOwnProperty.call(message, "templateId")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.templateId); if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.video.transcoder.v1beta1.JobConfig.encode(message.config, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.priority); - if (message.originUri != null && Object.hasOwnProperty.call(message, "originUri")) - $root.google.cloud.video.transcoder.v1beta1.Job.OriginUri.encode(message.originUri, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.cloud.video.transcoder.v1.JobConfig.encode(message.config, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.state != null && Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); - if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) - $root.google.cloud.video.transcoder.v1beta1.Progress.encode(message.progress, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.failureReason != null && Object.hasOwnProperty.call(message, "failureReason")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.failureReason); - if (message.failureDetails != null && message.failureDetails.length) - for (var i = 0; i < message.failureDetails.length; ++i) - $root.google.cloud.video.transcoder.v1beta1.FailureDetail.encode(message.failureDetails[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.ttlAfterCompletionDays != null && Object.hasOwnProperty.call(message, "ttlAfterCompletionDays")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.ttlAfterCompletionDays); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); return writer; }; /** - * Encodes the specified Job message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Job.verify|verify} messages. + * Encodes the specified Job message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Job.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Job + * @memberof google.cloud.video.transcoder.v1.Job * @static - * @param {google.cloud.video.transcoder.v1beta1.IJob} message Job message or plain object to encode + * @param {google.cloud.video.transcoder.v1.IJob} message Job message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ @@ -311,18 +276,18 @@ /** * Decodes a Job message from the specified reader or buffer. * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.Job + * @memberof google.cloud.video.transcoder.v1.Job * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.Job} Job + * @returns {google.cloud.video.transcoder.v1.Job} Job * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Job.decode = function 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.transcoder.v1beta1.Job(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.transcoder.v1.Job(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -339,28 +304,11 @@ message.templateId = reader.string(); break; case 5: - message.config = $root.google.cloud.video.transcoder.v1beta1.JobConfig.decode(reader, reader.uint32()); - break; - case 6: - message.priority = reader.int32(); - break; - case 7: - message.originUri = $root.google.cloud.video.transcoder.v1beta1.Job.OriginUri.decode(reader, reader.uint32()); + message.config = $root.google.cloud.video.transcoder.v1.JobConfig.decode(reader, reader.uint32()); break; case 8: message.state = reader.int32(); break; - case 9: - message.progress = $root.google.cloud.video.transcoder.v1beta1.Progress.decode(reader, reader.uint32()); - break; - case 10: - message.failureReason = reader.string(); - break; - case 11: - if (!(message.failureDetails && message.failureDetails.length)) - message.failureDetails = []; - message.failureDetails.push($root.google.cloud.video.transcoder.v1beta1.FailureDetail.decode(reader, reader.uint32())); - break; case 12: message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; @@ -370,6 +318,12 @@ case 14: message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; + case 15: + message.ttlAfterCompletionDays = reader.int32(); + break; + case 17: + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -381,10 +335,10 @@ /** * Decodes a Job message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Job + * @memberof google.cloud.video.transcoder.v1.Job * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.Job} Job + * @returns {google.cloud.video.transcoder.v1.Job} Job * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ @@ -397,7 +351,7 @@ /** * Verifies a Job message. * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.Job + * @memberof google.cloud.video.transcoder.v1.Job * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not @@ -425,19 +379,11 @@ return "jobConfig: multiple values"; properties.jobConfig = 1; { - var error = $root.google.cloud.video.transcoder.v1beta1.JobConfig.verify(message.config); + var error = $root.google.cloud.video.transcoder.v1.JobConfig.verify(message.config); if (error) return "config." + error; } } - if (message.priority != null && message.hasOwnProperty("priority")) - if (!$util.isInteger(message.priority)) - return "priority: integer expected"; - if (message.originUri != null && message.hasOwnProperty("originUri")) { - var error = $root.google.cloud.video.transcoder.v1beta1.Job.OriginUri.verify(message.originUri); - if (error) - return "originUri." + error; - } if (message.state != null && message.hasOwnProperty("state")) switch (message.state) { default: @@ -449,23 +395,6 @@ case 4: break; } - if (message.progress != null && message.hasOwnProperty("progress")) { - var error = $root.google.cloud.video.transcoder.v1beta1.Progress.verify(message.progress); - if (error) - return "progress." + error; - } - if (message.failureReason != null && message.hasOwnProperty("failureReason")) - if (!$util.isString(message.failureReason)) - return "failureReason: string expected"; - if (message.failureDetails != null && message.hasOwnProperty("failureDetails")) { - if (!Array.isArray(message.failureDetails)) - return "failureDetails: array expected"; - for (var i = 0; i < message.failureDetails.length; ++i) { - var error = $root.google.cloud.video.transcoder.v1beta1.FailureDetail.verify(message.failureDetails[i]); - if (error) - return "failureDetails." + error; - } - } if (message.createTime != null && message.hasOwnProperty("createTime")) { var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) @@ -481,21 +410,29 @@ if (error) return "endTime." + error; } + if (message.ttlAfterCompletionDays != null && message.hasOwnProperty("ttlAfterCompletionDays")) + if (!$util.isInteger(message.ttlAfterCompletionDays)) + return "ttlAfterCompletionDays: integer expected"; + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } return null; }; /** * Creates a Job message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.Job + * @memberof google.cloud.video.transcoder.v1.Job * @static * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.Job} Job + * @returns {google.cloud.video.transcoder.v1.Job} Job */ Job.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Job) + if (object instanceof $root.google.cloud.video.transcoder.v1.Job) return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.Job(); + var message = new $root.google.cloud.video.transcoder.v1.Job(); if (object.name != null) message.name = String(object.name); if (object.inputUri != null) @@ -506,15 +443,8 @@ message.templateId = String(object.templateId); if (object.config != null) { if (typeof object.config !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.config: object expected"); - message.config = $root.google.cloud.video.transcoder.v1beta1.JobConfig.fromObject(object.config); - } - if (object.priority != null) - message.priority = object.priority | 0; - if (object.originUri != null) { - if (typeof object.originUri !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.originUri: object expected"); - message.originUri = $root.google.cloud.video.transcoder.v1beta1.Job.OriginUri.fromObject(object.originUri); + throw TypeError(".google.cloud.video.transcoder.v1.Job.config: object expected"); + message.config = $root.google.cloud.video.transcoder.v1.JobConfig.fromObject(object.config); } switch (object.state) { case "PROCESSING_STATE_UNSPECIFIED": @@ -538,47 +468,37 @@ message.state = 4; break; } - if (object.progress != null) { - if (typeof object.progress !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.progress: object expected"); - message.progress = $root.google.cloud.video.transcoder.v1beta1.Progress.fromObject(object.progress); - } - if (object.failureReason != null) - message.failureReason = String(object.failureReason); - if (object.failureDetails) { - if (!Array.isArray(object.failureDetails)) - throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.failureDetails: array expected"); - message.failureDetails = []; - for (var i = 0; i < object.failureDetails.length; ++i) { - if (typeof object.failureDetails[i] !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.failureDetails: object expected"); - message.failureDetails[i] = $root.google.cloud.video.transcoder.v1beta1.FailureDetail.fromObject(object.failureDetails[i]); - } - } if (object.createTime != null) { if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.createTime: object expected"); + throw TypeError(".google.cloud.video.transcoder.v1.Job.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } if (object.startTime != null) { if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.startTime: object expected"); + throw TypeError(".google.cloud.video.transcoder.v1.Job.startTime: object expected"); message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); } if (object.endTime != null) { if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.endTime: object expected"); + throw TypeError(".google.cloud.video.transcoder.v1.Job.endTime: object expected"); message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); } + if (object.ttlAfterCompletionDays != null) + message.ttlAfterCompletionDays = object.ttlAfterCompletionDays | 0; + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.Job.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } return message; }; /** * Creates a plain object from a Job message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.Job + * @memberof google.cloud.video.transcoder.v1.Job * @static - * @param {google.cloud.video.transcoder.v1beta1.Job} message Job + * @param {google.cloud.video.transcoder.v1.Job} message Job * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ @@ -586,20 +506,16 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.failureDetails = []; if (options.defaults) { object.name = ""; object.inputUri = ""; object.outputUri = ""; - object.priority = 0; - object.originUri = null; object.state = options.enums === String ? "PROCESSING_STATE_UNSPECIFIED" : 0; - object.progress = null; - object.failureReason = ""; object.createTime = null; object.startTime = null; object.endTime = null; + object.ttlAfterCompletionDays = 0; + object.error = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -613,38 +529,29 @@ object.jobConfig = "templateId"; } if (message.config != null && message.hasOwnProperty("config")) { - object.config = $root.google.cloud.video.transcoder.v1beta1.JobConfig.toObject(message.config, options); + object.config = $root.google.cloud.video.transcoder.v1.JobConfig.toObject(message.config, options); if (options.oneofs) object.jobConfig = "config"; } - if (message.priority != null && message.hasOwnProperty("priority")) - object.priority = message.priority; - if (message.originUri != null && message.hasOwnProperty("originUri")) - object.originUri = $root.google.cloud.video.transcoder.v1beta1.Job.OriginUri.toObject(message.originUri, options); if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.video.transcoder.v1beta1.Job.ProcessingState[message.state] : message.state; - if (message.progress != null && message.hasOwnProperty("progress")) - object.progress = $root.google.cloud.video.transcoder.v1beta1.Progress.toObject(message.progress, options); - if (message.failureReason != null && message.hasOwnProperty("failureReason")) - object.failureReason = message.failureReason; - if (message.failureDetails && message.failureDetails.length) { - object.failureDetails = []; - for (var j = 0; j < message.failureDetails.length; ++j) - object.failureDetails[j] = $root.google.cloud.video.transcoder.v1beta1.FailureDetail.toObject(message.failureDetails[j], options); - } + object.state = options.enums === String ? $root.google.cloud.video.transcoder.v1.Job.ProcessingState[message.state] : message.state; if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.startTime != null && message.hasOwnProperty("startTime")) object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); if (message.endTime != null && message.hasOwnProperty("endTime")) object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.ttlAfterCompletionDays != null && message.hasOwnProperty("ttlAfterCompletionDays")) + object.ttlAfterCompletionDays = message.ttlAfterCompletionDays; + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.google.rpc.Status.toObject(message.error, options); return object; }; /** * Converts this Job to JSON. * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.Job + * @memberof google.cloud.video.transcoder.v1.Job * @instance * @returns {Object.} JSON object */ @@ -652,35 +559,14029 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - Job.OriginUri = (function() { + /** + * ProcessingState enum. + * @name google.cloud.video.transcoder.v1.Job.ProcessingState + * @enum {number} + * @property {number} PROCESSING_STATE_UNSPECIFIED=0 PROCESSING_STATE_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} RUNNING=2 RUNNING value + * @property {number} SUCCEEDED=3 SUCCEEDED value + * @property {number} FAILED=4 FAILED value + */ + Job.ProcessingState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROCESSING_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "SUCCEEDED"] = 3; + values[valuesById[4] = "FAILED"] = 4; + return values; + })(); - /** - * Properties of an OriginUri. - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @interface IOriginUri - * @property {string|null} [hls] OriginUri hls - * @property {string|null} [dash] OriginUri dash - */ + return Job; + })(); - /** - * Constructs a new OriginUri. - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @classdesc Represents an OriginUri. - * @implements IOriginUri - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.Job.IOriginUri=} [properties] Properties to set - */ - function OriginUri(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + v1.JobTemplate = (function() { - /** - * OriginUri hls. - * @member {string} hls - * @memberof google.cloud.video.transcoder.v1beta1.Job.OriginUri + /** + * Properties of a JobTemplate. + * @memberof google.cloud.video.transcoder.v1 + * @interface IJobTemplate + * @property {string|null} [name] JobTemplate name + * @property {google.cloud.video.transcoder.v1.IJobConfig|null} [config] JobTemplate config + */ + + /** + * Constructs a new JobTemplate. + * @memberof google.cloud.video.transcoder.v1 + * @classdesc Represents a JobTemplate. + * @implements IJobTemplate + * @constructor + * @param {google.cloud.video.transcoder.v1.IJobTemplate=} [properties] Properties to set + */ + function JobTemplate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JobTemplate name. + * @member {string} name + * @memberof google.cloud.video.transcoder.v1.JobTemplate + * @instance + */ + JobTemplate.prototype.name = ""; + + /** + * JobTemplate config. + * @member {google.cloud.video.transcoder.v1.IJobConfig|null|undefined} config + * @memberof google.cloud.video.transcoder.v1.JobTemplate + * @instance + */ + JobTemplate.prototype.config = null; + + /** + * Creates a new JobTemplate instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.JobTemplate + * @static + * @param {google.cloud.video.transcoder.v1.IJobTemplate=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.JobTemplate} JobTemplate instance + */ + JobTemplate.create = function create(properties) { + return new JobTemplate(properties); + }; + + /** + * Encodes the specified JobTemplate message. Does not implicitly {@link google.cloud.video.transcoder.v1.JobTemplate.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.JobTemplate + * @static + * @param {google.cloud.video.transcoder.v1.IJobTemplate} message JobTemplate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JobTemplate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.cloud.video.transcoder.v1.JobConfig.encode(message.config, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified JobTemplate message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.JobTemplate.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.JobTemplate + * @static + * @param {google.cloud.video.transcoder.v1.IJobTemplate} message JobTemplate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JobTemplate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JobTemplate message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.JobTemplate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.JobTemplate} JobTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JobTemplate.decode = function 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.transcoder.v1.JobTemplate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.config = $root.google.cloud.video.transcoder.v1.JobConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JobTemplate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.JobTemplate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.JobTemplate} JobTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JobTemplate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JobTemplate message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.JobTemplate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JobTemplate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.config != null && message.hasOwnProperty("config")) { + var error = $root.google.cloud.video.transcoder.v1.JobConfig.verify(message.config); + if (error) + return "config." + error; + } + return null; + }; + + /** + * Creates a JobTemplate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.JobTemplate + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.JobTemplate} JobTemplate + */ + JobTemplate.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.JobTemplate) + return object; + var message = new $root.google.cloud.video.transcoder.v1.JobTemplate(); + if (object.name != null) + message.name = String(object.name); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.JobTemplate.config: object expected"); + message.config = $root.google.cloud.video.transcoder.v1.JobConfig.fromObject(object.config); + } + return message; + }; + + /** + * Creates a plain object from a JobTemplate message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.JobTemplate + * @static + * @param {google.cloud.video.transcoder.v1.JobTemplate} message JobTemplate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JobTemplate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.config = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.video.transcoder.v1.JobConfig.toObject(message.config, options); + return object; + }; + + /** + * Converts this JobTemplate to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.JobTemplate + * @instance + * @returns {Object.} JSON object + */ + JobTemplate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return JobTemplate; + })(); + + v1.JobConfig = (function() { + + /** + * Properties of a JobConfig. + * @memberof google.cloud.video.transcoder.v1 + * @interface IJobConfig + * @property {Array.|null} [inputs] JobConfig inputs + * @property {Array.|null} [editList] JobConfig editList + * @property {Array.|null} [elementaryStreams] JobConfig elementaryStreams + * @property {Array.|null} [muxStreams] JobConfig muxStreams + * @property {Array.|null} [manifests] JobConfig manifests + * @property {google.cloud.video.transcoder.v1.IOutput|null} [output] JobConfig output + * @property {Array.|null} [adBreaks] JobConfig adBreaks + * @property {google.cloud.video.transcoder.v1.IPubsubDestination|null} [pubsubDestination] JobConfig pubsubDestination + * @property {Array.|null} [spriteSheets] JobConfig spriteSheets + * @property {Array.|null} [overlays] JobConfig overlays + */ + + /** + * Constructs a new JobConfig. + * @memberof google.cloud.video.transcoder.v1 + * @classdesc Represents a JobConfig. + * @implements IJobConfig + * @constructor + * @param {google.cloud.video.transcoder.v1.IJobConfig=} [properties] Properties to set + */ + function JobConfig(properties) { + this.inputs = []; + this.editList = []; + this.elementaryStreams = []; + this.muxStreams = []; + this.manifests = []; + this.adBreaks = []; + this.spriteSheets = []; + this.overlays = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JobConfig inputs. + * @member {Array.} inputs + * @memberof google.cloud.video.transcoder.v1.JobConfig + * @instance + */ + JobConfig.prototype.inputs = $util.emptyArray; + + /** + * JobConfig editList. + * @member {Array.} editList + * @memberof google.cloud.video.transcoder.v1.JobConfig + * @instance + */ + JobConfig.prototype.editList = $util.emptyArray; + + /** + * JobConfig elementaryStreams. + * @member {Array.} elementaryStreams + * @memberof google.cloud.video.transcoder.v1.JobConfig + * @instance + */ + JobConfig.prototype.elementaryStreams = $util.emptyArray; + + /** + * JobConfig muxStreams. + * @member {Array.} muxStreams + * @memberof google.cloud.video.transcoder.v1.JobConfig + * @instance + */ + JobConfig.prototype.muxStreams = $util.emptyArray; + + /** + * JobConfig manifests. + * @member {Array.} manifests + * @memberof google.cloud.video.transcoder.v1.JobConfig + * @instance + */ + JobConfig.prototype.manifests = $util.emptyArray; + + /** + * JobConfig output. + * @member {google.cloud.video.transcoder.v1.IOutput|null|undefined} output + * @memberof google.cloud.video.transcoder.v1.JobConfig + * @instance + */ + JobConfig.prototype.output = null; + + /** + * JobConfig adBreaks. + * @member {Array.} adBreaks + * @memberof google.cloud.video.transcoder.v1.JobConfig + * @instance + */ + JobConfig.prototype.adBreaks = $util.emptyArray; + + /** + * JobConfig pubsubDestination. + * @member {google.cloud.video.transcoder.v1.IPubsubDestination|null|undefined} pubsubDestination + * @memberof google.cloud.video.transcoder.v1.JobConfig + * @instance + */ + JobConfig.prototype.pubsubDestination = null; + + /** + * JobConfig spriteSheets. + * @member {Array.} spriteSheets + * @memberof google.cloud.video.transcoder.v1.JobConfig + * @instance + */ + JobConfig.prototype.spriteSheets = $util.emptyArray; + + /** + * JobConfig overlays. + * @member {Array.} overlays + * @memberof google.cloud.video.transcoder.v1.JobConfig + * @instance + */ + JobConfig.prototype.overlays = $util.emptyArray; + + /** + * Creates a new JobConfig instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.JobConfig + * @static + * @param {google.cloud.video.transcoder.v1.IJobConfig=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.JobConfig} JobConfig instance + */ + JobConfig.create = function create(properties) { + return new JobConfig(properties); + }; + + /** + * Encodes the specified JobConfig message. Does not implicitly {@link google.cloud.video.transcoder.v1.JobConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.JobConfig + * @static + * @param {google.cloud.video.transcoder.v1.IJobConfig} message JobConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JobConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inputs != null && message.inputs.length) + for (var i = 0; i < message.inputs.length; ++i) + $root.google.cloud.video.transcoder.v1.Input.encode(message.inputs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.editList != null && message.editList.length) + for (var i = 0; i < message.editList.length; ++i) + $root.google.cloud.video.transcoder.v1.EditAtom.encode(message.editList[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.elementaryStreams != null && message.elementaryStreams.length) + for (var i = 0; i < message.elementaryStreams.length; ++i) + $root.google.cloud.video.transcoder.v1.ElementaryStream.encode(message.elementaryStreams[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.muxStreams != null && message.muxStreams.length) + for (var i = 0; i < message.muxStreams.length; ++i) + $root.google.cloud.video.transcoder.v1.MuxStream.encode(message.muxStreams[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.manifests != null && message.manifests.length) + for (var i = 0; i < message.manifests.length; ++i) + $root.google.cloud.video.transcoder.v1.Manifest.encode(message.manifests[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.output != null && Object.hasOwnProperty.call(message, "output")) + $root.google.cloud.video.transcoder.v1.Output.encode(message.output, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.adBreaks != null && message.adBreaks.length) + for (var i = 0; i < message.adBreaks.length; ++i) + $root.google.cloud.video.transcoder.v1.AdBreak.encode(message.adBreaks[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.pubsubDestination != null && Object.hasOwnProperty.call(message, "pubsubDestination")) + $root.google.cloud.video.transcoder.v1.PubsubDestination.encode(message.pubsubDestination, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.spriteSheets != null && message.spriteSheets.length) + for (var i = 0; i < message.spriteSheets.length; ++i) + $root.google.cloud.video.transcoder.v1.SpriteSheet.encode(message.spriteSheets[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.overlays != null && message.overlays.length) + for (var i = 0; i < message.overlays.length; ++i) + $root.google.cloud.video.transcoder.v1.Overlay.encode(message.overlays[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified JobConfig message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.JobConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.JobConfig + * @static + * @param {google.cloud.video.transcoder.v1.IJobConfig} message JobConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JobConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JobConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.JobConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.JobConfig} JobConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JobConfig.decode = function 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.transcoder.v1.JobConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.inputs && message.inputs.length)) + message.inputs = []; + message.inputs.push($root.google.cloud.video.transcoder.v1.Input.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.editList && message.editList.length)) + message.editList = []; + message.editList.push($root.google.cloud.video.transcoder.v1.EditAtom.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.elementaryStreams && message.elementaryStreams.length)) + message.elementaryStreams = []; + message.elementaryStreams.push($root.google.cloud.video.transcoder.v1.ElementaryStream.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.muxStreams && message.muxStreams.length)) + message.muxStreams = []; + message.muxStreams.push($root.google.cloud.video.transcoder.v1.MuxStream.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.manifests && message.manifests.length)) + message.manifests = []; + message.manifests.push($root.google.cloud.video.transcoder.v1.Manifest.decode(reader, reader.uint32())); + break; + case 6: + message.output = $root.google.cloud.video.transcoder.v1.Output.decode(reader, reader.uint32()); + break; + case 7: + if (!(message.adBreaks && message.adBreaks.length)) + message.adBreaks = []; + message.adBreaks.push($root.google.cloud.video.transcoder.v1.AdBreak.decode(reader, reader.uint32())); + break; + case 8: + message.pubsubDestination = $root.google.cloud.video.transcoder.v1.PubsubDestination.decode(reader, reader.uint32()); + break; + case 9: + if (!(message.spriteSheets && message.spriteSheets.length)) + message.spriteSheets = []; + message.spriteSheets.push($root.google.cloud.video.transcoder.v1.SpriteSheet.decode(reader, reader.uint32())); + break; + case 10: + if (!(message.overlays && message.overlays.length)) + message.overlays = []; + message.overlays.push($root.google.cloud.video.transcoder.v1.Overlay.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JobConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.JobConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.JobConfig} JobConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JobConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JobConfig message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.JobConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JobConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.inputs != null && message.hasOwnProperty("inputs")) { + if (!Array.isArray(message.inputs)) + return "inputs: array expected"; + for (var i = 0; i < message.inputs.length; ++i) { + var error = $root.google.cloud.video.transcoder.v1.Input.verify(message.inputs[i]); + if (error) + return "inputs." + error; + } + } + if (message.editList != null && message.hasOwnProperty("editList")) { + if (!Array.isArray(message.editList)) + return "editList: array expected"; + for (var i = 0; i < message.editList.length; ++i) { + var error = $root.google.cloud.video.transcoder.v1.EditAtom.verify(message.editList[i]); + if (error) + return "editList." + error; + } + } + if (message.elementaryStreams != null && message.hasOwnProperty("elementaryStreams")) { + if (!Array.isArray(message.elementaryStreams)) + return "elementaryStreams: array expected"; + for (var i = 0; i < message.elementaryStreams.length; ++i) { + var error = $root.google.cloud.video.transcoder.v1.ElementaryStream.verify(message.elementaryStreams[i]); + if (error) + return "elementaryStreams." + error; + } + } + if (message.muxStreams != null && message.hasOwnProperty("muxStreams")) { + if (!Array.isArray(message.muxStreams)) + return "muxStreams: array expected"; + for (var i = 0; i < message.muxStreams.length; ++i) { + var error = $root.google.cloud.video.transcoder.v1.MuxStream.verify(message.muxStreams[i]); + if (error) + return "muxStreams." + error; + } + } + if (message.manifests != null && message.hasOwnProperty("manifests")) { + if (!Array.isArray(message.manifests)) + return "manifests: array expected"; + for (var i = 0; i < message.manifests.length; ++i) { + var error = $root.google.cloud.video.transcoder.v1.Manifest.verify(message.manifests[i]); + if (error) + return "manifests." + error; + } + } + if (message.output != null && message.hasOwnProperty("output")) { + var error = $root.google.cloud.video.transcoder.v1.Output.verify(message.output); + if (error) + return "output." + error; + } + 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.transcoder.v1.AdBreak.verify(message.adBreaks[i]); + if (error) + return "adBreaks." + error; + } + } + if (message.pubsubDestination != null && message.hasOwnProperty("pubsubDestination")) { + var error = $root.google.cloud.video.transcoder.v1.PubsubDestination.verify(message.pubsubDestination); + if (error) + return "pubsubDestination." + error; + } + if (message.spriteSheets != null && message.hasOwnProperty("spriteSheets")) { + if (!Array.isArray(message.spriteSheets)) + return "spriteSheets: array expected"; + for (var i = 0; i < message.spriteSheets.length; ++i) { + var error = $root.google.cloud.video.transcoder.v1.SpriteSheet.verify(message.spriteSheets[i]); + if (error) + return "spriteSheets." + error; + } + } + if (message.overlays != null && message.hasOwnProperty("overlays")) { + if (!Array.isArray(message.overlays)) + return "overlays: array expected"; + for (var i = 0; i < message.overlays.length; ++i) { + var error = $root.google.cloud.video.transcoder.v1.Overlay.verify(message.overlays[i]); + if (error) + return "overlays." + error; + } + } + return null; + }; + + /** + * Creates a JobConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.JobConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.JobConfig} JobConfig + */ + JobConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.JobConfig) + return object; + var message = new $root.google.cloud.video.transcoder.v1.JobConfig(); + if (object.inputs) { + if (!Array.isArray(object.inputs)) + throw TypeError(".google.cloud.video.transcoder.v1.JobConfig.inputs: array expected"); + message.inputs = []; + for (var i = 0; i < object.inputs.length; ++i) { + if (typeof object.inputs[i] !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.JobConfig.inputs: object expected"); + message.inputs[i] = $root.google.cloud.video.transcoder.v1.Input.fromObject(object.inputs[i]); + } + } + if (object.editList) { + if (!Array.isArray(object.editList)) + throw TypeError(".google.cloud.video.transcoder.v1.JobConfig.editList: array expected"); + message.editList = []; + for (var i = 0; i < object.editList.length; ++i) { + if (typeof object.editList[i] !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.JobConfig.editList: object expected"); + message.editList[i] = $root.google.cloud.video.transcoder.v1.EditAtom.fromObject(object.editList[i]); + } + } + if (object.elementaryStreams) { + if (!Array.isArray(object.elementaryStreams)) + throw TypeError(".google.cloud.video.transcoder.v1.JobConfig.elementaryStreams: array expected"); + message.elementaryStreams = []; + for (var i = 0; i < object.elementaryStreams.length; ++i) { + if (typeof object.elementaryStreams[i] !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.JobConfig.elementaryStreams: object expected"); + message.elementaryStreams[i] = $root.google.cloud.video.transcoder.v1.ElementaryStream.fromObject(object.elementaryStreams[i]); + } + } + if (object.muxStreams) { + if (!Array.isArray(object.muxStreams)) + throw TypeError(".google.cloud.video.transcoder.v1.JobConfig.muxStreams: array expected"); + message.muxStreams = []; + for (var i = 0; i < object.muxStreams.length; ++i) { + if (typeof object.muxStreams[i] !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.JobConfig.muxStreams: object expected"); + message.muxStreams[i] = $root.google.cloud.video.transcoder.v1.MuxStream.fromObject(object.muxStreams[i]); + } + } + if (object.manifests) { + if (!Array.isArray(object.manifests)) + throw TypeError(".google.cloud.video.transcoder.v1.JobConfig.manifests: array expected"); + message.manifests = []; + for (var i = 0; i < object.manifests.length; ++i) { + if (typeof object.manifests[i] !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.JobConfig.manifests: object expected"); + message.manifests[i] = $root.google.cloud.video.transcoder.v1.Manifest.fromObject(object.manifests[i]); + } + } + if (object.output != null) { + if (typeof object.output !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.JobConfig.output: object expected"); + message.output = $root.google.cloud.video.transcoder.v1.Output.fromObject(object.output); + } + if (object.adBreaks) { + if (!Array.isArray(object.adBreaks)) + throw TypeError(".google.cloud.video.transcoder.v1.JobConfig.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.transcoder.v1.JobConfig.adBreaks: object expected"); + message.adBreaks[i] = $root.google.cloud.video.transcoder.v1.AdBreak.fromObject(object.adBreaks[i]); + } + } + if (object.pubsubDestination != null) { + if (typeof object.pubsubDestination !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.JobConfig.pubsubDestination: object expected"); + message.pubsubDestination = $root.google.cloud.video.transcoder.v1.PubsubDestination.fromObject(object.pubsubDestination); + } + if (object.spriteSheets) { + if (!Array.isArray(object.spriteSheets)) + throw TypeError(".google.cloud.video.transcoder.v1.JobConfig.spriteSheets: array expected"); + message.spriteSheets = []; + for (var i = 0; i < object.spriteSheets.length; ++i) { + if (typeof object.spriteSheets[i] !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.JobConfig.spriteSheets: object expected"); + message.spriteSheets[i] = $root.google.cloud.video.transcoder.v1.SpriteSheet.fromObject(object.spriteSheets[i]); + } + } + if (object.overlays) { + if (!Array.isArray(object.overlays)) + throw TypeError(".google.cloud.video.transcoder.v1.JobConfig.overlays: array expected"); + message.overlays = []; + for (var i = 0; i < object.overlays.length; ++i) { + if (typeof object.overlays[i] !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.JobConfig.overlays: object expected"); + message.overlays[i] = $root.google.cloud.video.transcoder.v1.Overlay.fromObject(object.overlays[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a JobConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.JobConfig + * @static + * @param {google.cloud.video.transcoder.v1.JobConfig} message JobConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JobConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.inputs = []; + object.editList = []; + object.elementaryStreams = []; + object.muxStreams = []; + object.manifests = []; + object.adBreaks = []; + object.spriteSheets = []; + object.overlays = []; + } + if (options.defaults) { + object.output = null; + object.pubsubDestination = null; + } + if (message.inputs && message.inputs.length) { + object.inputs = []; + for (var j = 0; j < message.inputs.length; ++j) + object.inputs[j] = $root.google.cloud.video.transcoder.v1.Input.toObject(message.inputs[j], options); + } + if (message.editList && message.editList.length) { + object.editList = []; + for (var j = 0; j < message.editList.length; ++j) + object.editList[j] = $root.google.cloud.video.transcoder.v1.EditAtom.toObject(message.editList[j], options); + } + if (message.elementaryStreams && message.elementaryStreams.length) { + object.elementaryStreams = []; + for (var j = 0; j < message.elementaryStreams.length; ++j) + object.elementaryStreams[j] = $root.google.cloud.video.transcoder.v1.ElementaryStream.toObject(message.elementaryStreams[j], options); + } + if (message.muxStreams && message.muxStreams.length) { + object.muxStreams = []; + for (var j = 0; j < message.muxStreams.length; ++j) + object.muxStreams[j] = $root.google.cloud.video.transcoder.v1.MuxStream.toObject(message.muxStreams[j], options); + } + if (message.manifests && message.manifests.length) { + object.manifests = []; + for (var j = 0; j < message.manifests.length; ++j) + object.manifests[j] = $root.google.cloud.video.transcoder.v1.Manifest.toObject(message.manifests[j], options); + } + if (message.output != null && message.hasOwnProperty("output")) + object.output = $root.google.cloud.video.transcoder.v1.Output.toObject(message.output, options); + if (message.adBreaks && message.adBreaks.length) { + object.adBreaks = []; + for (var j = 0; j < message.adBreaks.length; ++j) + object.adBreaks[j] = $root.google.cloud.video.transcoder.v1.AdBreak.toObject(message.adBreaks[j], options); + } + if (message.pubsubDestination != null && message.hasOwnProperty("pubsubDestination")) + object.pubsubDestination = $root.google.cloud.video.transcoder.v1.PubsubDestination.toObject(message.pubsubDestination, options); + if (message.spriteSheets && message.spriteSheets.length) { + object.spriteSheets = []; + for (var j = 0; j < message.spriteSheets.length; ++j) + object.spriteSheets[j] = $root.google.cloud.video.transcoder.v1.SpriteSheet.toObject(message.spriteSheets[j], options); + } + if (message.overlays && message.overlays.length) { + object.overlays = []; + for (var j = 0; j < message.overlays.length; ++j) + object.overlays[j] = $root.google.cloud.video.transcoder.v1.Overlay.toObject(message.overlays[j], options); + } + return object; + }; + + /** + * Converts this JobConfig to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.JobConfig + * @instance + * @returns {Object.} JSON object + */ + JobConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return JobConfig; + })(); + + v1.Input = (function() { + + /** + * Properties of an Input. + * @memberof google.cloud.video.transcoder.v1 + * @interface IInput + * @property {string|null} [key] Input key + * @property {string|null} [uri] Input uri + * @property {google.cloud.video.transcoder.v1.IPreprocessingConfig|null} [preprocessingConfig] Input preprocessingConfig + */ + + /** + * Constructs a new Input. + * @memberof google.cloud.video.transcoder.v1 + * @classdesc Represents an Input. + * @implements IInput + * @constructor + * @param {google.cloud.video.transcoder.v1.IInput=} [properties] Properties to set + */ + function Input(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Input key. + * @member {string} key + * @memberof google.cloud.video.transcoder.v1.Input + * @instance + */ + Input.prototype.key = ""; + + /** + * Input uri. + * @member {string} uri + * @memberof google.cloud.video.transcoder.v1.Input + * @instance + */ + Input.prototype.uri = ""; + + /** + * Input preprocessingConfig. + * @member {google.cloud.video.transcoder.v1.IPreprocessingConfig|null|undefined} preprocessingConfig + * @memberof google.cloud.video.transcoder.v1.Input + * @instance + */ + Input.prototype.preprocessingConfig = null; + + /** + * Creates a new Input instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.Input + * @static + * @param {google.cloud.video.transcoder.v1.IInput=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.Input} Input instance + */ + Input.create = function create(properties) { + return new Input(properties); + }; + + /** + * Encodes the specified Input message. Does not implicitly {@link google.cloud.video.transcoder.v1.Input.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.Input + * @static + * @param {google.cloud.video.transcoder.v1.IInput} message Input message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Input.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.preprocessingConfig != null && Object.hasOwnProperty.call(message, "preprocessingConfig")) + $root.google.cloud.video.transcoder.v1.PreprocessingConfig.encode(message.preprocessingConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Input message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Input.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.Input + * @static + * @param {google.cloud.video.transcoder.v1.IInput} message Input message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Input.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Input message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.Input + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.Input} Input + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Input.decode = function 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.transcoder.v1.Input(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.string(); + break; + case 2: + message.uri = reader.string(); + break; + case 3: + message.preprocessingConfig = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Input message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.Input + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.Input} Input + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Input.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Input message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.Input + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Input.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.preprocessingConfig != null && message.hasOwnProperty("preprocessingConfig")) { + var error = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.verify(message.preprocessingConfig); + if (error) + return "preprocessingConfig." + error; + } + return null; + }; + + /** + * Creates an Input message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.Input + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.Input} Input + */ + Input.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.Input) + return object; + var message = new $root.google.cloud.video.transcoder.v1.Input(); + if (object.key != null) + message.key = String(object.key); + if (object.uri != null) + message.uri = String(object.uri); + if (object.preprocessingConfig != null) { + if (typeof object.preprocessingConfig !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.Input.preprocessingConfig: object expected"); + message.preprocessingConfig = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.fromObject(object.preprocessingConfig); + } + return message; + }; + + /** + * Creates a plain object from an Input message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.Input + * @static + * @param {google.cloud.video.transcoder.v1.Input} message Input + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Input.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = ""; + object.uri = ""; + object.preprocessingConfig = null; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.preprocessingConfig != null && message.hasOwnProperty("preprocessingConfig")) + object.preprocessingConfig = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.toObject(message.preprocessingConfig, options); + return object; + }; + + /** + * Converts this Input to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.Input + * @instance + * @returns {Object.} JSON object + */ + Input.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Input; + })(); + + v1.Output = (function() { + + /** + * Properties of an Output. + * @memberof google.cloud.video.transcoder.v1 + * @interface IOutput + * @property {string|null} [uri] Output uri + */ + + /** + * Constructs a new Output. + * @memberof google.cloud.video.transcoder.v1 + * @classdesc Represents an Output. + * @implements IOutput + * @constructor + * @param {google.cloud.video.transcoder.v1.IOutput=} [properties] Properties to set + */ + function Output(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Output uri. + * @member {string} uri + * @memberof google.cloud.video.transcoder.v1.Output + * @instance + */ + Output.prototype.uri = ""; + + /** + * Creates a new Output instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.Output + * @static + * @param {google.cloud.video.transcoder.v1.IOutput=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.Output} Output instance + */ + Output.create = function create(properties) { + return new Output(properties); + }; + + /** + * Encodes the specified Output message. Does not implicitly {@link google.cloud.video.transcoder.v1.Output.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.Output + * @static + * @param {google.cloud.video.transcoder.v1.IOutput} message Output message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Output.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 Output message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Output.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.Output + * @static + * @param {google.cloud.video.transcoder.v1.IOutput} message Output message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Output.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Output message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.Output + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.Output} Output + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Output.decode = function 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.transcoder.v1.Output(); + 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 Output message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.Output + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.Output} Output + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Output.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Output message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.Output + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Output.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 Output message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.Output + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.Output} Output + */ + Output.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.Output) + return object; + var message = new $root.google.cloud.video.transcoder.v1.Output(); + if (object.uri != null) + message.uri = String(object.uri); + return message; + }; + + /** + * Creates a plain object from an Output message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.Output + * @static + * @param {google.cloud.video.transcoder.v1.Output} message Output + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Output.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 Output to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.Output + * @instance + * @returns {Object.} JSON object + */ + Output.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Output; + })(); + + v1.EditAtom = (function() { + + /** + * Properties of an EditAtom. + * @memberof google.cloud.video.transcoder.v1 + * @interface IEditAtom + * @property {string|null} [key] EditAtom key + * @property {Array.|null} [inputs] EditAtom inputs + * @property {google.protobuf.IDuration|null} [endTimeOffset] EditAtom endTimeOffset + * @property {google.protobuf.IDuration|null} [startTimeOffset] EditAtom startTimeOffset + */ + + /** + * Constructs a new EditAtom. + * @memberof google.cloud.video.transcoder.v1 + * @classdesc Represents an EditAtom. + * @implements IEditAtom + * @constructor + * @param {google.cloud.video.transcoder.v1.IEditAtom=} [properties] Properties to set + */ + function EditAtom(properties) { + this.inputs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EditAtom key. + * @member {string} key + * @memberof google.cloud.video.transcoder.v1.EditAtom + * @instance + */ + EditAtom.prototype.key = ""; + + /** + * EditAtom inputs. + * @member {Array.} inputs + * @memberof google.cloud.video.transcoder.v1.EditAtom + * @instance + */ + EditAtom.prototype.inputs = $util.emptyArray; + + /** + * EditAtom endTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} endTimeOffset + * @memberof google.cloud.video.transcoder.v1.EditAtom + * @instance + */ + EditAtom.prototype.endTimeOffset = null; + + /** + * EditAtom startTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} startTimeOffset + * @memberof google.cloud.video.transcoder.v1.EditAtom + * @instance + */ + EditAtom.prototype.startTimeOffset = null; + + /** + * Creates a new EditAtom instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.EditAtom + * @static + * @param {google.cloud.video.transcoder.v1.IEditAtom=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.EditAtom} EditAtom instance + */ + EditAtom.create = function create(properties) { + return new EditAtom(properties); + }; + + /** + * Encodes the specified EditAtom message. Does not implicitly {@link google.cloud.video.transcoder.v1.EditAtom.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.EditAtom + * @static + * @param {google.cloud.video.transcoder.v1.IEditAtom} message EditAtom message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditAtom.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.inputs != null && message.inputs.length) + for (var i = 0; i < message.inputs.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputs[i]); + 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 EditAtom message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.EditAtom.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.EditAtom + * @static + * @param {google.cloud.video.transcoder.v1.IEditAtom} message EditAtom message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditAtom.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EditAtom message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.EditAtom + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.EditAtom} EditAtom + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditAtom.decode = function 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.transcoder.v1.EditAtom(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.string(); + break; + case 2: + if (!(message.inputs && message.inputs.length)) + message.inputs = []; + message.inputs.push(reader.string()); + 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 an EditAtom message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.EditAtom + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.EditAtom} EditAtom + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditAtom.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EditAtom message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.EditAtom + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EditAtom.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.inputs != null && message.hasOwnProperty("inputs")) { + if (!Array.isArray(message.inputs)) + return "inputs: array expected"; + for (var i = 0; i < message.inputs.length; ++i) + if (!$util.isString(message.inputs[i])) + return "inputs: string[] expected"; + } + 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 an EditAtom message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.EditAtom + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.EditAtom} EditAtom + */ + EditAtom.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.EditAtom) + return object; + var message = new $root.google.cloud.video.transcoder.v1.EditAtom(); + if (object.key != null) + message.key = String(object.key); + if (object.inputs) { + if (!Array.isArray(object.inputs)) + throw TypeError(".google.cloud.video.transcoder.v1.EditAtom.inputs: array expected"); + message.inputs = []; + for (var i = 0; i < object.inputs.length; ++i) + message.inputs[i] = String(object.inputs[i]); + } + if (object.endTimeOffset != null) { + if (typeof object.endTimeOffset !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.EditAtom.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.transcoder.v1.EditAtom.startTimeOffset: object expected"); + message.startTimeOffset = $root.google.protobuf.Duration.fromObject(object.startTimeOffset); + } + return message; + }; + + /** + * Creates a plain object from an EditAtom message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.EditAtom + * @static + * @param {google.cloud.video.transcoder.v1.EditAtom} message EditAtom + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EditAtom.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.inputs = []; + if (options.defaults) { + object.key = ""; + object.endTimeOffset = null; + object.startTimeOffset = null; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.inputs && message.inputs.length) { + object.inputs = []; + for (var j = 0; j < message.inputs.length; ++j) + object.inputs[j] = message.inputs[j]; + } + 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 EditAtom to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.EditAtom + * @instance + * @returns {Object.} JSON object + */ + EditAtom.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EditAtom; + })(); + + v1.AdBreak = (function() { + + /** + * Properties of an AdBreak. + * @memberof google.cloud.video.transcoder.v1 + * @interface IAdBreak + * @property {google.protobuf.IDuration|null} [startTimeOffset] AdBreak startTimeOffset + */ + + /** + * Constructs a new AdBreak. + * @memberof google.cloud.video.transcoder.v1 + * @classdesc Represents an AdBreak. + * @implements IAdBreak + * @constructor + * @param {google.cloud.video.transcoder.v1.IAdBreak=} [properties] Properties to set + */ + function AdBreak(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AdBreak startTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} startTimeOffset + * @memberof google.cloud.video.transcoder.v1.AdBreak + * @instance + */ + AdBreak.prototype.startTimeOffset = null; + + /** + * Creates a new AdBreak instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.AdBreak + * @static + * @param {google.cloud.video.transcoder.v1.IAdBreak=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.AdBreak} AdBreak instance + */ + AdBreak.create = function create(properties) { + return new AdBreak(properties); + }; + + /** + * Encodes the specified AdBreak message. Does not implicitly {@link google.cloud.video.transcoder.v1.AdBreak.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.AdBreak + * @static + * @param {google.cloud.video.transcoder.v1.IAdBreak} message AdBreak message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdBreak.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTimeOffset != null && Object.hasOwnProperty.call(message, "startTimeOffset")) + $root.google.protobuf.Duration.encode(message.startTimeOffset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AdBreak message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.AdBreak.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.AdBreak + * @static + * @param {google.cloud.video.transcoder.v1.IAdBreak} message AdBreak message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdBreak.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AdBreak message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.AdBreak + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.AdBreak} AdBreak + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdBreak.decode = function 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.transcoder.v1.AdBreak(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AdBreak message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.AdBreak + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.AdBreak} AdBreak + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdBreak.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AdBreak message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.AdBreak + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AdBreak.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.startTimeOffset); + if (error) + return "startTimeOffset." + error; + } + return null; + }; + + /** + * Creates an AdBreak message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.AdBreak + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.AdBreak} AdBreak + */ + AdBreak.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.AdBreak) + return object; + var message = new $root.google.cloud.video.transcoder.v1.AdBreak(); + if (object.startTimeOffset != null) { + if (typeof object.startTimeOffset !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.AdBreak.startTimeOffset: object expected"); + message.startTimeOffset = $root.google.protobuf.Duration.fromObject(object.startTimeOffset); + } + return message; + }; + + /** + * Creates a plain object from an AdBreak message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.AdBreak + * @static + * @param {google.cloud.video.transcoder.v1.AdBreak} message AdBreak + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AdBreak.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.startTimeOffset = null; + if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) + object.startTimeOffset = $root.google.protobuf.Duration.toObject(message.startTimeOffset, options); + return object; + }; + + /** + * Converts this AdBreak to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.AdBreak + * @instance + * @returns {Object.} JSON object + */ + AdBreak.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AdBreak; + })(); + + v1.ElementaryStream = (function() { + + /** + * Properties of an ElementaryStream. + * @memberof google.cloud.video.transcoder.v1 + * @interface IElementaryStream + * @property {string|null} [key] ElementaryStream key + * @property {google.cloud.video.transcoder.v1.IVideoStream|null} [videoStream] ElementaryStream videoStream + * @property {google.cloud.video.transcoder.v1.IAudioStream|null} [audioStream] ElementaryStream audioStream + * @property {google.cloud.video.transcoder.v1.ITextStream|null} [textStream] ElementaryStream textStream + */ + + /** + * Constructs a new ElementaryStream. + * @memberof google.cloud.video.transcoder.v1 + * @classdesc Represents an ElementaryStream. + * @implements IElementaryStream + * @constructor + * @param {google.cloud.video.transcoder.v1.IElementaryStream=} [properties] Properties to set + */ + function ElementaryStream(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ElementaryStream key. + * @member {string} key + * @memberof google.cloud.video.transcoder.v1.ElementaryStream + * @instance + */ + ElementaryStream.prototype.key = ""; + + /** + * ElementaryStream videoStream. + * @member {google.cloud.video.transcoder.v1.IVideoStream|null|undefined} videoStream + * @memberof google.cloud.video.transcoder.v1.ElementaryStream + * @instance + */ + ElementaryStream.prototype.videoStream = null; + + /** + * ElementaryStream audioStream. + * @member {google.cloud.video.transcoder.v1.IAudioStream|null|undefined} audioStream + * @memberof google.cloud.video.transcoder.v1.ElementaryStream + * @instance + */ + ElementaryStream.prototype.audioStream = null; + + /** + * ElementaryStream textStream. + * @member {google.cloud.video.transcoder.v1.ITextStream|null|undefined} textStream + * @memberof google.cloud.video.transcoder.v1.ElementaryStream + * @instance + */ + ElementaryStream.prototype.textStream = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ElementaryStream elementaryStream. + * @member {"videoStream"|"audioStream"|"textStream"|undefined} elementaryStream + * @memberof google.cloud.video.transcoder.v1.ElementaryStream + * @instance + */ + Object.defineProperty(ElementaryStream.prototype, "elementaryStream", { + get: $util.oneOfGetter($oneOfFields = ["videoStream", "audioStream", "textStream"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ElementaryStream instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.ElementaryStream + * @static + * @param {google.cloud.video.transcoder.v1.IElementaryStream=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.ElementaryStream} ElementaryStream instance + */ + ElementaryStream.create = function create(properties) { + return new ElementaryStream(properties); + }; + + /** + * Encodes the specified ElementaryStream message. Does not implicitly {@link google.cloud.video.transcoder.v1.ElementaryStream.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.ElementaryStream + * @static + * @param {google.cloud.video.transcoder.v1.IElementaryStream} message ElementaryStream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ElementaryStream.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.videoStream != null && Object.hasOwnProperty.call(message, "videoStream")) + $root.google.cloud.video.transcoder.v1.VideoStream.encode(message.videoStream, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.audioStream != null && Object.hasOwnProperty.call(message, "audioStream")) + $root.google.cloud.video.transcoder.v1.AudioStream.encode(message.audioStream, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.textStream != null && Object.hasOwnProperty.call(message, "textStream")) + $root.google.cloud.video.transcoder.v1.TextStream.encode(message.textStream, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.key); + return writer; + }; + + /** + * Encodes the specified ElementaryStream message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.ElementaryStream.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.ElementaryStream + * @static + * @param {google.cloud.video.transcoder.v1.IElementaryStream} message ElementaryStream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ElementaryStream.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ElementaryStream message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.ElementaryStream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.ElementaryStream} ElementaryStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ElementaryStream.decode = function 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.transcoder.v1.ElementaryStream(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: + message.key = reader.string(); + break; + case 1: + message.videoStream = $root.google.cloud.video.transcoder.v1.VideoStream.decode(reader, reader.uint32()); + break; + case 2: + message.audioStream = $root.google.cloud.video.transcoder.v1.AudioStream.decode(reader, reader.uint32()); + break; + case 3: + message.textStream = $root.google.cloud.video.transcoder.v1.TextStream.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ElementaryStream message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.ElementaryStream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.ElementaryStream} ElementaryStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ElementaryStream.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ElementaryStream message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.ElementaryStream + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ElementaryStream.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.videoStream != null && message.hasOwnProperty("videoStream")) { + properties.elementaryStream = 1; + { + var error = $root.google.cloud.video.transcoder.v1.VideoStream.verify(message.videoStream); + if (error) + return "videoStream." + error; + } + } + if (message.audioStream != null && message.hasOwnProperty("audioStream")) { + if (properties.elementaryStream === 1) + return "elementaryStream: multiple values"; + properties.elementaryStream = 1; + { + var error = $root.google.cloud.video.transcoder.v1.AudioStream.verify(message.audioStream); + if (error) + return "audioStream." + error; + } + } + if (message.textStream != null && message.hasOwnProperty("textStream")) { + if (properties.elementaryStream === 1) + return "elementaryStream: multiple values"; + properties.elementaryStream = 1; + { + var error = $root.google.cloud.video.transcoder.v1.TextStream.verify(message.textStream); + if (error) + return "textStream." + error; + } + } + return null; + }; + + /** + * Creates an ElementaryStream message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.ElementaryStream + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.ElementaryStream} ElementaryStream + */ + ElementaryStream.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.ElementaryStream) + return object; + var message = new $root.google.cloud.video.transcoder.v1.ElementaryStream(); + if (object.key != null) + message.key = String(object.key); + if (object.videoStream != null) { + if (typeof object.videoStream !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.ElementaryStream.videoStream: object expected"); + message.videoStream = $root.google.cloud.video.transcoder.v1.VideoStream.fromObject(object.videoStream); + } + if (object.audioStream != null) { + if (typeof object.audioStream !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.ElementaryStream.audioStream: object expected"); + message.audioStream = $root.google.cloud.video.transcoder.v1.AudioStream.fromObject(object.audioStream); + } + if (object.textStream != null) { + if (typeof object.textStream !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.ElementaryStream.textStream: object expected"); + message.textStream = $root.google.cloud.video.transcoder.v1.TextStream.fromObject(object.textStream); + } + return message; + }; + + /** + * Creates a plain object from an ElementaryStream message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.ElementaryStream + * @static + * @param {google.cloud.video.transcoder.v1.ElementaryStream} message ElementaryStream + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ElementaryStream.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.key = ""; + if (message.videoStream != null && message.hasOwnProperty("videoStream")) { + object.videoStream = $root.google.cloud.video.transcoder.v1.VideoStream.toObject(message.videoStream, options); + if (options.oneofs) + object.elementaryStream = "videoStream"; + } + if (message.audioStream != null && message.hasOwnProperty("audioStream")) { + object.audioStream = $root.google.cloud.video.transcoder.v1.AudioStream.toObject(message.audioStream, options); + if (options.oneofs) + object.elementaryStream = "audioStream"; + } + if (message.textStream != null && message.hasOwnProperty("textStream")) { + object.textStream = $root.google.cloud.video.transcoder.v1.TextStream.toObject(message.textStream, options); + if (options.oneofs) + object.elementaryStream = "textStream"; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + return object; + }; + + /** + * Converts this ElementaryStream to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.ElementaryStream + * @instance + * @returns {Object.} JSON object + */ + ElementaryStream.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ElementaryStream; + })(); + + v1.MuxStream = (function() { + + /** + * Properties of a MuxStream. + * @memberof google.cloud.video.transcoder.v1 + * @interface IMuxStream + * @property {string|null} [key] MuxStream key + * @property {string|null} [fileName] MuxStream fileName + * @property {string|null} [container] MuxStream container + * @property {Array.|null} [elementaryStreams] MuxStream elementaryStreams + * @property {google.cloud.video.transcoder.v1.ISegmentSettings|null} [segmentSettings] MuxStream segmentSettings + * @property {google.cloud.video.transcoder.v1.IEncryption|null} [encryption] MuxStream encryption + */ + + /** + * Constructs a new MuxStream. + * @memberof google.cloud.video.transcoder.v1 + * @classdesc Represents a MuxStream. + * @implements IMuxStream + * @constructor + * @param {google.cloud.video.transcoder.v1.IMuxStream=} [properties] Properties to set + */ + function MuxStream(properties) { + this.elementaryStreams = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MuxStream key. + * @member {string} key + * @memberof google.cloud.video.transcoder.v1.MuxStream + * @instance + */ + MuxStream.prototype.key = ""; + + /** + * MuxStream fileName. + * @member {string} fileName + * @memberof google.cloud.video.transcoder.v1.MuxStream + * @instance + */ + MuxStream.prototype.fileName = ""; + + /** + * MuxStream container. + * @member {string} container + * @memberof google.cloud.video.transcoder.v1.MuxStream + * @instance + */ + MuxStream.prototype.container = ""; + + /** + * MuxStream elementaryStreams. + * @member {Array.} elementaryStreams + * @memberof google.cloud.video.transcoder.v1.MuxStream + * @instance + */ + MuxStream.prototype.elementaryStreams = $util.emptyArray; + + /** + * MuxStream segmentSettings. + * @member {google.cloud.video.transcoder.v1.ISegmentSettings|null|undefined} segmentSettings + * @memberof google.cloud.video.transcoder.v1.MuxStream + * @instance + */ + MuxStream.prototype.segmentSettings = null; + + /** + * MuxStream encryption. + * @member {google.cloud.video.transcoder.v1.IEncryption|null|undefined} encryption + * @memberof google.cloud.video.transcoder.v1.MuxStream + * @instance + */ + MuxStream.prototype.encryption = null; + + /** + * Creates a new MuxStream instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.MuxStream + * @static + * @param {google.cloud.video.transcoder.v1.IMuxStream=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.MuxStream} MuxStream instance + */ + MuxStream.create = function create(properties) { + return new MuxStream(properties); + }; + + /** + * Encodes the specified MuxStream message. Does not implicitly {@link google.cloud.video.transcoder.v1.MuxStream.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.MuxStream + * @static + * @param {google.cloud.video.transcoder.v1.IMuxStream} message MuxStream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MuxStream.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fileName); + if (message.container != null && Object.hasOwnProperty.call(message, "container")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.container); + if (message.elementaryStreams != null && message.elementaryStreams.length) + for (var i = 0; i < message.elementaryStreams.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.elementaryStreams[i]); + if (message.segmentSettings != null && Object.hasOwnProperty.call(message, "segmentSettings")) + $root.google.cloud.video.transcoder.v1.SegmentSettings.encode(message.segmentSettings, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.encryption != null && Object.hasOwnProperty.call(message, "encryption")) + $root.google.cloud.video.transcoder.v1.Encryption.encode(message.encryption, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MuxStream message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.MuxStream.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.MuxStream + * @static + * @param {google.cloud.video.transcoder.v1.IMuxStream} message MuxStream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MuxStream.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MuxStream message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.MuxStream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.MuxStream} MuxStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MuxStream.decode = function 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.transcoder.v1.MuxStream(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.string(); + break; + case 2: + message.fileName = reader.string(); + break; + case 3: + message.container = reader.string(); + break; + case 4: + if (!(message.elementaryStreams && message.elementaryStreams.length)) + message.elementaryStreams = []; + message.elementaryStreams.push(reader.string()); + break; + case 5: + message.segmentSettings = $root.google.cloud.video.transcoder.v1.SegmentSettings.decode(reader, reader.uint32()); + break; + case 6: + message.encryption = $root.google.cloud.video.transcoder.v1.Encryption.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MuxStream message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.MuxStream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.MuxStream} MuxStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MuxStream.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MuxStream message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.MuxStream + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MuxStream.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.fileName != null && message.hasOwnProperty("fileName")) + if (!$util.isString(message.fileName)) + return "fileName: string expected"; + if (message.container != null && message.hasOwnProperty("container")) + if (!$util.isString(message.container)) + return "container: string expected"; + if (message.elementaryStreams != null && message.hasOwnProperty("elementaryStreams")) { + if (!Array.isArray(message.elementaryStreams)) + return "elementaryStreams: array expected"; + for (var i = 0; i < message.elementaryStreams.length; ++i) + if (!$util.isString(message.elementaryStreams[i])) + return "elementaryStreams: string[] expected"; + } + if (message.segmentSettings != null && message.hasOwnProperty("segmentSettings")) { + var error = $root.google.cloud.video.transcoder.v1.SegmentSettings.verify(message.segmentSettings); + if (error) + return "segmentSettings." + error; + } + if (message.encryption != null && message.hasOwnProperty("encryption")) { + var error = $root.google.cloud.video.transcoder.v1.Encryption.verify(message.encryption); + if (error) + return "encryption." + error; + } + return null; + }; + + /** + * Creates a MuxStream message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.MuxStream + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.MuxStream} MuxStream + */ + MuxStream.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.MuxStream) + return object; + var message = new $root.google.cloud.video.transcoder.v1.MuxStream(); + if (object.key != null) + message.key = String(object.key); + if (object.fileName != null) + message.fileName = String(object.fileName); + if (object.container != null) + message.container = String(object.container); + if (object.elementaryStreams) { + if (!Array.isArray(object.elementaryStreams)) + throw TypeError(".google.cloud.video.transcoder.v1.MuxStream.elementaryStreams: array expected"); + message.elementaryStreams = []; + for (var i = 0; i < object.elementaryStreams.length; ++i) + message.elementaryStreams[i] = String(object.elementaryStreams[i]); + } + if (object.segmentSettings != null) { + if (typeof object.segmentSettings !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.MuxStream.segmentSettings: object expected"); + message.segmentSettings = $root.google.cloud.video.transcoder.v1.SegmentSettings.fromObject(object.segmentSettings); + } + if (object.encryption != null) { + if (typeof object.encryption !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.MuxStream.encryption: object expected"); + message.encryption = $root.google.cloud.video.transcoder.v1.Encryption.fromObject(object.encryption); + } + return message; + }; + + /** + * Creates a plain object from a MuxStream message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.MuxStream + * @static + * @param {google.cloud.video.transcoder.v1.MuxStream} message MuxStream + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MuxStream.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.elementaryStreams = []; + if (options.defaults) { + object.key = ""; + object.fileName = ""; + object.container = ""; + object.segmentSettings = null; + object.encryption = null; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.fileName != null && message.hasOwnProperty("fileName")) + object.fileName = message.fileName; + if (message.container != null && message.hasOwnProperty("container")) + object.container = message.container; + if (message.elementaryStreams && message.elementaryStreams.length) { + object.elementaryStreams = []; + for (var j = 0; j < message.elementaryStreams.length; ++j) + object.elementaryStreams[j] = message.elementaryStreams[j]; + } + if (message.segmentSettings != null && message.hasOwnProperty("segmentSettings")) + object.segmentSettings = $root.google.cloud.video.transcoder.v1.SegmentSettings.toObject(message.segmentSettings, options); + if (message.encryption != null && message.hasOwnProperty("encryption")) + object.encryption = $root.google.cloud.video.transcoder.v1.Encryption.toObject(message.encryption, options); + return object; + }; + + /** + * Converts this MuxStream to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.MuxStream + * @instance + * @returns {Object.} JSON object + */ + MuxStream.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MuxStream; + })(); + + v1.Manifest = (function() { + + /** + * Properties of a Manifest. + * @memberof google.cloud.video.transcoder.v1 + * @interface IManifest + * @property {string|null} [fileName] Manifest fileName + * @property {google.cloud.video.transcoder.v1.Manifest.ManifestType|null} [type] Manifest type + * @property {Array.|null} [muxStreams] Manifest muxStreams + */ + + /** + * Constructs a new Manifest. + * @memberof google.cloud.video.transcoder.v1 + * @classdesc Represents a Manifest. + * @implements IManifest + * @constructor + * @param {google.cloud.video.transcoder.v1.IManifest=} [properties] Properties to set + */ + function Manifest(properties) { + this.muxStreams = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Manifest fileName. + * @member {string} fileName + * @memberof google.cloud.video.transcoder.v1.Manifest + * @instance + */ + Manifest.prototype.fileName = ""; + + /** + * Manifest type. + * @member {google.cloud.video.transcoder.v1.Manifest.ManifestType} type + * @memberof google.cloud.video.transcoder.v1.Manifest + * @instance + */ + Manifest.prototype.type = 0; + + /** + * Manifest muxStreams. + * @member {Array.} muxStreams + * @memberof google.cloud.video.transcoder.v1.Manifest + * @instance + */ + Manifest.prototype.muxStreams = $util.emptyArray; + + /** + * Creates a new Manifest instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.Manifest + * @static + * @param {google.cloud.video.transcoder.v1.IManifest=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.Manifest} Manifest instance + */ + Manifest.create = function create(properties) { + return new Manifest(properties); + }; + + /** + * Encodes the specified Manifest message. Does not implicitly {@link google.cloud.video.transcoder.v1.Manifest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.Manifest + * @static + * @param {google.cloud.video.transcoder.v1.IManifest} message Manifest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Manifest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fileName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.muxStreams != null && message.muxStreams.length) + for (var i = 0; i < message.muxStreams.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.muxStreams[i]); + return writer; + }; + + /** + * Encodes the specified Manifest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Manifest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.Manifest + * @static + * @param {google.cloud.video.transcoder.v1.IManifest} message Manifest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Manifest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Manifest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.Manifest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.Manifest} Manifest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Manifest.decode = function 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.transcoder.v1.Manifest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.fileName = reader.string(); + break; + case 2: + message.type = reader.int32(); + break; + case 3: + if (!(message.muxStreams && message.muxStreams.length)) + message.muxStreams = []; + message.muxStreams.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Manifest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.Manifest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.Manifest} Manifest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Manifest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Manifest message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.Manifest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Manifest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fileName != null && message.hasOwnProperty("fileName")) + if (!$util.isString(message.fileName)) + return "fileName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.muxStreams != null && message.hasOwnProperty("muxStreams")) { + if (!Array.isArray(message.muxStreams)) + return "muxStreams: array expected"; + for (var i = 0; i < message.muxStreams.length; ++i) + if (!$util.isString(message.muxStreams[i])) + return "muxStreams: string[] expected"; + } + return null; + }; + + /** + * Creates a Manifest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.Manifest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.Manifest} Manifest + */ + Manifest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.Manifest) + return object; + var message = new $root.google.cloud.video.transcoder.v1.Manifest(); + if (object.fileName != null) + message.fileName = String(object.fileName); + switch (object.type) { + case "MANIFEST_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "HLS": + case 1: + message.type = 1; + break; + case "DASH": + case 2: + message.type = 2; + break; + } + if (object.muxStreams) { + if (!Array.isArray(object.muxStreams)) + throw TypeError(".google.cloud.video.transcoder.v1.Manifest.muxStreams: array expected"); + message.muxStreams = []; + for (var i = 0; i < object.muxStreams.length; ++i) + message.muxStreams[i] = String(object.muxStreams[i]); + } + return message; + }; + + /** + * Creates a plain object from a Manifest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.Manifest + * @static + * @param {google.cloud.video.transcoder.v1.Manifest} message Manifest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Manifest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.muxStreams = []; + if (options.defaults) { + object.fileName = ""; + object.type = options.enums === String ? "MANIFEST_TYPE_UNSPECIFIED" : 0; + } + if (message.fileName != null && message.hasOwnProperty("fileName")) + object.fileName = message.fileName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.video.transcoder.v1.Manifest.ManifestType[message.type] : message.type; + if (message.muxStreams && message.muxStreams.length) { + object.muxStreams = []; + for (var j = 0; j < message.muxStreams.length; ++j) + object.muxStreams[j] = message.muxStreams[j]; + } + return object; + }; + + /** + * Converts this Manifest to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.Manifest + * @instance + * @returns {Object.} JSON object + */ + Manifest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ManifestType enum. + * @name google.cloud.video.transcoder.v1.Manifest.ManifestType + * @enum {number} + * @property {number} MANIFEST_TYPE_UNSPECIFIED=0 MANIFEST_TYPE_UNSPECIFIED value + * @property {number} HLS=1 HLS value + * @property {number} DASH=2 DASH value + */ + Manifest.ManifestType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MANIFEST_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "HLS"] = 1; + values[valuesById[2] = "DASH"] = 2; + return values; + })(); + + return Manifest; + })(); + + v1.PubsubDestination = (function() { + + /** + * Properties of a PubsubDestination. + * @memberof google.cloud.video.transcoder.v1 + * @interface IPubsubDestination + * @property {string|null} [topic] PubsubDestination topic + */ + + /** + * Constructs a new PubsubDestination. + * @memberof google.cloud.video.transcoder.v1 + * @classdesc Represents a PubsubDestination. + * @implements IPubsubDestination + * @constructor + * @param {google.cloud.video.transcoder.v1.IPubsubDestination=} [properties] Properties to set + */ + function PubsubDestination(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PubsubDestination topic. + * @member {string} topic + * @memberof google.cloud.video.transcoder.v1.PubsubDestination + * @instance + */ + PubsubDestination.prototype.topic = ""; + + /** + * Creates a new PubsubDestination instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.PubsubDestination + * @static + * @param {google.cloud.video.transcoder.v1.IPubsubDestination=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.PubsubDestination} PubsubDestination instance + */ + PubsubDestination.create = function create(properties) { + return new PubsubDestination(properties); + }; + + /** + * Encodes the specified PubsubDestination message. Does not implicitly {@link google.cloud.video.transcoder.v1.PubsubDestination.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.PubsubDestination + * @static + * @param {google.cloud.video.transcoder.v1.IPubsubDestination} message PubsubDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PubsubDestination.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.topic); + return writer; + }; + + /** + * Encodes the specified PubsubDestination message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.PubsubDestination.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.PubsubDestination + * @static + * @param {google.cloud.video.transcoder.v1.IPubsubDestination} message PubsubDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PubsubDestination.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PubsubDestination message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.PubsubDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.PubsubDestination} PubsubDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PubsubDestination.decode = function 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.transcoder.v1.PubsubDestination(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.topic = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PubsubDestination message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.PubsubDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.PubsubDestination} PubsubDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PubsubDestination.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PubsubDestination message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.PubsubDestination + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PubsubDestination.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.topic != null && message.hasOwnProperty("topic")) + if (!$util.isString(message.topic)) + return "topic: string expected"; + return null; + }; + + /** + * Creates a PubsubDestination message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.PubsubDestination + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.PubsubDestination} PubsubDestination + */ + PubsubDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.PubsubDestination) + return object; + var message = new $root.google.cloud.video.transcoder.v1.PubsubDestination(); + if (object.topic != null) + message.topic = String(object.topic); + return message; + }; + + /** + * Creates a plain object from a PubsubDestination message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.PubsubDestination + * @static + * @param {google.cloud.video.transcoder.v1.PubsubDestination} message PubsubDestination + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PubsubDestination.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.topic = ""; + if (message.topic != null && message.hasOwnProperty("topic")) + object.topic = message.topic; + return object; + }; + + /** + * Converts this PubsubDestination to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.PubsubDestination + * @instance + * @returns {Object.} JSON object + */ + PubsubDestination.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PubsubDestination; + })(); + + v1.SpriteSheet = (function() { + + /** + * Properties of a SpriteSheet. + * @memberof google.cloud.video.transcoder.v1 + * @interface ISpriteSheet + * @property {string|null} [format] SpriteSheet format + * @property {string|null} [filePrefix] SpriteSheet filePrefix + * @property {number|null} [spriteWidthPixels] SpriteSheet spriteWidthPixels + * @property {number|null} [spriteHeightPixels] SpriteSheet spriteHeightPixels + * @property {number|null} [columnCount] SpriteSheet columnCount + * @property {number|null} [rowCount] SpriteSheet rowCount + * @property {google.protobuf.IDuration|null} [startTimeOffset] SpriteSheet startTimeOffset + * @property {google.protobuf.IDuration|null} [endTimeOffset] SpriteSheet endTimeOffset + * @property {number|null} [totalCount] SpriteSheet totalCount + * @property {google.protobuf.IDuration|null} [interval] SpriteSheet interval + * @property {number|null} [quality] SpriteSheet quality + */ + + /** + * Constructs a new SpriteSheet. + * @memberof google.cloud.video.transcoder.v1 + * @classdesc Represents a SpriteSheet. + * @implements ISpriteSheet + * @constructor + * @param {google.cloud.video.transcoder.v1.ISpriteSheet=} [properties] Properties to set + */ + function SpriteSheet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SpriteSheet format. + * @member {string} format + * @memberof google.cloud.video.transcoder.v1.SpriteSheet + * @instance + */ + SpriteSheet.prototype.format = ""; + + /** + * SpriteSheet filePrefix. + * @member {string} filePrefix + * @memberof google.cloud.video.transcoder.v1.SpriteSheet + * @instance + */ + SpriteSheet.prototype.filePrefix = ""; + + /** + * SpriteSheet spriteWidthPixels. + * @member {number} spriteWidthPixels + * @memberof google.cloud.video.transcoder.v1.SpriteSheet + * @instance + */ + SpriteSheet.prototype.spriteWidthPixels = 0; + + /** + * SpriteSheet spriteHeightPixels. + * @member {number} spriteHeightPixels + * @memberof google.cloud.video.transcoder.v1.SpriteSheet + * @instance + */ + SpriteSheet.prototype.spriteHeightPixels = 0; + + /** + * SpriteSheet columnCount. + * @member {number} columnCount + * @memberof google.cloud.video.transcoder.v1.SpriteSheet + * @instance + */ + SpriteSheet.prototype.columnCount = 0; + + /** + * SpriteSheet rowCount. + * @member {number} rowCount + * @memberof google.cloud.video.transcoder.v1.SpriteSheet + * @instance + */ + SpriteSheet.prototype.rowCount = 0; + + /** + * SpriteSheet startTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} startTimeOffset + * @memberof google.cloud.video.transcoder.v1.SpriteSheet + * @instance + */ + SpriteSheet.prototype.startTimeOffset = null; + + /** + * SpriteSheet endTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} endTimeOffset + * @memberof google.cloud.video.transcoder.v1.SpriteSheet + * @instance + */ + SpriteSheet.prototype.endTimeOffset = null; + + /** + * SpriteSheet totalCount. + * @member {number|null|undefined} totalCount + * @memberof google.cloud.video.transcoder.v1.SpriteSheet + * @instance + */ + SpriteSheet.prototype.totalCount = null; + + /** + * SpriteSheet interval. + * @member {google.protobuf.IDuration|null|undefined} interval + * @memberof google.cloud.video.transcoder.v1.SpriteSheet + * @instance + */ + SpriteSheet.prototype.interval = null; + + /** + * SpriteSheet quality. + * @member {number} quality + * @memberof google.cloud.video.transcoder.v1.SpriteSheet + * @instance + */ + SpriteSheet.prototype.quality = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SpriteSheet extractionStrategy. + * @member {"totalCount"|"interval"|undefined} extractionStrategy + * @memberof google.cloud.video.transcoder.v1.SpriteSheet + * @instance + */ + Object.defineProperty(SpriteSheet.prototype, "extractionStrategy", { + get: $util.oneOfGetter($oneOfFields = ["totalCount", "interval"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SpriteSheet instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.SpriteSheet + * @static + * @param {google.cloud.video.transcoder.v1.ISpriteSheet=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.SpriteSheet} SpriteSheet instance + */ + SpriteSheet.create = function create(properties) { + return new SpriteSheet(properties); + }; + + /** + * Encodes the specified SpriteSheet message. Does not implicitly {@link google.cloud.video.transcoder.v1.SpriteSheet.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.SpriteSheet + * @static + * @param {google.cloud.video.transcoder.v1.ISpriteSheet} message SpriteSheet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SpriteSheet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.format); + if (message.filePrefix != null && Object.hasOwnProperty.call(message, "filePrefix")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filePrefix); + if (message.spriteWidthPixels != null && Object.hasOwnProperty.call(message, "spriteWidthPixels")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.spriteWidthPixels); + if (message.spriteHeightPixels != null && Object.hasOwnProperty.call(message, "spriteHeightPixels")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.spriteHeightPixels); + if (message.columnCount != null && Object.hasOwnProperty.call(message, "columnCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.columnCount); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.rowCount); + if (message.startTimeOffset != null && Object.hasOwnProperty.call(message, "startTimeOffset")) + $root.google.protobuf.Duration.encode(message.startTimeOffset, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.endTimeOffset != null && Object.hasOwnProperty.call(message, "endTimeOffset")) + $root.google.protobuf.Duration.encode(message.endTimeOffset, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.totalCount != null && Object.hasOwnProperty.call(message, "totalCount")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.totalCount); + if (message.interval != null && Object.hasOwnProperty.call(message, "interval")) + $root.google.protobuf.Duration.encode(message.interval, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.quality != null && Object.hasOwnProperty.call(message, "quality")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.quality); + return writer; + }; + + /** + * Encodes the specified SpriteSheet message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.SpriteSheet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.SpriteSheet + * @static + * @param {google.cloud.video.transcoder.v1.ISpriteSheet} message SpriteSheet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SpriteSheet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SpriteSheet message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.SpriteSheet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.SpriteSheet} SpriteSheet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SpriteSheet.decode = function 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.transcoder.v1.SpriteSheet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.format = reader.string(); + break; + case 2: + message.filePrefix = reader.string(); + break; + case 3: + message.spriteWidthPixels = reader.int32(); + break; + case 4: + message.spriteHeightPixels = reader.int32(); + break; + case 5: + message.columnCount = reader.int32(); + break; + case 6: + message.rowCount = reader.int32(); + break; + case 7: + message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 8: + message.endTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 9: + message.totalCount = reader.int32(); + break; + case 10: + message.interval = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 11: + message.quality = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SpriteSheet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.SpriteSheet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.SpriteSheet} SpriteSheet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SpriteSheet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SpriteSheet message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.SpriteSheet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SpriteSheet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.format != null && message.hasOwnProperty("format")) + if (!$util.isString(message.format)) + return "format: string expected"; + if (message.filePrefix != null && message.hasOwnProperty("filePrefix")) + if (!$util.isString(message.filePrefix)) + return "filePrefix: string expected"; + if (message.spriteWidthPixels != null && message.hasOwnProperty("spriteWidthPixels")) + if (!$util.isInteger(message.spriteWidthPixels)) + return "spriteWidthPixels: integer expected"; + if (message.spriteHeightPixels != null && message.hasOwnProperty("spriteHeightPixels")) + if (!$util.isInteger(message.spriteHeightPixels)) + return "spriteHeightPixels: integer expected"; + if (message.columnCount != null && message.hasOwnProperty("columnCount")) + if (!$util.isInteger(message.columnCount)) + return "columnCount: integer expected"; + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (!$util.isInteger(message.rowCount)) + return "rowCount: integer expected"; + if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.startTimeOffset); + if (error) + return "startTimeOffset." + error; + } + if (message.endTimeOffset != null && message.hasOwnProperty("endTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.endTimeOffset); + if (error) + return "endTimeOffset." + error; + } + if (message.totalCount != null && message.hasOwnProperty("totalCount")) { + properties.extractionStrategy = 1; + if (!$util.isInteger(message.totalCount)) + return "totalCount: integer expected"; + } + if (message.interval != null && message.hasOwnProperty("interval")) { + if (properties.extractionStrategy === 1) + return "extractionStrategy: multiple values"; + properties.extractionStrategy = 1; + { + var error = $root.google.protobuf.Duration.verify(message.interval); + if (error) + return "interval." + error; + } + } + if (message.quality != null && message.hasOwnProperty("quality")) + if (!$util.isInteger(message.quality)) + return "quality: integer expected"; + return null; + }; + + /** + * Creates a SpriteSheet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.SpriteSheet + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.SpriteSheet} SpriteSheet + */ + SpriteSheet.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.SpriteSheet) + return object; + var message = new $root.google.cloud.video.transcoder.v1.SpriteSheet(); + if (object.format != null) + message.format = String(object.format); + if (object.filePrefix != null) + message.filePrefix = String(object.filePrefix); + if (object.spriteWidthPixels != null) + message.spriteWidthPixels = object.spriteWidthPixels | 0; + if (object.spriteHeightPixels != null) + message.spriteHeightPixels = object.spriteHeightPixels | 0; + if (object.columnCount != null) + message.columnCount = object.columnCount | 0; + if (object.rowCount != null) + message.rowCount = object.rowCount | 0; + if (object.startTimeOffset != null) { + if (typeof object.startTimeOffset !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.SpriteSheet.startTimeOffset: object expected"); + message.startTimeOffset = $root.google.protobuf.Duration.fromObject(object.startTimeOffset); + } + if (object.endTimeOffset != null) { + if (typeof object.endTimeOffset !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.SpriteSheet.endTimeOffset: object expected"); + message.endTimeOffset = $root.google.protobuf.Duration.fromObject(object.endTimeOffset); + } + if (object.totalCount != null) + message.totalCount = object.totalCount | 0; + if (object.interval != null) { + if (typeof object.interval !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.SpriteSheet.interval: object expected"); + message.interval = $root.google.protobuf.Duration.fromObject(object.interval); + } + if (object.quality != null) + message.quality = object.quality | 0; + return message; + }; + + /** + * Creates a plain object from a SpriteSheet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.SpriteSheet + * @static + * @param {google.cloud.video.transcoder.v1.SpriteSheet} message SpriteSheet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SpriteSheet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.format = ""; + object.filePrefix = ""; + object.spriteWidthPixels = 0; + object.spriteHeightPixels = 0; + object.columnCount = 0; + object.rowCount = 0; + object.startTimeOffset = null; + object.endTimeOffset = null; + object.quality = 0; + } + if (message.format != null && message.hasOwnProperty("format")) + object.format = message.format; + if (message.filePrefix != null && message.hasOwnProperty("filePrefix")) + object.filePrefix = message.filePrefix; + if (message.spriteWidthPixels != null && message.hasOwnProperty("spriteWidthPixels")) + object.spriteWidthPixels = message.spriteWidthPixels; + if (message.spriteHeightPixels != null && message.hasOwnProperty("spriteHeightPixels")) + object.spriteHeightPixels = message.spriteHeightPixels; + if (message.columnCount != null && message.hasOwnProperty("columnCount")) + object.columnCount = message.columnCount; + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + object.rowCount = message.rowCount; + if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) + object.startTimeOffset = $root.google.protobuf.Duration.toObject(message.startTimeOffset, options); + if (message.endTimeOffset != null && message.hasOwnProperty("endTimeOffset")) + object.endTimeOffset = $root.google.protobuf.Duration.toObject(message.endTimeOffset, options); + if (message.totalCount != null && message.hasOwnProperty("totalCount")) { + object.totalCount = message.totalCount; + if (options.oneofs) + object.extractionStrategy = "totalCount"; + } + if (message.interval != null && message.hasOwnProperty("interval")) { + object.interval = $root.google.protobuf.Duration.toObject(message.interval, options); + if (options.oneofs) + object.extractionStrategy = "interval"; + } + if (message.quality != null && message.hasOwnProperty("quality")) + object.quality = message.quality; + return object; + }; + + /** + * Converts this SpriteSheet to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.SpriteSheet + * @instance + * @returns {Object.} JSON object + */ + SpriteSheet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SpriteSheet; + })(); + + v1.Overlay = (function() { + + /** + * Properties of an Overlay. + * @memberof google.cloud.video.transcoder.v1 + * @interface IOverlay + * @property {google.cloud.video.transcoder.v1.Overlay.IImage|null} [image] Overlay image + * @property {Array.|null} [animations] Overlay animations + */ + + /** + * Constructs a new Overlay. + * @memberof google.cloud.video.transcoder.v1 + * @classdesc Represents an Overlay. + * @implements IOverlay + * @constructor + * @param {google.cloud.video.transcoder.v1.IOverlay=} [properties] Properties to set + */ + function Overlay(properties) { + this.animations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Overlay image. + * @member {google.cloud.video.transcoder.v1.Overlay.IImage|null|undefined} image + * @memberof google.cloud.video.transcoder.v1.Overlay + * @instance + */ + Overlay.prototype.image = null; + + /** + * Overlay animations. + * @member {Array.} animations + * @memberof google.cloud.video.transcoder.v1.Overlay + * @instance + */ + Overlay.prototype.animations = $util.emptyArray; + + /** + * Creates a new Overlay instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.Overlay + * @static + * @param {google.cloud.video.transcoder.v1.IOverlay=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.Overlay} Overlay instance + */ + Overlay.create = function create(properties) { + return new Overlay(properties); + }; + + /** + * Encodes the specified Overlay message. Does not implicitly {@link google.cloud.video.transcoder.v1.Overlay.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.Overlay + * @static + * @param {google.cloud.video.transcoder.v1.IOverlay} message Overlay message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Overlay.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.image != null && Object.hasOwnProperty.call(message, "image")) + $root.google.cloud.video.transcoder.v1.Overlay.Image.encode(message.image, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.animations != null && message.animations.length) + for (var i = 0; i < message.animations.length; ++i) + $root.google.cloud.video.transcoder.v1.Overlay.Animation.encode(message.animations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Overlay message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Overlay.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.Overlay + * @static + * @param {google.cloud.video.transcoder.v1.IOverlay} message Overlay message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Overlay.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Overlay message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.Overlay + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.Overlay} Overlay + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Overlay.decode = function 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.transcoder.v1.Overlay(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.image = $root.google.cloud.video.transcoder.v1.Overlay.Image.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.animations && message.animations.length)) + message.animations = []; + message.animations.push($root.google.cloud.video.transcoder.v1.Overlay.Animation.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Overlay message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.Overlay + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.Overlay} Overlay + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Overlay.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Overlay message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.Overlay + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Overlay.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.image != null && message.hasOwnProperty("image")) { + var error = $root.google.cloud.video.transcoder.v1.Overlay.Image.verify(message.image); + if (error) + return "image." + error; + } + if (message.animations != null && message.hasOwnProperty("animations")) { + if (!Array.isArray(message.animations)) + return "animations: array expected"; + for (var i = 0; i < message.animations.length; ++i) { + var error = $root.google.cloud.video.transcoder.v1.Overlay.Animation.verify(message.animations[i]); + if (error) + return "animations." + error; + } + } + return null; + }; + + /** + * Creates an Overlay message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.Overlay + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.Overlay} Overlay + */ + Overlay.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.Overlay) + return object; + var message = new $root.google.cloud.video.transcoder.v1.Overlay(); + if (object.image != null) { + if (typeof object.image !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.Overlay.image: object expected"); + message.image = $root.google.cloud.video.transcoder.v1.Overlay.Image.fromObject(object.image); + } + if (object.animations) { + if (!Array.isArray(object.animations)) + throw TypeError(".google.cloud.video.transcoder.v1.Overlay.animations: array expected"); + message.animations = []; + for (var i = 0; i < object.animations.length; ++i) { + if (typeof object.animations[i] !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.Overlay.animations: object expected"); + message.animations[i] = $root.google.cloud.video.transcoder.v1.Overlay.Animation.fromObject(object.animations[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an Overlay message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.Overlay + * @static + * @param {google.cloud.video.transcoder.v1.Overlay} message Overlay + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Overlay.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.animations = []; + if (options.defaults) + object.image = null; + if (message.image != null && message.hasOwnProperty("image")) + object.image = $root.google.cloud.video.transcoder.v1.Overlay.Image.toObject(message.image, options); + if (message.animations && message.animations.length) { + object.animations = []; + for (var j = 0; j < message.animations.length; ++j) + object.animations[j] = $root.google.cloud.video.transcoder.v1.Overlay.Animation.toObject(message.animations[j], options); + } + return object; + }; + + /** + * Converts this Overlay to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.Overlay + * @instance + * @returns {Object.} JSON object + */ + Overlay.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Overlay.NormalizedCoordinate = (function() { + + /** + * Properties of a NormalizedCoordinate. + * @memberof google.cloud.video.transcoder.v1.Overlay + * @interface INormalizedCoordinate + * @property {number|null} [x] NormalizedCoordinate x + * @property {number|null} [y] NormalizedCoordinate y + */ + + /** + * Constructs a new NormalizedCoordinate. + * @memberof google.cloud.video.transcoder.v1.Overlay + * @classdesc Represents a NormalizedCoordinate. + * @implements INormalizedCoordinate + * @constructor + * @param {google.cloud.video.transcoder.v1.Overlay.INormalizedCoordinate=} [properties] Properties to set + */ + function NormalizedCoordinate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NormalizedCoordinate x. + * @member {number} x + * @memberof google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate + * @instance + */ + NormalizedCoordinate.prototype.x = 0; + + /** + * NormalizedCoordinate y. + * @member {number} y + * @memberof google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate + * @instance + */ + NormalizedCoordinate.prototype.y = 0; + + /** + * Creates a new NormalizedCoordinate instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate + * @static + * @param {google.cloud.video.transcoder.v1.Overlay.INormalizedCoordinate=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate} NormalizedCoordinate instance + */ + NormalizedCoordinate.create = function create(properties) { + return new NormalizedCoordinate(properties); + }; + + /** + * Encodes the specified NormalizedCoordinate message. Does not implicitly {@link google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate + * @static + * @param {google.cloud.video.transcoder.v1.Overlay.INormalizedCoordinate} message NormalizedCoordinate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NormalizedCoordinate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.x != null && Object.hasOwnProperty.call(message, "x")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.x); + if (message.y != null && Object.hasOwnProperty.call(message, "y")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.y); + return writer; + }; + + /** + * Encodes the specified NormalizedCoordinate message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate + * @static + * @param {google.cloud.video.transcoder.v1.Overlay.INormalizedCoordinate} message NormalizedCoordinate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NormalizedCoordinate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NormalizedCoordinate message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate} NormalizedCoordinate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NormalizedCoordinate.decode = function 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.transcoder.v1.Overlay.NormalizedCoordinate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.x = reader.double(); + break; + case 2: + message.y = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NormalizedCoordinate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate} NormalizedCoordinate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NormalizedCoordinate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NormalizedCoordinate message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NormalizedCoordinate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.x != null && message.hasOwnProperty("x")) + if (typeof message.x !== "number") + return "x: number expected"; + if (message.y != null && message.hasOwnProperty("y")) + if (typeof message.y !== "number") + return "y: number expected"; + return null; + }; + + /** + * Creates a NormalizedCoordinate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate} NormalizedCoordinate + */ + NormalizedCoordinate.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate) + return object; + var message = new $root.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate(); + if (object.x != null) + message.x = Number(object.x); + if (object.y != null) + message.y = Number(object.y); + return message; + }; + + /** + * Creates a plain object from a NormalizedCoordinate message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate + * @static + * @param {google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate} message NormalizedCoordinate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NormalizedCoordinate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.x = 0; + object.y = 0; + } + if (message.x != null && message.hasOwnProperty("x")) + object.x = options.json && !isFinite(message.x) ? String(message.x) : message.x; + if (message.y != null && message.hasOwnProperty("y")) + object.y = options.json && !isFinite(message.y) ? String(message.y) : message.y; + return object; + }; + + /** + * Converts this NormalizedCoordinate to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate + * @instance + * @returns {Object.} JSON object + */ + NormalizedCoordinate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NormalizedCoordinate; + })(); + + Overlay.Image = (function() { + + /** + * Properties of an Image. + * @memberof google.cloud.video.transcoder.v1.Overlay + * @interface IImage + * @property {string|null} [uri] Image uri + * @property {google.cloud.video.transcoder.v1.Overlay.INormalizedCoordinate|null} [resolution] Image resolution + * @property {number|null} [alpha] Image alpha + */ + + /** + * Constructs a new Image. + * @memberof google.cloud.video.transcoder.v1.Overlay + * @classdesc Represents an Image. + * @implements IImage + * @constructor + * @param {google.cloud.video.transcoder.v1.Overlay.IImage=} [properties] Properties to set + */ + function Image(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Image uri. + * @member {string} uri + * @memberof google.cloud.video.transcoder.v1.Overlay.Image + * @instance + */ + Image.prototype.uri = ""; + + /** + * Image resolution. + * @member {google.cloud.video.transcoder.v1.Overlay.INormalizedCoordinate|null|undefined} resolution + * @memberof google.cloud.video.transcoder.v1.Overlay.Image + * @instance + */ + Image.prototype.resolution = null; + + /** + * Image alpha. + * @member {number} alpha + * @memberof google.cloud.video.transcoder.v1.Overlay.Image + * @instance + */ + Image.prototype.alpha = 0; + + /** + * Creates a new Image instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.Overlay.Image + * @static + * @param {google.cloud.video.transcoder.v1.Overlay.IImage=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.Overlay.Image} Image instance + */ + Image.create = function create(properties) { + return new Image(properties); + }; + + /** + * Encodes the specified Image message. Does not implicitly {@link google.cloud.video.transcoder.v1.Overlay.Image.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.Overlay.Image + * @static + * @param {google.cloud.video.transcoder.v1.Overlay.IImage} message Image message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Image.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.resolution != null && Object.hasOwnProperty.call(message, "resolution")) + $root.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate.encode(message.resolution, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.alpha != null && Object.hasOwnProperty.call(message, "alpha")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.alpha); + return writer; + }; + + /** + * Encodes the specified Image message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Overlay.Image.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.Overlay.Image + * @static + * @param {google.cloud.video.transcoder.v1.Overlay.IImage} message Image message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Image.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Image message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.Overlay.Image + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.Overlay.Image} Image + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Image.decode = function 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.transcoder.v1.Overlay.Image(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.uri = reader.string(); + break; + case 2: + message.resolution = $root.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate.decode(reader, reader.uint32()); + break; + case 3: + message.alpha = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Image message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.Overlay.Image + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.Overlay.Image} Image + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Image.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Image message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.Overlay.Image + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Image.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.resolution != null && message.hasOwnProperty("resolution")) { + var error = $root.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate.verify(message.resolution); + if (error) + return "resolution." + error; + } + if (message.alpha != null && message.hasOwnProperty("alpha")) + if (typeof message.alpha !== "number") + return "alpha: number expected"; + return null; + }; + + /** + * Creates an Image message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.Overlay.Image + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.Overlay.Image} Image + */ + Image.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.Overlay.Image) + return object; + var message = new $root.google.cloud.video.transcoder.v1.Overlay.Image(); + if (object.uri != null) + message.uri = String(object.uri); + if (object.resolution != null) { + if (typeof object.resolution !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.Overlay.Image.resolution: object expected"); + message.resolution = $root.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate.fromObject(object.resolution); + } + if (object.alpha != null) + message.alpha = Number(object.alpha); + return message; + }; + + /** + * Creates a plain object from an Image message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.Overlay.Image + * @static + * @param {google.cloud.video.transcoder.v1.Overlay.Image} message Image + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Image.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.uri = ""; + object.resolution = null; + object.alpha = 0; + } + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.resolution != null && message.hasOwnProperty("resolution")) + object.resolution = $root.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate.toObject(message.resolution, options); + if (message.alpha != null && message.hasOwnProperty("alpha")) + object.alpha = options.json && !isFinite(message.alpha) ? String(message.alpha) : message.alpha; + return object; + }; + + /** + * Converts this Image to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.Overlay.Image + * @instance + * @returns {Object.} JSON object + */ + Image.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Image; + })(); + + Overlay.AnimationStatic = (function() { + + /** + * Properties of an AnimationStatic. + * @memberof google.cloud.video.transcoder.v1.Overlay + * @interface IAnimationStatic + * @property {google.cloud.video.transcoder.v1.Overlay.INormalizedCoordinate|null} [xy] AnimationStatic xy + * @property {google.protobuf.IDuration|null} [startTimeOffset] AnimationStatic startTimeOffset + */ + + /** + * Constructs a new AnimationStatic. + * @memberof google.cloud.video.transcoder.v1.Overlay + * @classdesc Represents an AnimationStatic. + * @implements IAnimationStatic + * @constructor + * @param {google.cloud.video.transcoder.v1.Overlay.IAnimationStatic=} [properties] Properties to set + */ + function AnimationStatic(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnimationStatic xy. + * @member {google.cloud.video.transcoder.v1.Overlay.INormalizedCoordinate|null|undefined} xy + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationStatic + * @instance + */ + AnimationStatic.prototype.xy = null; + + /** + * AnimationStatic startTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} startTimeOffset + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationStatic + * @instance + */ + AnimationStatic.prototype.startTimeOffset = null; + + /** + * Creates a new AnimationStatic instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationStatic + * @static + * @param {google.cloud.video.transcoder.v1.Overlay.IAnimationStatic=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.Overlay.AnimationStatic} AnimationStatic instance + */ + AnimationStatic.create = function create(properties) { + return new AnimationStatic(properties); + }; + + /** + * Encodes the specified AnimationStatic message. Does not implicitly {@link google.cloud.video.transcoder.v1.Overlay.AnimationStatic.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationStatic + * @static + * @param {google.cloud.video.transcoder.v1.Overlay.IAnimationStatic} message AnimationStatic message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnimationStatic.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.xy != null && Object.hasOwnProperty.call(message, "xy")) + $root.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate.encode(message.xy, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.startTimeOffset != null && Object.hasOwnProperty.call(message, "startTimeOffset")) + $root.google.protobuf.Duration.encode(message.startTimeOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AnimationStatic message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Overlay.AnimationStatic.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationStatic + * @static + * @param {google.cloud.video.transcoder.v1.Overlay.IAnimationStatic} message AnimationStatic message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnimationStatic.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnimationStatic message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationStatic + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.Overlay.AnimationStatic} AnimationStatic + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnimationStatic.decode = function 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.transcoder.v1.Overlay.AnimationStatic(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.xy = $root.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate.decode(reader, reader.uint32()); + break; + case 2: + message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnimationStatic message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationStatic + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.Overlay.AnimationStatic} AnimationStatic + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnimationStatic.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnimationStatic message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationStatic + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnimationStatic.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.xy != null && message.hasOwnProperty("xy")) { + var error = $root.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate.verify(message.xy); + if (error) + return "xy." + 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 an AnimationStatic message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationStatic + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.Overlay.AnimationStatic} AnimationStatic + */ + AnimationStatic.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.Overlay.AnimationStatic) + return object; + var message = new $root.google.cloud.video.transcoder.v1.Overlay.AnimationStatic(); + if (object.xy != null) { + if (typeof object.xy !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.Overlay.AnimationStatic.xy: object expected"); + message.xy = $root.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate.fromObject(object.xy); + } + if (object.startTimeOffset != null) { + if (typeof object.startTimeOffset !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.Overlay.AnimationStatic.startTimeOffset: object expected"); + message.startTimeOffset = $root.google.protobuf.Duration.fromObject(object.startTimeOffset); + } + return message; + }; + + /** + * Creates a plain object from an AnimationStatic message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationStatic + * @static + * @param {google.cloud.video.transcoder.v1.Overlay.AnimationStatic} message AnimationStatic + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnimationStatic.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.xy = null; + object.startTimeOffset = null; + } + if (message.xy != null && message.hasOwnProperty("xy")) + object.xy = $root.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate.toObject(message.xy, options); + if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) + object.startTimeOffset = $root.google.protobuf.Duration.toObject(message.startTimeOffset, options); + return object; + }; + + /** + * Converts this AnimationStatic to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationStatic + * @instance + * @returns {Object.} JSON object + */ + AnimationStatic.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AnimationStatic; + })(); + + Overlay.AnimationFade = (function() { + + /** + * Properties of an AnimationFade. + * @memberof google.cloud.video.transcoder.v1.Overlay + * @interface IAnimationFade + * @property {google.cloud.video.transcoder.v1.Overlay.FadeType|null} [fadeType] AnimationFade fadeType + * @property {google.cloud.video.transcoder.v1.Overlay.INormalizedCoordinate|null} [xy] AnimationFade xy + * @property {google.protobuf.IDuration|null} [startTimeOffset] AnimationFade startTimeOffset + * @property {google.protobuf.IDuration|null} [endTimeOffset] AnimationFade endTimeOffset + */ + + /** + * Constructs a new AnimationFade. + * @memberof google.cloud.video.transcoder.v1.Overlay + * @classdesc Represents an AnimationFade. + * @implements IAnimationFade + * @constructor + * @param {google.cloud.video.transcoder.v1.Overlay.IAnimationFade=} [properties] Properties to set + */ + function AnimationFade(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnimationFade fadeType. + * @member {google.cloud.video.transcoder.v1.Overlay.FadeType} fadeType + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationFade + * @instance + */ + AnimationFade.prototype.fadeType = 0; + + /** + * AnimationFade xy. + * @member {google.cloud.video.transcoder.v1.Overlay.INormalizedCoordinate|null|undefined} xy + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationFade + * @instance + */ + AnimationFade.prototype.xy = null; + + /** + * AnimationFade startTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} startTimeOffset + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationFade + * @instance + */ + AnimationFade.prototype.startTimeOffset = null; + + /** + * AnimationFade endTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} endTimeOffset + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationFade + * @instance + */ + AnimationFade.prototype.endTimeOffset = null; + + /** + * Creates a new AnimationFade instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationFade + * @static + * @param {google.cloud.video.transcoder.v1.Overlay.IAnimationFade=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.Overlay.AnimationFade} AnimationFade instance + */ + AnimationFade.create = function create(properties) { + return new AnimationFade(properties); + }; + + /** + * Encodes the specified AnimationFade message. Does not implicitly {@link google.cloud.video.transcoder.v1.Overlay.AnimationFade.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationFade + * @static + * @param {google.cloud.video.transcoder.v1.Overlay.IAnimationFade} message AnimationFade message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnimationFade.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fadeType != null && Object.hasOwnProperty.call(message, "fadeType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fadeType); + if (message.xy != null && Object.hasOwnProperty.call(message, "xy")) + $root.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate.encode(message.xy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.startTimeOffset != null && Object.hasOwnProperty.call(message, "startTimeOffset")) + $root.google.protobuf.Duration.encode(message.startTimeOffset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endTimeOffset != null && Object.hasOwnProperty.call(message, "endTimeOffset")) + $root.google.protobuf.Duration.encode(message.endTimeOffset, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AnimationFade message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Overlay.AnimationFade.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationFade + * @static + * @param {google.cloud.video.transcoder.v1.Overlay.IAnimationFade} message AnimationFade message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnimationFade.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnimationFade message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationFade + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.Overlay.AnimationFade} AnimationFade + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnimationFade.decode = function 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.transcoder.v1.Overlay.AnimationFade(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.fadeType = reader.int32(); + break; + case 2: + message.xy = $root.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate.decode(reader, reader.uint32()); + break; + case 3: + message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 4: + message.endTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnimationFade message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationFade + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.Overlay.AnimationFade} AnimationFade + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnimationFade.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnimationFade message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationFade + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnimationFade.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fadeType != null && message.hasOwnProperty("fadeType")) + switch (message.fadeType) { + default: + return "fadeType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.xy != null && message.hasOwnProperty("xy")) { + var error = $root.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate.verify(message.xy); + if (error) + return "xy." + error; + } + if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.startTimeOffset); + if (error) + return "startTimeOffset." + error; + } + if (message.endTimeOffset != null && message.hasOwnProperty("endTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.endTimeOffset); + if (error) + return "endTimeOffset." + error; + } + return null; + }; + + /** + * Creates an AnimationFade message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationFade + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.Overlay.AnimationFade} AnimationFade + */ + AnimationFade.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.Overlay.AnimationFade) + return object; + var message = new $root.google.cloud.video.transcoder.v1.Overlay.AnimationFade(); + switch (object.fadeType) { + case "FADE_TYPE_UNSPECIFIED": + case 0: + message.fadeType = 0; + break; + case "FADE_IN": + case 1: + message.fadeType = 1; + break; + case "FADE_OUT": + case 2: + message.fadeType = 2; + break; + } + if (object.xy != null) { + if (typeof object.xy !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.Overlay.AnimationFade.xy: object expected"); + message.xy = $root.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate.fromObject(object.xy); + } + if (object.startTimeOffset != null) { + if (typeof object.startTimeOffset !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.Overlay.AnimationFade.startTimeOffset: object expected"); + message.startTimeOffset = $root.google.protobuf.Duration.fromObject(object.startTimeOffset); + } + if (object.endTimeOffset != null) { + if (typeof object.endTimeOffset !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.Overlay.AnimationFade.endTimeOffset: object expected"); + message.endTimeOffset = $root.google.protobuf.Duration.fromObject(object.endTimeOffset); + } + return message; + }; + + /** + * Creates a plain object from an AnimationFade message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationFade + * @static + * @param {google.cloud.video.transcoder.v1.Overlay.AnimationFade} message AnimationFade + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnimationFade.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fadeType = options.enums === String ? "FADE_TYPE_UNSPECIFIED" : 0; + object.xy = null; + object.startTimeOffset = null; + object.endTimeOffset = null; + } + if (message.fadeType != null && message.hasOwnProperty("fadeType")) + object.fadeType = options.enums === String ? $root.google.cloud.video.transcoder.v1.Overlay.FadeType[message.fadeType] : message.fadeType; + if (message.xy != null && message.hasOwnProperty("xy")) + object.xy = $root.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate.toObject(message.xy, options); + if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) + object.startTimeOffset = $root.google.protobuf.Duration.toObject(message.startTimeOffset, options); + if (message.endTimeOffset != null && message.hasOwnProperty("endTimeOffset")) + object.endTimeOffset = $root.google.protobuf.Duration.toObject(message.endTimeOffset, options); + return object; + }; + + /** + * Converts this AnimationFade to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationFade + * @instance + * @returns {Object.} JSON object + */ + AnimationFade.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AnimationFade; + })(); + + Overlay.AnimationEnd = (function() { + + /** + * Properties of an AnimationEnd. + * @memberof google.cloud.video.transcoder.v1.Overlay + * @interface IAnimationEnd + * @property {google.protobuf.IDuration|null} [startTimeOffset] AnimationEnd startTimeOffset + */ + + /** + * Constructs a new AnimationEnd. + * @memberof google.cloud.video.transcoder.v1.Overlay + * @classdesc Represents an AnimationEnd. + * @implements IAnimationEnd + * @constructor + * @param {google.cloud.video.transcoder.v1.Overlay.IAnimationEnd=} [properties] Properties to set + */ + function AnimationEnd(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnimationEnd startTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} startTimeOffset + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationEnd + * @instance + */ + AnimationEnd.prototype.startTimeOffset = null; + + /** + * Creates a new AnimationEnd instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationEnd + * @static + * @param {google.cloud.video.transcoder.v1.Overlay.IAnimationEnd=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.Overlay.AnimationEnd} AnimationEnd instance + */ + AnimationEnd.create = function create(properties) { + return new AnimationEnd(properties); + }; + + /** + * Encodes the specified AnimationEnd message. Does not implicitly {@link google.cloud.video.transcoder.v1.Overlay.AnimationEnd.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationEnd + * @static + * @param {google.cloud.video.transcoder.v1.Overlay.IAnimationEnd} message AnimationEnd message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnimationEnd.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTimeOffset != null && Object.hasOwnProperty.call(message, "startTimeOffset")) + $root.google.protobuf.Duration.encode(message.startTimeOffset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AnimationEnd message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Overlay.AnimationEnd.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationEnd + * @static + * @param {google.cloud.video.transcoder.v1.Overlay.IAnimationEnd} message AnimationEnd message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnimationEnd.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnimationEnd message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationEnd + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.Overlay.AnimationEnd} AnimationEnd + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnimationEnd.decode = function 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.transcoder.v1.Overlay.AnimationEnd(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnimationEnd message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationEnd + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.Overlay.AnimationEnd} AnimationEnd + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnimationEnd.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnimationEnd message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationEnd + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnimationEnd.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.startTimeOffset); + if (error) + return "startTimeOffset." + error; + } + return null; + }; + + /** + * Creates an AnimationEnd message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationEnd + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.Overlay.AnimationEnd} AnimationEnd + */ + AnimationEnd.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.Overlay.AnimationEnd) + return object; + var message = new $root.google.cloud.video.transcoder.v1.Overlay.AnimationEnd(); + if (object.startTimeOffset != null) { + if (typeof object.startTimeOffset !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.Overlay.AnimationEnd.startTimeOffset: object expected"); + message.startTimeOffset = $root.google.protobuf.Duration.fromObject(object.startTimeOffset); + } + return message; + }; + + /** + * Creates a plain object from an AnimationEnd message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationEnd + * @static + * @param {google.cloud.video.transcoder.v1.Overlay.AnimationEnd} message AnimationEnd + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnimationEnd.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.startTimeOffset = null; + if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) + object.startTimeOffset = $root.google.protobuf.Duration.toObject(message.startTimeOffset, options); + return object; + }; + + /** + * Converts this AnimationEnd to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationEnd + * @instance + * @returns {Object.} JSON object + */ + AnimationEnd.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AnimationEnd; + })(); + + Overlay.Animation = (function() { + + /** + * Properties of an Animation. + * @memberof google.cloud.video.transcoder.v1.Overlay + * @interface IAnimation + * @property {google.cloud.video.transcoder.v1.Overlay.IAnimationStatic|null} [animationStatic] Animation animationStatic + * @property {google.cloud.video.transcoder.v1.Overlay.IAnimationFade|null} [animationFade] Animation animationFade + * @property {google.cloud.video.transcoder.v1.Overlay.IAnimationEnd|null} [animationEnd] Animation animationEnd + */ + + /** + * Constructs a new Animation. + * @memberof google.cloud.video.transcoder.v1.Overlay + * @classdesc Represents an Animation. + * @implements IAnimation + * @constructor + * @param {google.cloud.video.transcoder.v1.Overlay.IAnimation=} [properties] Properties to set + */ + function Animation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Animation animationStatic. + * @member {google.cloud.video.transcoder.v1.Overlay.IAnimationStatic|null|undefined} animationStatic + * @memberof google.cloud.video.transcoder.v1.Overlay.Animation + * @instance + */ + Animation.prototype.animationStatic = null; + + /** + * Animation animationFade. + * @member {google.cloud.video.transcoder.v1.Overlay.IAnimationFade|null|undefined} animationFade + * @memberof google.cloud.video.transcoder.v1.Overlay.Animation + * @instance + */ + Animation.prototype.animationFade = null; + + /** + * Animation animationEnd. + * @member {google.cloud.video.transcoder.v1.Overlay.IAnimationEnd|null|undefined} animationEnd + * @memberof google.cloud.video.transcoder.v1.Overlay.Animation + * @instance + */ + Animation.prototype.animationEnd = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Animation animationType. + * @member {"animationStatic"|"animationFade"|"animationEnd"|undefined} animationType + * @memberof google.cloud.video.transcoder.v1.Overlay.Animation + * @instance + */ + Object.defineProperty(Animation.prototype, "animationType", { + get: $util.oneOfGetter($oneOfFields = ["animationStatic", "animationFade", "animationEnd"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Animation instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.Overlay.Animation + * @static + * @param {google.cloud.video.transcoder.v1.Overlay.IAnimation=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.Overlay.Animation} Animation instance + */ + Animation.create = function create(properties) { + return new Animation(properties); + }; + + /** + * Encodes the specified Animation message. Does not implicitly {@link google.cloud.video.transcoder.v1.Overlay.Animation.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.Overlay.Animation + * @static + * @param {google.cloud.video.transcoder.v1.Overlay.IAnimation} message Animation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Animation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.animationStatic != null && Object.hasOwnProperty.call(message, "animationStatic")) + $root.google.cloud.video.transcoder.v1.Overlay.AnimationStatic.encode(message.animationStatic, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.animationFade != null && Object.hasOwnProperty.call(message, "animationFade")) + $root.google.cloud.video.transcoder.v1.Overlay.AnimationFade.encode(message.animationFade, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.animationEnd != null && Object.hasOwnProperty.call(message, "animationEnd")) + $root.google.cloud.video.transcoder.v1.Overlay.AnimationEnd.encode(message.animationEnd, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Animation message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Overlay.Animation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.Overlay.Animation + * @static + * @param {google.cloud.video.transcoder.v1.Overlay.IAnimation} message Animation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Animation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Animation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.Overlay.Animation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.Overlay.Animation} Animation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Animation.decode = function 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.transcoder.v1.Overlay.Animation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.animationStatic = $root.google.cloud.video.transcoder.v1.Overlay.AnimationStatic.decode(reader, reader.uint32()); + break; + case 2: + message.animationFade = $root.google.cloud.video.transcoder.v1.Overlay.AnimationFade.decode(reader, reader.uint32()); + break; + case 3: + message.animationEnd = $root.google.cloud.video.transcoder.v1.Overlay.AnimationEnd.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Animation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.Overlay.Animation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.Overlay.Animation} Animation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Animation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Animation message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.Overlay.Animation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Animation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.animationStatic != null && message.hasOwnProperty("animationStatic")) { + properties.animationType = 1; + { + var error = $root.google.cloud.video.transcoder.v1.Overlay.AnimationStatic.verify(message.animationStatic); + if (error) + return "animationStatic." + error; + } + } + if (message.animationFade != null && message.hasOwnProperty("animationFade")) { + if (properties.animationType === 1) + return "animationType: multiple values"; + properties.animationType = 1; + { + var error = $root.google.cloud.video.transcoder.v1.Overlay.AnimationFade.verify(message.animationFade); + if (error) + return "animationFade." + error; + } + } + if (message.animationEnd != null && message.hasOwnProperty("animationEnd")) { + if (properties.animationType === 1) + return "animationType: multiple values"; + properties.animationType = 1; + { + var error = $root.google.cloud.video.transcoder.v1.Overlay.AnimationEnd.verify(message.animationEnd); + if (error) + return "animationEnd." + error; + } + } + return null; + }; + + /** + * Creates an Animation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.Overlay.Animation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.Overlay.Animation} Animation + */ + Animation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.Overlay.Animation) + return object; + var message = new $root.google.cloud.video.transcoder.v1.Overlay.Animation(); + if (object.animationStatic != null) { + if (typeof object.animationStatic !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.Overlay.Animation.animationStatic: object expected"); + message.animationStatic = $root.google.cloud.video.transcoder.v1.Overlay.AnimationStatic.fromObject(object.animationStatic); + } + if (object.animationFade != null) { + if (typeof object.animationFade !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.Overlay.Animation.animationFade: object expected"); + message.animationFade = $root.google.cloud.video.transcoder.v1.Overlay.AnimationFade.fromObject(object.animationFade); + } + if (object.animationEnd != null) { + if (typeof object.animationEnd !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.Overlay.Animation.animationEnd: object expected"); + message.animationEnd = $root.google.cloud.video.transcoder.v1.Overlay.AnimationEnd.fromObject(object.animationEnd); + } + return message; + }; + + /** + * Creates a plain object from an Animation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.Overlay.Animation + * @static + * @param {google.cloud.video.transcoder.v1.Overlay.Animation} message Animation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Animation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.animationStatic != null && message.hasOwnProperty("animationStatic")) { + object.animationStatic = $root.google.cloud.video.transcoder.v1.Overlay.AnimationStatic.toObject(message.animationStatic, options); + if (options.oneofs) + object.animationType = "animationStatic"; + } + if (message.animationFade != null && message.hasOwnProperty("animationFade")) { + object.animationFade = $root.google.cloud.video.transcoder.v1.Overlay.AnimationFade.toObject(message.animationFade, options); + if (options.oneofs) + object.animationType = "animationFade"; + } + if (message.animationEnd != null && message.hasOwnProperty("animationEnd")) { + object.animationEnd = $root.google.cloud.video.transcoder.v1.Overlay.AnimationEnd.toObject(message.animationEnd, options); + if (options.oneofs) + object.animationType = "animationEnd"; + } + return object; + }; + + /** + * Converts this Animation to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.Overlay.Animation + * @instance + * @returns {Object.} JSON object + */ + Animation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Animation; + })(); + + /** + * FadeType enum. + * @name google.cloud.video.transcoder.v1.Overlay.FadeType + * @enum {number} + * @property {number} FADE_TYPE_UNSPECIFIED=0 FADE_TYPE_UNSPECIFIED value + * @property {number} FADE_IN=1 FADE_IN value + * @property {number} FADE_OUT=2 FADE_OUT value + */ + Overlay.FadeType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FADE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FADE_IN"] = 1; + values[valuesById[2] = "FADE_OUT"] = 2; + return values; + })(); + + return Overlay; + })(); + + v1.PreprocessingConfig = (function() { + + /** + * Properties of a PreprocessingConfig. + * @memberof google.cloud.video.transcoder.v1 + * @interface IPreprocessingConfig + * @property {google.cloud.video.transcoder.v1.PreprocessingConfig.IColor|null} [color] PreprocessingConfig color + * @property {google.cloud.video.transcoder.v1.PreprocessingConfig.IDenoise|null} [denoise] PreprocessingConfig denoise + * @property {google.cloud.video.transcoder.v1.PreprocessingConfig.IDeblock|null} [deblock] PreprocessingConfig deblock + * @property {google.cloud.video.transcoder.v1.PreprocessingConfig.IAudio|null} [audio] PreprocessingConfig audio + * @property {google.cloud.video.transcoder.v1.PreprocessingConfig.ICrop|null} [crop] PreprocessingConfig crop + * @property {google.cloud.video.transcoder.v1.PreprocessingConfig.IPad|null} [pad] PreprocessingConfig pad + */ + + /** + * Constructs a new PreprocessingConfig. + * @memberof google.cloud.video.transcoder.v1 + * @classdesc Represents a PreprocessingConfig. + * @implements IPreprocessingConfig + * @constructor + * @param {google.cloud.video.transcoder.v1.IPreprocessingConfig=} [properties] Properties to set + */ + function PreprocessingConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PreprocessingConfig color. + * @member {google.cloud.video.transcoder.v1.PreprocessingConfig.IColor|null|undefined} color + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig + * @instance + */ + PreprocessingConfig.prototype.color = null; + + /** + * PreprocessingConfig denoise. + * @member {google.cloud.video.transcoder.v1.PreprocessingConfig.IDenoise|null|undefined} denoise + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig + * @instance + */ + PreprocessingConfig.prototype.denoise = null; + + /** + * PreprocessingConfig deblock. + * @member {google.cloud.video.transcoder.v1.PreprocessingConfig.IDeblock|null|undefined} deblock + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig + * @instance + */ + PreprocessingConfig.prototype.deblock = null; + + /** + * PreprocessingConfig audio. + * @member {google.cloud.video.transcoder.v1.PreprocessingConfig.IAudio|null|undefined} audio + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig + * @instance + */ + PreprocessingConfig.prototype.audio = null; + + /** + * PreprocessingConfig crop. + * @member {google.cloud.video.transcoder.v1.PreprocessingConfig.ICrop|null|undefined} crop + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig + * @instance + */ + PreprocessingConfig.prototype.crop = null; + + /** + * PreprocessingConfig pad. + * @member {google.cloud.video.transcoder.v1.PreprocessingConfig.IPad|null|undefined} pad + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig + * @instance + */ + PreprocessingConfig.prototype.pad = null; + + /** + * Creates a new PreprocessingConfig instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig + * @static + * @param {google.cloud.video.transcoder.v1.IPreprocessingConfig=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.PreprocessingConfig} PreprocessingConfig instance + */ + PreprocessingConfig.create = function create(properties) { + return new PreprocessingConfig(properties); + }; + + /** + * Encodes the specified PreprocessingConfig message. Does not implicitly {@link google.cloud.video.transcoder.v1.PreprocessingConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig + * @static + * @param {google.cloud.video.transcoder.v1.IPreprocessingConfig} message PreprocessingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PreprocessingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.color != null && Object.hasOwnProperty.call(message, "color")) + $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Color.encode(message.color, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.denoise != null && Object.hasOwnProperty.call(message, "denoise")) + $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise.encode(message.denoise, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.deblock != null && Object.hasOwnProperty.call(message, "deblock")) + $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock.encode(message.deblock, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) + $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Audio.encode(message.audio, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.crop != null && Object.hasOwnProperty.call(message, "crop")) + $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Crop.encode(message.crop, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.pad != null && Object.hasOwnProperty.call(message, "pad")) + $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Pad.encode(message.pad, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PreprocessingConfig message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.PreprocessingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig + * @static + * @param {google.cloud.video.transcoder.v1.IPreprocessingConfig} message PreprocessingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PreprocessingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PreprocessingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.PreprocessingConfig} PreprocessingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PreprocessingConfig.decode = function 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.transcoder.v1.PreprocessingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.color = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Color.decode(reader, reader.uint32()); + break; + case 2: + message.denoise = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise.decode(reader, reader.uint32()); + break; + case 3: + message.deblock = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock.decode(reader, reader.uint32()); + break; + case 4: + message.audio = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Audio.decode(reader, reader.uint32()); + break; + case 5: + message.crop = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Crop.decode(reader, reader.uint32()); + break; + case 6: + message.pad = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Pad.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PreprocessingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.PreprocessingConfig} PreprocessingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PreprocessingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PreprocessingConfig message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PreprocessingConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.color != null && message.hasOwnProperty("color")) { + var error = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Color.verify(message.color); + if (error) + return "color." + error; + } + if (message.denoise != null && message.hasOwnProperty("denoise")) { + var error = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise.verify(message.denoise); + if (error) + return "denoise." + error; + } + if (message.deblock != null && message.hasOwnProperty("deblock")) { + var error = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock.verify(message.deblock); + if (error) + return "deblock." + error; + } + if (message.audio != null && message.hasOwnProperty("audio")) { + var error = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Audio.verify(message.audio); + if (error) + return "audio." + error; + } + if (message.crop != null && message.hasOwnProperty("crop")) { + var error = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Crop.verify(message.crop); + if (error) + return "crop." + error; + } + if (message.pad != null && message.hasOwnProperty("pad")) { + var error = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Pad.verify(message.pad); + if (error) + return "pad." + error; + } + return null; + }; + + /** + * Creates a PreprocessingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.PreprocessingConfig} PreprocessingConfig + */ + PreprocessingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.PreprocessingConfig) + return object; + var message = new $root.google.cloud.video.transcoder.v1.PreprocessingConfig(); + if (object.color != null) { + if (typeof object.color !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.PreprocessingConfig.color: object expected"); + message.color = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Color.fromObject(object.color); + } + if (object.denoise != null) { + if (typeof object.denoise !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.PreprocessingConfig.denoise: object expected"); + message.denoise = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise.fromObject(object.denoise); + } + if (object.deblock != null) { + if (typeof object.deblock !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.PreprocessingConfig.deblock: object expected"); + message.deblock = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock.fromObject(object.deblock); + } + if (object.audio != null) { + if (typeof object.audio !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.PreprocessingConfig.audio: object expected"); + message.audio = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Audio.fromObject(object.audio); + } + if (object.crop != null) { + if (typeof object.crop !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.PreprocessingConfig.crop: object expected"); + message.crop = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Crop.fromObject(object.crop); + } + if (object.pad != null) { + if (typeof object.pad !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.PreprocessingConfig.pad: object expected"); + message.pad = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Pad.fromObject(object.pad); + } + return message; + }; + + /** + * Creates a plain object from a PreprocessingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig + * @static + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig} message PreprocessingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PreprocessingConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.color = null; + object.denoise = null; + object.deblock = null; + object.audio = null; + object.crop = null; + object.pad = null; + } + if (message.color != null && message.hasOwnProperty("color")) + object.color = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Color.toObject(message.color, options); + if (message.denoise != null && message.hasOwnProperty("denoise")) + object.denoise = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise.toObject(message.denoise, options); + if (message.deblock != null && message.hasOwnProperty("deblock")) + object.deblock = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock.toObject(message.deblock, options); + if (message.audio != null && message.hasOwnProperty("audio")) + object.audio = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Audio.toObject(message.audio, options); + if (message.crop != null && message.hasOwnProperty("crop")) + object.crop = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Crop.toObject(message.crop, options); + if (message.pad != null && message.hasOwnProperty("pad")) + object.pad = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Pad.toObject(message.pad, options); + return object; + }; + + /** + * Converts this PreprocessingConfig to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig + * @instance + * @returns {Object.} JSON object + */ + PreprocessingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + PreprocessingConfig.Color = (function() { + + /** + * Properties of a Color. + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig + * @interface IColor + * @property {number|null} [saturation] Color saturation + * @property {number|null} [contrast] Color contrast + * @property {number|null} [brightness] Color brightness + */ + + /** + * Constructs a new Color. + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig + * @classdesc Represents a Color. + * @implements IColor + * @constructor + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig.IColor=} [properties] Properties to set + */ + function Color(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Color saturation. + * @member {number} saturation + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Color + * @instance + */ + Color.prototype.saturation = 0; + + /** + * Color contrast. + * @member {number} contrast + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Color + * @instance + */ + Color.prototype.contrast = 0; + + /** + * Color brightness. + * @member {number} brightness + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Color + * @instance + */ + Color.prototype.brightness = 0; + + /** + * Creates a new Color instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Color + * @static + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig.IColor=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.PreprocessingConfig.Color} Color instance + */ + Color.create = function create(properties) { + return new Color(properties); + }; + + /** + * Encodes the specified Color message. Does not implicitly {@link google.cloud.video.transcoder.v1.PreprocessingConfig.Color.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Color + * @static + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig.IColor} message Color message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Color.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.saturation != null && Object.hasOwnProperty.call(message, "saturation")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.saturation); + if (message.contrast != null && Object.hasOwnProperty.call(message, "contrast")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.contrast); + if (message.brightness != null && Object.hasOwnProperty.call(message, "brightness")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.brightness); + return writer; + }; + + /** + * Encodes the specified Color message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.PreprocessingConfig.Color.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Color + * @static + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig.IColor} message Color message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Color.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Color message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Color + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.PreprocessingConfig.Color} Color + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Color.decode = function 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.transcoder.v1.PreprocessingConfig.Color(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.saturation = reader.double(); + break; + case 2: + message.contrast = reader.double(); + break; + case 3: + message.brightness = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Color message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Color + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.PreprocessingConfig.Color} Color + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Color.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Color message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Color + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Color.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.saturation != null && message.hasOwnProperty("saturation")) + if (typeof message.saturation !== "number") + return "saturation: number expected"; + if (message.contrast != null && message.hasOwnProperty("contrast")) + if (typeof message.contrast !== "number") + return "contrast: number expected"; + if (message.brightness != null && message.hasOwnProperty("brightness")) + if (typeof message.brightness !== "number") + return "brightness: number expected"; + return null; + }; + + /** + * Creates a Color message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Color + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.PreprocessingConfig.Color} Color + */ + Color.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Color) + return object; + var message = new $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Color(); + if (object.saturation != null) + message.saturation = Number(object.saturation); + if (object.contrast != null) + message.contrast = Number(object.contrast); + if (object.brightness != null) + message.brightness = Number(object.brightness); + return message; + }; + + /** + * Creates a plain object from a Color message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Color + * @static + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig.Color} message Color + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Color.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.saturation = 0; + object.contrast = 0; + object.brightness = 0; + } + if (message.saturation != null && message.hasOwnProperty("saturation")) + object.saturation = options.json && !isFinite(message.saturation) ? String(message.saturation) : message.saturation; + if (message.contrast != null && message.hasOwnProperty("contrast")) + object.contrast = options.json && !isFinite(message.contrast) ? String(message.contrast) : message.contrast; + if (message.brightness != null && message.hasOwnProperty("brightness")) + object.brightness = options.json && !isFinite(message.brightness) ? String(message.brightness) : message.brightness; + return object; + }; + + /** + * Converts this Color to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Color + * @instance + * @returns {Object.} JSON object + */ + Color.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Color; + })(); + + PreprocessingConfig.Denoise = (function() { + + /** + * Properties of a Denoise. + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig + * @interface IDenoise + * @property {number|null} [strength] Denoise strength + * @property {string|null} [tune] Denoise tune + */ + + /** + * Constructs a new Denoise. + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig + * @classdesc Represents a Denoise. + * @implements IDenoise + * @constructor + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig.IDenoise=} [properties] Properties to set + */ + function Denoise(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Denoise strength. + * @member {number} strength + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise + * @instance + */ + Denoise.prototype.strength = 0; + + /** + * Denoise tune. + * @member {string} tune + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise + * @instance + */ + Denoise.prototype.tune = ""; + + /** + * Creates a new Denoise instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise + * @static + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig.IDenoise=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise} Denoise instance + */ + Denoise.create = function create(properties) { + return new Denoise(properties); + }; + + /** + * Encodes the specified Denoise message. Does not implicitly {@link google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise + * @static + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig.IDenoise} message Denoise message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Denoise.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.strength != null && Object.hasOwnProperty.call(message, "strength")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.strength); + if (message.tune != null && Object.hasOwnProperty.call(message, "tune")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.tune); + return writer; + }; + + /** + * Encodes the specified Denoise message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise + * @static + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig.IDenoise} message Denoise message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Denoise.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Denoise message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise} Denoise + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Denoise.decode = function 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.transcoder.v1.PreprocessingConfig.Denoise(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.strength = reader.double(); + break; + case 2: + message.tune = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Denoise message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise} Denoise + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Denoise.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Denoise message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Denoise.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.strength != null && message.hasOwnProperty("strength")) + if (typeof message.strength !== "number") + return "strength: number expected"; + if (message.tune != null && message.hasOwnProperty("tune")) + if (!$util.isString(message.tune)) + return "tune: string expected"; + return null; + }; + + /** + * Creates a Denoise message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise} Denoise + */ + Denoise.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise) + return object; + var message = new $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise(); + if (object.strength != null) + message.strength = Number(object.strength); + if (object.tune != null) + message.tune = String(object.tune); + return message; + }; + + /** + * Creates a plain object from a Denoise message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise + * @static + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise} message Denoise + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Denoise.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.strength = 0; + object.tune = ""; + } + if (message.strength != null && message.hasOwnProperty("strength")) + object.strength = options.json && !isFinite(message.strength) ? String(message.strength) : message.strength; + if (message.tune != null && message.hasOwnProperty("tune")) + object.tune = message.tune; + return object; + }; + + /** + * Converts this Denoise to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise + * @instance + * @returns {Object.} JSON object + */ + Denoise.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Denoise; + })(); + + PreprocessingConfig.Deblock = (function() { + + /** + * Properties of a Deblock. + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig + * @interface IDeblock + * @property {number|null} [strength] Deblock strength + * @property {boolean|null} [enabled] Deblock enabled + */ + + /** + * Constructs a new Deblock. + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig + * @classdesc Represents a Deblock. + * @implements IDeblock + * @constructor + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig.IDeblock=} [properties] Properties to set + */ + function Deblock(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Deblock strength. + * @member {number} strength + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock + * @instance + */ + Deblock.prototype.strength = 0; + + /** + * Deblock enabled. + * @member {boolean} enabled + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock + * @instance + */ + Deblock.prototype.enabled = false; + + /** + * Creates a new Deblock instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock + * @static + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig.IDeblock=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock} Deblock instance + */ + Deblock.create = function create(properties) { + return new Deblock(properties); + }; + + /** + * Encodes the specified Deblock message. Does not implicitly {@link google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock + * @static + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig.IDeblock} message Deblock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Deblock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.strength != null && Object.hasOwnProperty.call(message, "strength")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.strength); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified Deblock message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock + * @static + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig.IDeblock} message Deblock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Deblock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Deblock message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock} Deblock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Deblock.decode = function 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.transcoder.v1.PreprocessingConfig.Deblock(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.strength = reader.double(); + break; + case 2: + message.enabled = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Deblock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock} Deblock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Deblock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Deblock message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Deblock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.strength != null && message.hasOwnProperty("strength")) + if (typeof message.strength !== "number") + return "strength: number expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a Deblock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock} Deblock + */ + Deblock.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock) + return object; + var message = new $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock(); + if (object.strength != null) + message.strength = Number(object.strength); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a Deblock message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock + * @static + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock} message Deblock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Deblock.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.strength = 0; + object.enabled = false; + } + if (message.strength != null && message.hasOwnProperty("strength")) + object.strength = options.json && !isFinite(message.strength) ? String(message.strength) : message.strength; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this Deblock to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock + * @instance + * @returns {Object.} JSON object + */ + Deblock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Deblock; + })(); + + PreprocessingConfig.Audio = (function() { + + /** + * Properties of an Audio. + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig + * @interface IAudio + * @property {number|null} [lufs] Audio lufs + * @property {boolean|null} [highBoost] Audio highBoost + * @property {boolean|null} [lowBoost] Audio lowBoost + */ + + /** + * Constructs a new Audio. + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig + * @classdesc Represents an Audio. + * @implements IAudio + * @constructor + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig.IAudio=} [properties] Properties to set + */ + function Audio(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Audio lufs. + * @member {number} lufs + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Audio + * @instance + */ + Audio.prototype.lufs = 0; + + /** + * Audio highBoost. + * @member {boolean} highBoost + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Audio + * @instance + */ + Audio.prototype.highBoost = false; + + /** + * Audio lowBoost. + * @member {boolean} lowBoost + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Audio + * @instance + */ + Audio.prototype.lowBoost = false; + + /** + * Creates a new Audio instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Audio + * @static + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig.IAudio=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.PreprocessingConfig.Audio} Audio instance + */ + Audio.create = function create(properties) { + return new Audio(properties); + }; + + /** + * Encodes the specified Audio message. Does not implicitly {@link google.cloud.video.transcoder.v1.PreprocessingConfig.Audio.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Audio + * @static + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig.IAudio} message Audio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Audio.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lufs != null && Object.hasOwnProperty.call(message, "lufs")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.lufs); + if (message.highBoost != null && Object.hasOwnProperty.call(message, "highBoost")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.highBoost); + if (message.lowBoost != null && Object.hasOwnProperty.call(message, "lowBoost")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.lowBoost); + return writer; + }; + + /** + * Encodes the specified Audio message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.PreprocessingConfig.Audio.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Audio + * @static + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig.IAudio} message Audio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Audio.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Audio message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Audio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.PreprocessingConfig.Audio} Audio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Audio.decode = function 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.transcoder.v1.PreprocessingConfig.Audio(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.lufs = reader.double(); + break; + case 2: + message.highBoost = reader.bool(); + break; + case 3: + message.lowBoost = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Audio message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Audio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.PreprocessingConfig.Audio} Audio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Audio.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Audio message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Audio + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Audio.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lufs != null && message.hasOwnProperty("lufs")) + if (typeof message.lufs !== "number") + return "lufs: number expected"; + if (message.highBoost != null && message.hasOwnProperty("highBoost")) + if (typeof message.highBoost !== "boolean") + return "highBoost: boolean expected"; + if (message.lowBoost != null && message.hasOwnProperty("lowBoost")) + if (typeof message.lowBoost !== "boolean") + return "lowBoost: boolean expected"; + return null; + }; + + /** + * Creates an Audio message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Audio + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.PreprocessingConfig.Audio} Audio + */ + Audio.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Audio) + return object; + var message = new $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Audio(); + if (object.lufs != null) + message.lufs = Number(object.lufs); + if (object.highBoost != null) + message.highBoost = Boolean(object.highBoost); + if (object.lowBoost != null) + message.lowBoost = Boolean(object.lowBoost); + return message; + }; + + /** + * Creates a plain object from an Audio message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Audio + * @static + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig.Audio} message Audio + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Audio.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.lufs = 0; + object.highBoost = false; + object.lowBoost = false; + } + if (message.lufs != null && message.hasOwnProperty("lufs")) + object.lufs = options.json && !isFinite(message.lufs) ? String(message.lufs) : message.lufs; + if (message.highBoost != null && message.hasOwnProperty("highBoost")) + object.highBoost = message.highBoost; + if (message.lowBoost != null && message.hasOwnProperty("lowBoost")) + object.lowBoost = message.lowBoost; + return object; + }; + + /** + * Converts this Audio to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Audio + * @instance + * @returns {Object.} JSON object + */ + Audio.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Audio; + })(); + + PreprocessingConfig.Crop = (function() { + + /** + * Properties of a Crop. + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig + * @interface ICrop + * @property {number|null} [topPixels] Crop topPixels + * @property {number|null} [bottomPixels] Crop bottomPixels + * @property {number|null} [leftPixels] Crop leftPixels + * @property {number|null} [rightPixels] Crop rightPixels + */ + + /** + * Constructs a new Crop. + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig + * @classdesc Represents a Crop. + * @implements ICrop + * @constructor + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig.ICrop=} [properties] Properties to set + */ + function Crop(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Crop topPixels. + * @member {number} topPixels + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Crop + * @instance + */ + Crop.prototype.topPixels = 0; + + /** + * Crop bottomPixels. + * @member {number} bottomPixels + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Crop + * @instance + */ + Crop.prototype.bottomPixels = 0; + + /** + * Crop leftPixels. + * @member {number} leftPixels + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Crop + * @instance + */ + Crop.prototype.leftPixels = 0; + + /** + * Crop rightPixels. + * @member {number} rightPixels + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Crop + * @instance + */ + Crop.prototype.rightPixels = 0; + + /** + * Creates a new Crop instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Crop + * @static + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig.ICrop=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.PreprocessingConfig.Crop} Crop instance + */ + Crop.create = function create(properties) { + return new Crop(properties); + }; + + /** + * Encodes the specified Crop message. Does not implicitly {@link google.cloud.video.transcoder.v1.PreprocessingConfig.Crop.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Crop + * @static + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig.ICrop} message Crop message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Crop.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.topPixels != null && Object.hasOwnProperty.call(message, "topPixels")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.topPixels); + if (message.bottomPixels != null && Object.hasOwnProperty.call(message, "bottomPixels")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.bottomPixels); + if (message.leftPixels != null && Object.hasOwnProperty.call(message, "leftPixels")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.leftPixels); + if (message.rightPixels != null && Object.hasOwnProperty.call(message, "rightPixels")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.rightPixels); + return writer; + }; + + /** + * Encodes the specified Crop message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.PreprocessingConfig.Crop.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Crop + * @static + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig.ICrop} message Crop message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Crop.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Crop message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Crop + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.PreprocessingConfig.Crop} Crop + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Crop.decode = function 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.transcoder.v1.PreprocessingConfig.Crop(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.topPixels = reader.int32(); + break; + case 2: + message.bottomPixels = reader.int32(); + break; + case 3: + message.leftPixels = reader.int32(); + break; + case 4: + message.rightPixels = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Crop message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Crop + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.PreprocessingConfig.Crop} Crop + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Crop.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Crop message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Crop + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Crop.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.topPixels != null && message.hasOwnProperty("topPixels")) + if (!$util.isInteger(message.topPixels)) + return "topPixels: integer expected"; + if (message.bottomPixels != null && message.hasOwnProperty("bottomPixels")) + if (!$util.isInteger(message.bottomPixels)) + return "bottomPixels: integer expected"; + if (message.leftPixels != null && message.hasOwnProperty("leftPixels")) + if (!$util.isInteger(message.leftPixels)) + return "leftPixels: integer expected"; + if (message.rightPixels != null && message.hasOwnProperty("rightPixels")) + if (!$util.isInteger(message.rightPixels)) + return "rightPixels: integer expected"; + return null; + }; + + /** + * Creates a Crop message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Crop + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.PreprocessingConfig.Crop} Crop + */ + Crop.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Crop) + return object; + var message = new $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Crop(); + if (object.topPixels != null) + message.topPixels = object.topPixels | 0; + if (object.bottomPixels != null) + message.bottomPixels = object.bottomPixels | 0; + if (object.leftPixels != null) + message.leftPixels = object.leftPixels | 0; + if (object.rightPixels != null) + message.rightPixels = object.rightPixels | 0; + return message; + }; + + /** + * Creates a plain object from a Crop message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Crop + * @static + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig.Crop} message Crop + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Crop.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.topPixels = 0; + object.bottomPixels = 0; + object.leftPixels = 0; + object.rightPixels = 0; + } + if (message.topPixels != null && message.hasOwnProperty("topPixels")) + object.topPixels = message.topPixels; + if (message.bottomPixels != null && message.hasOwnProperty("bottomPixels")) + object.bottomPixels = message.bottomPixels; + if (message.leftPixels != null && message.hasOwnProperty("leftPixels")) + object.leftPixels = message.leftPixels; + if (message.rightPixels != null && message.hasOwnProperty("rightPixels")) + object.rightPixels = message.rightPixels; + return object; + }; + + /** + * Converts this Crop to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Crop + * @instance + * @returns {Object.} JSON object + */ + Crop.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Crop; + })(); + + PreprocessingConfig.Pad = (function() { + + /** + * Properties of a Pad. + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig + * @interface IPad + * @property {number|null} [topPixels] Pad topPixels + * @property {number|null} [bottomPixels] Pad bottomPixels + * @property {number|null} [leftPixels] Pad leftPixels + * @property {number|null} [rightPixels] Pad rightPixels + */ + + /** + * Constructs a new Pad. + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig + * @classdesc Represents a Pad. + * @implements IPad + * @constructor + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig.IPad=} [properties] Properties to set + */ + function Pad(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Pad topPixels. + * @member {number} topPixels + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Pad + * @instance + */ + Pad.prototype.topPixels = 0; + + /** + * Pad bottomPixels. + * @member {number} bottomPixels + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Pad + * @instance + */ + Pad.prototype.bottomPixels = 0; + + /** + * Pad leftPixels. + * @member {number} leftPixels + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Pad + * @instance + */ + Pad.prototype.leftPixels = 0; + + /** + * Pad rightPixels. + * @member {number} rightPixels + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Pad + * @instance + */ + Pad.prototype.rightPixels = 0; + + /** + * Creates a new Pad instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Pad + * @static + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig.IPad=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.PreprocessingConfig.Pad} Pad instance + */ + Pad.create = function create(properties) { + return new Pad(properties); + }; + + /** + * Encodes the specified Pad message. Does not implicitly {@link google.cloud.video.transcoder.v1.PreprocessingConfig.Pad.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Pad + * @static + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig.IPad} message Pad message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pad.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.topPixels != null && Object.hasOwnProperty.call(message, "topPixels")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.topPixels); + if (message.bottomPixels != null && Object.hasOwnProperty.call(message, "bottomPixels")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.bottomPixels); + if (message.leftPixels != null && Object.hasOwnProperty.call(message, "leftPixels")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.leftPixels); + if (message.rightPixels != null && Object.hasOwnProperty.call(message, "rightPixels")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.rightPixels); + return writer; + }; + + /** + * Encodes the specified Pad message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.PreprocessingConfig.Pad.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Pad + * @static + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig.IPad} message Pad message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pad.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Pad message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Pad + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.PreprocessingConfig.Pad} Pad + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pad.decode = function 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.transcoder.v1.PreprocessingConfig.Pad(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.topPixels = reader.int32(); + break; + case 2: + message.bottomPixels = reader.int32(); + break; + case 3: + message.leftPixels = reader.int32(); + break; + case 4: + message.rightPixels = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Pad message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Pad + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.PreprocessingConfig.Pad} Pad + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pad.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Pad message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Pad + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Pad.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.topPixels != null && message.hasOwnProperty("topPixels")) + if (!$util.isInteger(message.topPixels)) + return "topPixels: integer expected"; + if (message.bottomPixels != null && message.hasOwnProperty("bottomPixels")) + if (!$util.isInteger(message.bottomPixels)) + return "bottomPixels: integer expected"; + if (message.leftPixels != null && message.hasOwnProperty("leftPixels")) + if (!$util.isInteger(message.leftPixels)) + return "leftPixels: integer expected"; + if (message.rightPixels != null && message.hasOwnProperty("rightPixels")) + if (!$util.isInteger(message.rightPixels)) + return "rightPixels: integer expected"; + return null; + }; + + /** + * Creates a Pad message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Pad + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.PreprocessingConfig.Pad} Pad + */ + Pad.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Pad) + return object; + var message = new $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Pad(); + if (object.topPixels != null) + message.topPixels = object.topPixels | 0; + if (object.bottomPixels != null) + message.bottomPixels = object.bottomPixels | 0; + if (object.leftPixels != null) + message.leftPixels = object.leftPixels | 0; + if (object.rightPixels != null) + message.rightPixels = object.rightPixels | 0; + return message; + }; + + /** + * Creates a plain object from a Pad message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Pad + * @static + * @param {google.cloud.video.transcoder.v1.PreprocessingConfig.Pad} message Pad + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Pad.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.topPixels = 0; + object.bottomPixels = 0; + object.leftPixels = 0; + object.rightPixels = 0; + } + if (message.topPixels != null && message.hasOwnProperty("topPixels")) + object.topPixels = message.topPixels; + if (message.bottomPixels != null && message.hasOwnProperty("bottomPixels")) + object.bottomPixels = message.bottomPixels; + if (message.leftPixels != null && message.hasOwnProperty("leftPixels")) + object.leftPixels = message.leftPixels; + if (message.rightPixels != null && message.hasOwnProperty("rightPixels")) + object.rightPixels = message.rightPixels; + return object; + }; + + /** + * Converts this Pad to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Pad + * @instance + * @returns {Object.} JSON object + */ + Pad.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Pad; + })(); + + return PreprocessingConfig; + })(); + + v1.VideoStream = (function() { + + /** + * Properties of a VideoStream. + * @memberof google.cloud.video.transcoder.v1 + * @interface IVideoStream + * @property {google.cloud.video.transcoder.v1.VideoStream.IH264CodecSettings|null} [h264] VideoStream h264 + * @property {google.cloud.video.transcoder.v1.VideoStream.IH265CodecSettings|null} [h265] VideoStream h265 + * @property {google.cloud.video.transcoder.v1.VideoStream.IVp9CodecSettings|null} [vp9] VideoStream vp9 + */ + + /** + * Constructs a new VideoStream. + * @memberof google.cloud.video.transcoder.v1 + * @classdesc Represents a VideoStream. + * @implements IVideoStream + * @constructor + * @param {google.cloud.video.transcoder.v1.IVideoStream=} [properties] Properties to set + */ + function VideoStream(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VideoStream h264. + * @member {google.cloud.video.transcoder.v1.VideoStream.IH264CodecSettings|null|undefined} h264 + * @memberof google.cloud.video.transcoder.v1.VideoStream + * @instance + */ + VideoStream.prototype.h264 = null; + + /** + * VideoStream h265. + * @member {google.cloud.video.transcoder.v1.VideoStream.IH265CodecSettings|null|undefined} h265 + * @memberof google.cloud.video.transcoder.v1.VideoStream + * @instance + */ + VideoStream.prototype.h265 = null; + + /** + * VideoStream vp9. + * @member {google.cloud.video.transcoder.v1.VideoStream.IVp9CodecSettings|null|undefined} vp9 + * @memberof google.cloud.video.transcoder.v1.VideoStream + * @instance + */ + VideoStream.prototype.vp9 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * VideoStream codecSettings. + * @member {"h264"|"h265"|"vp9"|undefined} codecSettings + * @memberof google.cloud.video.transcoder.v1.VideoStream + * @instance + */ + Object.defineProperty(VideoStream.prototype, "codecSettings", { + get: $util.oneOfGetter($oneOfFields = ["h264", "h265", "vp9"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new VideoStream instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.VideoStream + * @static + * @param {google.cloud.video.transcoder.v1.IVideoStream=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.VideoStream} VideoStream instance + */ + VideoStream.create = function create(properties) { + return new VideoStream(properties); + }; + + /** + * Encodes the specified VideoStream message. Does not implicitly {@link google.cloud.video.transcoder.v1.VideoStream.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.VideoStream + * @static + * @param {google.cloud.video.transcoder.v1.IVideoStream} message VideoStream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VideoStream.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.h264 != null && Object.hasOwnProperty.call(message, "h264")) + $root.google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings.encode(message.h264, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.h265 != null && Object.hasOwnProperty.call(message, "h265")) + $root.google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings.encode(message.h265, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.vp9 != null && Object.hasOwnProperty.call(message, "vp9")) + $root.google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings.encode(message.vp9, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified VideoStream message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.VideoStream.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.VideoStream + * @static + * @param {google.cloud.video.transcoder.v1.IVideoStream} message VideoStream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VideoStream.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VideoStream message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.VideoStream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.VideoStream} VideoStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VideoStream.decode = function 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.transcoder.v1.VideoStream(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.h264 = $root.google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings.decode(reader, reader.uint32()); + break; + case 2: + message.h265 = $root.google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings.decode(reader, reader.uint32()); + break; + case 3: + message.vp9 = $root.google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VideoStream message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.VideoStream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.VideoStream} VideoStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VideoStream.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VideoStream message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.VideoStream + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VideoStream.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.h264 != null && message.hasOwnProperty("h264")) { + properties.codecSettings = 1; + { + var error = $root.google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings.verify(message.h264); + if (error) + return "h264." + error; + } + } + if (message.h265 != null && message.hasOwnProperty("h265")) { + if (properties.codecSettings === 1) + return "codecSettings: multiple values"; + properties.codecSettings = 1; + { + var error = $root.google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings.verify(message.h265); + if (error) + return "h265." + error; + } + } + if (message.vp9 != null && message.hasOwnProperty("vp9")) { + if (properties.codecSettings === 1) + return "codecSettings: multiple values"; + properties.codecSettings = 1; + { + var error = $root.google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings.verify(message.vp9); + if (error) + return "vp9." + error; + } + } + return null; + }; + + /** + * Creates a VideoStream message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.VideoStream + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.VideoStream} VideoStream + */ + VideoStream.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.VideoStream) + return object; + var message = new $root.google.cloud.video.transcoder.v1.VideoStream(); + if (object.h264 != null) { + if (typeof object.h264 !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.VideoStream.h264: object expected"); + message.h264 = $root.google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings.fromObject(object.h264); + } + if (object.h265 != null) { + if (typeof object.h265 !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.VideoStream.h265: object expected"); + message.h265 = $root.google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings.fromObject(object.h265); + } + if (object.vp9 != null) { + if (typeof object.vp9 !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.VideoStream.vp9: object expected"); + message.vp9 = $root.google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings.fromObject(object.vp9); + } + return message; + }; + + /** + * Creates a plain object from a VideoStream message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.VideoStream + * @static + * @param {google.cloud.video.transcoder.v1.VideoStream} message VideoStream + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VideoStream.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.h264 != null && message.hasOwnProperty("h264")) { + object.h264 = $root.google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings.toObject(message.h264, options); + if (options.oneofs) + object.codecSettings = "h264"; + } + if (message.h265 != null && message.hasOwnProperty("h265")) { + object.h265 = $root.google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings.toObject(message.h265, options); + if (options.oneofs) + object.codecSettings = "h265"; + } + if (message.vp9 != null && message.hasOwnProperty("vp9")) { + object.vp9 = $root.google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings.toObject(message.vp9, options); + if (options.oneofs) + object.codecSettings = "vp9"; + } + return object; + }; + + /** + * Converts this VideoStream to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.VideoStream + * @instance + * @returns {Object.} JSON object + */ + VideoStream.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + VideoStream.H264CodecSettings = (function() { + + /** + * Properties of a H264CodecSettings. + * @memberof google.cloud.video.transcoder.v1.VideoStream + * @interface IH264CodecSettings + * @property {number|null} [widthPixels] H264CodecSettings widthPixels + * @property {number|null} [heightPixels] H264CodecSettings heightPixels + * @property {number|null} [frameRate] H264CodecSettings frameRate + * @property {number|null} [bitrateBps] H264CodecSettings bitrateBps + * @property {string|null} [pixelFormat] H264CodecSettings pixelFormat + * @property {string|null} [rateControlMode] H264CodecSettings rateControlMode + * @property {number|null} [crfLevel] H264CodecSettings crfLevel + * @property {boolean|null} [allowOpenGop] H264CodecSettings allowOpenGop + * @property {number|null} [gopFrameCount] H264CodecSettings gopFrameCount + * @property {google.protobuf.IDuration|null} [gopDuration] H264CodecSettings gopDuration + * @property {boolean|null} [enableTwoPass] H264CodecSettings enableTwoPass + * @property {number|null} [vbvSizeBits] H264CodecSettings vbvSizeBits + * @property {number|null} [vbvFullnessBits] H264CodecSettings vbvFullnessBits + * @property {string|null} [entropyCoder] H264CodecSettings entropyCoder + * @property {boolean|null} [bPyramid] H264CodecSettings bPyramid + * @property {number|null} [bFrameCount] H264CodecSettings bFrameCount + * @property {number|null} [aqStrength] H264CodecSettings aqStrength + * @property {string|null} [profile] H264CodecSettings profile + * @property {string|null} [tune] H264CodecSettings tune + * @property {string|null} [preset] H264CodecSettings preset + */ + + /** + * Constructs a new H264CodecSettings. + * @memberof google.cloud.video.transcoder.v1.VideoStream + * @classdesc Represents a H264CodecSettings. + * @implements IH264CodecSettings + * @constructor + * @param {google.cloud.video.transcoder.v1.VideoStream.IH264CodecSettings=} [properties] Properties to set + */ + function H264CodecSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * H264CodecSettings widthPixels. + * @member {number} widthPixels + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @instance + */ + H264CodecSettings.prototype.widthPixels = 0; + + /** + * H264CodecSettings heightPixels. + * @member {number} heightPixels + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @instance + */ + H264CodecSettings.prototype.heightPixels = 0; + + /** + * H264CodecSettings frameRate. + * @member {number} frameRate + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @instance + */ + H264CodecSettings.prototype.frameRate = 0; + + /** + * H264CodecSettings bitrateBps. + * @member {number} bitrateBps + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @instance + */ + H264CodecSettings.prototype.bitrateBps = 0; + + /** + * H264CodecSettings pixelFormat. + * @member {string} pixelFormat + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @instance + */ + H264CodecSettings.prototype.pixelFormat = ""; + + /** + * H264CodecSettings rateControlMode. + * @member {string} rateControlMode + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @instance + */ + H264CodecSettings.prototype.rateControlMode = ""; + + /** + * H264CodecSettings crfLevel. + * @member {number} crfLevel + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @instance + */ + H264CodecSettings.prototype.crfLevel = 0; + + /** + * H264CodecSettings allowOpenGop. + * @member {boolean} allowOpenGop + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @instance + */ + H264CodecSettings.prototype.allowOpenGop = false; + + /** + * H264CodecSettings gopFrameCount. + * @member {number|null|undefined} gopFrameCount + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @instance + */ + H264CodecSettings.prototype.gopFrameCount = null; + + /** + * H264CodecSettings gopDuration. + * @member {google.protobuf.IDuration|null|undefined} gopDuration + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @instance + */ + H264CodecSettings.prototype.gopDuration = null; + + /** + * H264CodecSettings enableTwoPass. + * @member {boolean} enableTwoPass + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @instance + */ + H264CodecSettings.prototype.enableTwoPass = false; + + /** + * H264CodecSettings vbvSizeBits. + * @member {number} vbvSizeBits + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @instance + */ + H264CodecSettings.prototype.vbvSizeBits = 0; + + /** + * H264CodecSettings vbvFullnessBits. + * @member {number} vbvFullnessBits + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @instance + */ + H264CodecSettings.prototype.vbvFullnessBits = 0; + + /** + * H264CodecSettings entropyCoder. + * @member {string} entropyCoder + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @instance + */ + H264CodecSettings.prototype.entropyCoder = ""; + + /** + * H264CodecSettings bPyramid. + * @member {boolean} bPyramid + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @instance + */ + H264CodecSettings.prototype.bPyramid = false; + + /** + * H264CodecSettings bFrameCount. + * @member {number} bFrameCount + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @instance + */ + H264CodecSettings.prototype.bFrameCount = 0; + + /** + * H264CodecSettings aqStrength. + * @member {number} aqStrength + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @instance + */ + H264CodecSettings.prototype.aqStrength = 0; + + /** + * H264CodecSettings profile. + * @member {string} profile + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @instance + */ + H264CodecSettings.prototype.profile = ""; + + /** + * H264CodecSettings tune. + * @member {string} tune + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @instance + */ + H264CodecSettings.prototype.tune = ""; + + /** + * H264CodecSettings preset. + * @member {string} preset + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @instance + */ + H264CodecSettings.prototype.preset = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * H264CodecSettings gopMode. + * @member {"gopFrameCount"|"gopDuration"|undefined} gopMode + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @instance + */ + Object.defineProperty(H264CodecSettings.prototype, "gopMode", { + get: $util.oneOfGetter($oneOfFields = ["gopFrameCount", "gopDuration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new H264CodecSettings instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @static + * @param {google.cloud.video.transcoder.v1.VideoStream.IH264CodecSettings=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings} H264CodecSettings instance + */ + H264CodecSettings.create = function create(properties) { + return new H264CodecSettings(properties); + }; + + /** + * Encodes the specified H264CodecSettings message. Does not implicitly {@link google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @static + * @param {google.cloud.video.transcoder.v1.VideoStream.IH264CodecSettings} message H264CodecSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + H264CodecSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.widthPixels != null && Object.hasOwnProperty.call(message, "widthPixels")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.widthPixels); + if (message.heightPixels != null && Object.hasOwnProperty.call(message, "heightPixels")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.heightPixels); + if (message.frameRate != null && Object.hasOwnProperty.call(message, "frameRate")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.frameRate); + if (message.bitrateBps != null && Object.hasOwnProperty.call(message, "bitrateBps")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.bitrateBps); + if (message.pixelFormat != null && Object.hasOwnProperty.call(message, "pixelFormat")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.pixelFormat); + if (message.rateControlMode != null && Object.hasOwnProperty.call(message, "rateControlMode")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.rateControlMode); + if (message.crfLevel != null && Object.hasOwnProperty.call(message, "crfLevel")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.crfLevel); + if (message.allowOpenGop != null && Object.hasOwnProperty.call(message, "allowOpenGop")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.allowOpenGop); + if (message.gopFrameCount != null && Object.hasOwnProperty.call(message, "gopFrameCount")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.gopFrameCount); + if (message.gopDuration != null && Object.hasOwnProperty.call(message, "gopDuration")) + $root.google.protobuf.Duration.encode(message.gopDuration, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.enableTwoPass != null && Object.hasOwnProperty.call(message, "enableTwoPass")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.enableTwoPass); + if (message.vbvSizeBits != null && Object.hasOwnProperty.call(message, "vbvSizeBits")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.vbvSizeBits); + if (message.vbvFullnessBits != null && Object.hasOwnProperty.call(message, "vbvFullnessBits")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.vbvFullnessBits); + if (message.entropyCoder != null && Object.hasOwnProperty.call(message, "entropyCoder")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.entropyCoder); + if (message.bPyramid != null && Object.hasOwnProperty.call(message, "bPyramid")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.bPyramid); + if (message.bFrameCount != null && Object.hasOwnProperty.call(message, "bFrameCount")) + writer.uint32(/* id 16, wireType 0 =*/128).int32(message.bFrameCount); + if (message.aqStrength != null && Object.hasOwnProperty.call(message, "aqStrength")) + writer.uint32(/* id 17, wireType 1 =*/137).double(message.aqStrength); + if (message.profile != null && Object.hasOwnProperty.call(message, "profile")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.profile); + if (message.tune != null && Object.hasOwnProperty.call(message, "tune")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.tune); + if (message.preset != null && Object.hasOwnProperty.call(message, "preset")) + writer.uint32(/* id 20, wireType 2 =*/162).string(message.preset); + return writer; + }; + + /** + * Encodes the specified H264CodecSettings message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @static + * @param {google.cloud.video.transcoder.v1.VideoStream.IH264CodecSettings} message H264CodecSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + H264CodecSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a H264CodecSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings} H264CodecSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + H264CodecSettings.decode = function 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.transcoder.v1.VideoStream.H264CodecSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.widthPixels = reader.int32(); + break; + case 2: + message.heightPixels = reader.int32(); + break; + case 3: + message.frameRate = reader.double(); + break; + case 4: + message.bitrateBps = reader.int32(); + break; + case 5: + message.pixelFormat = reader.string(); + break; + case 6: + message.rateControlMode = reader.string(); + break; + case 7: + message.crfLevel = reader.int32(); + break; + case 8: + message.allowOpenGop = reader.bool(); + break; + case 9: + message.gopFrameCount = reader.int32(); + break; + case 10: + message.gopDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 11: + message.enableTwoPass = reader.bool(); + break; + case 12: + message.vbvSizeBits = reader.int32(); + break; + case 13: + message.vbvFullnessBits = reader.int32(); + break; + case 14: + message.entropyCoder = reader.string(); + break; + case 15: + message.bPyramid = reader.bool(); + break; + case 16: + message.bFrameCount = reader.int32(); + break; + case 17: + message.aqStrength = reader.double(); + break; + case 18: + message.profile = reader.string(); + break; + case 19: + message.tune = reader.string(); + break; + case 20: + message.preset = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a H264CodecSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings} H264CodecSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + H264CodecSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a H264CodecSettings message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + H264CodecSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.widthPixels != null && message.hasOwnProperty("widthPixels")) + if (!$util.isInteger(message.widthPixels)) + return "widthPixels: integer expected"; + if (message.heightPixels != null && message.hasOwnProperty("heightPixels")) + if (!$util.isInteger(message.heightPixels)) + return "heightPixels: integer expected"; + if (message.frameRate != null && message.hasOwnProperty("frameRate")) + if (typeof message.frameRate !== "number") + return "frameRate: number expected"; + if (message.bitrateBps != null && message.hasOwnProperty("bitrateBps")) + if (!$util.isInteger(message.bitrateBps)) + return "bitrateBps: integer expected"; + if (message.pixelFormat != null && message.hasOwnProperty("pixelFormat")) + if (!$util.isString(message.pixelFormat)) + return "pixelFormat: string expected"; + if (message.rateControlMode != null && message.hasOwnProperty("rateControlMode")) + if (!$util.isString(message.rateControlMode)) + return "rateControlMode: string expected"; + if (message.crfLevel != null && message.hasOwnProperty("crfLevel")) + if (!$util.isInteger(message.crfLevel)) + return "crfLevel: integer expected"; + if (message.allowOpenGop != null && message.hasOwnProperty("allowOpenGop")) + if (typeof message.allowOpenGop !== "boolean") + return "allowOpenGop: boolean expected"; + if (message.gopFrameCount != null && message.hasOwnProperty("gopFrameCount")) { + properties.gopMode = 1; + if (!$util.isInteger(message.gopFrameCount)) + return "gopFrameCount: integer expected"; + } + if (message.gopDuration != null && message.hasOwnProperty("gopDuration")) { + if (properties.gopMode === 1) + return "gopMode: multiple values"; + properties.gopMode = 1; + { + var error = $root.google.protobuf.Duration.verify(message.gopDuration); + if (error) + return "gopDuration." + error; + } + } + if (message.enableTwoPass != null && message.hasOwnProperty("enableTwoPass")) + if (typeof message.enableTwoPass !== "boolean") + return "enableTwoPass: boolean expected"; + if (message.vbvSizeBits != null && message.hasOwnProperty("vbvSizeBits")) + if (!$util.isInteger(message.vbvSizeBits)) + return "vbvSizeBits: integer expected"; + if (message.vbvFullnessBits != null && message.hasOwnProperty("vbvFullnessBits")) + if (!$util.isInteger(message.vbvFullnessBits)) + return "vbvFullnessBits: integer expected"; + if (message.entropyCoder != null && message.hasOwnProperty("entropyCoder")) + if (!$util.isString(message.entropyCoder)) + return "entropyCoder: string expected"; + if (message.bPyramid != null && message.hasOwnProperty("bPyramid")) + if (typeof message.bPyramid !== "boolean") + return "bPyramid: boolean expected"; + if (message.bFrameCount != null && message.hasOwnProperty("bFrameCount")) + if (!$util.isInteger(message.bFrameCount)) + return "bFrameCount: integer expected"; + if (message.aqStrength != null && message.hasOwnProperty("aqStrength")) + if (typeof message.aqStrength !== "number") + return "aqStrength: number expected"; + if (message.profile != null && message.hasOwnProperty("profile")) + if (!$util.isString(message.profile)) + return "profile: string expected"; + if (message.tune != null && message.hasOwnProperty("tune")) + if (!$util.isString(message.tune)) + return "tune: string expected"; + if (message.preset != null && message.hasOwnProperty("preset")) + if (!$util.isString(message.preset)) + return "preset: string expected"; + return null; + }; + + /** + * Creates a H264CodecSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings} H264CodecSettings + */ + H264CodecSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings) + return object; + var message = new $root.google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings(); + if (object.widthPixels != null) + message.widthPixels = object.widthPixels | 0; + if (object.heightPixels != null) + message.heightPixels = object.heightPixels | 0; + if (object.frameRate != null) + message.frameRate = Number(object.frameRate); + if (object.bitrateBps != null) + message.bitrateBps = object.bitrateBps | 0; + if (object.pixelFormat != null) + message.pixelFormat = String(object.pixelFormat); + if (object.rateControlMode != null) + message.rateControlMode = String(object.rateControlMode); + if (object.crfLevel != null) + message.crfLevel = object.crfLevel | 0; + if (object.allowOpenGop != null) + message.allowOpenGop = Boolean(object.allowOpenGop); + if (object.gopFrameCount != null) + message.gopFrameCount = object.gopFrameCount | 0; + if (object.gopDuration != null) { + if (typeof object.gopDuration !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings.gopDuration: object expected"); + message.gopDuration = $root.google.protobuf.Duration.fromObject(object.gopDuration); + } + if (object.enableTwoPass != null) + message.enableTwoPass = Boolean(object.enableTwoPass); + if (object.vbvSizeBits != null) + message.vbvSizeBits = object.vbvSizeBits | 0; + if (object.vbvFullnessBits != null) + message.vbvFullnessBits = object.vbvFullnessBits | 0; + if (object.entropyCoder != null) + message.entropyCoder = String(object.entropyCoder); + if (object.bPyramid != null) + message.bPyramid = Boolean(object.bPyramid); + if (object.bFrameCount != null) + message.bFrameCount = object.bFrameCount | 0; + if (object.aqStrength != null) + message.aqStrength = Number(object.aqStrength); + if (object.profile != null) + message.profile = String(object.profile); + if (object.tune != null) + message.tune = String(object.tune); + if (object.preset != null) + message.preset = String(object.preset); + return message; + }; + + /** + * Creates a plain object from a H264CodecSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @static + * @param {google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings} message H264CodecSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + H264CodecSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.widthPixels = 0; + object.heightPixels = 0; + object.frameRate = 0; + object.bitrateBps = 0; + object.pixelFormat = ""; + object.rateControlMode = ""; + object.crfLevel = 0; + object.allowOpenGop = false; + object.enableTwoPass = false; + object.vbvSizeBits = 0; + object.vbvFullnessBits = 0; + object.entropyCoder = ""; + object.bPyramid = false; + object.bFrameCount = 0; + object.aqStrength = 0; + object.profile = ""; + object.tune = ""; + object.preset = ""; + } + if (message.widthPixels != null && message.hasOwnProperty("widthPixels")) + object.widthPixels = message.widthPixels; + if (message.heightPixels != null && message.hasOwnProperty("heightPixels")) + object.heightPixels = message.heightPixels; + if (message.frameRate != null && message.hasOwnProperty("frameRate")) + object.frameRate = options.json && !isFinite(message.frameRate) ? String(message.frameRate) : message.frameRate; + if (message.bitrateBps != null && message.hasOwnProperty("bitrateBps")) + object.bitrateBps = message.bitrateBps; + if (message.pixelFormat != null && message.hasOwnProperty("pixelFormat")) + object.pixelFormat = message.pixelFormat; + if (message.rateControlMode != null && message.hasOwnProperty("rateControlMode")) + object.rateControlMode = message.rateControlMode; + if (message.crfLevel != null && message.hasOwnProperty("crfLevel")) + object.crfLevel = message.crfLevel; + if (message.allowOpenGop != null && message.hasOwnProperty("allowOpenGop")) + object.allowOpenGop = message.allowOpenGop; + if (message.gopFrameCount != null && message.hasOwnProperty("gopFrameCount")) { + object.gopFrameCount = message.gopFrameCount; + if (options.oneofs) + object.gopMode = "gopFrameCount"; + } + if (message.gopDuration != null && message.hasOwnProperty("gopDuration")) { + object.gopDuration = $root.google.protobuf.Duration.toObject(message.gopDuration, options); + if (options.oneofs) + object.gopMode = "gopDuration"; + } + if (message.enableTwoPass != null && message.hasOwnProperty("enableTwoPass")) + object.enableTwoPass = message.enableTwoPass; + if (message.vbvSizeBits != null && message.hasOwnProperty("vbvSizeBits")) + object.vbvSizeBits = message.vbvSizeBits; + if (message.vbvFullnessBits != null && message.hasOwnProperty("vbvFullnessBits")) + object.vbvFullnessBits = message.vbvFullnessBits; + if (message.entropyCoder != null && message.hasOwnProperty("entropyCoder")) + object.entropyCoder = message.entropyCoder; + if (message.bPyramid != null && message.hasOwnProperty("bPyramid")) + object.bPyramid = message.bPyramid; + if (message.bFrameCount != null && message.hasOwnProperty("bFrameCount")) + object.bFrameCount = message.bFrameCount; + if (message.aqStrength != null && message.hasOwnProperty("aqStrength")) + object.aqStrength = options.json && !isFinite(message.aqStrength) ? String(message.aqStrength) : message.aqStrength; + if (message.profile != null && message.hasOwnProperty("profile")) + object.profile = message.profile; + if (message.tune != null && message.hasOwnProperty("tune")) + object.tune = message.tune; + if (message.preset != null && message.hasOwnProperty("preset")) + object.preset = message.preset; + return object; + }; + + /** + * Converts this H264CodecSettings to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @instance + * @returns {Object.} JSON object + */ + H264CodecSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return H264CodecSettings; + })(); + + VideoStream.H265CodecSettings = (function() { + + /** + * Properties of a H265CodecSettings. + * @memberof google.cloud.video.transcoder.v1.VideoStream + * @interface IH265CodecSettings + * @property {number|null} [widthPixels] H265CodecSettings widthPixels + * @property {number|null} [heightPixels] H265CodecSettings heightPixels + * @property {number|null} [frameRate] H265CodecSettings frameRate + * @property {number|null} [bitrateBps] H265CodecSettings bitrateBps + * @property {string|null} [pixelFormat] H265CodecSettings pixelFormat + * @property {string|null} [rateControlMode] H265CodecSettings rateControlMode + * @property {number|null} [crfLevel] H265CodecSettings crfLevel + * @property {boolean|null} [allowOpenGop] H265CodecSettings allowOpenGop + * @property {number|null} [gopFrameCount] H265CodecSettings gopFrameCount + * @property {google.protobuf.IDuration|null} [gopDuration] H265CodecSettings gopDuration + * @property {boolean|null} [enableTwoPass] H265CodecSettings enableTwoPass + * @property {number|null} [vbvSizeBits] H265CodecSettings vbvSizeBits + * @property {number|null} [vbvFullnessBits] H265CodecSettings vbvFullnessBits + * @property {boolean|null} [bPyramid] H265CodecSettings bPyramid + * @property {number|null} [bFrameCount] H265CodecSettings bFrameCount + * @property {number|null} [aqStrength] H265CodecSettings aqStrength + * @property {string|null} [profile] H265CodecSettings profile + * @property {string|null} [tune] H265CodecSettings tune + * @property {string|null} [preset] H265CodecSettings preset + */ + + /** + * Constructs a new H265CodecSettings. + * @memberof google.cloud.video.transcoder.v1.VideoStream + * @classdesc Represents a H265CodecSettings. + * @implements IH265CodecSettings + * @constructor + * @param {google.cloud.video.transcoder.v1.VideoStream.IH265CodecSettings=} [properties] Properties to set + */ + function H265CodecSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * H265CodecSettings widthPixels. + * @member {number} widthPixels + * @memberof google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + * @instance + */ + H265CodecSettings.prototype.widthPixels = 0; + + /** + * H265CodecSettings heightPixels. + * @member {number} heightPixels + * @memberof google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + * @instance + */ + H265CodecSettings.prototype.heightPixels = 0; + + /** + * H265CodecSettings frameRate. + * @member {number} frameRate + * @memberof google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + * @instance + */ + H265CodecSettings.prototype.frameRate = 0; + + /** + * H265CodecSettings bitrateBps. + * @member {number} bitrateBps + * @memberof google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + * @instance + */ + H265CodecSettings.prototype.bitrateBps = 0; + + /** + * H265CodecSettings pixelFormat. + * @member {string} pixelFormat + * @memberof google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + * @instance + */ + H265CodecSettings.prototype.pixelFormat = ""; + + /** + * H265CodecSettings rateControlMode. + * @member {string} rateControlMode + * @memberof google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + * @instance + */ + H265CodecSettings.prototype.rateControlMode = ""; + + /** + * H265CodecSettings crfLevel. + * @member {number} crfLevel + * @memberof google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + * @instance + */ + H265CodecSettings.prototype.crfLevel = 0; + + /** + * H265CodecSettings allowOpenGop. + * @member {boolean} allowOpenGop + * @memberof google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + * @instance + */ + H265CodecSettings.prototype.allowOpenGop = false; + + /** + * H265CodecSettings gopFrameCount. + * @member {number|null|undefined} gopFrameCount + * @memberof google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + * @instance + */ + H265CodecSettings.prototype.gopFrameCount = null; + + /** + * H265CodecSettings gopDuration. + * @member {google.protobuf.IDuration|null|undefined} gopDuration + * @memberof google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + * @instance + */ + H265CodecSettings.prototype.gopDuration = null; + + /** + * H265CodecSettings enableTwoPass. + * @member {boolean} enableTwoPass + * @memberof google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + * @instance + */ + H265CodecSettings.prototype.enableTwoPass = false; + + /** + * H265CodecSettings vbvSizeBits. + * @member {number} vbvSizeBits + * @memberof google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + * @instance + */ + H265CodecSettings.prototype.vbvSizeBits = 0; + + /** + * H265CodecSettings vbvFullnessBits. + * @member {number} vbvFullnessBits + * @memberof google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + * @instance + */ + H265CodecSettings.prototype.vbvFullnessBits = 0; + + /** + * H265CodecSettings bPyramid. + * @member {boolean} bPyramid + * @memberof google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + * @instance + */ + H265CodecSettings.prototype.bPyramid = false; + + /** + * H265CodecSettings bFrameCount. + * @member {number} bFrameCount + * @memberof google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + * @instance + */ + H265CodecSettings.prototype.bFrameCount = 0; + + /** + * H265CodecSettings aqStrength. + * @member {number} aqStrength + * @memberof google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + * @instance + */ + H265CodecSettings.prototype.aqStrength = 0; + + /** + * H265CodecSettings profile. + * @member {string} profile + * @memberof google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + * @instance + */ + H265CodecSettings.prototype.profile = ""; + + /** + * H265CodecSettings tune. + * @member {string} tune + * @memberof google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + * @instance + */ + H265CodecSettings.prototype.tune = ""; + + /** + * H265CodecSettings preset. + * @member {string} preset + * @memberof google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + * @instance + */ + H265CodecSettings.prototype.preset = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * H265CodecSettings gopMode. + * @member {"gopFrameCount"|"gopDuration"|undefined} gopMode + * @memberof google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + * @instance + */ + Object.defineProperty(H265CodecSettings.prototype, "gopMode", { + get: $util.oneOfGetter($oneOfFields = ["gopFrameCount", "gopDuration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new H265CodecSettings instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + * @static + * @param {google.cloud.video.transcoder.v1.VideoStream.IH265CodecSettings=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings} H265CodecSettings instance + */ + H265CodecSettings.create = function create(properties) { + return new H265CodecSettings(properties); + }; + + /** + * Encodes the specified H265CodecSettings message. Does not implicitly {@link google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + * @static + * @param {google.cloud.video.transcoder.v1.VideoStream.IH265CodecSettings} message H265CodecSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + H265CodecSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.widthPixels != null && Object.hasOwnProperty.call(message, "widthPixels")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.widthPixels); + if (message.heightPixels != null && Object.hasOwnProperty.call(message, "heightPixels")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.heightPixels); + if (message.frameRate != null && Object.hasOwnProperty.call(message, "frameRate")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.frameRate); + if (message.bitrateBps != null && Object.hasOwnProperty.call(message, "bitrateBps")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.bitrateBps); + if (message.pixelFormat != null && Object.hasOwnProperty.call(message, "pixelFormat")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.pixelFormat); + if (message.rateControlMode != null && Object.hasOwnProperty.call(message, "rateControlMode")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.rateControlMode); + if (message.crfLevel != null && Object.hasOwnProperty.call(message, "crfLevel")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.crfLevel); + if (message.allowOpenGop != null && Object.hasOwnProperty.call(message, "allowOpenGop")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.allowOpenGop); + if (message.gopFrameCount != null && Object.hasOwnProperty.call(message, "gopFrameCount")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.gopFrameCount); + if (message.gopDuration != null && Object.hasOwnProperty.call(message, "gopDuration")) + $root.google.protobuf.Duration.encode(message.gopDuration, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.enableTwoPass != null && Object.hasOwnProperty.call(message, "enableTwoPass")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.enableTwoPass); + if (message.vbvSizeBits != null && Object.hasOwnProperty.call(message, "vbvSizeBits")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.vbvSizeBits); + if (message.vbvFullnessBits != null && Object.hasOwnProperty.call(message, "vbvFullnessBits")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.vbvFullnessBits); + if (message.bPyramid != null && Object.hasOwnProperty.call(message, "bPyramid")) + writer.uint32(/* id 14, wireType 0 =*/112).bool(message.bPyramid); + if (message.bFrameCount != null && Object.hasOwnProperty.call(message, "bFrameCount")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.bFrameCount); + if (message.aqStrength != null && Object.hasOwnProperty.call(message, "aqStrength")) + writer.uint32(/* id 16, wireType 1 =*/129).double(message.aqStrength); + if (message.profile != null && Object.hasOwnProperty.call(message, "profile")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.profile); + if (message.tune != null && Object.hasOwnProperty.call(message, "tune")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.tune); + if (message.preset != null && Object.hasOwnProperty.call(message, "preset")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.preset); + return writer; + }; + + /** + * Encodes the specified H265CodecSettings message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + * @static + * @param {google.cloud.video.transcoder.v1.VideoStream.IH265CodecSettings} message H265CodecSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + H265CodecSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a H265CodecSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings} H265CodecSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + H265CodecSettings.decode = function 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.transcoder.v1.VideoStream.H265CodecSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.widthPixels = reader.int32(); + break; + case 2: + message.heightPixels = reader.int32(); + break; + case 3: + message.frameRate = reader.double(); + break; + case 4: + message.bitrateBps = reader.int32(); + break; + case 5: + message.pixelFormat = reader.string(); + break; + case 6: + message.rateControlMode = reader.string(); + break; + case 7: + message.crfLevel = reader.int32(); + break; + case 8: + message.allowOpenGop = reader.bool(); + break; + case 9: + message.gopFrameCount = reader.int32(); + break; + case 10: + message.gopDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 11: + message.enableTwoPass = reader.bool(); + break; + case 12: + message.vbvSizeBits = reader.int32(); + break; + case 13: + message.vbvFullnessBits = reader.int32(); + break; + case 14: + message.bPyramid = reader.bool(); + break; + case 15: + message.bFrameCount = reader.int32(); + break; + case 16: + message.aqStrength = reader.double(); + break; + case 17: + message.profile = reader.string(); + break; + case 18: + message.tune = reader.string(); + break; + case 19: + message.preset = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a H265CodecSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings} H265CodecSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + H265CodecSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a H265CodecSettings message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + H265CodecSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.widthPixels != null && message.hasOwnProperty("widthPixels")) + if (!$util.isInteger(message.widthPixels)) + return "widthPixels: integer expected"; + if (message.heightPixels != null && message.hasOwnProperty("heightPixels")) + if (!$util.isInteger(message.heightPixels)) + return "heightPixels: integer expected"; + if (message.frameRate != null && message.hasOwnProperty("frameRate")) + if (typeof message.frameRate !== "number") + return "frameRate: number expected"; + if (message.bitrateBps != null && message.hasOwnProperty("bitrateBps")) + if (!$util.isInteger(message.bitrateBps)) + return "bitrateBps: integer expected"; + if (message.pixelFormat != null && message.hasOwnProperty("pixelFormat")) + if (!$util.isString(message.pixelFormat)) + return "pixelFormat: string expected"; + if (message.rateControlMode != null && message.hasOwnProperty("rateControlMode")) + if (!$util.isString(message.rateControlMode)) + return "rateControlMode: string expected"; + if (message.crfLevel != null && message.hasOwnProperty("crfLevel")) + if (!$util.isInteger(message.crfLevel)) + return "crfLevel: integer expected"; + if (message.allowOpenGop != null && message.hasOwnProperty("allowOpenGop")) + if (typeof message.allowOpenGop !== "boolean") + return "allowOpenGop: boolean expected"; + if (message.gopFrameCount != null && message.hasOwnProperty("gopFrameCount")) { + properties.gopMode = 1; + if (!$util.isInteger(message.gopFrameCount)) + return "gopFrameCount: integer expected"; + } + if (message.gopDuration != null && message.hasOwnProperty("gopDuration")) { + if (properties.gopMode === 1) + return "gopMode: multiple values"; + properties.gopMode = 1; + { + var error = $root.google.protobuf.Duration.verify(message.gopDuration); + if (error) + return "gopDuration." + error; + } + } + if (message.enableTwoPass != null && message.hasOwnProperty("enableTwoPass")) + if (typeof message.enableTwoPass !== "boolean") + return "enableTwoPass: boolean expected"; + if (message.vbvSizeBits != null && message.hasOwnProperty("vbvSizeBits")) + if (!$util.isInteger(message.vbvSizeBits)) + return "vbvSizeBits: integer expected"; + if (message.vbvFullnessBits != null && message.hasOwnProperty("vbvFullnessBits")) + if (!$util.isInteger(message.vbvFullnessBits)) + return "vbvFullnessBits: integer expected"; + if (message.bPyramid != null && message.hasOwnProperty("bPyramid")) + if (typeof message.bPyramid !== "boolean") + return "bPyramid: boolean expected"; + if (message.bFrameCount != null && message.hasOwnProperty("bFrameCount")) + if (!$util.isInteger(message.bFrameCount)) + return "bFrameCount: integer expected"; + if (message.aqStrength != null && message.hasOwnProperty("aqStrength")) + if (typeof message.aqStrength !== "number") + return "aqStrength: number expected"; + if (message.profile != null && message.hasOwnProperty("profile")) + if (!$util.isString(message.profile)) + return "profile: string expected"; + if (message.tune != null && message.hasOwnProperty("tune")) + if (!$util.isString(message.tune)) + return "tune: string expected"; + if (message.preset != null && message.hasOwnProperty("preset")) + if (!$util.isString(message.preset)) + return "preset: string expected"; + return null; + }; + + /** + * Creates a H265CodecSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings} H265CodecSettings + */ + H265CodecSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings) + return object; + var message = new $root.google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings(); + if (object.widthPixels != null) + message.widthPixels = object.widthPixels | 0; + if (object.heightPixels != null) + message.heightPixels = object.heightPixels | 0; + if (object.frameRate != null) + message.frameRate = Number(object.frameRate); + if (object.bitrateBps != null) + message.bitrateBps = object.bitrateBps | 0; + if (object.pixelFormat != null) + message.pixelFormat = String(object.pixelFormat); + if (object.rateControlMode != null) + message.rateControlMode = String(object.rateControlMode); + if (object.crfLevel != null) + message.crfLevel = object.crfLevel | 0; + if (object.allowOpenGop != null) + message.allowOpenGop = Boolean(object.allowOpenGop); + if (object.gopFrameCount != null) + message.gopFrameCount = object.gopFrameCount | 0; + if (object.gopDuration != null) { + if (typeof object.gopDuration !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings.gopDuration: object expected"); + message.gopDuration = $root.google.protobuf.Duration.fromObject(object.gopDuration); + } + if (object.enableTwoPass != null) + message.enableTwoPass = Boolean(object.enableTwoPass); + if (object.vbvSizeBits != null) + message.vbvSizeBits = object.vbvSizeBits | 0; + if (object.vbvFullnessBits != null) + message.vbvFullnessBits = object.vbvFullnessBits | 0; + if (object.bPyramid != null) + message.bPyramid = Boolean(object.bPyramid); + if (object.bFrameCount != null) + message.bFrameCount = object.bFrameCount | 0; + if (object.aqStrength != null) + message.aqStrength = Number(object.aqStrength); + if (object.profile != null) + message.profile = String(object.profile); + if (object.tune != null) + message.tune = String(object.tune); + if (object.preset != null) + message.preset = String(object.preset); + return message; + }; + + /** + * Creates a plain object from a H265CodecSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + * @static + * @param {google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings} message H265CodecSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + H265CodecSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.widthPixels = 0; + object.heightPixels = 0; + object.frameRate = 0; + object.bitrateBps = 0; + object.pixelFormat = ""; + object.rateControlMode = ""; + object.crfLevel = 0; + object.allowOpenGop = false; + object.enableTwoPass = false; + object.vbvSizeBits = 0; + object.vbvFullnessBits = 0; + object.bPyramid = false; + object.bFrameCount = 0; + object.aqStrength = 0; + object.profile = ""; + object.tune = ""; + object.preset = ""; + } + if (message.widthPixels != null && message.hasOwnProperty("widthPixels")) + object.widthPixels = message.widthPixels; + if (message.heightPixels != null && message.hasOwnProperty("heightPixels")) + object.heightPixels = message.heightPixels; + if (message.frameRate != null && message.hasOwnProperty("frameRate")) + object.frameRate = options.json && !isFinite(message.frameRate) ? String(message.frameRate) : message.frameRate; + if (message.bitrateBps != null && message.hasOwnProperty("bitrateBps")) + object.bitrateBps = message.bitrateBps; + if (message.pixelFormat != null && message.hasOwnProperty("pixelFormat")) + object.pixelFormat = message.pixelFormat; + if (message.rateControlMode != null && message.hasOwnProperty("rateControlMode")) + object.rateControlMode = message.rateControlMode; + if (message.crfLevel != null && message.hasOwnProperty("crfLevel")) + object.crfLevel = message.crfLevel; + if (message.allowOpenGop != null && message.hasOwnProperty("allowOpenGop")) + object.allowOpenGop = message.allowOpenGop; + if (message.gopFrameCount != null && message.hasOwnProperty("gopFrameCount")) { + object.gopFrameCount = message.gopFrameCount; + if (options.oneofs) + object.gopMode = "gopFrameCount"; + } + if (message.gopDuration != null && message.hasOwnProperty("gopDuration")) { + object.gopDuration = $root.google.protobuf.Duration.toObject(message.gopDuration, options); + if (options.oneofs) + object.gopMode = "gopDuration"; + } + if (message.enableTwoPass != null && message.hasOwnProperty("enableTwoPass")) + object.enableTwoPass = message.enableTwoPass; + if (message.vbvSizeBits != null && message.hasOwnProperty("vbvSizeBits")) + object.vbvSizeBits = message.vbvSizeBits; + if (message.vbvFullnessBits != null && message.hasOwnProperty("vbvFullnessBits")) + object.vbvFullnessBits = message.vbvFullnessBits; + if (message.bPyramid != null && message.hasOwnProperty("bPyramid")) + object.bPyramid = message.bPyramid; + if (message.bFrameCount != null && message.hasOwnProperty("bFrameCount")) + object.bFrameCount = message.bFrameCount; + if (message.aqStrength != null && message.hasOwnProperty("aqStrength")) + object.aqStrength = options.json && !isFinite(message.aqStrength) ? String(message.aqStrength) : message.aqStrength; + if (message.profile != null && message.hasOwnProperty("profile")) + object.profile = message.profile; + if (message.tune != null && message.hasOwnProperty("tune")) + object.tune = message.tune; + if (message.preset != null && message.hasOwnProperty("preset")) + object.preset = message.preset; + return object; + }; + + /** + * Converts this H265CodecSettings to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + * @instance + * @returns {Object.} JSON object + */ + H265CodecSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return H265CodecSettings; + })(); + + VideoStream.Vp9CodecSettings = (function() { + + /** + * Properties of a Vp9CodecSettings. + * @memberof google.cloud.video.transcoder.v1.VideoStream + * @interface IVp9CodecSettings + * @property {number|null} [widthPixels] Vp9CodecSettings widthPixels + * @property {number|null} [heightPixels] Vp9CodecSettings heightPixels + * @property {number|null} [frameRate] Vp9CodecSettings frameRate + * @property {number|null} [bitrateBps] Vp9CodecSettings bitrateBps + * @property {string|null} [pixelFormat] Vp9CodecSettings pixelFormat + * @property {string|null} [rateControlMode] Vp9CodecSettings rateControlMode + * @property {number|null} [crfLevel] Vp9CodecSettings crfLevel + * @property {number|null} [gopFrameCount] Vp9CodecSettings gopFrameCount + * @property {google.protobuf.IDuration|null} [gopDuration] Vp9CodecSettings gopDuration + * @property {string|null} [profile] Vp9CodecSettings profile + */ + + /** + * Constructs a new Vp9CodecSettings. + * @memberof google.cloud.video.transcoder.v1.VideoStream + * @classdesc Represents a Vp9CodecSettings. + * @implements IVp9CodecSettings + * @constructor + * @param {google.cloud.video.transcoder.v1.VideoStream.IVp9CodecSettings=} [properties] Properties to set + */ + function Vp9CodecSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Vp9CodecSettings widthPixels. + * @member {number} widthPixels + * @memberof google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings + * @instance + */ + Vp9CodecSettings.prototype.widthPixels = 0; + + /** + * Vp9CodecSettings heightPixels. + * @member {number} heightPixels + * @memberof google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings + * @instance + */ + Vp9CodecSettings.prototype.heightPixels = 0; + + /** + * Vp9CodecSettings frameRate. + * @member {number} frameRate + * @memberof google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings + * @instance + */ + Vp9CodecSettings.prototype.frameRate = 0; + + /** + * Vp9CodecSettings bitrateBps. + * @member {number} bitrateBps + * @memberof google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings + * @instance + */ + Vp9CodecSettings.prototype.bitrateBps = 0; + + /** + * Vp9CodecSettings pixelFormat. + * @member {string} pixelFormat + * @memberof google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings + * @instance + */ + Vp9CodecSettings.prototype.pixelFormat = ""; + + /** + * Vp9CodecSettings rateControlMode. + * @member {string} rateControlMode + * @memberof google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings + * @instance + */ + Vp9CodecSettings.prototype.rateControlMode = ""; + + /** + * Vp9CodecSettings crfLevel. + * @member {number} crfLevel + * @memberof google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings + * @instance + */ + Vp9CodecSettings.prototype.crfLevel = 0; + + /** + * Vp9CodecSettings gopFrameCount. + * @member {number|null|undefined} gopFrameCount + * @memberof google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings + * @instance + */ + Vp9CodecSettings.prototype.gopFrameCount = null; + + /** + * Vp9CodecSettings gopDuration. + * @member {google.protobuf.IDuration|null|undefined} gopDuration + * @memberof google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings + * @instance + */ + Vp9CodecSettings.prototype.gopDuration = null; + + /** + * Vp9CodecSettings profile. + * @member {string} profile + * @memberof google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings + * @instance + */ + Vp9CodecSettings.prototype.profile = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Vp9CodecSettings gopMode. + * @member {"gopFrameCount"|"gopDuration"|undefined} gopMode + * @memberof google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings + * @instance + */ + Object.defineProperty(Vp9CodecSettings.prototype, "gopMode", { + get: $util.oneOfGetter($oneOfFields = ["gopFrameCount", "gopDuration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Vp9CodecSettings instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings + * @static + * @param {google.cloud.video.transcoder.v1.VideoStream.IVp9CodecSettings=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings} Vp9CodecSettings instance + */ + Vp9CodecSettings.create = function create(properties) { + return new Vp9CodecSettings(properties); + }; + + /** + * Encodes the specified Vp9CodecSettings message. Does not implicitly {@link google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings + * @static + * @param {google.cloud.video.transcoder.v1.VideoStream.IVp9CodecSettings} message Vp9CodecSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Vp9CodecSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.widthPixels != null && Object.hasOwnProperty.call(message, "widthPixels")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.widthPixels); + if (message.heightPixels != null && Object.hasOwnProperty.call(message, "heightPixels")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.heightPixels); + if (message.frameRate != null && Object.hasOwnProperty.call(message, "frameRate")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.frameRate); + if (message.bitrateBps != null && Object.hasOwnProperty.call(message, "bitrateBps")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.bitrateBps); + if (message.pixelFormat != null && Object.hasOwnProperty.call(message, "pixelFormat")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.pixelFormat); + if (message.rateControlMode != null && Object.hasOwnProperty.call(message, "rateControlMode")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.rateControlMode); + if (message.crfLevel != null && Object.hasOwnProperty.call(message, "crfLevel")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.crfLevel); + if (message.gopFrameCount != null && Object.hasOwnProperty.call(message, "gopFrameCount")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.gopFrameCount); + if (message.gopDuration != null && Object.hasOwnProperty.call(message, "gopDuration")) + $root.google.protobuf.Duration.encode(message.gopDuration, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.profile != null && Object.hasOwnProperty.call(message, "profile")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.profile); + return writer; + }; + + /** + * Encodes the specified Vp9CodecSettings message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings + * @static + * @param {google.cloud.video.transcoder.v1.VideoStream.IVp9CodecSettings} message Vp9CodecSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Vp9CodecSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Vp9CodecSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings} Vp9CodecSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Vp9CodecSettings.decode = function 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.transcoder.v1.VideoStream.Vp9CodecSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.widthPixels = reader.int32(); + break; + case 2: + message.heightPixels = reader.int32(); + break; + case 3: + message.frameRate = reader.double(); + break; + case 4: + message.bitrateBps = reader.int32(); + break; + case 5: + message.pixelFormat = reader.string(); + break; + case 6: + message.rateControlMode = reader.string(); + break; + case 7: + message.crfLevel = reader.int32(); + break; + case 8: + message.gopFrameCount = reader.int32(); + break; + case 9: + message.gopDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 10: + message.profile = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Vp9CodecSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings} Vp9CodecSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Vp9CodecSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Vp9CodecSettings message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Vp9CodecSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.widthPixels != null && message.hasOwnProperty("widthPixels")) + if (!$util.isInteger(message.widthPixels)) + return "widthPixels: integer expected"; + if (message.heightPixels != null && message.hasOwnProperty("heightPixels")) + if (!$util.isInteger(message.heightPixels)) + return "heightPixels: integer expected"; + if (message.frameRate != null && message.hasOwnProperty("frameRate")) + if (typeof message.frameRate !== "number") + return "frameRate: number expected"; + if (message.bitrateBps != null && message.hasOwnProperty("bitrateBps")) + if (!$util.isInteger(message.bitrateBps)) + return "bitrateBps: integer expected"; + if (message.pixelFormat != null && message.hasOwnProperty("pixelFormat")) + if (!$util.isString(message.pixelFormat)) + return "pixelFormat: string expected"; + if (message.rateControlMode != null && message.hasOwnProperty("rateControlMode")) + if (!$util.isString(message.rateControlMode)) + return "rateControlMode: string expected"; + if (message.crfLevel != null && message.hasOwnProperty("crfLevel")) + if (!$util.isInteger(message.crfLevel)) + return "crfLevel: integer expected"; + if (message.gopFrameCount != null && message.hasOwnProperty("gopFrameCount")) { + properties.gopMode = 1; + if (!$util.isInteger(message.gopFrameCount)) + return "gopFrameCount: integer expected"; + } + if (message.gopDuration != null && message.hasOwnProperty("gopDuration")) { + if (properties.gopMode === 1) + return "gopMode: multiple values"; + properties.gopMode = 1; + { + var error = $root.google.protobuf.Duration.verify(message.gopDuration); + if (error) + return "gopDuration." + error; + } + } + if (message.profile != null && message.hasOwnProperty("profile")) + if (!$util.isString(message.profile)) + return "profile: string expected"; + return null; + }; + + /** + * Creates a Vp9CodecSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings} Vp9CodecSettings + */ + Vp9CodecSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings) + return object; + var message = new $root.google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings(); + if (object.widthPixels != null) + message.widthPixels = object.widthPixels | 0; + if (object.heightPixels != null) + message.heightPixels = object.heightPixels | 0; + if (object.frameRate != null) + message.frameRate = Number(object.frameRate); + if (object.bitrateBps != null) + message.bitrateBps = object.bitrateBps | 0; + if (object.pixelFormat != null) + message.pixelFormat = String(object.pixelFormat); + if (object.rateControlMode != null) + message.rateControlMode = String(object.rateControlMode); + if (object.crfLevel != null) + message.crfLevel = object.crfLevel | 0; + if (object.gopFrameCount != null) + message.gopFrameCount = object.gopFrameCount | 0; + if (object.gopDuration != null) { + if (typeof object.gopDuration !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings.gopDuration: object expected"); + message.gopDuration = $root.google.protobuf.Duration.fromObject(object.gopDuration); + } + if (object.profile != null) + message.profile = String(object.profile); + return message; + }; + + /** + * Creates a plain object from a Vp9CodecSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings + * @static + * @param {google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings} message Vp9CodecSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Vp9CodecSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.widthPixels = 0; + object.heightPixels = 0; + object.frameRate = 0; + object.bitrateBps = 0; + object.pixelFormat = ""; + object.rateControlMode = ""; + object.crfLevel = 0; + object.profile = ""; + } + if (message.widthPixels != null && message.hasOwnProperty("widthPixels")) + object.widthPixels = message.widthPixels; + if (message.heightPixels != null && message.hasOwnProperty("heightPixels")) + object.heightPixels = message.heightPixels; + if (message.frameRate != null && message.hasOwnProperty("frameRate")) + object.frameRate = options.json && !isFinite(message.frameRate) ? String(message.frameRate) : message.frameRate; + if (message.bitrateBps != null && message.hasOwnProperty("bitrateBps")) + object.bitrateBps = message.bitrateBps; + if (message.pixelFormat != null && message.hasOwnProperty("pixelFormat")) + object.pixelFormat = message.pixelFormat; + if (message.rateControlMode != null && message.hasOwnProperty("rateControlMode")) + object.rateControlMode = message.rateControlMode; + if (message.crfLevel != null && message.hasOwnProperty("crfLevel")) + object.crfLevel = message.crfLevel; + if (message.gopFrameCount != null && message.hasOwnProperty("gopFrameCount")) { + object.gopFrameCount = message.gopFrameCount; + if (options.oneofs) + object.gopMode = "gopFrameCount"; + } + if (message.gopDuration != null && message.hasOwnProperty("gopDuration")) { + object.gopDuration = $root.google.protobuf.Duration.toObject(message.gopDuration, options); + if (options.oneofs) + object.gopMode = "gopDuration"; + } + if (message.profile != null && message.hasOwnProperty("profile")) + object.profile = message.profile; + return object; + }; + + /** + * Converts this Vp9CodecSettings to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings + * @instance + * @returns {Object.} JSON object + */ + Vp9CodecSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Vp9CodecSettings; + })(); + + return VideoStream; + })(); + + v1.AudioStream = (function() { + + /** + * Properties of an AudioStream. + * @memberof google.cloud.video.transcoder.v1 + * @interface IAudioStream + * @property {string|null} [codec] AudioStream codec + * @property {number|null} [bitrateBps] AudioStream bitrateBps + * @property {number|null} [channelCount] AudioStream channelCount + * @property {Array.|null} [channelLayout] AudioStream channelLayout + * @property {Array.|null} [mapping] AudioStream mapping + * @property {number|null} [sampleRateHertz] AudioStream sampleRateHertz + */ + + /** + * Constructs a new AudioStream. + * @memberof google.cloud.video.transcoder.v1 + * @classdesc Represents an AudioStream. + * @implements IAudioStream + * @constructor + * @param {google.cloud.video.transcoder.v1.IAudioStream=} [properties] Properties to set + */ + function AudioStream(properties) { + this.channelLayout = []; + this.mapping = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AudioStream codec. + * @member {string} codec + * @memberof google.cloud.video.transcoder.v1.AudioStream + * @instance + */ + AudioStream.prototype.codec = ""; + + /** + * AudioStream bitrateBps. + * @member {number} bitrateBps + * @memberof google.cloud.video.transcoder.v1.AudioStream + * @instance + */ + AudioStream.prototype.bitrateBps = 0; + + /** + * AudioStream channelCount. + * @member {number} channelCount + * @memberof google.cloud.video.transcoder.v1.AudioStream + * @instance + */ + AudioStream.prototype.channelCount = 0; + + /** + * AudioStream channelLayout. + * @member {Array.} channelLayout + * @memberof google.cloud.video.transcoder.v1.AudioStream + * @instance + */ + AudioStream.prototype.channelLayout = $util.emptyArray; + + /** + * AudioStream mapping. + * @member {Array.} mapping + * @memberof google.cloud.video.transcoder.v1.AudioStream + * @instance + */ + AudioStream.prototype.mapping = $util.emptyArray; + + /** + * AudioStream sampleRateHertz. + * @member {number} sampleRateHertz + * @memberof google.cloud.video.transcoder.v1.AudioStream + * @instance + */ + AudioStream.prototype.sampleRateHertz = 0; + + /** + * Creates a new AudioStream instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.AudioStream + * @static + * @param {google.cloud.video.transcoder.v1.IAudioStream=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.AudioStream} AudioStream instance + */ + AudioStream.create = function create(properties) { + return new AudioStream(properties); + }; + + /** + * Encodes the specified AudioStream message. Does not implicitly {@link google.cloud.video.transcoder.v1.AudioStream.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.AudioStream + * @static + * @param {google.cloud.video.transcoder.v1.IAudioStream} message AudioStream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudioStream.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.codec != null && Object.hasOwnProperty.call(message, "codec")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.codec); + if (message.bitrateBps != null && Object.hasOwnProperty.call(message, "bitrateBps")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.bitrateBps); + if (message.channelCount != null && Object.hasOwnProperty.call(message, "channelCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.channelCount); + if (message.channelLayout != null && message.channelLayout.length) + for (var i = 0; i < message.channelLayout.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.channelLayout[i]); + if (message.mapping != null && message.mapping.length) + for (var i = 0; i < message.mapping.length; ++i) + $root.google.cloud.video.transcoder.v1.AudioStream.AudioMapping.encode(message.mapping[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.sampleRateHertz); + return writer; + }; + + /** + * Encodes the specified AudioStream message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.AudioStream.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.AudioStream + * @static + * @param {google.cloud.video.transcoder.v1.IAudioStream} message AudioStream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudioStream.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudioStream message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.AudioStream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.AudioStream} AudioStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudioStream.decode = function 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.transcoder.v1.AudioStream(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.codec = reader.string(); + break; + case 2: + message.bitrateBps = reader.int32(); + break; + case 3: + message.channelCount = reader.int32(); + break; + case 4: + if (!(message.channelLayout && message.channelLayout.length)) + message.channelLayout = []; + message.channelLayout.push(reader.string()); + break; + case 5: + if (!(message.mapping && message.mapping.length)) + message.mapping = []; + message.mapping.push($root.google.cloud.video.transcoder.v1.AudioStream.AudioMapping.decode(reader, reader.uint32())); + break; + case 6: + message.sampleRateHertz = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudioStream message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.AudioStream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.AudioStream} AudioStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudioStream.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudioStream message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.AudioStream + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudioStream.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.codec != null && message.hasOwnProperty("codec")) + if (!$util.isString(message.codec)) + return "codec: string expected"; + if (message.bitrateBps != null && message.hasOwnProperty("bitrateBps")) + if (!$util.isInteger(message.bitrateBps)) + return "bitrateBps: integer expected"; + if (message.channelCount != null && message.hasOwnProperty("channelCount")) + if (!$util.isInteger(message.channelCount)) + return "channelCount: integer expected"; + if (message.channelLayout != null && message.hasOwnProperty("channelLayout")) { + if (!Array.isArray(message.channelLayout)) + return "channelLayout: array expected"; + for (var i = 0; i < message.channelLayout.length; ++i) + if (!$util.isString(message.channelLayout[i])) + return "channelLayout: string[] expected"; + } + if (message.mapping != null && message.hasOwnProperty("mapping")) { + if (!Array.isArray(message.mapping)) + return "mapping: array expected"; + for (var i = 0; i < message.mapping.length; ++i) { + var error = $root.google.cloud.video.transcoder.v1.AudioStream.AudioMapping.verify(message.mapping[i]); + if (error) + return "mapping." + error; + } + } + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + if (!$util.isInteger(message.sampleRateHertz)) + return "sampleRateHertz: integer expected"; + return null; + }; + + /** + * Creates an AudioStream message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.AudioStream + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.AudioStream} AudioStream + */ + AudioStream.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.AudioStream) + return object; + var message = new $root.google.cloud.video.transcoder.v1.AudioStream(); + if (object.codec != null) + message.codec = String(object.codec); + if (object.bitrateBps != null) + message.bitrateBps = object.bitrateBps | 0; + if (object.channelCount != null) + message.channelCount = object.channelCount | 0; + if (object.channelLayout) { + if (!Array.isArray(object.channelLayout)) + throw TypeError(".google.cloud.video.transcoder.v1.AudioStream.channelLayout: array expected"); + message.channelLayout = []; + for (var i = 0; i < object.channelLayout.length; ++i) + message.channelLayout[i] = String(object.channelLayout[i]); + } + if (object.mapping) { + if (!Array.isArray(object.mapping)) + throw TypeError(".google.cloud.video.transcoder.v1.AudioStream.mapping: array expected"); + message.mapping = []; + for (var i = 0; i < object.mapping.length; ++i) { + if (typeof object.mapping[i] !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.AudioStream.mapping: object expected"); + message.mapping[i] = $root.google.cloud.video.transcoder.v1.AudioStream.AudioMapping.fromObject(object.mapping[i]); + } + } + if (object.sampleRateHertz != null) + message.sampleRateHertz = object.sampleRateHertz | 0; + return message; + }; + + /** + * Creates a plain object from an AudioStream message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.AudioStream + * @static + * @param {google.cloud.video.transcoder.v1.AudioStream} message AudioStream + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudioStream.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.channelLayout = []; + object.mapping = []; + } + if (options.defaults) { + object.codec = ""; + object.bitrateBps = 0; + object.channelCount = 0; + object.sampleRateHertz = 0; + } + if (message.codec != null && message.hasOwnProperty("codec")) + object.codec = message.codec; + if (message.bitrateBps != null && message.hasOwnProperty("bitrateBps")) + object.bitrateBps = message.bitrateBps; + if (message.channelCount != null && message.hasOwnProperty("channelCount")) + object.channelCount = message.channelCount; + if (message.channelLayout && message.channelLayout.length) { + object.channelLayout = []; + for (var j = 0; j < message.channelLayout.length; ++j) + object.channelLayout[j] = message.channelLayout[j]; + } + if (message.mapping && message.mapping.length) { + object.mapping = []; + for (var j = 0; j < message.mapping.length; ++j) + object.mapping[j] = $root.google.cloud.video.transcoder.v1.AudioStream.AudioMapping.toObject(message.mapping[j], options); + } + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + object.sampleRateHertz = message.sampleRateHertz; + return object; + }; + + /** + * Converts this AudioStream to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.AudioStream + * @instance + * @returns {Object.} JSON object + */ + AudioStream.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + AudioStream.AudioMapping = (function() { + + /** + * Properties of an AudioMapping. + * @memberof google.cloud.video.transcoder.v1.AudioStream + * @interface IAudioMapping + * @property {string|null} [atomKey] AudioMapping atomKey + * @property {string|null} [inputKey] AudioMapping inputKey + * @property {number|null} [inputTrack] AudioMapping inputTrack + * @property {number|null} [inputChannel] AudioMapping inputChannel + * @property {number|null} [outputChannel] AudioMapping outputChannel + * @property {number|null} [gainDb] AudioMapping gainDb + */ + + /** + * Constructs a new AudioMapping. + * @memberof google.cloud.video.transcoder.v1.AudioStream + * @classdesc Represents an AudioMapping. + * @implements IAudioMapping + * @constructor + * @param {google.cloud.video.transcoder.v1.AudioStream.IAudioMapping=} [properties] Properties to set + */ + function AudioMapping(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AudioMapping atomKey. + * @member {string} atomKey + * @memberof google.cloud.video.transcoder.v1.AudioStream.AudioMapping + * @instance + */ + AudioMapping.prototype.atomKey = ""; + + /** + * AudioMapping inputKey. + * @member {string} inputKey + * @memberof google.cloud.video.transcoder.v1.AudioStream.AudioMapping + * @instance + */ + AudioMapping.prototype.inputKey = ""; + + /** + * AudioMapping inputTrack. + * @member {number} inputTrack + * @memberof google.cloud.video.transcoder.v1.AudioStream.AudioMapping + * @instance + */ + AudioMapping.prototype.inputTrack = 0; + + /** + * AudioMapping inputChannel. + * @member {number} inputChannel + * @memberof google.cloud.video.transcoder.v1.AudioStream.AudioMapping + * @instance + */ + AudioMapping.prototype.inputChannel = 0; + + /** + * AudioMapping outputChannel. + * @member {number} outputChannel + * @memberof google.cloud.video.transcoder.v1.AudioStream.AudioMapping + * @instance + */ + AudioMapping.prototype.outputChannel = 0; + + /** + * AudioMapping gainDb. + * @member {number} gainDb + * @memberof google.cloud.video.transcoder.v1.AudioStream.AudioMapping + * @instance + */ + AudioMapping.prototype.gainDb = 0; + + /** + * Creates a new AudioMapping instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.AudioStream.AudioMapping + * @static + * @param {google.cloud.video.transcoder.v1.AudioStream.IAudioMapping=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.AudioStream.AudioMapping} AudioMapping instance + */ + AudioMapping.create = function create(properties) { + return new AudioMapping(properties); + }; + + /** + * Encodes the specified AudioMapping message. Does not implicitly {@link google.cloud.video.transcoder.v1.AudioStream.AudioMapping.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.AudioStream.AudioMapping + * @static + * @param {google.cloud.video.transcoder.v1.AudioStream.IAudioMapping} message AudioMapping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudioMapping.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.atomKey != null && Object.hasOwnProperty.call(message, "atomKey")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.atomKey); + if (message.inputKey != null && Object.hasOwnProperty.call(message, "inputKey")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputKey); + if (message.inputTrack != null && Object.hasOwnProperty.call(message, "inputTrack")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.inputTrack); + if (message.inputChannel != null && Object.hasOwnProperty.call(message, "inputChannel")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.inputChannel); + if (message.outputChannel != null && Object.hasOwnProperty.call(message, "outputChannel")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.outputChannel); + if (message.gainDb != null && Object.hasOwnProperty.call(message, "gainDb")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.gainDb); + return writer; + }; + + /** + * Encodes the specified AudioMapping message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.AudioStream.AudioMapping.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.AudioStream.AudioMapping + * @static + * @param {google.cloud.video.transcoder.v1.AudioStream.IAudioMapping} message AudioMapping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudioMapping.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudioMapping message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.AudioStream.AudioMapping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.AudioStream.AudioMapping} AudioMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudioMapping.decode = function 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.transcoder.v1.AudioStream.AudioMapping(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.atomKey = reader.string(); + break; + case 2: + message.inputKey = reader.string(); + break; + case 3: + message.inputTrack = reader.int32(); + break; + case 4: + message.inputChannel = reader.int32(); + break; + case 5: + message.outputChannel = reader.int32(); + break; + case 6: + message.gainDb = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudioMapping message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.AudioStream.AudioMapping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.AudioStream.AudioMapping} AudioMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudioMapping.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudioMapping message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.AudioStream.AudioMapping + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudioMapping.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.atomKey != null && message.hasOwnProperty("atomKey")) + if (!$util.isString(message.atomKey)) + return "atomKey: string expected"; + if (message.inputKey != null && message.hasOwnProperty("inputKey")) + if (!$util.isString(message.inputKey)) + return "inputKey: string expected"; + if (message.inputTrack != null && message.hasOwnProperty("inputTrack")) + if (!$util.isInteger(message.inputTrack)) + return "inputTrack: integer expected"; + if (message.inputChannel != null && message.hasOwnProperty("inputChannel")) + if (!$util.isInteger(message.inputChannel)) + return "inputChannel: integer expected"; + if (message.outputChannel != null && message.hasOwnProperty("outputChannel")) + if (!$util.isInteger(message.outputChannel)) + return "outputChannel: integer expected"; + if (message.gainDb != null && message.hasOwnProperty("gainDb")) + if (typeof message.gainDb !== "number") + return "gainDb: number expected"; + return null; + }; + + /** + * Creates an AudioMapping message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.AudioStream.AudioMapping + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.AudioStream.AudioMapping} AudioMapping + */ + AudioMapping.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.AudioStream.AudioMapping) + return object; + var message = new $root.google.cloud.video.transcoder.v1.AudioStream.AudioMapping(); + if (object.atomKey != null) + message.atomKey = String(object.atomKey); + if (object.inputKey != null) + message.inputKey = String(object.inputKey); + if (object.inputTrack != null) + message.inputTrack = object.inputTrack | 0; + if (object.inputChannel != null) + message.inputChannel = object.inputChannel | 0; + if (object.outputChannel != null) + message.outputChannel = object.outputChannel | 0; + if (object.gainDb != null) + message.gainDb = Number(object.gainDb); + return message; + }; + + /** + * Creates a plain object from an AudioMapping message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.AudioStream.AudioMapping + * @static + * @param {google.cloud.video.transcoder.v1.AudioStream.AudioMapping} message AudioMapping + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudioMapping.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.atomKey = ""; + object.inputKey = ""; + object.inputTrack = 0; + object.inputChannel = 0; + object.outputChannel = 0; + object.gainDb = 0; + } + if (message.atomKey != null && message.hasOwnProperty("atomKey")) + object.atomKey = message.atomKey; + if (message.inputKey != null && message.hasOwnProperty("inputKey")) + object.inputKey = message.inputKey; + if (message.inputTrack != null && message.hasOwnProperty("inputTrack")) + object.inputTrack = message.inputTrack; + if (message.inputChannel != null && message.hasOwnProperty("inputChannel")) + object.inputChannel = message.inputChannel; + if (message.outputChannel != null && message.hasOwnProperty("outputChannel")) + object.outputChannel = message.outputChannel; + if (message.gainDb != null && message.hasOwnProperty("gainDb")) + object.gainDb = options.json && !isFinite(message.gainDb) ? String(message.gainDb) : message.gainDb; + return object; + }; + + /** + * Converts this AudioMapping to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.AudioStream.AudioMapping + * @instance + * @returns {Object.} JSON object + */ + AudioMapping.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AudioMapping; + })(); + + return AudioStream; + })(); + + v1.TextStream = (function() { + + /** + * Properties of a TextStream. + * @memberof google.cloud.video.transcoder.v1 + * @interface ITextStream + * @property {string|null} [codec] TextStream codec + * @property {Array.|null} [mapping] TextStream mapping + */ + + /** + * Constructs a new TextStream. + * @memberof google.cloud.video.transcoder.v1 + * @classdesc Represents a TextStream. + * @implements ITextStream + * @constructor + * @param {google.cloud.video.transcoder.v1.ITextStream=} [properties] Properties to set + */ + function TextStream(properties) { + this.mapping = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TextStream codec. + * @member {string} codec + * @memberof google.cloud.video.transcoder.v1.TextStream + * @instance + */ + TextStream.prototype.codec = ""; + + /** + * TextStream mapping. + * @member {Array.} mapping + * @memberof google.cloud.video.transcoder.v1.TextStream + * @instance + */ + TextStream.prototype.mapping = $util.emptyArray; + + /** + * Creates a new TextStream instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.TextStream + * @static + * @param {google.cloud.video.transcoder.v1.ITextStream=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.TextStream} TextStream instance + */ + TextStream.create = function create(properties) { + return new TextStream(properties); + }; + + /** + * Encodes the specified TextStream message. Does not implicitly {@link google.cloud.video.transcoder.v1.TextStream.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.TextStream + * @static + * @param {google.cloud.video.transcoder.v1.ITextStream} message TextStream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextStream.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.codec != null && Object.hasOwnProperty.call(message, "codec")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.codec); + if (message.mapping != null && message.mapping.length) + for (var i = 0; i < message.mapping.length; ++i) + $root.google.cloud.video.transcoder.v1.TextStream.TextMapping.encode(message.mapping[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TextStream message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.TextStream.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.TextStream + * @static + * @param {google.cloud.video.transcoder.v1.ITextStream} message TextStream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextStream.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TextStream message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.TextStream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.TextStream} TextStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextStream.decode = function 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.transcoder.v1.TextStream(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.codec = reader.string(); + break; + case 3: + if (!(message.mapping && message.mapping.length)) + message.mapping = []; + message.mapping.push($root.google.cloud.video.transcoder.v1.TextStream.TextMapping.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TextStream message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.TextStream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.TextStream} TextStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextStream.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TextStream message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.TextStream + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TextStream.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.codec != null && message.hasOwnProperty("codec")) + if (!$util.isString(message.codec)) + return "codec: string expected"; + if (message.mapping != null && message.hasOwnProperty("mapping")) { + if (!Array.isArray(message.mapping)) + return "mapping: array expected"; + for (var i = 0; i < message.mapping.length; ++i) { + var error = $root.google.cloud.video.transcoder.v1.TextStream.TextMapping.verify(message.mapping[i]); + if (error) + return "mapping." + error; + } + } + return null; + }; + + /** + * Creates a TextStream message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.TextStream + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.TextStream} TextStream + */ + TextStream.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.TextStream) + return object; + var message = new $root.google.cloud.video.transcoder.v1.TextStream(); + if (object.codec != null) + message.codec = String(object.codec); + if (object.mapping) { + if (!Array.isArray(object.mapping)) + throw TypeError(".google.cloud.video.transcoder.v1.TextStream.mapping: array expected"); + message.mapping = []; + for (var i = 0; i < object.mapping.length; ++i) { + if (typeof object.mapping[i] !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.TextStream.mapping: object expected"); + message.mapping[i] = $root.google.cloud.video.transcoder.v1.TextStream.TextMapping.fromObject(object.mapping[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a TextStream message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.TextStream + * @static + * @param {google.cloud.video.transcoder.v1.TextStream} message TextStream + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TextStream.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.mapping = []; + if (options.defaults) + object.codec = ""; + if (message.codec != null && message.hasOwnProperty("codec")) + object.codec = message.codec; + if (message.mapping && message.mapping.length) { + object.mapping = []; + for (var j = 0; j < message.mapping.length; ++j) + object.mapping[j] = $root.google.cloud.video.transcoder.v1.TextStream.TextMapping.toObject(message.mapping[j], options); + } + return object; + }; + + /** + * Converts this TextStream to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.TextStream + * @instance + * @returns {Object.} JSON object + */ + TextStream.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + TextStream.TextMapping = (function() { + + /** + * Properties of a TextMapping. + * @memberof google.cloud.video.transcoder.v1.TextStream + * @interface ITextMapping + * @property {string|null} [atomKey] TextMapping atomKey + * @property {string|null} [inputKey] TextMapping inputKey + * @property {number|null} [inputTrack] TextMapping inputTrack + */ + + /** + * Constructs a new TextMapping. + * @memberof google.cloud.video.transcoder.v1.TextStream + * @classdesc Represents a TextMapping. + * @implements ITextMapping + * @constructor + * @param {google.cloud.video.transcoder.v1.TextStream.ITextMapping=} [properties] Properties to set + */ + function TextMapping(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TextMapping atomKey. + * @member {string} atomKey + * @memberof google.cloud.video.transcoder.v1.TextStream.TextMapping + * @instance + */ + TextMapping.prototype.atomKey = ""; + + /** + * TextMapping inputKey. + * @member {string} inputKey + * @memberof google.cloud.video.transcoder.v1.TextStream.TextMapping + * @instance + */ + TextMapping.prototype.inputKey = ""; + + /** + * TextMapping inputTrack. + * @member {number} inputTrack + * @memberof google.cloud.video.transcoder.v1.TextStream.TextMapping + * @instance + */ + TextMapping.prototype.inputTrack = 0; + + /** + * Creates a new TextMapping instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.TextStream.TextMapping + * @static + * @param {google.cloud.video.transcoder.v1.TextStream.ITextMapping=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.TextStream.TextMapping} TextMapping instance + */ + TextMapping.create = function create(properties) { + return new TextMapping(properties); + }; + + /** + * Encodes the specified TextMapping message. Does not implicitly {@link google.cloud.video.transcoder.v1.TextStream.TextMapping.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.TextStream.TextMapping + * @static + * @param {google.cloud.video.transcoder.v1.TextStream.ITextMapping} message TextMapping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextMapping.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.atomKey != null && Object.hasOwnProperty.call(message, "atomKey")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.atomKey); + if (message.inputKey != null && Object.hasOwnProperty.call(message, "inputKey")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputKey); + if (message.inputTrack != null && Object.hasOwnProperty.call(message, "inputTrack")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.inputTrack); + return writer; + }; + + /** + * Encodes the specified TextMapping message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.TextStream.TextMapping.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.TextStream.TextMapping + * @static + * @param {google.cloud.video.transcoder.v1.TextStream.ITextMapping} message TextMapping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextMapping.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TextMapping message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.TextStream.TextMapping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.TextStream.TextMapping} TextMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextMapping.decode = function 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.transcoder.v1.TextStream.TextMapping(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.atomKey = reader.string(); + break; + case 2: + message.inputKey = reader.string(); + break; + case 3: + message.inputTrack = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TextMapping message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.TextStream.TextMapping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.TextStream.TextMapping} TextMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextMapping.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TextMapping message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.TextStream.TextMapping + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TextMapping.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.atomKey != null && message.hasOwnProperty("atomKey")) + if (!$util.isString(message.atomKey)) + return "atomKey: string expected"; + if (message.inputKey != null && message.hasOwnProperty("inputKey")) + if (!$util.isString(message.inputKey)) + return "inputKey: string expected"; + if (message.inputTrack != null && message.hasOwnProperty("inputTrack")) + if (!$util.isInteger(message.inputTrack)) + return "inputTrack: integer expected"; + return null; + }; + + /** + * Creates a TextMapping message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.TextStream.TextMapping + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.TextStream.TextMapping} TextMapping + */ + TextMapping.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.TextStream.TextMapping) + return object; + var message = new $root.google.cloud.video.transcoder.v1.TextStream.TextMapping(); + if (object.atomKey != null) + message.atomKey = String(object.atomKey); + if (object.inputKey != null) + message.inputKey = String(object.inputKey); + if (object.inputTrack != null) + message.inputTrack = object.inputTrack | 0; + return message; + }; + + /** + * Creates a plain object from a TextMapping message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.TextStream.TextMapping + * @static + * @param {google.cloud.video.transcoder.v1.TextStream.TextMapping} message TextMapping + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TextMapping.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.atomKey = ""; + object.inputKey = ""; + object.inputTrack = 0; + } + if (message.atomKey != null && message.hasOwnProperty("atomKey")) + object.atomKey = message.atomKey; + if (message.inputKey != null && message.hasOwnProperty("inputKey")) + object.inputKey = message.inputKey; + if (message.inputTrack != null && message.hasOwnProperty("inputTrack")) + object.inputTrack = message.inputTrack; + return object; + }; + + /** + * Converts this TextMapping to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.TextStream.TextMapping + * @instance + * @returns {Object.} JSON object + */ + TextMapping.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TextMapping; + })(); + + return TextStream; + })(); + + v1.SegmentSettings = (function() { + + /** + * Properties of a SegmentSettings. + * @memberof google.cloud.video.transcoder.v1 + * @interface ISegmentSettings + * @property {google.protobuf.IDuration|null} [segmentDuration] SegmentSettings segmentDuration + * @property {boolean|null} [individualSegments] SegmentSettings individualSegments + */ + + /** + * Constructs a new SegmentSettings. + * @memberof google.cloud.video.transcoder.v1 + * @classdesc Represents a SegmentSettings. + * @implements ISegmentSettings + * @constructor + * @param {google.cloud.video.transcoder.v1.ISegmentSettings=} [properties] Properties to set + */ + function SegmentSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SegmentSettings segmentDuration. + * @member {google.protobuf.IDuration|null|undefined} segmentDuration + * @memberof google.cloud.video.transcoder.v1.SegmentSettings + * @instance + */ + SegmentSettings.prototype.segmentDuration = null; + + /** + * SegmentSettings individualSegments. + * @member {boolean} individualSegments + * @memberof google.cloud.video.transcoder.v1.SegmentSettings + * @instance + */ + SegmentSettings.prototype.individualSegments = false; + + /** + * Creates a new SegmentSettings instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.SegmentSettings + * @static + * @param {google.cloud.video.transcoder.v1.ISegmentSettings=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.SegmentSettings} SegmentSettings instance + */ + SegmentSettings.create = function create(properties) { + return new SegmentSettings(properties); + }; + + /** + * Encodes the specified SegmentSettings message. Does not implicitly {@link google.cloud.video.transcoder.v1.SegmentSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.SegmentSettings + * @static + * @param {google.cloud.video.transcoder.v1.ISegmentSettings} message SegmentSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.segmentDuration != null && Object.hasOwnProperty.call(message, "segmentDuration")) + $root.google.protobuf.Duration.encode(message.segmentDuration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.individualSegments != null && Object.hasOwnProperty.call(message, "individualSegments")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.individualSegments); + return writer; + }; + + /** + * Encodes the specified SegmentSettings message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.SegmentSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.SegmentSettings + * @static + * @param {google.cloud.video.transcoder.v1.ISegmentSettings} message SegmentSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SegmentSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SegmentSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.SegmentSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.SegmentSettings} SegmentSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentSettings.decode = function 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.transcoder.v1.SegmentSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.segmentDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 3: + message.individualSegments = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SegmentSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.SegmentSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.SegmentSettings} SegmentSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SegmentSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SegmentSettings message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.SegmentSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SegmentSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.segmentDuration != null && message.hasOwnProperty("segmentDuration")) { + var error = $root.google.protobuf.Duration.verify(message.segmentDuration); + if (error) + return "segmentDuration." + error; + } + if (message.individualSegments != null && message.hasOwnProperty("individualSegments")) + if (typeof message.individualSegments !== "boolean") + return "individualSegments: boolean expected"; + return null; + }; + + /** + * Creates a SegmentSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.SegmentSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.SegmentSettings} SegmentSettings + */ + SegmentSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.SegmentSettings) + return object; + var message = new $root.google.cloud.video.transcoder.v1.SegmentSettings(); + if (object.segmentDuration != null) { + if (typeof object.segmentDuration !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.SegmentSettings.segmentDuration: object expected"); + message.segmentDuration = $root.google.protobuf.Duration.fromObject(object.segmentDuration); + } + if (object.individualSegments != null) + message.individualSegments = Boolean(object.individualSegments); + return message; + }; + + /** + * Creates a plain object from a SegmentSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.SegmentSettings + * @static + * @param {google.cloud.video.transcoder.v1.SegmentSettings} message SegmentSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SegmentSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.segmentDuration = null; + object.individualSegments = false; + } + if (message.segmentDuration != null && message.hasOwnProperty("segmentDuration")) + object.segmentDuration = $root.google.protobuf.Duration.toObject(message.segmentDuration, options); + if (message.individualSegments != null && message.hasOwnProperty("individualSegments")) + object.individualSegments = message.individualSegments; + return object; + }; + + /** + * Converts this SegmentSettings to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.SegmentSettings + * @instance + * @returns {Object.} JSON object + */ + SegmentSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SegmentSettings; + })(); + + v1.Encryption = (function() { + + /** + * Properties of an Encryption. + * @memberof google.cloud.video.transcoder.v1 + * @interface IEncryption + * @property {string|null} [key] Encryption key + * @property {string|null} [iv] Encryption iv + * @property {google.cloud.video.transcoder.v1.Encryption.IAes128Encryption|null} [aes_128] Encryption aes_128 + * @property {google.cloud.video.transcoder.v1.Encryption.ISampleAesEncryption|null} [sampleAes] Encryption sampleAes + * @property {google.cloud.video.transcoder.v1.Encryption.IMpegCommonEncryption|null} [mpegCenc] Encryption mpegCenc + */ + + /** + * Constructs a new Encryption. + * @memberof google.cloud.video.transcoder.v1 + * @classdesc Represents an Encryption. + * @implements IEncryption + * @constructor + * @param {google.cloud.video.transcoder.v1.IEncryption=} [properties] Properties to set + */ + function Encryption(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Encryption key. + * @member {string} key + * @memberof google.cloud.video.transcoder.v1.Encryption + * @instance + */ + Encryption.prototype.key = ""; + + /** + * Encryption iv. + * @member {string} iv + * @memberof google.cloud.video.transcoder.v1.Encryption + * @instance + */ + Encryption.prototype.iv = ""; + + /** + * Encryption aes_128. + * @member {google.cloud.video.transcoder.v1.Encryption.IAes128Encryption|null|undefined} aes_128 + * @memberof google.cloud.video.transcoder.v1.Encryption + * @instance + */ + Encryption.prototype.aes_128 = null; + + /** + * Encryption sampleAes. + * @member {google.cloud.video.transcoder.v1.Encryption.ISampleAesEncryption|null|undefined} sampleAes + * @memberof google.cloud.video.transcoder.v1.Encryption + * @instance + */ + Encryption.prototype.sampleAes = null; + + /** + * Encryption mpegCenc. + * @member {google.cloud.video.transcoder.v1.Encryption.IMpegCommonEncryption|null|undefined} mpegCenc + * @memberof google.cloud.video.transcoder.v1.Encryption + * @instance + */ + Encryption.prototype.mpegCenc = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Encryption encryptionMode. + * @member {"aes_128"|"sampleAes"|"mpegCenc"|undefined} encryptionMode + * @memberof google.cloud.video.transcoder.v1.Encryption + * @instance + */ + Object.defineProperty(Encryption.prototype, "encryptionMode", { + get: $util.oneOfGetter($oneOfFields = ["aes_128", "sampleAes", "mpegCenc"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Encryption instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.Encryption + * @static + * @param {google.cloud.video.transcoder.v1.IEncryption=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.Encryption} Encryption instance + */ + Encryption.create = function create(properties) { + return new Encryption(properties); + }; + + /** + * Encodes the specified Encryption message. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.Encryption + * @static + * @param {google.cloud.video.transcoder.v1.IEncryption} message Encryption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encryption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.iv != null && Object.hasOwnProperty.call(message, "iv")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.iv); + if (message.aes_128 != null && Object.hasOwnProperty.call(message, "aes_128")) + $root.google.cloud.video.transcoder.v1.Encryption.Aes128Encryption.encode(message.aes_128, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.sampleAes != null && Object.hasOwnProperty.call(message, "sampleAes")) + $root.google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption.encode(message.sampleAes, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.mpegCenc != null && Object.hasOwnProperty.call(message, "mpegCenc")) + $root.google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption.encode(message.mpegCenc, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Encryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.Encryption + * @static + * @param {google.cloud.video.transcoder.v1.IEncryption} message Encryption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encryption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Encryption message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.Encryption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.Encryption} Encryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encryption.decode = function 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.transcoder.v1.Encryption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.string(); + break; + case 2: + message.iv = reader.string(); + break; + case 3: + message.aes_128 = $root.google.cloud.video.transcoder.v1.Encryption.Aes128Encryption.decode(reader, reader.uint32()); + break; + case 4: + message.sampleAes = $root.google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption.decode(reader, reader.uint32()); + break; + case 5: + message.mpegCenc = $root.google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Encryption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.Encryption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.Encryption} Encryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encryption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Encryption message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.Encryption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Encryption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.iv != null && message.hasOwnProperty("iv")) + if (!$util.isString(message.iv)) + return "iv: string expected"; + if (message.aes_128 != null && message.hasOwnProperty("aes_128")) { + properties.encryptionMode = 1; + { + var error = $root.google.cloud.video.transcoder.v1.Encryption.Aes128Encryption.verify(message.aes_128); + if (error) + return "aes_128." + error; + } + } + if (message.sampleAes != null && message.hasOwnProperty("sampleAes")) { + if (properties.encryptionMode === 1) + return "encryptionMode: multiple values"; + properties.encryptionMode = 1; + { + var error = $root.google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption.verify(message.sampleAes); + if (error) + return "sampleAes." + error; + } + } + if (message.mpegCenc != null && message.hasOwnProperty("mpegCenc")) { + if (properties.encryptionMode === 1) + return "encryptionMode: multiple values"; + properties.encryptionMode = 1; + { + var error = $root.google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption.verify(message.mpegCenc); + if (error) + return "mpegCenc." + error; + } + } + return null; + }; + + /** + * Creates an Encryption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.Encryption + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.Encryption} Encryption + */ + Encryption.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.Encryption) + return object; + var message = new $root.google.cloud.video.transcoder.v1.Encryption(); + if (object.key != null) + message.key = String(object.key); + if (object.iv != null) + message.iv = String(object.iv); + if (object.aes_128 != null) { + if (typeof object.aes_128 !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.Encryption.aes_128: object expected"); + message.aes_128 = $root.google.cloud.video.transcoder.v1.Encryption.Aes128Encryption.fromObject(object.aes_128); + } + if (object.sampleAes != null) { + if (typeof object.sampleAes !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.Encryption.sampleAes: object expected"); + message.sampleAes = $root.google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption.fromObject(object.sampleAes); + } + if (object.mpegCenc != null) { + if (typeof object.mpegCenc !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.Encryption.mpegCenc: object expected"); + message.mpegCenc = $root.google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption.fromObject(object.mpegCenc); + } + return message; + }; + + /** + * Creates a plain object from an Encryption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.Encryption + * @static + * @param {google.cloud.video.transcoder.v1.Encryption} message Encryption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Encryption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = ""; + object.iv = ""; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.iv != null && message.hasOwnProperty("iv")) + object.iv = message.iv; + if (message.aes_128 != null && message.hasOwnProperty("aes_128")) { + object.aes_128 = $root.google.cloud.video.transcoder.v1.Encryption.Aes128Encryption.toObject(message.aes_128, options); + if (options.oneofs) + object.encryptionMode = "aes_128"; + } + if (message.sampleAes != null && message.hasOwnProperty("sampleAes")) { + object.sampleAes = $root.google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption.toObject(message.sampleAes, options); + if (options.oneofs) + object.encryptionMode = "sampleAes"; + } + if (message.mpegCenc != null && message.hasOwnProperty("mpegCenc")) { + object.mpegCenc = $root.google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption.toObject(message.mpegCenc, options); + if (options.oneofs) + object.encryptionMode = "mpegCenc"; + } + return object; + }; + + /** + * Converts this Encryption to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.Encryption + * @instance + * @returns {Object.} JSON object + */ + Encryption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Encryption.Aes128Encryption = (function() { + + /** + * Properties of an Aes128Encryption. + * @memberof google.cloud.video.transcoder.v1.Encryption + * @interface IAes128Encryption + * @property {string|null} [keyUri] Aes128Encryption keyUri + */ + + /** + * Constructs a new Aes128Encryption. + * @memberof google.cloud.video.transcoder.v1.Encryption + * @classdesc Represents an Aes128Encryption. + * @implements IAes128Encryption + * @constructor + * @param {google.cloud.video.transcoder.v1.Encryption.IAes128Encryption=} [properties] Properties to set + */ + function Aes128Encryption(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Aes128Encryption keyUri. + * @member {string} keyUri + * @memberof google.cloud.video.transcoder.v1.Encryption.Aes128Encryption + * @instance + */ + Aes128Encryption.prototype.keyUri = ""; + + /** + * Creates a new Aes128Encryption instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.Encryption.Aes128Encryption + * @static + * @param {google.cloud.video.transcoder.v1.Encryption.IAes128Encryption=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.Encryption.Aes128Encryption} Aes128Encryption instance + */ + Aes128Encryption.create = function create(properties) { + return new Aes128Encryption(properties); + }; + + /** + * Encodes the specified Aes128Encryption message. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.Aes128Encryption.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.Encryption.Aes128Encryption + * @static + * @param {google.cloud.video.transcoder.v1.Encryption.IAes128Encryption} message Aes128Encryption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Aes128Encryption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyUri != null && Object.hasOwnProperty.call(message, "keyUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyUri); + return writer; + }; + + /** + * Encodes the specified Aes128Encryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.Aes128Encryption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.Encryption.Aes128Encryption + * @static + * @param {google.cloud.video.transcoder.v1.Encryption.IAes128Encryption} message Aes128Encryption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Aes128Encryption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Aes128Encryption message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.Encryption.Aes128Encryption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.Encryption.Aes128Encryption} Aes128Encryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Aes128Encryption.decode = function 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.transcoder.v1.Encryption.Aes128Encryption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.keyUri = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Aes128Encryption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.Encryption.Aes128Encryption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.Encryption.Aes128Encryption} Aes128Encryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Aes128Encryption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Aes128Encryption message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.Encryption.Aes128Encryption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Aes128Encryption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyUri != null && message.hasOwnProperty("keyUri")) + if (!$util.isString(message.keyUri)) + return "keyUri: string expected"; + return null; + }; + + /** + * Creates an Aes128Encryption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.Encryption.Aes128Encryption + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.Encryption.Aes128Encryption} Aes128Encryption + */ + Aes128Encryption.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.Encryption.Aes128Encryption) + return object; + var message = new $root.google.cloud.video.transcoder.v1.Encryption.Aes128Encryption(); + if (object.keyUri != null) + message.keyUri = String(object.keyUri); + return message; + }; + + /** + * Creates a plain object from an Aes128Encryption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.Encryption.Aes128Encryption + * @static + * @param {google.cloud.video.transcoder.v1.Encryption.Aes128Encryption} message Aes128Encryption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Aes128Encryption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.keyUri = ""; + if (message.keyUri != null && message.hasOwnProperty("keyUri")) + object.keyUri = message.keyUri; + return object; + }; + + /** + * Converts this Aes128Encryption to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.Encryption.Aes128Encryption + * @instance + * @returns {Object.} JSON object + */ + Aes128Encryption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Aes128Encryption; + })(); + + Encryption.SampleAesEncryption = (function() { + + /** + * Properties of a SampleAesEncryption. + * @memberof google.cloud.video.transcoder.v1.Encryption + * @interface ISampleAesEncryption + * @property {string|null} [keyUri] SampleAesEncryption keyUri + */ + + /** + * Constructs a new SampleAesEncryption. + * @memberof google.cloud.video.transcoder.v1.Encryption + * @classdesc Represents a SampleAesEncryption. + * @implements ISampleAesEncryption + * @constructor + * @param {google.cloud.video.transcoder.v1.Encryption.ISampleAesEncryption=} [properties] Properties to set + */ + function SampleAesEncryption(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SampleAesEncryption keyUri. + * @member {string} keyUri + * @memberof google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption + * @instance + */ + SampleAesEncryption.prototype.keyUri = ""; + + /** + * Creates a new SampleAesEncryption instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption + * @static + * @param {google.cloud.video.transcoder.v1.Encryption.ISampleAesEncryption=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption} SampleAesEncryption instance + */ + SampleAesEncryption.create = function create(properties) { + return new SampleAesEncryption(properties); + }; + + /** + * Encodes the specified SampleAesEncryption message. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption + * @static + * @param {google.cloud.video.transcoder.v1.Encryption.ISampleAesEncryption} message SampleAesEncryption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SampleAesEncryption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyUri != null && Object.hasOwnProperty.call(message, "keyUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyUri); + return writer; + }; + + /** + * Encodes the specified SampleAesEncryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption + * @static + * @param {google.cloud.video.transcoder.v1.Encryption.ISampleAesEncryption} message SampleAesEncryption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SampleAesEncryption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SampleAesEncryption message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption} SampleAesEncryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SampleAesEncryption.decode = function 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.transcoder.v1.Encryption.SampleAesEncryption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.keyUri = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SampleAesEncryption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption} SampleAesEncryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SampleAesEncryption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SampleAesEncryption message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SampleAesEncryption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyUri != null && message.hasOwnProperty("keyUri")) + if (!$util.isString(message.keyUri)) + return "keyUri: string expected"; + return null; + }; + + /** + * Creates a SampleAesEncryption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption} SampleAesEncryption + */ + SampleAesEncryption.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption) + return object; + var message = new $root.google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption(); + if (object.keyUri != null) + message.keyUri = String(object.keyUri); + return message; + }; + + /** + * Creates a plain object from a SampleAesEncryption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption + * @static + * @param {google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption} message SampleAesEncryption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SampleAesEncryption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.keyUri = ""; + if (message.keyUri != null && message.hasOwnProperty("keyUri")) + object.keyUri = message.keyUri; + return object; + }; + + /** + * Converts this SampleAesEncryption to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption + * @instance + * @returns {Object.} JSON object + */ + SampleAesEncryption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SampleAesEncryption; + })(); + + Encryption.MpegCommonEncryption = (function() { + + /** + * Properties of a MpegCommonEncryption. + * @memberof google.cloud.video.transcoder.v1.Encryption + * @interface IMpegCommonEncryption + * @property {string|null} [keyId] MpegCommonEncryption keyId + * @property {string|null} [scheme] MpegCommonEncryption scheme + */ + + /** + * Constructs a new MpegCommonEncryption. + * @memberof google.cloud.video.transcoder.v1.Encryption + * @classdesc Represents a MpegCommonEncryption. + * @implements IMpegCommonEncryption + * @constructor + * @param {google.cloud.video.transcoder.v1.Encryption.IMpegCommonEncryption=} [properties] Properties to set + */ + function MpegCommonEncryption(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MpegCommonEncryption keyId. + * @member {string} keyId + * @memberof google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption + * @instance + */ + MpegCommonEncryption.prototype.keyId = ""; + + /** + * MpegCommonEncryption scheme. + * @member {string} scheme + * @memberof google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption + * @instance + */ + MpegCommonEncryption.prototype.scheme = ""; + + /** + * Creates a new MpegCommonEncryption instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption + * @static + * @param {google.cloud.video.transcoder.v1.Encryption.IMpegCommonEncryption=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption} MpegCommonEncryption instance + */ + MpegCommonEncryption.create = function create(properties) { + return new MpegCommonEncryption(properties); + }; + + /** + * Encodes the specified MpegCommonEncryption message. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption + * @static + * @param {google.cloud.video.transcoder.v1.Encryption.IMpegCommonEncryption} message MpegCommonEncryption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MpegCommonEncryption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyId != null && Object.hasOwnProperty.call(message, "keyId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyId); + if (message.scheme != null && Object.hasOwnProperty.call(message, "scheme")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.scheme); + return writer; + }; + + /** + * Encodes the specified MpegCommonEncryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption + * @static + * @param {google.cloud.video.transcoder.v1.Encryption.IMpegCommonEncryption} message MpegCommonEncryption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MpegCommonEncryption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MpegCommonEncryption message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption} MpegCommonEncryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MpegCommonEncryption.decode = function 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.transcoder.v1.Encryption.MpegCommonEncryption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.keyId = reader.string(); + break; + case 2: + message.scheme = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MpegCommonEncryption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption} MpegCommonEncryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MpegCommonEncryption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MpegCommonEncryption message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MpegCommonEncryption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyId != null && message.hasOwnProperty("keyId")) + if (!$util.isString(message.keyId)) + return "keyId: string expected"; + if (message.scheme != null && message.hasOwnProperty("scheme")) + if (!$util.isString(message.scheme)) + return "scheme: string expected"; + return null; + }; + + /** + * Creates a MpegCommonEncryption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption} MpegCommonEncryption + */ + MpegCommonEncryption.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption) + return object; + var message = new $root.google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption(); + if (object.keyId != null) + message.keyId = String(object.keyId); + if (object.scheme != null) + message.scheme = String(object.scheme); + return message; + }; + + /** + * Creates a plain object from a MpegCommonEncryption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption + * @static + * @param {google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption} message MpegCommonEncryption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MpegCommonEncryption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.keyId = ""; + object.scheme = ""; + } + if (message.keyId != null && message.hasOwnProperty("keyId")) + object.keyId = message.keyId; + if (message.scheme != null && message.hasOwnProperty("scheme")) + object.scheme = message.scheme; + return object; + }; + + /** + * Converts this MpegCommonEncryption to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption + * @instance + * @returns {Object.} JSON object + */ + MpegCommonEncryption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MpegCommonEncryption; + })(); + + return Encryption; + })(); + + v1.TranscoderService = (function() { + + /** + * Constructs a new TranscoderService service. + * @memberof google.cloud.video.transcoder.v1 + * @classdesc Represents a TranscoderService + * @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 TranscoderService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (TranscoderService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = TranscoderService; + + /** + * Creates new TranscoderService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @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 {TranscoderService} RPC service. Useful where requests and/or responses are streamed. + */ + TranscoderService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#createJob}. + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @typedef CreateJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.transcoder.v1.Job} [response] Job + */ + + /** + * Calls CreateJob. + * @function createJob + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1.ICreateJobRequest} request CreateJobRequest message or plain object + * @param {google.cloud.video.transcoder.v1.TranscoderService.CreateJobCallback} callback Node-style callback called with the error, if any, and Job + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TranscoderService.prototype.createJob = function createJob(request, callback) { + return this.rpcCall(createJob, $root.google.cloud.video.transcoder.v1.CreateJobRequest, $root.google.cloud.video.transcoder.v1.Job, request, callback); + }, "name", { value: "CreateJob" }); + + /** + * Calls CreateJob. + * @function createJob + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1.ICreateJobRequest} request CreateJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#listJobs}. + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @typedef ListJobsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.transcoder.v1.ListJobsResponse} [response] ListJobsResponse + */ + + /** + * Calls ListJobs. + * @function listJobs + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1.IListJobsRequest} request ListJobsRequest message or plain object + * @param {google.cloud.video.transcoder.v1.TranscoderService.ListJobsCallback} callback Node-style callback called with the error, if any, and ListJobsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TranscoderService.prototype.listJobs = function listJobs(request, callback) { + return this.rpcCall(listJobs, $root.google.cloud.video.transcoder.v1.ListJobsRequest, $root.google.cloud.video.transcoder.v1.ListJobsResponse, request, callback); + }, "name", { value: "ListJobs" }); + + /** + * Calls ListJobs. + * @function listJobs + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1.IListJobsRequest} request ListJobsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#getJob}. + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @typedef GetJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.transcoder.v1.Job} [response] Job + */ + + /** + * Calls GetJob. + * @function getJob + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1.IGetJobRequest} request GetJobRequest message or plain object + * @param {google.cloud.video.transcoder.v1.TranscoderService.GetJobCallback} callback Node-style callback called with the error, if any, and Job + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TranscoderService.prototype.getJob = function getJob(request, callback) { + return this.rpcCall(getJob, $root.google.cloud.video.transcoder.v1.GetJobRequest, $root.google.cloud.video.transcoder.v1.Job, request, callback); + }, "name", { value: "GetJob" }); + + /** + * Calls GetJob. + * @function getJob + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1.IGetJobRequest} request GetJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#deleteJob}. + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @typedef DeleteJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteJob. + * @function deleteJob + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1.IDeleteJobRequest} request DeleteJobRequest message or plain object + * @param {google.cloud.video.transcoder.v1.TranscoderService.DeleteJobCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TranscoderService.prototype.deleteJob = function deleteJob(request, callback) { + return this.rpcCall(deleteJob, $root.google.cloud.video.transcoder.v1.DeleteJobRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteJob" }); + + /** + * Calls DeleteJob. + * @function deleteJob + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1.IDeleteJobRequest} request DeleteJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#createJobTemplate}. + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @typedef CreateJobTemplateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.transcoder.v1.JobTemplate} [response] JobTemplate + */ + + /** + * Calls CreateJobTemplate. + * @function createJobTemplate + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1.ICreateJobTemplateRequest} request CreateJobTemplateRequest message or plain object + * @param {google.cloud.video.transcoder.v1.TranscoderService.CreateJobTemplateCallback} callback Node-style callback called with the error, if any, and JobTemplate + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TranscoderService.prototype.createJobTemplate = function createJobTemplate(request, callback) { + return this.rpcCall(createJobTemplate, $root.google.cloud.video.transcoder.v1.CreateJobTemplateRequest, $root.google.cloud.video.transcoder.v1.JobTemplate, request, callback); + }, "name", { value: "CreateJobTemplate" }); + + /** + * Calls CreateJobTemplate. + * @function createJobTemplate + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1.ICreateJobTemplateRequest} request CreateJobTemplateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#listJobTemplates}. + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @typedef ListJobTemplatesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.transcoder.v1.ListJobTemplatesResponse} [response] ListJobTemplatesResponse + */ + + /** + * Calls ListJobTemplates. + * @function listJobTemplates + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1.IListJobTemplatesRequest} request ListJobTemplatesRequest message or plain object + * @param {google.cloud.video.transcoder.v1.TranscoderService.ListJobTemplatesCallback} callback Node-style callback called with the error, if any, and ListJobTemplatesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TranscoderService.prototype.listJobTemplates = function listJobTemplates(request, callback) { + return this.rpcCall(listJobTemplates, $root.google.cloud.video.transcoder.v1.ListJobTemplatesRequest, $root.google.cloud.video.transcoder.v1.ListJobTemplatesResponse, request, callback); + }, "name", { value: "ListJobTemplates" }); + + /** + * Calls ListJobTemplates. + * @function listJobTemplates + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1.IListJobTemplatesRequest} request ListJobTemplatesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#getJobTemplate}. + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @typedef GetJobTemplateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.transcoder.v1.JobTemplate} [response] JobTemplate + */ + + /** + * Calls GetJobTemplate. + * @function getJobTemplate + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1.IGetJobTemplateRequest} request GetJobTemplateRequest message or plain object + * @param {google.cloud.video.transcoder.v1.TranscoderService.GetJobTemplateCallback} callback Node-style callback called with the error, if any, and JobTemplate + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TranscoderService.prototype.getJobTemplate = function getJobTemplate(request, callback) { + return this.rpcCall(getJobTemplate, $root.google.cloud.video.transcoder.v1.GetJobTemplateRequest, $root.google.cloud.video.transcoder.v1.JobTemplate, request, callback); + }, "name", { value: "GetJobTemplate" }); + + /** + * Calls GetJobTemplate. + * @function getJobTemplate + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1.IGetJobTemplateRequest} request GetJobTemplateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#deleteJobTemplate}. + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @typedef DeleteJobTemplateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteJobTemplate. + * @function deleteJobTemplate + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest} request DeleteJobTemplateRequest message or plain object + * @param {google.cloud.video.transcoder.v1.TranscoderService.DeleteJobTemplateCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TranscoderService.prototype.deleteJobTemplate = function deleteJobTemplate(request, callback) { + return this.rpcCall(deleteJobTemplate, $root.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteJobTemplate" }); + + /** + * Calls DeleteJobTemplate. + * @function deleteJobTemplate + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest} request DeleteJobTemplateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return TranscoderService; + })(); + + v1.CreateJobRequest = (function() { + + /** + * Properties of a CreateJobRequest. + * @memberof google.cloud.video.transcoder.v1 + * @interface ICreateJobRequest + * @property {string|null} [parent] CreateJobRequest parent + * @property {google.cloud.video.transcoder.v1.IJob|null} [job] CreateJobRequest job + */ + + /** + * Constructs a new CreateJobRequest. + * @memberof google.cloud.video.transcoder.v1 + * @classdesc Represents a CreateJobRequest. + * @implements ICreateJobRequest + * @constructor + * @param {google.cloud.video.transcoder.v1.ICreateJobRequest=} [properties] Properties to set + */ + function CreateJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateJobRequest parent. + * @member {string} parent + * @memberof google.cloud.video.transcoder.v1.CreateJobRequest + * @instance + */ + CreateJobRequest.prototype.parent = ""; + + /** + * CreateJobRequest job. + * @member {google.cloud.video.transcoder.v1.IJob|null|undefined} job + * @memberof google.cloud.video.transcoder.v1.CreateJobRequest + * @instance + */ + CreateJobRequest.prototype.job = null; + + /** + * Creates a new CreateJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.CreateJobRequest + * @static + * @param {google.cloud.video.transcoder.v1.ICreateJobRequest=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.CreateJobRequest} CreateJobRequest instance + */ + CreateJobRequest.create = function create(properties) { + return new CreateJobRequest(properties); + }; + + /** + * Encodes the specified CreateJobRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1.CreateJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.CreateJobRequest + * @static + * @param {google.cloud.video.transcoder.v1.ICreateJobRequest} message CreateJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateJobRequest.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.job != null && Object.hasOwnProperty.call(message, "job")) + $root.google.cloud.video.transcoder.v1.Job.encode(message.job, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateJobRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.CreateJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.CreateJobRequest + * @static + * @param {google.cloud.video.transcoder.v1.ICreateJobRequest} message CreateJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.CreateJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.CreateJobRequest} CreateJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateJobRequest.decode = function 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.transcoder.v1.CreateJobRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.job = $root.google.cloud.video.transcoder.v1.Job.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.CreateJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.CreateJobRequest} CreateJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateJobRequest message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.CreateJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateJobRequest.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.job != null && message.hasOwnProperty("job")) { + var error = $root.google.cloud.video.transcoder.v1.Job.verify(message.job); + if (error) + return "job." + error; + } + return null; + }; + + /** + * Creates a CreateJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.CreateJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.CreateJobRequest} CreateJobRequest + */ + CreateJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.CreateJobRequest) + return object; + var message = new $root.google.cloud.video.transcoder.v1.CreateJobRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.job != null) { + if (typeof object.job !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.CreateJobRequest.job: object expected"); + message.job = $root.google.cloud.video.transcoder.v1.Job.fromObject(object.job); + } + return message; + }; + + /** + * Creates a plain object from a CreateJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.CreateJobRequest + * @static + * @param {google.cloud.video.transcoder.v1.CreateJobRequest} message CreateJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateJobRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.job = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.job != null && message.hasOwnProperty("job")) + object.job = $root.google.cloud.video.transcoder.v1.Job.toObject(message.job, options); + return object; + }; + + /** + * Converts this CreateJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.CreateJobRequest + * @instance + * @returns {Object.} JSON object + */ + CreateJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateJobRequest; + })(); + + v1.ListJobsRequest = (function() { + + /** + * Properties of a ListJobsRequest. + * @memberof google.cloud.video.transcoder.v1 + * @interface IListJobsRequest + * @property {string|null} [parent] ListJobsRequest parent + * @property {number|null} [pageSize] ListJobsRequest pageSize + * @property {string|null} [pageToken] ListJobsRequest pageToken + * @property {string|null} [filter] ListJobsRequest filter + * @property {string|null} [orderBy] ListJobsRequest orderBy + */ + + /** + * Constructs a new ListJobsRequest. + * @memberof google.cloud.video.transcoder.v1 + * @classdesc Represents a ListJobsRequest. + * @implements IListJobsRequest + * @constructor + * @param {google.cloud.video.transcoder.v1.IListJobsRequest=} [properties] Properties to set + */ + function ListJobsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListJobsRequest parent. + * @member {string} parent + * @memberof google.cloud.video.transcoder.v1.ListJobsRequest + * @instance + */ + ListJobsRequest.prototype.parent = ""; + + /** + * ListJobsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.video.transcoder.v1.ListJobsRequest + * @instance + */ + ListJobsRequest.prototype.pageSize = 0; + + /** + * ListJobsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.video.transcoder.v1.ListJobsRequest + * @instance + */ + ListJobsRequest.prototype.pageToken = ""; + + /** + * ListJobsRequest filter. + * @member {string} filter + * @memberof google.cloud.video.transcoder.v1.ListJobsRequest + * @instance + */ + ListJobsRequest.prototype.filter = ""; + + /** + * ListJobsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.video.transcoder.v1.ListJobsRequest + * @instance + */ + ListJobsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListJobsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.ListJobsRequest + * @static + * @param {google.cloud.video.transcoder.v1.IListJobsRequest=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.ListJobsRequest} ListJobsRequest instance + */ + ListJobsRequest.create = function create(properties) { + return new ListJobsRequest(properties); + }; + + /** + * Encodes the specified ListJobsRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1.ListJobsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.ListJobsRequest + * @static + * @param {google.cloud.video.transcoder.v1.IListJobsRequest} message ListJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobsRequest.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 ListJobsRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.ListJobsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.ListJobsRequest + * @static + * @param {google.cloud.video.transcoder.v1.IListJobsRequest} message ListJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListJobsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.ListJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.ListJobsRequest} ListJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobsRequest.decode = function 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.transcoder.v1.ListJobsRequest(); + 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 ListJobsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.ListJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.ListJobsRequest} ListJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListJobsRequest message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.ListJobsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListJobsRequest.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 ListJobsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.ListJobsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.ListJobsRequest} ListJobsRequest + */ + ListJobsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.ListJobsRequest) + return object; + var message = new $root.google.cloud.video.transcoder.v1.ListJobsRequest(); + 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 ListJobsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.ListJobsRequest + * @static + * @param {google.cloud.video.transcoder.v1.ListJobsRequest} message ListJobsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListJobsRequest.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 ListJobsRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.ListJobsRequest + * @instance + * @returns {Object.} JSON object + */ + ListJobsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListJobsRequest; + })(); + + v1.GetJobRequest = (function() { + + /** + * Properties of a GetJobRequest. + * @memberof google.cloud.video.transcoder.v1 + * @interface IGetJobRequest + * @property {string|null} [name] GetJobRequest name + */ + + /** + * Constructs a new GetJobRequest. + * @memberof google.cloud.video.transcoder.v1 + * @classdesc Represents a GetJobRequest. + * @implements IGetJobRequest + * @constructor + * @param {google.cloud.video.transcoder.v1.IGetJobRequest=} [properties] Properties to set + */ + function GetJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetJobRequest name. + * @member {string} name + * @memberof google.cloud.video.transcoder.v1.GetJobRequest + * @instance + */ + GetJobRequest.prototype.name = ""; + + /** + * Creates a new GetJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.GetJobRequest + * @static + * @param {google.cloud.video.transcoder.v1.IGetJobRequest=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.GetJobRequest} GetJobRequest instance + */ + GetJobRequest.create = function create(properties) { + return new GetJobRequest(properties); + }; + + /** + * Encodes the specified GetJobRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1.GetJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.GetJobRequest + * @static + * @param {google.cloud.video.transcoder.v1.IGetJobRequest} message GetJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetJobRequest.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 GetJobRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.GetJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.GetJobRequest + * @static + * @param {google.cloud.video.transcoder.v1.IGetJobRequest} message GetJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.GetJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.GetJobRequest} GetJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetJobRequest.decode = function 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.transcoder.v1.GetJobRequest(); + 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 GetJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.GetJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.GetJobRequest} GetJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetJobRequest message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.GetJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetJobRequest.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 GetJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.GetJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.GetJobRequest} GetJobRequest + */ + GetJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.GetJobRequest) + return object; + var message = new $root.google.cloud.video.transcoder.v1.GetJobRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.GetJobRequest + * @static + * @param {google.cloud.video.transcoder.v1.GetJobRequest} message GetJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetJobRequest.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 GetJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.GetJobRequest + * @instance + * @returns {Object.} JSON object + */ + GetJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetJobRequest; + })(); + + v1.DeleteJobRequest = (function() { + + /** + * Properties of a DeleteJobRequest. + * @memberof google.cloud.video.transcoder.v1 + * @interface IDeleteJobRequest + * @property {string|null} [name] DeleteJobRequest name + */ + + /** + * Constructs a new DeleteJobRequest. + * @memberof google.cloud.video.transcoder.v1 + * @classdesc Represents a DeleteJobRequest. + * @implements IDeleteJobRequest + * @constructor + * @param {google.cloud.video.transcoder.v1.IDeleteJobRequest=} [properties] Properties to set + */ + function DeleteJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteJobRequest name. + * @member {string} name + * @memberof google.cloud.video.transcoder.v1.DeleteJobRequest + * @instance + */ + DeleteJobRequest.prototype.name = ""; + + /** + * Creates a new DeleteJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.DeleteJobRequest + * @static + * @param {google.cloud.video.transcoder.v1.IDeleteJobRequest=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.DeleteJobRequest} DeleteJobRequest instance + */ + DeleteJobRequest.create = function create(properties) { + return new DeleteJobRequest(properties); + }; + + /** + * Encodes the specified DeleteJobRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1.DeleteJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.DeleteJobRequest + * @static + * @param {google.cloud.video.transcoder.v1.IDeleteJobRequest} message DeleteJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteJobRequest.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 DeleteJobRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.DeleteJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.DeleteJobRequest + * @static + * @param {google.cloud.video.transcoder.v1.IDeleteJobRequest} message DeleteJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.DeleteJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.DeleteJobRequest} DeleteJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteJobRequest.decode = function 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.transcoder.v1.DeleteJobRequest(); + 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 DeleteJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.DeleteJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.DeleteJobRequest} DeleteJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteJobRequest message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.DeleteJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteJobRequest.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 DeleteJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.DeleteJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.DeleteJobRequest} DeleteJobRequest + */ + DeleteJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.DeleteJobRequest) + return object; + var message = new $root.google.cloud.video.transcoder.v1.DeleteJobRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.DeleteJobRequest + * @static + * @param {google.cloud.video.transcoder.v1.DeleteJobRequest} message DeleteJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteJobRequest.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 DeleteJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.DeleteJobRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteJobRequest; + })(); + + v1.ListJobsResponse = (function() { + + /** + * Properties of a ListJobsResponse. + * @memberof google.cloud.video.transcoder.v1 + * @interface IListJobsResponse + * @property {Array.|null} [jobs] ListJobsResponse jobs + * @property {string|null} [nextPageToken] ListJobsResponse nextPageToken + * @property {Array.|null} [unreachable] ListJobsResponse unreachable + */ + + /** + * Constructs a new ListJobsResponse. + * @memberof google.cloud.video.transcoder.v1 + * @classdesc Represents a ListJobsResponse. + * @implements IListJobsResponse + * @constructor + * @param {google.cloud.video.transcoder.v1.IListJobsResponse=} [properties] Properties to set + */ + function ListJobsResponse(properties) { + this.jobs = []; + 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]]; + } + + /** + * ListJobsResponse jobs. + * @member {Array.} jobs + * @memberof google.cloud.video.transcoder.v1.ListJobsResponse + * @instance + */ + ListJobsResponse.prototype.jobs = $util.emptyArray; + + /** + * ListJobsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.video.transcoder.v1.ListJobsResponse + * @instance + */ + ListJobsResponse.prototype.nextPageToken = ""; + + /** + * ListJobsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.video.transcoder.v1.ListJobsResponse + * @instance + */ + ListJobsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListJobsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.ListJobsResponse + * @static + * @param {google.cloud.video.transcoder.v1.IListJobsResponse=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.ListJobsResponse} ListJobsResponse instance + */ + ListJobsResponse.create = function create(properties) { + return new ListJobsResponse(properties); + }; + + /** + * Encodes the specified ListJobsResponse message. Does not implicitly {@link google.cloud.video.transcoder.v1.ListJobsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.ListJobsResponse + * @static + * @param {google.cloud.video.transcoder.v1.IListJobsResponse} message ListJobsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.jobs != null && message.jobs.length) + for (var i = 0; i < message.jobs.length; ++i) + $root.google.cloud.video.transcoder.v1.Job.encode(message.jobs[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 ListJobsResponse message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.ListJobsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.ListJobsResponse + * @static + * @param {google.cloud.video.transcoder.v1.IListJobsResponse} message ListJobsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListJobsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.ListJobsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.ListJobsResponse} ListJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobsResponse.decode = function 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.transcoder.v1.ListJobsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.jobs && message.jobs.length)) + message.jobs = []; + message.jobs.push($root.google.cloud.video.transcoder.v1.Job.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 ListJobsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.ListJobsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.ListJobsResponse} ListJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListJobsResponse message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.ListJobsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListJobsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.jobs != null && message.hasOwnProperty("jobs")) { + if (!Array.isArray(message.jobs)) + return "jobs: array expected"; + for (var i = 0; i < message.jobs.length; ++i) { + var error = $root.google.cloud.video.transcoder.v1.Job.verify(message.jobs[i]); + if (error) + return "jobs." + 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 ListJobsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.ListJobsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.ListJobsResponse} ListJobsResponse + */ + ListJobsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.ListJobsResponse) + return object; + var message = new $root.google.cloud.video.transcoder.v1.ListJobsResponse(); + if (object.jobs) { + if (!Array.isArray(object.jobs)) + throw TypeError(".google.cloud.video.transcoder.v1.ListJobsResponse.jobs: array expected"); + message.jobs = []; + for (var i = 0; i < object.jobs.length; ++i) { + if (typeof object.jobs[i] !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.ListJobsResponse.jobs: object expected"); + message.jobs[i] = $root.google.cloud.video.transcoder.v1.Job.fromObject(object.jobs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.video.transcoder.v1.ListJobsResponse.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 ListJobsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.ListJobsResponse + * @static + * @param {google.cloud.video.transcoder.v1.ListJobsResponse} message ListJobsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListJobsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.jobs = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.jobs && message.jobs.length) { + object.jobs = []; + for (var j = 0; j < message.jobs.length; ++j) + object.jobs[j] = $root.google.cloud.video.transcoder.v1.Job.toObject(message.jobs[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 ListJobsResponse to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.ListJobsResponse + * @instance + * @returns {Object.} JSON object + */ + ListJobsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListJobsResponse; + })(); + + v1.CreateJobTemplateRequest = (function() { + + /** + * Properties of a CreateJobTemplateRequest. + * @memberof google.cloud.video.transcoder.v1 + * @interface ICreateJobTemplateRequest + * @property {string|null} [parent] CreateJobTemplateRequest parent + * @property {google.cloud.video.transcoder.v1.IJobTemplate|null} [jobTemplate] CreateJobTemplateRequest jobTemplate + * @property {string|null} [jobTemplateId] CreateJobTemplateRequest jobTemplateId + */ + + /** + * Constructs a new CreateJobTemplateRequest. + * @memberof google.cloud.video.transcoder.v1 + * @classdesc Represents a CreateJobTemplateRequest. + * @implements ICreateJobTemplateRequest + * @constructor + * @param {google.cloud.video.transcoder.v1.ICreateJobTemplateRequest=} [properties] Properties to set + */ + function CreateJobTemplateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateJobTemplateRequest parent. + * @member {string} parent + * @memberof google.cloud.video.transcoder.v1.CreateJobTemplateRequest + * @instance + */ + CreateJobTemplateRequest.prototype.parent = ""; + + /** + * CreateJobTemplateRequest jobTemplate. + * @member {google.cloud.video.transcoder.v1.IJobTemplate|null|undefined} jobTemplate + * @memberof google.cloud.video.transcoder.v1.CreateJobTemplateRequest + * @instance + */ + CreateJobTemplateRequest.prototype.jobTemplate = null; + + /** + * CreateJobTemplateRequest jobTemplateId. + * @member {string} jobTemplateId + * @memberof google.cloud.video.transcoder.v1.CreateJobTemplateRequest + * @instance + */ + CreateJobTemplateRequest.prototype.jobTemplateId = ""; + + /** + * Creates a new CreateJobTemplateRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.CreateJobTemplateRequest + * @static + * @param {google.cloud.video.transcoder.v1.ICreateJobTemplateRequest=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.CreateJobTemplateRequest} CreateJobTemplateRequest instance + */ + CreateJobTemplateRequest.create = function create(properties) { + return new CreateJobTemplateRequest(properties); + }; + + /** + * Encodes the specified CreateJobTemplateRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1.CreateJobTemplateRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.CreateJobTemplateRequest + * @static + * @param {google.cloud.video.transcoder.v1.ICreateJobTemplateRequest} message CreateJobTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateJobTemplateRequest.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.jobTemplate != null && Object.hasOwnProperty.call(message, "jobTemplate")) + $root.google.cloud.video.transcoder.v1.JobTemplate.encode(message.jobTemplate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.jobTemplateId != null && Object.hasOwnProperty.call(message, "jobTemplateId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.jobTemplateId); + return writer; + }; + + /** + * Encodes the specified CreateJobTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.CreateJobTemplateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.CreateJobTemplateRequest + * @static + * @param {google.cloud.video.transcoder.v1.ICreateJobTemplateRequest} message CreateJobTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateJobTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateJobTemplateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.CreateJobTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.CreateJobTemplateRequest} CreateJobTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateJobTemplateRequest.decode = function 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.transcoder.v1.CreateJobTemplateRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.jobTemplate = $root.google.cloud.video.transcoder.v1.JobTemplate.decode(reader, reader.uint32()); + break; + case 3: + message.jobTemplateId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateJobTemplateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.CreateJobTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.CreateJobTemplateRequest} CreateJobTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateJobTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateJobTemplateRequest message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.CreateJobTemplateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateJobTemplateRequest.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.jobTemplate != null && message.hasOwnProperty("jobTemplate")) { + var error = $root.google.cloud.video.transcoder.v1.JobTemplate.verify(message.jobTemplate); + if (error) + return "jobTemplate." + error; + } + if (message.jobTemplateId != null && message.hasOwnProperty("jobTemplateId")) + if (!$util.isString(message.jobTemplateId)) + return "jobTemplateId: string expected"; + return null; + }; + + /** + * Creates a CreateJobTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.CreateJobTemplateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.CreateJobTemplateRequest} CreateJobTemplateRequest + */ + CreateJobTemplateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.CreateJobTemplateRequest) + return object; + var message = new $root.google.cloud.video.transcoder.v1.CreateJobTemplateRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.jobTemplate != null) { + if (typeof object.jobTemplate !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.CreateJobTemplateRequest.jobTemplate: object expected"); + message.jobTemplate = $root.google.cloud.video.transcoder.v1.JobTemplate.fromObject(object.jobTemplate); + } + if (object.jobTemplateId != null) + message.jobTemplateId = String(object.jobTemplateId); + return message; + }; + + /** + * Creates a plain object from a CreateJobTemplateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.CreateJobTemplateRequest + * @static + * @param {google.cloud.video.transcoder.v1.CreateJobTemplateRequest} message CreateJobTemplateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateJobTemplateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.jobTemplate = null; + object.jobTemplateId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.jobTemplate != null && message.hasOwnProperty("jobTemplate")) + object.jobTemplate = $root.google.cloud.video.transcoder.v1.JobTemplate.toObject(message.jobTemplate, options); + if (message.jobTemplateId != null && message.hasOwnProperty("jobTemplateId")) + object.jobTemplateId = message.jobTemplateId; + return object; + }; + + /** + * Converts this CreateJobTemplateRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.CreateJobTemplateRequest + * @instance + * @returns {Object.} JSON object + */ + CreateJobTemplateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateJobTemplateRequest; + })(); + + v1.ListJobTemplatesRequest = (function() { + + /** + * Properties of a ListJobTemplatesRequest. + * @memberof google.cloud.video.transcoder.v1 + * @interface IListJobTemplatesRequest + * @property {string|null} [parent] ListJobTemplatesRequest parent + * @property {number|null} [pageSize] ListJobTemplatesRequest pageSize + * @property {string|null} [pageToken] ListJobTemplatesRequest pageToken + * @property {string|null} [filter] ListJobTemplatesRequest filter + * @property {string|null} [orderBy] ListJobTemplatesRequest orderBy + */ + + /** + * Constructs a new ListJobTemplatesRequest. + * @memberof google.cloud.video.transcoder.v1 + * @classdesc Represents a ListJobTemplatesRequest. + * @implements IListJobTemplatesRequest + * @constructor + * @param {google.cloud.video.transcoder.v1.IListJobTemplatesRequest=} [properties] Properties to set + */ + function ListJobTemplatesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListJobTemplatesRequest parent. + * @member {string} parent + * @memberof google.cloud.video.transcoder.v1.ListJobTemplatesRequest + * @instance + */ + ListJobTemplatesRequest.prototype.parent = ""; + + /** + * ListJobTemplatesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.video.transcoder.v1.ListJobTemplatesRequest + * @instance + */ + ListJobTemplatesRequest.prototype.pageSize = 0; + + /** + * ListJobTemplatesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.video.transcoder.v1.ListJobTemplatesRequest + * @instance + */ + ListJobTemplatesRequest.prototype.pageToken = ""; + + /** + * ListJobTemplatesRequest filter. + * @member {string} filter + * @memberof google.cloud.video.transcoder.v1.ListJobTemplatesRequest + * @instance + */ + ListJobTemplatesRequest.prototype.filter = ""; + + /** + * ListJobTemplatesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.video.transcoder.v1.ListJobTemplatesRequest + * @instance + */ + ListJobTemplatesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListJobTemplatesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.ListJobTemplatesRequest + * @static + * @param {google.cloud.video.transcoder.v1.IListJobTemplatesRequest=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.ListJobTemplatesRequest} ListJobTemplatesRequest instance + */ + ListJobTemplatesRequest.create = function create(properties) { + return new ListJobTemplatesRequest(properties); + }; + + /** + * Encodes the specified ListJobTemplatesRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1.ListJobTemplatesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.ListJobTemplatesRequest + * @static + * @param {google.cloud.video.transcoder.v1.IListJobTemplatesRequest} message ListJobTemplatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobTemplatesRequest.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 ListJobTemplatesRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.ListJobTemplatesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.ListJobTemplatesRequest + * @static + * @param {google.cloud.video.transcoder.v1.IListJobTemplatesRequest} message ListJobTemplatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobTemplatesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListJobTemplatesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.ListJobTemplatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.ListJobTemplatesRequest} ListJobTemplatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobTemplatesRequest.decode = function 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.transcoder.v1.ListJobTemplatesRequest(); + 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 ListJobTemplatesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.ListJobTemplatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.ListJobTemplatesRequest} ListJobTemplatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobTemplatesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListJobTemplatesRequest message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.ListJobTemplatesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListJobTemplatesRequest.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 ListJobTemplatesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.ListJobTemplatesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.ListJobTemplatesRequest} ListJobTemplatesRequest + */ + ListJobTemplatesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.ListJobTemplatesRequest) + return object; + var message = new $root.google.cloud.video.transcoder.v1.ListJobTemplatesRequest(); + 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 ListJobTemplatesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.ListJobTemplatesRequest + * @static + * @param {google.cloud.video.transcoder.v1.ListJobTemplatesRequest} message ListJobTemplatesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListJobTemplatesRequest.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 ListJobTemplatesRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.ListJobTemplatesRequest + * @instance + * @returns {Object.} JSON object + */ + ListJobTemplatesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListJobTemplatesRequest; + })(); + + v1.GetJobTemplateRequest = (function() { + + /** + * Properties of a GetJobTemplateRequest. + * @memberof google.cloud.video.transcoder.v1 + * @interface IGetJobTemplateRequest + * @property {string|null} [name] GetJobTemplateRequest name + */ + + /** + * Constructs a new GetJobTemplateRequest. + * @memberof google.cloud.video.transcoder.v1 + * @classdesc Represents a GetJobTemplateRequest. + * @implements IGetJobTemplateRequest + * @constructor + * @param {google.cloud.video.transcoder.v1.IGetJobTemplateRequest=} [properties] Properties to set + */ + function GetJobTemplateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetJobTemplateRequest name. + * @member {string} name + * @memberof google.cloud.video.transcoder.v1.GetJobTemplateRequest + * @instance + */ + GetJobTemplateRequest.prototype.name = ""; + + /** + * Creates a new GetJobTemplateRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.GetJobTemplateRequest + * @static + * @param {google.cloud.video.transcoder.v1.IGetJobTemplateRequest=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.GetJobTemplateRequest} GetJobTemplateRequest instance + */ + GetJobTemplateRequest.create = function create(properties) { + return new GetJobTemplateRequest(properties); + }; + + /** + * Encodes the specified GetJobTemplateRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1.GetJobTemplateRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.GetJobTemplateRequest + * @static + * @param {google.cloud.video.transcoder.v1.IGetJobTemplateRequest} message GetJobTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetJobTemplateRequest.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 GetJobTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.GetJobTemplateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.GetJobTemplateRequest + * @static + * @param {google.cloud.video.transcoder.v1.IGetJobTemplateRequest} message GetJobTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetJobTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetJobTemplateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.GetJobTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.GetJobTemplateRequest} GetJobTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetJobTemplateRequest.decode = function 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.transcoder.v1.GetJobTemplateRequest(); + 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 GetJobTemplateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.GetJobTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.GetJobTemplateRequest} GetJobTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetJobTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetJobTemplateRequest message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.GetJobTemplateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetJobTemplateRequest.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 GetJobTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.GetJobTemplateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.GetJobTemplateRequest} GetJobTemplateRequest + */ + GetJobTemplateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.GetJobTemplateRequest) + return object; + var message = new $root.google.cloud.video.transcoder.v1.GetJobTemplateRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetJobTemplateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.GetJobTemplateRequest + * @static + * @param {google.cloud.video.transcoder.v1.GetJobTemplateRequest} message GetJobTemplateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetJobTemplateRequest.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 GetJobTemplateRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.GetJobTemplateRequest + * @instance + * @returns {Object.} JSON object + */ + GetJobTemplateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetJobTemplateRequest; + })(); + + v1.DeleteJobTemplateRequest = (function() { + + /** + * Properties of a DeleteJobTemplateRequest. + * @memberof google.cloud.video.transcoder.v1 + * @interface IDeleteJobTemplateRequest + * @property {string|null} [name] DeleteJobTemplateRequest name + */ + + /** + * Constructs a new DeleteJobTemplateRequest. + * @memberof google.cloud.video.transcoder.v1 + * @classdesc Represents a DeleteJobTemplateRequest. + * @implements IDeleteJobTemplateRequest + * @constructor + * @param {google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest=} [properties] Properties to set + */ + function DeleteJobTemplateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteJobTemplateRequest name. + * @member {string} name + * @memberof google.cloud.video.transcoder.v1.DeleteJobTemplateRequest + * @instance + */ + DeleteJobTemplateRequest.prototype.name = ""; + + /** + * Creates a new DeleteJobTemplateRequest instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.DeleteJobTemplateRequest + * @static + * @param {google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.DeleteJobTemplateRequest} DeleteJobTemplateRequest instance + */ + DeleteJobTemplateRequest.create = function create(properties) { + return new DeleteJobTemplateRequest(properties); + }; + + /** + * Encodes the specified DeleteJobTemplateRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1.DeleteJobTemplateRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.DeleteJobTemplateRequest + * @static + * @param {google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest} message DeleteJobTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteJobTemplateRequest.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 DeleteJobTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.DeleteJobTemplateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.DeleteJobTemplateRequest + * @static + * @param {google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest} message DeleteJobTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteJobTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteJobTemplateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.DeleteJobTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.DeleteJobTemplateRequest} DeleteJobTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteJobTemplateRequest.decode = function 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.transcoder.v1.DeleteJobTemplateRequest(); + 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 DeleteJobTemplateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.DeleteJobTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.DeleteJobTemplateRequest} DeleteJobTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteJobTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteJobTemplateRequest message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.DeleteJobTemplateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteJobTemplateRequest.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 DeleteJobTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.DeleteJobTemplateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.DeleteJobTemplateRequest} DeleteJobTemplateRequest + */ + DeleteJobTemplateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest) + return object; + var message = new $root.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteJobTemplateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.DeleteJobTemplateRequest + * @static + * @param {google.cloud.video.transcoder.v1.DeleteJobTemplateRequest} message DeleteJobTemplateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteJobTemplateRequest.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 DeleteJobTemplateRequest to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.DeleteJobTemplateRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteJobTemplateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteJobTemplateRequest; + })(); + + v1.ListJobTemplatesResponse = (function() { + + /** + * Properties of a ListJobTemplatesResponse. + * @memberof google.cloud.video.transcoder.v1 + * @interface IListJobTemplatesResponse + * @property {Array.|null} [jobTemplates] ListJobTemplatesResponse jobTemplates + * @property {string|null} [nextPageToken] ListJobTemplatesResponse nextPageToken + * @property {Array.|null} [unreachable] ListJobTemplatesResponse unreachable + */ + + /** + * Constructs a new ListJobTemplatesResponse. + * @memberof google.cloud.video.transcoder.v1 + * @classdesc Represents a ListJobTemplatesResponse. + * @implements IListJobTemplatesResponse + * @constructor + * @param {google.cloud.video.transcoder.v1.IListJobTemplatesResponse=} [properties] Properties to set + */ + function ListJobTemplatesResponse(properties) { + this.jobTemplates = []; + 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]]; + } + + /** + * ListJobTemplatesResponse jobTemplates. + * @member {Array.} jobTemplates + * @memberof google.cloud.video.transcoder.v1.ListJobTemplatesResponse + * @instance + */ + ListJobTemplatesResponse.prototype.jobTemplates = $util.emptyArray; + + /** + * ListJobTemplatesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.video.transcoder.v1.ListJobTemplatesResponse + * @instance + */ + ListJobTemplatesResponse.prototype.nextPageToken = ""; + + /** + * ListJobTemplatesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.video.transcoder.v1.ListJobTemplatesResponse + * @instance + */ + ListJobTemplatesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListJobTemplatesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1.ListJobTemplatesResponse + * @static + * @param {google.cloud.video.transcoder.v1.IListJobTemplatesResponse=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1.ListJobTemplatesResponse} ListJobTemplatesResponse instance + */ + ListJobTemplatesResponse.create = function create(properties) { + return new ListJobTemplatesResponse(properties); + }; + + /** + * Encodes the specified ListJobTemplatesResponse message. Does not implicitly {@link google.cloud.video.transcoder.v1.ListJobTemplatesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1.ListJobTemplatesResponse + * @static + * @param {google.cloud.video.transcoder.v1.IListJobTemplatesResponse} message ListJobTemplatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobTemplatesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.jobTemplates != null && message.jobTemplates.length) + for (var i = 0; i < message.jobTemplates.length; ++i) + $root.google.cloud.video.transcoder.v1.JobTemplate.encode(message.jobTemplates[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 ListJobTemplatesResponse message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.ListJobTemplatesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1.ListJobTemplatesResponse + * @static + * @param {google.cloud.video.transcoder.v1.IListJobTemplatesResponse} message ListJobTemplatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobTemplatesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListJobTemplatesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1.ListJobTemplatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1.ListJobTemplatesResponse} ListJobTemplatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobTemplatesResponse.decode = function 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.transcoder.v1.ListJobTemplatesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.jobTemplates && message.jobTemplates.length)) + message.jobTemplates = []; + message.jobTemplates.push($root.google.cloud.video.transcoder.v1.JobTemplate.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 ListJobTemplatesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1.ListJobTemplatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1.ListJobTemplatesResponse} ListJobTemplatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobTemplatesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListJobTemplatesResponse message. + * @function verify + * @memberof google.cloud.video.transcoder.v1.ListJobTemplatesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListJobTemplatesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.jobTemplates != null && message.hasOwnProperty("jobTemplates")) { + if (!Array.isArray(message.jobTemplates)) + return "jobTemplates: array expected"; + for (var i = 0; i < message.jobTemplates.length; ++i) { + var error = $root.google.cloud.video.transcoder.v1.JobTemplate.verify(message.jobTemplates[i]); + if (error) + return "jobTemplates." + 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 ListJobTemplatesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1.ListJobTemplatesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1.ListJobTemplatesResponse} ListJobTemplatesResponse + */ + ListJobTemplatesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1.ListJobTemplatesResponse) + return object; + var message = new $root.google.cloud.video.transcoder.v1.ListJobTemplatesResponse(); + if (object.jobTemplates) { + if (!Array.isArray(object.jobTemplates)) + throw TypeError(".google.cloud.video.transcoder.v1.ListJobTemplatesResponse.jobTemplates: array expected"); + message.jobTemplates = []; + for (var i = 0; i < object.jobTemplates.length; ++i) { + if (typeof object.jobTemplates[i] !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.ListJobTemplatesResponse.jobTemplates: object expected"); + message.jobTemplates[i] = $root.google.cloud.video.transcoder.v1.JobTemplate.fromObject(object.jobTemplates[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.video.transcoder.v1.ListJobTemplatesResponse.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 ListJobTemplatesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1.ListJobTemplatesResponse + * @static + * @param {google.cloud.video.transcoder.v1.ListJobTemplatesResponse} message ListJobTemplatesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListJobTemplatesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.jobTemplates = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.jobTemplates && message.jobTemplates.length) { + object.jobTemplates = []; + for (var j = 0; j < message.jobTemplates.length; ++j) + object.jobTemplates[j] = $root.google.cloud.video.transcoder.v1.JobTemplate.toObject(message.jobTemplates[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 ListJobTemplatesResponse to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1.ListJobTemplatesResponse + * @instance + * @returns {Object.} JSON object + */ + ListJobTemplatesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListJobTemplatesResponse; + })(); + + return v1; + })(); + + transcoder.v1beta1 = (function() { + + /** + * Namespace v1beta1. + * @memberof google.cloud.video.transcoder + * @namespace + */ + var v1beta1 = {}; + + v1beta1.Job = (function() { + + /** + * Properties of a Job. + * @memberof google.cloud.video.transcoder.v1beta1 + * @interface IJob + * @property {string|null} [name] Job name + * @property {string|null} [inputUri] Job inputUri + * @property {string|null} [outputUri] Job outputUri + * @property {string|null} [templateId] Job templateId + * @property {google.cloud.video.transcoder.v1beta1.IJobConfig|null} [config] Job config + * @property {number|null} [priority] Job priority + * @property {google.cloud.video.transcoder.v1beta1.Job.IOriginUri|null} [originUri] Job originUri + * @property {google.cloud.video.transcoder.v1beta1.Job.ProcessingState|null} [state] Job state + * @property {google.cloud.video.transcoder.v1beta1.IProgress|null} [progress] Job progress + * @property {string|null} [failureReason] Job failureReason + * @property {Array.|null} [failureDetails] Job failureDetails + * @property {google.protobuf.ITimestamp|null} [createTime] Job createTime + * @property {google.protobuf.ITimestamp|null} [startTime] Job startTime + * @property {google.protobuf.ITimestamp|null} [endTime] Job endTime + */ + + /** + * Constructs a new Job. + * @memberof google.cloud.video.transcoder.v1beta1 + * @classdesc Represents a Job. + * @implements IJob + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.IJob=} [properties] Properties to set + */ + function Job(properties) { + this.failureDetails = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Job name. + * @member {string} name + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Job.prototype.name = ""; + + /** + * Job inputUri. + * @member {string} inputUri + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Job.prototype.inputUri = ""; + + /** + * Job outputUri. + * @member {string} outputUri + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Job.prototype.outputUri = ""; + + /** + * Job templateId. + * @member {string|null|undefined} templateId + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Job.prototype.templateId = null; + + /** + * Job config. + * @member {google.cloud.video.transcoder.v1beta1.IJobConfig|null|undefined} config + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Job.prototype.config = null; + + /** + * Job priority. + * @member {number} priority + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Job.prototype.priority = 0; + + /** + * Job originUri. + * @member {google.cloud.video.transcoder.v1beta1.Job.IOriginUri|null|undefined} originUri + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Job.prototype.originUri = null; + + /** + * Job state. + * @member {google.cloud.video.transcoder.v1beta1.Job.ProcessingState} state + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Job.prototype.state = 0; + + /** + * Job progress. + * @member {google.cloud.video.transcoder.v1beta1.IProgress|null|undefined} progress + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Job.prototype.progress = null; + + /** + * Job failureReason. + * @member {string} failureReason + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Job.prototype.failureReason = ""; + + /** + * Job failureDetails. + * @member {Array.} failureDetails + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Job.prototype.failureDetails = $util.emptyArray; + + /** + * Job createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Job.prototype.createTime = null; + + /** + * Job startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Job.prototype.startTime = null; + + /** + * Job endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Job.prototype.endTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Job jobConfig. + * @member {"templateId"|"config"|undefined} jobConfig + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Object.defineProperty(Job.prototype, "jobConfig", { + get: $util.oneOfGetter($oneOfFields = ["templateId", "config"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Job instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @static + * @param {google.cloud.video.transcoder.v1beta1.IJob=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.Job} Job instance + */ + Job.create = function create(properties) { + return new Job(properties); + }; + + /** + * Encodes the specified Job message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Job.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @static + * @param {google.cloud.video.transcoder.v1beta1.IJob} message Job message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Job.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.inputUri != null && Object.hasOwnProperty.call(message, "inputUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputUri); + if (message.outputUri != null && Object.hasOwnProperty.call(message, "outputUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputUri); + if (message.templateId != null && Object.hasOwnProperty.call(message, "templateId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.templateId); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.cloud.video.transcoder.v1beta1.JobConfig.encode(message.config, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.priority); + if (message.originUri != null && Object.hasOwnProperty.call(message, "originUri")) + $root.google.cloud.video.transcoder.v1beta1.Job.OriginUri.encode(message.originUri, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); + if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) + $root.google.cloud.video.transcoder.v1beta1.Progress.encode(message.progress, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.failureReason != null && Object.hasOwnProperty.call(message, "failureReason")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.failureReason); + if (message.failureDetails != null && message.failureDetails.length) + for (var i = 0; i < message.failureDetails.length; ++i) + $root.google.cloud.video.transcoder.v1beta1.FailureDetail.encode(message.failureDetails[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Job message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Job.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @static + * @param {google.cloud.video.transcoder.v1beta1.IJob} message Job message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Job.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Job message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.Job} Job + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Job.decode = function 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.transcoder.v1beta1.Job(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.inputUri = reader.string(); + break; + case 3: + message.outputUri = reader.string(); + break; + case 4: + message.templateId = reader.string(); + break; + case 5: + message.config = $root.google.cloud.video.transcoder.v1beta1.JobConfig.decode(reader, reader.uint32()); + break; + case 6: + message.priority = reader.int32(); + break; + case 7: + message.originUri = $root.google.cloud.video.transcoder.v1beta1.Job.OriginUri.decode(reader, reader.uint32()); + break; + case 8: + message.state = reader.int32(); + break; + case 9: + message.progress = $root.google.cloud.video.transcoder.v1beta1.Progress.decode(reader, reader.uint32()); + break; + case 10: + message.failureReason = reader.string(); + break; + case 11: + if (!(message.failureDetails && message.failureDetails.length)) + message.failureDetails = []; + message.failureDetails.push($root.google.cloud.video.transcoder.v1beta1.FailureDetail.decode(reader, reader.uint32())); + break; + case 12: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 13: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 14: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Job message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.Job} Job + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Job.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Job message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Job.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputUri != null && message.hasOwnProperty("inputUri")) + if (!$util.isString(message.inputUri)) + return "inputUri: string expected"; + if (message.outputUri != null && message.hasOwnProperty("outputUri")) + if (!$util.isString(message.outputUri)) + return "outputUri: string expected"; + if (message.templateId != null && message.hasOwnProperty("templateId")) { + properties.jobConfig = 1; + if (!$util.isString(message.templateId)) + return "templateId: string expected"; + } + if (message.config != null && message.hasOwnProperty("config")) { + if (properties.jobConfig === 1) + return "jobConfig: multiple values"; + properties.jobConfig = 1; + { + var error = $root.google.cloud.video.transcoder.v1beta1.JobConfig.verify(message.config); + if (error) + return "config." + error; + } + } + if (message.priority != null && message.hasOwnProperty("priority")) + if (!$util.isInteger(message.priority)) + return "priority: integer expected"; + if (message.originUri != null && message.hasOwnProperty("originUri")) { + var error = $root.google.cloud.video.transcoder.v1beta1.Job.OriginUri.verify(message.originUri); + if (error) + return "originUri." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.progress != null && message.hasOwnProperty("progress")) { + var error = $root.google.cloud.video.transcoder.v1beta1.Progress.verify(message.progress); + if (error) + return "progress." + error; + } + if (message.failureReason != null && message.hasOwnProperty("failureReason")) + if (!$util.isString(message.failureReason)) + return "failureReason: string expected"; + if (message.failureDetails != null && message.hasOwnProperty("failureDetails")) { + if (!Array.isArray(message.failureDetails)) + return "failureDetails: array expected"; + for (var i = 0; i < message.failureDetails.length; ++i) { + var error = $root.google.cloud.video.transcoder.v1beta1.FailureDetail.verify(message.failureDetails[i]); + if (error) + return "failureDetails." + error; + } + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates a Job message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.Job} Job + */ + Job.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Job) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.Job(); + if (object.name != null) + message.name = String(object.name); + if (object.inputUri != null) + message.inputUri = String(object.inputUri); + if (object.outputUri != null) + message.outputUri = String(object.outputUri); + if (object.templateId != null) + message.templateId = String(object.templateId); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.config: object expected"); + message.config = $root.google.cloud.video.transcoder.v1beta1.JobConfig.fromObject(object.config); + } + if (object.priority != null) + message.priority = object.priority | 0; + if (object.originUri != null) { + if (typeof object.originUri !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.originUri: object expected"); + message.originUri = $root.google.cloud.video.transcoder.v1beta1.Job.OriginUri.fromObject(object.originUri); + } + switch (object.state) { + case "PROCESSING_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PENDING": + case 1: + message.state = 1; + break; + case "RUNNING": + case 2: + message.state = 2; + break; + case "SUCCEEDED": + case 3: + message.state = 3; + break; + case "FAILED": + case 4: + message.state = 4; + break; + } + if (object.progress != null) { + if (typeof object.progress !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.progress: object expected"); + message.progress = $root.google.cloud.video.transcoder.v1beta1.Progress.fromObject(object.progress); + } + if (object.failureReason != null) + message.failureReason = String(object.failureReason); + if (object.failureDetails) { + if (!Array.isArray(object.failureDetails)) + throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.failureDetails: array expected"); + message.failureDetails = []; + for (var i = 0; i < object.failureDetails.length; ++i) { + if (typeof object.failureDetails[i] !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.failureDetails: object expected"); + message.failureDetails[i] = $root.google.cloud.video.transcoder.v1beta1.FailureDetail.fromObject(object.failureDetails[i]); + } + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + return message; + }; + + /** + * Creates a plain object from a Job message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @static + * @param {google.cloud.video.transcoder.v1beta1.Job} message Job + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Job.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.failureDetails = []; + if (options.defaults) { + object.name = ""; + object.inputUri = ""; + object.outputUri = ""; + object.priority = 0; + object.originUri = null; + object.state = options.enums === String ? "PROCESSING_STATE_UNSPECIFIED" : 0; + object.progress = null; + object.failureReason = ""; + object.createTime = null; + object.startTime = null; + object.endTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputUri != null && message.hasOwnProperty("inputUri")) + object.inputUri = message.inputUri; + if (message.outputUri != null && message.hasOwnProperty("outputUri")) + object.outputUri = message.outputUri; + if (message.templateId != null && message.hasOwnProperty("templateId")) { + object.templateId = message.templateId; + if (options.oneofs) + object.jobConfig = "templateId"; + } + if (message.config != null && message.hasOwnProperty("config")) { + object.config = $root.google.cloud.video.transcoder.v1beta1.JobConfig.toObject(message.config, options); + if (options.oneofs) + object.jobConfig = "config"; + } + if (message.priority != null && message.hasOwnProperty("priority")) + object.priority = message.priority; + if (message.originUri != null && message.hasOwnProperty("originUri")) + object.originUri = $root.google.cloud.video.transcoder.v1beta1.Job.OriginUri.toObject(message.originUri, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.video.transcoder.v1beta1.Job.ProcessingState[message.state] : message.state; + if (message.progress != null && message.hasOwnProperty("progress")) + object.progress = $root.google.cloud.video.transcoder.v1beta1.Progress.toObject(message.progress, options); + if (message.failureReason != null && message.hasOwnProperty("failureReason")) + object.failureReason = message.failureReason; + if (message.failureDetails && message.failureDetails.length) { + object.failureDetails = []; + for (var j = 0; j < message.failureDetails.length; ++j) + object.failureDetails[j] = $root.google.cloud.video.transcoder.v1beta1.FailureDetail.toObject(message.failureDetails[j], options); + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + return object; + }; + + /** + * Converts this Job to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + * @returns {Object.} JSON object + */ + Job.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Job.OriginUri = (function() { + + /** + * Properties of an OriginUri. + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @interface IOriginUri + * @property {string|null} [hls] OriginUri hls + * @property {string|null} [dash] OriginUri dash + */ + + /** + * Constructs a new OriginUri. + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @classdesc Represents an OriginUri. + * @implements IOriginUri + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.Job.IOriginUri=} [properties] Properties to set + */ + function OriginUri(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OriginUri hls. + * @member {string} hls + * @memberof google.cloud.video.transcoder.v1beta1.Job.OriginUri * @instance */ OriginUri.prototype.hls = ""; @@ -23783,38 +37684,262 @@ }; /** - * Converts this Duration to JSON. + * 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); + }; + + return Duration; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. * @function toJSON - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Timestamp * @instance * @returns {Object.} JSON object */ - Duration.prototype.toJSON = function toJSON() { + Timestamp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Duration; + return Timestamp; })(); - protobuf.Timestamp = (function() { + protobuf.Any = (function() { /** - * Properties of a Timestamp. + * Properties of an Any. * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value */ /** - * Constructs a new Timestamp. + * Constructs a new Any. * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp + * @classdesc Represents an Any. + * @implements IAny * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @param {google.protobuf.IAny=} [properties] Properties to set */ - function Timestamp(properties) { + function Any(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23822,88 +37947,88 @@ } /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any * @instance */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Any.prototype.type_url = ""; /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any * @instance */ - Timestamp.prototype.nanos = 0; + Any.prototype.value = $util.newBuffer([]); /** - * Creates a new Timestamp instance using the specified properties. + * Creates a new Any instance using the specified properties. * @function create - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); + Any.create = function create(properties) { + return new Any(properties); }; /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encode - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encode = function encode(message, writer) { + Any.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); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); return writer; }; /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + Any.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Timestamp message from the specified reader or buffer. + * Decodes an Any message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Any * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.protobuf.Any} Any * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Timestamp.decode = function decode(reader, length) { + Any.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.seconds = reader.int64(); + message.type_url = reader.string(); break; case 2: - message.nanos = reader.int32(); + message.value = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -23914,110 +38039,105 @@ }; /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * Decodes an Any message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Any * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.protobuf.Any} Any * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { + Any.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Timestamp message. + * Verifies an Any message. * @function verify - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Any * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Timestamp.verify = function verify(message) { + Any.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"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; return null; }; /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Any * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.protobuf.Any} Any */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) return object; - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; return message; }; /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * Creates a plain object from an Any message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.Timestamp} message Timestamp + * @param {google.protobuf.Any} message Any * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Timestamp.toObject = function toObject(message, options) { + Any.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; + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; }; /** - * Converts this Timestamp to JSON. + * Converts this Any to JSON. * @function toJSON - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Any * @instance * @returns {Object.} JSON object */ - Timestamp.prototype.toJSON = function toJSON() { + Any.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Timestamp; + return Any; })(); protobuf.Empty = (function() { @@ -24183,6 +38303,272 @@ return protobuf; })(); + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { + + /** + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details + */ + + /** + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set + */ + function Status(properties) { + this.details = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; + + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.int32(); + break; + case 2: + message.message = reader.string(); + break; + case 3: + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @memberof google.rpc.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i]); + if (error) + return "details." + error; + } + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) + return object; + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + } + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Status; + })(); + + return rpc; + })(); + return google; })(); diff --git a/packages/google-cloud-video-transcoder/protos/protos.json b/packages/google-cloud-video-transcoder/protos/protos.json index 0b4af31da95..795e2e4dbd3 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.json +++ b/packages/google-cloud-video-transcoder/protos/protos.json @@ -8,6 +8,1477 @@ "nested": { "transcoder": { "nested": { + "v1": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/cloud/video/transcoder/v1;transcoder", + "java_multiple_files": true, + "java_outer_classname": "ServicesProto", + "java_package": "com.google.cloud.video.transcoder.v1", + "csharp_namespace": "Google.Cloud.Video.Transcoder.V1", + "php_namespace": "Google\\Cloud\\Video\\Transcoder\\V1", + "ruby_package": "Google::Cloud::Video::Transcoder::V1" + }, + "nested": { + "Job": { + "options": { + "(google.api.resource).type": "transcoder.googleapis.com/Job", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/jobs/{job}" + }, + "oneofs": { + "jobConfig": { + "oneof": [ + "templateId", + "config" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputUri": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY" + } + }, + "outputUri": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY" + } + }, + "templateId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY" + } + }, + "config": { + "type": "JobConfig", + "id": 5 + }, + "state": { + "type": "ProcessingState", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "ttlAfterCompletionDays": { + "type": "int32", + "id": 15 + }, + "error": { + "type": "google.rpc.Status", + "id": 17, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "ProcessingState": { + "values": { + "PROCESSING_STATE_UNSPECIFIED": 0, + "PENDING": 1, + "RUNNING": 2, + "SUCCEEDED": 3, + "FAILED": 4 + } + } + } + }, + "JobTemplate": { + "options": { + "(google.api.resource).type": "transcoder.googleapis.com/JobTemplate", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/jobTemplates/{job_template}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "config": { + "type": "JobConfig", + "id": 2 + } + } + }, + "JobConfig": { + "fields": { + "inputs": { + "rule": "repeated", + "type": "Input", + "id": 1 + }, + "editList": { + "rule": "repeated", + "type": "EditAtom", + "id": 2 + }, + "elementaryStreams": { + "rule": "repeated", + "type": "ElementaryStream", + "id": 3 + }, + "muxStreams": { + "rule": "repeated", + "type": "MuxStream", + "id": 4 + }, + "manifests": { + "rule": "repeated", + "type": "Manifest", + "id": 5 + }, + "output": { + "type": "Output", + "id": 6 + }, + "adBreaks": { + "rule": "repeated", + "type": "AdBreak", + "id": 7 + }, + "pubsubDestination": { + "type": "PubsubDestination", + "id": 8 + }, + "spriteSheets": { + "rule": "repeated", + "type": "SpriteSheet", + "id": 9 + }, + "overlays": { + "rule": "repeated", + "type": "Overlay", + "id": 10 + } + } + }, + "Input": { + "fields": { + "key": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "preprocessingConfig": { + "type": "PreprocessingConfig", + "id": 3 + } + } + }, + "Output": { + "fields": { + "uri": { + "type": "string", + "id": 1 + } + } + }, + "EditAtom": { + "fields": { + "key": { + "type": "string", + "id": 1 + }, + "inputs": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "endTimeOffset": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "startTimeOffset": { + "type": "google.protobuf.Duration", + "id": 4 + } + } + }, + "AdBreak": { + "fields": { + "startTimeOffset": { + "type": "google.protobuf.Duration", + "id": 1 + } + } + }, + "ElementaryStream": { + "oneofs": { + "elementaryStream": { + "oneof": [ + "videoStream", + "audioStream", + "textStream" + ] + } + }, + "fields": { + "key": { + "type": "string", + "id": 4 + }, + "videoStream": { + "type": "VideoStream", + "id": 1 + }, + "audioStream": { + "type": "AudioStream", + "id": 2 + }, + "textStream": { + "type": "TextStream", + "id": 3 + } + } + }, + "MuxStream": { + "fields": { + "key": { + "type": "string", + "id": 1 + }, + "fileName": { + "type": "string", + "id": 2 + }, + "container": { + "type": "string", + "id": 3 + }, + "elementaryStreams": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "segmentSettings": { + "type": "SegmentSettings", + "id": 5 + }, + "encryption": { + "type": "Encryption", + "id": 6 + } + } + }, + "Manifest": { + "fields": { + "fileName": { + "type": "string", + "id": 1 + }, + "type": { + "type": "ManifestType", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "muxStreams": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "ManifestType": { + "values": { + "MANIFEST_TYPE_UNSPECIFIED": 0, + "HLS": 1, + "DASH": 2 + } + } + } + }, + "PubsubDestination": { + "fields": { + "topic": { + "type": "string", + "id": 1 + } + } + }, + "SpriteSheet": { + "oneofs": { + "extractionStrategy": { + "oneof": [ + "totalCount", + "interval" + ] + } + }, + "fields": { + "format": { + "type": "string", + "id": 1 + }, + "filePrefix": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "spriteWidthPixels": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "spriteHeightPixels": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "columnCount": { + "type": "int32", + "id": 5 + }, + "rowCount": { + "type": "int32", + "id": 6 + }, + "startTimeOffset": { + "type": "google.protobuf.Duration", + "id": 7 + }, + "endTimeOffset": { + "type": "google.protobuf.Duration", + "id": 8 + }, + "totalCount": { + "type": "int32", + "id": 9 + }, + "interval": { + "type": "google.protobuf.Duration", + "id": 10 + }, + "quality": { + "type": "int32", + "id": 11 + } + } + }, + "Overlay": { + "fields": { + "image": { + "type": "Image", + "id": 1 + }, + "animations": { + "rule": "repeated", + "type": "Animation", + "id": 2 + } + }, + "nested": { + "NormalizedCoordinate": { + "fields": { + "x": { + "type": "double", + "id": 1 + }, + "y": { + "type": "double", + "id": 2 + } + } + }, + "Image": { + "fields": { + "uri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "resolution": { + "type": "NormalizedCoordinate", + "id": 2 + }, + "alpha": { + "type": "double", + "id": 3 + } + } + }, + "AnimationStatic": { + "fields": { + "xy": { + "type": "NormalizedCoordinate", + "id": 1 + }, + "startTimeOffset": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "AnimationFade": { + "fields": { + "fadeType": { + "type": "FadeType", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "xy": { + "type": "NormalizedCoordinate", + "id": 2 + }, + "startTimeOffset": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "endTimeOffset": { + "type": "google.protobuf.Duration", + "id": 4 + } + } + }, + "AnimationEnd": { + "fields": { + "startTimeOffset": { + "type": "google.protobuf.Duration", + "id": 1 + } + } + }, + "Animation": { + "oneofs": { + "animationType": { + "oneof": [ + "animationStatic", + "animationFade", + "animationEnd" + ] + } + }, + "fields": { + "animationStatic": { + "type": "AnimationStatic", + "id": 1 + }, + "animationFade": { + "type": "AnimationFade", + "id": 2 + }, + "animationEnd": { + "type": "AnimationEnd", + "id": 3 + } + } + }, + "FadeType": { + "values": { + "FADE_TYPE_UNSPECIFIED": 0, + "FADE_IN": 1, + "FADE_OUT": 2 + } + } + } + }, + "PreprocessingConfig": { + "fields": { + "color": { + "type": "Color", + "id": 1 + }, + "denoise": { + "type": "Denoise", + "id": 2 + }, + "deblock": { + "type": "Deblock", + "id": 3 + }, + "audio": { + "type": "Audio", + "id": 4 + }, + "crop": { + "type": "Crop", + "id": 5 + }, + "pad": { + "type": "Pad", + "id": 6 + } + }, + "nested": { + "Color": { + "fields": { + "saturation": { + "type": "double", + "id": 1 + }, + "contrast": { + "type": "double", + "id": 2 + }, + "brightness": { + "type": "double", + "id": 3 + } + } + }, + "Denoise": { + "fields": { + "strength": { + "type": "double", + "id": 1 + }, + "tune": { + "type": "string", + "id": 2 + } + } + }, + "Deblock": { + "fields": { + "strength": { + "type": "double", + "id": 1 + }, + "enabled": { + "type": "bool", + "id": 2 + } + } + }, + "Audio": { + "fields": { + "lufs": { + "type": "double", + "id": 1 + }, + "highBoost": { + "type": "bool", + "id": 2 + }, + "lowBoost": { + "type": "bool", + "id": 3 + } + } + }, + "Crop": { + "fields": { + "topPixels": { + "type": "int32", + "id": 1 + }, + "bottomPixels": { + "type": "int32", + "id": 2 + }, + "leftPixels": { + "type": "int32", + "id": 3 + }, + "rightPixels": { + "type": "int32", + "id": 4 + } + } + }, + "Pad": { + "fields": { + "topPixels": { + "type": "int32", + "id": 1 + }, + "bottomPixels": { + "type": "int32", + "id": 2 + }, + "leftPixels": { + "type": "int32", + "id": 3 + }, + "rightPixels": { + "type": "int32", + "id": 4 + } + } + } + } + }, + "VideoStream": { + "oneofs": { + "codecSettings": { + "oneof": [ + "h264", + "h265", + "vp9" + ] + } + }, + "fields": { + "h264": { + "type": "H264CodecSettings", + "id": 1 + }, + "h265": { + "type": "H265CodecSettings", + "id": 2 + }, + "vp9": { + "type": "Vp9CodecSettings", + "id": 3 + } + }, + "nested": { + "H264CodecSettings": { + "oneofs": { + "gopMode": { + "oneof": [ + "gopFrameCount", + "gopDuration" + ] + } + }, + "fields": { + "widthPixels": { + "type": "int32", + "id": 1 + }, + "heightPixels": { + "type": "int32", + "id": 2 + }, + "frameRate": { + "type": "double", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "bitrateBps": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pixelFormat": { + "type": "string", + "id": 5 + }, + "rateControlMode": { + "type": "string", + "id": 6 + }, + "crfLevel": { + "type": "int32", + "id": 7 + }, + "allowOpenGop": { + "type": "bool", + "id": 8 + }, + "gopFrameCount": { + "type": "int32", + "id": 9 + }, + "gopDuration": { + "type": "google.protobuf.Duration", + "id": 10 + }, + "enableTwoPass": { + "type": "bool", + "id": 11 + }, + "vbvSizeBits": { + "type": "int32", + "id": 12 + }, + "vbvFullnessBits": { + "type": "int32", + "id": 13 + }, + "entropyCoder": { + "type": "string", + "id": 14 + }, + "bPyramid": { + "type": "bool", + "id": 15 + }, + "bFrameCount": { + "type": "int32", + "id": 16 + }, + "aqStrength": { + "type": "double", + "id": 17 + }, + "profile": { + "type": "string", + "id": 18 + }, + "tune": { + "type": "string", + "id": 19 + }, + "preset": { + "type": "string", + "id": 20 + } + } + }, + "H265CodecSettings": { + "oneofs": { + "gopMode": { + "oneof": [ + "gopFrameCount", + "gopDuration" + ] + } + }, + "fields": { + "widthPixels": { + "type": "int32", + "id": 1 + }, + "heightPixels": { + "type": "int32", + "id": 2 + }, + "frameRate": { + "type": "double", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "bitrateBps": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pixelFormat": { + "type": "string", + "id": 5 + }, + "rateControlMode": { + "type": "string", + "id": 6 + }, + "crfLevel": { + "type": "int32", + "id": 7 + }, + "allowOpenGop": { + "type": "bool", + "id": 8 + }, + "gopFrameCount": { + "type": "int32", + "id": 9 + }, + "gopDuration": { + "type": "google.protobuf.Duration", + "id": 10 + }, + "enableTwoPass": { + "type": "bool", + "id": 11 + }, + "vbvSizeBits": { + "type": "int32", + "id": 12 + }, + "vbvFullnessBits": { + "type": "int32", + "id": 13 + }, + "bPyramid": { + "type": "bool", + "id": 14 + }, + "bFrameCount": { + "type": "int32", + "id": 15 + }, + "aqStrength": { + "type": "double", + "id": 16 + }, + "profile": { + "type": "string", + "id": 17 + }, + "tune": { + "type": "string", + "id": 18 + }, + "preset": { + "type": "string", + "id": 19 + } + } + }, + "Vp9CodecSettings": { + "oneofs": { + "gopMode": { + "oneof": [ + "gopFrameCount", + "gopDuration" + ] + } + }, + "fields": { + "widthPixels": { + "type": "int32", + "id": 1 + }, + "heightPixels": { + "type": "int32", + "id": 2 + }, + "frameRate": { + "type": "double", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "bitrateBps": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pixelFormat": { + "type": "string", + "id": 5 + }, + "rateControlMode": { + "type": "string", + "id": 6 + }, + "crfLevel": { + "type": "int32", + "id": 7 + }, + "gopFrameCount": { + "type": "int32", + "id": 8 + }, + "gopDuration": { + "type": "google.protobuf.Duration", + "id": 9 + }, + "profile": { + "type": "string", + "id": 10 + } + } + } + } + }, + "AudioStream": { + "fields": { + "codec": { + "type": "string", + "id": 1 + }, + "bitrateBps": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "channelCount": { + "type": "int32", + "id": 3 + }, + "channelLayout": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "mapping": { + "rule": "repeated", + "type": "AudioMapping", + "id": 5 + }, + "sampleRateHertz": { + "type": "int32", + "id": 6 + } + }, + "nested": { + "AudioMapping": { + "fields": { + "atomKey": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "inputKey": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "inputTrack": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "inputChannel": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "outputChannel": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "gainDb": { + "type": "double", + "id": 6 + } + } + } + } + }, + "TextStream": { + "fields": { + "codec": { + "type": "string", + "id": 1 + }, + "mapping": { + "rule": "repeated", + "type": "TextMapping", + "id": 3 + } + }, + "nested": { + "TextMapping": { + "fields": { + "atomKey": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "inputKey": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "inputTrack": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "SegmentSettings": { + "fields": { + "segmentDuration": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "individualSegments": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Encryption": { + "oneofs": { + "encryptionMode": { + "oneof": [ + "aes_128", + "sampleAes", + "mpegCenc" + ] + } + }, + "fields": { + "key": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "iv": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "aes_128": { + "type": "Aes128Encryption", + "id": 3 + }, + "sampleAes": { + "type": "SampleAesEncryption", + "id": 4 + }, + "mpegCenc": { + "type": "MpegCommonEncryption", + "id": 5 + } + }, + "nested": { + "Aes128Encryption": { + "fields": { + "keyUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "SampleAesEncryption": { + "fields": { + "keyUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MpegCommonEncryption": { + "fields": { + "keyId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "scheme": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "TranscoderService": { + "options": { + "(google.api.default_host)": "transcoder.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateJob": { + "requestType": "CreateJobRequest", + "responseType": "Job", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/jobs", + "(google.api.http).body": "job", + "(google.api.method_signature)": "parent,job" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/jobs", + "body": "job" + } + }, + { + "(google.api.method_signature)": "parent,job" + } + ] + }, + "ListJobs": { + "requestType": "ListJobsRequest", + "responseType": "ListJobsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/jobs", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/jobs" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetJob": { + "requestType": "GetJobRequest", + "responseType": "Job", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/jobs/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/jobs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteJob": { + "requestType": "DeleteJobRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/jobs/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/jobs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateJobTemplate": { + "requestType": "CreateJobTemplateRequest", + "responseType": "JobTemplate", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/jobTemplates", + "(google.api.http).body": "job_template", + "(google.api.method_signature)": "parent,job_template,job_template_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/jobTemplates", + "body": "job_template" + } + }, + { + "(google.api.method_signature)": "parent,job_template,job_template_id" + } + ] + }, + "ListJobTemplates": { + "requestType": "ListJobTemplatesRequest", + "responseType": "ListJobTemplatesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/jobTemplates", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/jobTemplates" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetJobTemplate": { + "requestType": "GetJobTemplateRequest", + "responseType": "JobTemplate", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/jobTemplates/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/jobTemplates/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteJobTemplate": { + "requestType": "DeleteJobTemplateRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/jobTemplates/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/jobTemplates/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "CreateJobRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "job": { + "type": "Job", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListJobsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5 + } + } + }, + "GetJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "transcoder.googleapis.com/Job" + } + } + } + }, + "DeleteJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "transcoder.googleapis.com/Job" + } + } + } + }, + "ListJobsResponse": { + "fields": { + "jobs": { + "rule": "repeated", + "type": "Job", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "CreateJobTemplateRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "jobTemplate": { + "type": "JobTemplate", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "jobTemplateId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListJobTemplatesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5 + } + } + }, + "GetJobTemplateRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "transcoder.googleapis.com/JobTemplate" + } + } + } + }, + "DeleteJobTemplateRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "transcoder.googleapis.com/JobTemplate" + } + } + } + }, + "ListJobTemplatesResponse": { + "fields": { + "jobTemplates": { + "rule": "repeated", + "type": "JobTemplate", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + } + } + }, "v1beta1": { "options": { "go_package": "google.golang.org/genproto/googleapis/cloud/video/transcoder/v1beta1;transcoder", @@ -2452,10 +3923,51 @@ } } }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, "Empty": { "fields": {} } } + }, + "rpc": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } } } } diff --git a/packages/google-cloud-video-transcoder/src/index.ts b/packages/google-cloud-video-transcoder/src/index.ts index ee0192e23c0..a388b892f12 100644 --- a/packages/google-cloud-video-transcoder/src/index.ts +++ b/packages/google-cloud-video-transcoder/src/index.ts @@ -16,12 +16,13 @@ // ** https://github.com/googleapis/synthtool ** // ** All changes to this file may be overwritten. ** +import * as v1 from './v1'; import * as v1beta1 from './v1beta1'; const TranscoderServiceClient = v1beta1.TranscoderServiceClient; type TranscoderServiceClient = v1beta1.TranscoderServiceClient; -export {v1beta1, TranscoderServiceClient}; -export default {v1beta1, TranscoderServiceClient}; +export {v1, v1beta1, TranscoderServiceClient}; +export default {v1, v1beta1, TranscoderServiceClient}; import * as protos from '../protos/protos'; export {protos}; diff --git a/packages/google-cloud-video-transcoder/src/v1/gapic_metadata.json b/packages/google-cloud-video-transcoder/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..d4f8949e0d3 --- /dev/null +++ b/packages/google-cloud-video-transcoder/src/v1/gapic_metadata.json @@ -0,0 +1,111 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.video.transcoder.v1", + "libraryPackage": "@google-cloud/transcoder", + "services": { + "TranscoderService": { + "clients": { + "grpc": { + "libraryClient": "TranscoderServiceClient", + "rpcs": { + "CreateJob": { + "methods": [ + "createJob" + ] + }, + "GetJob": { + "methods": [ + "getJob" + ] + }, + "DeleteJob": { + "methods": [ + "deleteJob" + ] + }, + "CreateJobTemplate": { + "methods": [ + "createJobTemplate" + ] + }, + "GetJobTemplate": { + "methods": [ + "getJobTemplate" + ] + }, + "DeleteJobTemplate": { + "methods": [ + "deleteJobTemplate" + ] + }, + "ListJobs": { + "methods": [ + "listJobs", + "listJobsStream", + "listJobsAsync" + ] + }, + "ListJobTemplates": { + "methods": [ + "listJobTemplates", + "listJobTemplatesStream", + "listJobTemplatesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "TranscoderServiceClient", + "rpcs": { + "CreateJob": { + "methods": [ + "createJob" + ] + }, + "GetJob": { + "methods": [ + "getJob" + ] + }, + "DeleteJob": { + "methods": [ + "deleteJob" + ] + }, + "CreateJobTemplate": { + "methods": [ + "createJobTemplate" + ] + }, + "GetJobTemplate": { + "methods": [ + "getJobTemplate" + ] + }, + "DeleteJobTemplate": { + "methods": [ + "deleteJobTemplate" + ] + }, + "ListJobs": { + "methods": [ + "listJobs", + "listJobsStream", + "listJobsAsync" + ] + }, + "ListJobTemplates": { + "methods": [ + "listJobTemplates", + "listJobTemplatesStream", + "listJobTemplatesAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-video-transcoder/src/v1/index.ts b/packages/google-cloud-video-transcoder/src/v1/index.ts new file mode 100644 index 00000000000..337677124be --- /dev/null +++ b/packages/google-cloud-video-transcoder/src/v1/index.ts @@ -0,0 +1,19 @@ +// 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. +// +// ** 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 {TranscoderServiceClient} from './transcoder_service_client'; diff --git a/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts b/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts new file mode 100644 index 00000000000..a3367dda48c --- /dev/null +++ b/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts @@ -0,0 +1,1485 @@ +// 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. +// +// ** 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 * as gax from 'google-gax'; +import { + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + GaxCall, +} from 'google-gax'; + +import {Transform} from 'stream'; +import {RequestType} from 'google-gax/build/src/apitypes'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/transcoder_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './transcoder_service_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * Using the Transcoder API, you can queue asynchronous jobs for transcoding + * media into various output formats. Output formats may include different + * streaming standards such as HTTP Live Streaming (HLS) and Dynamic Adaptive + * Streaming over HTTP (DASH). You can also customize jobs using advanced + * features such as Digital Rights Management (DRM), audio equalization, content + * concatenation, and digital ad-stitch ready content generation. + * @class + * @memberof v1 + */ +export class TranscoderServiceClient { + private _terminated = false; + private _opts: ClientOptions; + 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: {}, + }; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + transcoderServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of TranscoderServiceClient. + * + * @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/master/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. + * In fallback mode, a special browser-compatible transport implementation is used + * instead of gRPC transport. In browser context (if the `window` object is defined) + * the fallback mode is enabled automatically; set `options.fallback` to `false` + * if you need to override this behavior. + */ + constructor(opts?: ClientOptions) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof TranscoderServiceClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + 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); + + // 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; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gax.fallback : gax; + + // 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 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 = { + jobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/jobs/{job}' + ), + jobTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/jobTemplates/{job_template}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + }; + + // 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 = { + listJobs: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'jobs' + ), + listJobTemplates: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'jobTemplates' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.video.transcoder.v1.TranscoderService', + 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 = {}; + } + + /** + * 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.transcoderServiceStub) { + return this.transcoderServiceStub; + } + + // Put together the "service stub" for + // google.cloud.video.transcoder.v1.TranscoderService. + this.transcoderServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.video.transcoder.v1.TranscoderService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.video.transcoder.v1 + .TranscoderService, + this._opts + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const transcoderServiceStubMethods = [ + 'createJob', + 'listJobs', + 'getJob', + 'deleteJob', + 'createJobTemplate', + 'listJobTemplates', + 'getJobTemplate', + 'deleteJobTemplate', + ]; + for (const methodName of transcoderServiceStubMethods) { + const callPromise = this.transcoderServiceStub.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.innerApiCalls[methodName] = apiCall; + } + + return this.transcoderServiceStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'transcoder.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 'transcoder.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 -- + // ------------------- + createJob( + request?: protos.google.cloud.video.transcoder.v1.ICreateJobRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.transcoder.v1.IJob, + protos.google.cloud.video.transcoder.v1.ICreateJobRequest | undefined, + {} | undefined + ] + >; + createJob( + request: protos.google.cloud.video.transcoder.v1.ICreateJobRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.video.transcoder.v1.IJob, + | protos.google.cloud.video.transcoder.v1.ICreateJobRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createJob( + request: protos.google.cloud.video.transcoder.v1.ICreateJobRequest, + callback: Callback< + protos.google.cloud.video.transcoder.v1.IJob, + | protos.google.cloud.video.transcoder.v1.ICreateJobRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Creates a job in the specified region. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location to create and process this job. + * Format: `projects/{project}/locations/{location}` + * @param {google.cloud.video.transcoder.v1.Job} request.job + * Required. Parameters for creating transcoding job. + * @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 [Job]{@link google.cloud.video.transcoder.v1.Job}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.createJob(request); + */ + createJob( + request?: protos.google.cloud.video.transcoder.v1.ICreateJobRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.video.transcoder.v1.IJob, + | protos.google.cloud.video.transcoder.v1.ICreateJobRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.video.transcoder.v1.IJob, + | protos.google.cloud.video.transcoder.v1.ICreateJobRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.video.transcoder.v1.IJob, + protos.google.cloud.video.transcoder.v1.ICreateJobRequest | 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'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createJob(request, options, callback); + } + getJob( + request?: protos.google.cloud.video.transcoder.v1.IGetJobRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.transcoder.v1.IJob, + protos.google.cloud.video.transcoder.v1.IGetJobRequest | undefined, + {} | undefined + ] + >; + getJob( + request: protos.google.cloud.video.transcoder.v1.IGetJobRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.video.transcoder.v1.IJob, + protos.google.cloud.video.transcoder.v1.IGetJobRequest | null | undefined, + {} | null | undefined + > + ): void; + getJob( + request: protos.google.cloud.video.transcoder.v1.IGetJobRequest, + callback: Callback< + protos.google.cloud.video.transcoder.v1.IJob, + protos.google.cloud.video.transcoder.v1.IGetJobRequest | null | undefined, + {} | null | undefined + > + ): void; + /** + * Returns the job data. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the job to retrieve. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * @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 [Job]{@link google.cloud.video.transcoder.v1.Job}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getJob(request); + */ + getJob( + request?: protos.google.cloud.video.transcoder.v1.IGetJobRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.video.transcoder.v1.IJob, + | protos.google.cloud.video.transcoder.v1.IGetJobRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.video.transcoder.v1.IJob, + protos.google.cloud.video.transcoder.v1.IGetJobRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.video.transcoder.v1.IJob, + protos.google.cloud.video.transcoder.v1.IGetJobRequest | 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'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getJob(request, options, callback); + } + deleteJob( + request?: protos.google.cloud.video.transcoder.v1.IDeleteJobRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.video.transcoder.v1.IDeleteJobRequest | undefined, + {} | undefined + ] + >; + deleteJob( + request: protos.google.cloud.video.transcoder.v1.IDeleteJobRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.video.transcoder.v1.IDeleteJobRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteJob( + request: protos.google.cloud.video.transcoder.v1.IDeleteJobRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.video.transcoder.v1.IDeleteJobRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Deletes a job. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the job to delete. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * @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 + * const [response] = await client.deleteJob(request); + */ + deleteJob( + request?: protos.google.cloud.video.transcoder.v1.IDeleteJobRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.video.transcoder.v1.IDeleteJobRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.video.transcoder.v1.IDeleteJobRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.video.transcoder.v1.IDeleteJobRequest | 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'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteJob(request, options, callback); + } + createJobTemplate( + request?: protos.google.cloud.video.transcoder.v1.ICreateJobTemplateRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.transcoder.v1.IJobTemplate, + ( + | protos.google.cloud.video.transcoder.v1.ICreateJobTemplateRequest + | undefined + ), + {} | undefined + ] + >; + createJobTemplate( + request: protos.google.cloud.video.transcoder.v1.ICreateJobTemplateRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.video.transcoder.v1.IJobTemplate, + | protos.google.cloud.video.transcoder.v1.ICreateJobTemplateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createJobTemplate( + request: protos.google.cloud.video.transcoder.v1.ICreateJobTemplateRequest, + callback: Callback< + protos.google.cloud.video.transcoder.v1.IJobTemplate, + | protos.google.cloud.video.transcoder.v1.ICreateJobTemplateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Creates a job template in the specified region. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location to create this job template. + * Format: `projects/{project}/locations/{location}` + * @param {google.cloud.video.transcoder.v1.JobTemplate} request.jobTemplate + * Required. Parameters for creating job template. + * @param {string} request.jobTemplateId + * Required. The ID to use for the job template, which will become the final component + * of the job template's resource name. + * + * This value should be 4-63 characters, and valid characters must match the + * regular expression `{@link a-zA-Z0-9_-|a-zA-Z}*`. + * @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 [JobTemplate]{@link google.cloud.video.transcoder.v1.JobTemplate}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.createJobTemplate(request); + */ + createJobTemplate( + request?: protos.google.cloud.video.transcoder.v1.ICreateJobTemplateRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.video.transcoder.v1.IJobTemplate, + | protos.google.cloud.video.transcoder.v1.ICreateJobTemplateRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.video.transcoder.v1.IJobTemplate, + | protos.google.cloud.video.transcoder.v1.ICreateJobTemplateRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.video.transcoder.v1.IJobTemplate, + ( + | protos.google.cloud.video.transcoder.v1.ICreateJobTemplateRequest + | 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'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.createJobTemplate(request, options, callback); + } + getJobTemplate( + request?: protos.google.cloud.video.transcoder.v1.IGetJobTemplateRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.transcoder.v1.IJobTemplate, + ( + | protos.google.cloud.video.transcoder.v1.IGetJobTemplateRequest + | undefined + ), + {} | undefined + ] + >; + getJobTemplate( + request: protos.google.cloud.video.transcoder.v1.IGetJobTemplateRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.video.transcoder.v1.IJobTemplate, + | protos.google.cloud.video.transcoder.v1.IGetJobTemplateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getJobTemplate( + request: protos.google.cloud.video.transcoder.v1.IGetJobTemplateRequest, + callback: Callback< + protos.google.cloud.video.transcoder.v1.IJobTemplate, + | protos.google.cloud.video.transcoder.v1.IGetJobTemplateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Returns the job template data. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the job template to retrieve. + * Format: + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * @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 [JobTemplate]{@link google.cloud.video.transcoder.v1.JobTemplate}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * const [response] = await client.getJobTemplate(request); + */ + getJobTemplate( + request?: protos.google.cloud.video.transcoder.v1.IGetJobTemplateRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.video.transcoder.v1.IJobTemplate, + | protos.google.cloud.video.transcoder.v1.IGetJobTemplateRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.video.transcoder.v1.IJobTemplate, + | protos.google.cloud.video.transcoder.v1.IGetJobTemplateRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.video.transcoder.v1.IJobTemplate, + ( + | protos.google.cloud.video.transcoder.v1.IGetJobTemplateRequest + | 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'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.getJobTemplate(request, options, callback); + } + deleteJobTemplate( + request?: protos.google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest + | undefined + ), + {} | undefined + ] + >; + deleteJobTemplate( + request: protos.google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteJobTemplate( + request: protos.google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Deletes a job template. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the job template to delete. + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * @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 + * const [response] = await client.deleteJobTemplate(request); + */ + deleteJobTemplate( + request?: protos.google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest + | 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'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.deleteJobTemplate(request, options, callback); + } + + listJobs( + request?: protos.google.cloud.video.transcoder.v1.IListJobsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.transcoder.v1.IJob[], + protos.google.cloud.video.transcoder.v1.IListJobsRequest | null, + protos.google.cloud.video.transcoder.v1.IListJobsResponse + ] + >; + listJobs( + request: protos.google.cloud.video.transcoder.v1.IListJobsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.video.transcoder.v1.IListJobsRequest, + | protos.google.cloud.video.transcoder.v1.IListJobsResponse + | null + | undefined, + protos.google.cloud.video.transcoder.v1.IJob + > + ): void; + listJobs( + request: protos.google.cloud.video.transcoder.v1.IListJobsRequest, + callback: PaginationCallback< + protos.google.cloud.video.transcoder.v1.IListJobsRequest, + | protos.google.cloud.video.transcoder.v1.IListJobsResponse + | null + | undefined, + protos.google.cloud.video.transcoder.v1.IJob + > + ): void; + /** + * Lists jobs in the specified region. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Format: `projects/{project}/locations/{location}` + * @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 {string} request.filter + * The filter expression, following the syntax outlined in + * https://google.aip.dev/160. + * @param {string} request.orderBy + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * @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 [Job]{@link google.cloud.video.transcoder.v1.Job}. + * 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 `listJobsAsync()` + * 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. + */ + listJobs( + request?: protos.google.cloud.video.transcoder.v1.IListJobsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.video.transcoder.v1.IListJobsRequest, + | protos.google.cloud.video.transcoder.v1.IListJobsResponse + | null + | undefined, + protos.google.cloud.video.transcoder.v1.IJob + >, + callback?: PaginationCallback< + protos.google.cloud.video.transcoder.v1.IListJobsRequest, + | protos.google.cloud.video.transcoder.v1.IListJobsResponse + | null + | undefined, + protos.google.cloud.video.transcoder.v1.IJob + > + ): Promise< + [ + protos.google.cloud.video.transcoder.v1.IJob[], + protos.google.cloud.video.transcoder.v1.IListJobsRequest | null, + protos.google.cloud.video.transcoder.v1.IListJobsResponse + ] + > | 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'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listJobs(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. Format: `projects/{project}/locations/{location}` + * @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 {string} request.filter + * The filter expression, following the syntax outlined in + * https://google.aip.dev/160. + * @param {string} request.orderBy + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * @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 [Job]{@link google.cloud.video.transcoder.v1.Job} 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 `listJobsAsync()` + * 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. + */ + listJobsStream( + request?: protos.google.cloud.video.transcoder.v1.IListJobsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listJobs.createStream( + this.innerApiCalls.listJobs as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listJobs`, 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. Format: `projects/{project}/locations/{location}` + * @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 {string} request.filter + * The filter expression, following the syntax outlined in + * https://google.aip.dev/160. + * @param {string} request.orderBy + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * @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 + * [Job]{@link google.cloud.video.transcoder.v1.Job}. 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 + * const iterable = client.listJobsAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + listJobsAsync( + request?: protos.google.cloud.video.transcoder.v1.IListJobsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listJobs.asyncIterate( + this.innerApiCalls['listJobs'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + listJobTemplates( + request?: protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.transcoder.v1.IJobTemplate[], + protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest | null, + protos.google.cloud.video.transcoder.v1.IListJobTemplatesResponse + ] + >; + listJobTemplates( + request: protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, + | protos.google.cloud.video.transcoder.v1.IListJobTemplatesResponse + | null + | undefined, + protos.google.cloud.video.transcoder.v1.IJobTemplate + > + ): void; + listJobTemplates( + request: protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, + callback: PaginationCallback< + protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, + | protos.google.cloud.video.transcoder.v1.IListJobTemplatesResponse + | null + | undefined, + protos.google.cloud.video.transcoder.v1.IJobTemplate + > + ): void; + /** + * Lists job templates in the specified region. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location from which to retrieve the collection of job templates. + * Format: `projects/{project}/locations/{location}` + * @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 {string} request.filter + * The filter expression, following the syntax outlined in + * https://google.aip.dev/160. + * @param {string} request.orderBy + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * @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 [JobTemplate]{@link google.cloud.video.transcoder.v1.JobTemplate}. + * 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 `listJobTemplatesAsync()` + * 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. + */ + listJobTemplates( + request?: protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, + | protos.google.cloud.video.transcoder.v1.IListJobTemplatesResponse + | null + | undefined, + protos.google.cloud.video.transcoder.v1.IJobTemplate + >, + callback?: PaginationCallback< + protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, + | protos.google.cloud.video.transcoder.v1.IListJobTemplatesResponse + | null + | undefined, + protos.google.cloud.video.transcoder.v1.IJobTemplate + > + ): Promise< + [ + protos.google.cloud.video.transcoder.v1.IJobTemplate[], + protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest | null, + protos.google.cloud.video.transcoder.v1.IListJobTemplatesResponse + ] + > | 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'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listJobTemplates(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 parent location from which to retrieve the collection of job templates. + * Format: `projects/{project}/locations/{location}` + * @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 {string} request.filter + * The filter expression, following the syntax outlined in + * https://google.aip.dev/160. + * @param {string} request.orderBy + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * @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 [JobTemplate]{@link google.cloud.video.transcoder.v1.JobTemplate} 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 `listJobTemplatesAsync()` + * 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. + */ + listJobTemplatesStream( + request?: protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listJobTemplates.createStream( + this.innerApiCalls.listJobTemplates as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listJobTemplates`, 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 parent location from which to retrieve the collection of job templates. + * Format: `projects/{project}/locations/{location}` + * @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 {string} request.filter + * The filter expression, following the syntax outlined in + * https://google.aip.dev/160. + * @param {string} request.orderBy + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * @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 + * [JobTemplate]{@link google.cloud.video.transcoder.v1.JobTemplate}. 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 + * const iterable = client.listJobTemplatesAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + listJobTemplatesAsync( + request?: protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listJobTemplates.asyncIterate( + this.innerApiCalls['listJobTemplates'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified job resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} job + * @returns {string} Resource name string. + */ + jobPath(project: string, location: string, job: string) { + return this.pathTemplates.jobPathTemplate.render({ + project: project, + location: location, + job: job, + }); + } + + /** + * Parse the project from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the project. + */ + matchProjectFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).project; + } + + /** + * Parse the location from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the location. + */ + matchLocationFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).location; + } + + /** + * Parse the job from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the job. + */ + matchJobFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).job; + } + + /** + * Return a fully-qualified jobTemplate resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} job_template + * @returns {string} Resource name string. + */ + jobTemplatePath(project: string, location: string, jobTemplate: string) { + return this.pathTemplates.jobTemplatePathTemplate.render({ + project: project, + location: location, + job_template: jobTemplate, + }); + } + + /** + * Parse the project from JobTemplate resource. + * + * @param {string} jobTemplateName + * A fully-qualified path representing JobTemplate resource. + * @returns {string} A string representing the project. + */ + matchProjectFromJobTemplateName(jobTemplateName: string) { + return this.pathTemplates.jobTemplatePathTemplate.match(jobTemplateName) + .project; + } + + /** + * Parse the location from JobTemplate resource. + * + * @param {string} jobTemplateName + * A fully-qualified path representing JobTemplate resource. + * @returns {string} A string representing the location. + */ + matchLocationFromJobTemplateName(jobTemplateName: string) { + return this.pathTemplates.jobTemplatePathTemplate.match(jobTemplateName) + .location; + } + + /** + * Parse the job_template from JobTemplate resource. + * + * @param {string} jobTemplateName + * A fully-qualified path representing JobTemplate resource. + * @returns {string} A string representing the job_template. + */ + matchJobTemplateFromJobTemplateName(jobTemplateName: string) { + return this.pathTemplates.jobTemplatePathTemplate.match(jobTemplateName) + .job_template; + } + + /** + * 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; + } + + /** + * 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 { + this.initialize(); + if (!this._terminated) { + return this.transcoderServiceStub!.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client_config.json b/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client_config.json new file mode 100644 index 00000000000..0217861fc90 --- /dev/null +++ b/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client_config.json @@ -0,0 +1,66 @@ +{ + "interfaces": { + "google.cloud.video.transcoder.v1.TranscoderService": { + "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": { + "CreateJob": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListJobs": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetJob": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteJob": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateJobTemplate": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListJobTemplates": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetJobTemplate": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteJobTemplate": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-video-transcoder/src/v1/transcoder_service_proto_list.json b/packages/google-cloud-video-transcoder/src/v1/transcoder_service_proto_list.json new file mode 100644 index 00000000000..b948cd53075 --- /dev/null +++ b/packages/google-cloud-video-transcoder/src/v1/transcoder_service_proto_list.json @@ -0,0 +1,4 @@ +[ + "../../protos/google/cloud/video/transcoder/v1/resources.proto", + "../../protos/google/cloud/video/transcoder/v1/services.proto" +] diff --git a/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts b/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts new file mode 100644 index 00000000000..95ce1ac83c3 --- /dev/null +++ b/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts @@ -0,0 +1,1644 @@ +// 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. +// +// ** 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 transcoderserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf} from 'google-gax'; + +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.TranscoderServiceClient', () => { + it('has servicePath', () => { + const servicePath = + transcoderserviceModule.v1.TranscoderServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + transcoderserviceModule.v1.TranscoderServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = transcoderserviceModule.v1.TranscoderServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.transcoderServiceStub, undefined); + await client.initialize(); + assert(client.transcoderServiceStub); + }); + + it('has close method', () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + 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 transcoderserviceModule.v1.TranscoderServiceClient({ + 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('createJob', () => { + it('invokes createJob without error', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.CreateJobRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.Job() + ); + client.innerApiCalls.createJob = stubSimpleCall(expectedResponse); + const [response] = await client.createJob(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createJob without error using callback', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.CreateJobRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.Job() + ); + client.innerApiCalls.createJob = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createJob( + request, + ( + err?: Error | null, + result?: protos.google.cloud.video.transcoder.v1.IJob | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createJob with error', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.CreateJobRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createJob = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createJob(request), expectedError); + assert( + (client.innerApiCalls.createJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getJob', () => { + it('invokes getJob without error', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.GetJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.Job() + ); + client.innerApiCalls.getJob = stubSimpleCall(expectedResponse); + const [response] = await client.getJob(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getJob without error using callback', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.GetJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.Job() + ); + client.innerApiCalls.getJob = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getJob( + request, + ( + err?: Error | null, + result?: protos.google.cloud.video.transcoder.v1.IJob | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getJob with error', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.GetJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getJob = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getJob(request), expectedError); + assert( + (client.innerApiCalls.getJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('deleteJob', () => { + it('invokes deleteJob without error', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.DeleteJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteJob = stubSimpleCall(expectedResponse); + const [response] = await client.deleteJob(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteJob without error using callback', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.DeleteJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteJob = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteJob( + 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); + assert( + (client.innerApiCalls.deleteJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteJob with error', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.DeleteJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteJob = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteJob(request), expectedError); + assert( + (client.innerApiCalls.deleteJob as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createJobTemplate', () => { + it('invokes createJobTemplate without error', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.CreateJobTemplateRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.JobTemplate() + ); + client.innerApiCalls.createJobTemplate = stubSimpleCall(expectedResponse); + const [response] = await client.createJobTemplate(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createJobTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createJobTemplate without error using callback', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.CreateJobTemplateRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.JobTemplate() + ); + client.innerApiCalls.createJobTemplate = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createJobTemplate( + request, + ( + err?: Error | null, + result?: protos.google.cloud.video.transcoder.v1.IJobTemplate | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createJobTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createJobTemplate with error', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.CreateJobTemplateRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createJobTemplate = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createJobTemplate(request), expectedError); + assert( + (client.innerApiCalls.createJobTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getJobTemplate', () => { + it('invokes getJobTemplate without error', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.GetJobTemplateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.JobTemplate() + ); + client.innerApiCalls.getJobTemplate = stubSimpleCall(expectedResponse); + const [response] = await client.getJobTemplate(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getJobTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getJobTemplate without error using callback', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.GetJobTemplateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.JobTemplate() + ); + client.innerApiCalls.getJobTemplate = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getJobTemplate( + request, + ( + err?: Error | null, + result?: protos.google.cloud.video.transcoder.v1.IJobTemplate | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getJobTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getJobTemplate with error', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.GetJobTemplateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getJobTemplate = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getJobTemplate(request), expectedError); + assert( + (client.innerApiCalls.getJobTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('deleteJobTemplate', () => { + it('invokes deleteJobTemplate without error', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteJobTemplate = stubSimpleCall(expectedResponse); + const [response] = await client.deleteJobTemplate(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteJobTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteJobTemplate without error using callback', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteJobTemplate = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteJobTemplate( + 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); + assert( + (client.innerApiCalls.deleteJobTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteJobTemplate with error', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteJobTemplate = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteJobTemplate(request), expectedError); + assert( + (client.innerApiCalls.deleteJobTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('listJobs', () => { + it('invokes listJobs without error', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.ListJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.Job() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.Job() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.Job() + ), + ]; + client.innerApiCalls.listJobs = stubSimpleCall(expectedResponse); + const [response] = await client.listJobs(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listJobs as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listJobs without error using callback', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.ListJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.Job() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.Job() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.Job() + ), + ]; + client.innerApiCalls.listJobs = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listJobs( + request, + ( + err?: Error | null, + result?: protos.google.cloud.video.transcoder.v1.IJob[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listJobs as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listJobs with error', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.ListJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listJobs = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listJobs(request), expectedError); + assert( + (client.innerApiCalls.listJobs as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listJobsStream without error', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.ListJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.Job() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.Job() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.Job() + ), + ]; + client.descriptors.page.listJobs.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listJobsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.video.transcoder.v1.Job[] = []; + stream.on( + 'data', + (response: protos.google.cloud.video.transcoder.v1.Job) => { + 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.listJobs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listJobs, request) + ); + assert.strictEqual( + (client.descriptors.page.listJobs.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listJobsStream with error', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.ListJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listJobs.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listJobsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.video.transcoder.v1.Job[] = []; + stream.on( + 'data', + (response: protos.google.cloud.video.transcoder.v1.Job) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listJobs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listJobs, request) + ); + assert.strictEqual( + (client.descriptors.page.listJobs.createStream as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listJobs without error', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.ListJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.Job() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.Job() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.Job() + ), + ]; + client.descriptors.page.listJobs.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.video.transcoder.v1.IJob[] = []; + const iterable = client.listJobsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listJobs with error', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.ListJobsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listJobs.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listJobsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.video.transcoder.v1.IJob[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listJobTemplates', () => { + it('invokes listJobTemplates without error', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.ListJobTemplatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.JobTemplate() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.JobTemplate() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.JobTemplate() + ), + ]; + client.innerApiCalls.listJobTemplates = stubSimpleCall(expectedResponse); + const [response] = await client.listJobTemplates(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listJobTemplates as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listJobTemplates without error using callback', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.ListJobTemplatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.JobTemplate() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.JobTemplate() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.JobTemplate() + ), + ]; + client.innerApiCalls.listJobTemplates = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listJobTemplates( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.video.transcoder.v1.IJobTemplate[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listJobTemplates as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listJobTemplates with error', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.ListJobTemplatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listJobTemplates = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listJobTemplates(request), expectedError); + assert( + (client.innerApiCalls.listJobTemplates as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listJobTemplatesStream without error', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.ListJobTemplatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.JobTemplate() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.JobTemplate() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.JobTemplate() + ), + ]; + client.descriptors.page.listJobTemplates.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listJobTemplatesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.video.transcoder.v1.JobTemplate[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.video.transcoder.v1.JobTemplate) => { + 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.listJobTemplates.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listJobTemplates, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listJobTemplates.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listJobTemplatesStream with error', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.ListJobTemplatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listJobTemplates.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listJobTemplatesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.video.transcoder.v1.JobTemplate[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.video.transcoder.v1.JobTemplate) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listJobTemplates.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listJobTemplates, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listJobTemplates.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listJobTemplates without error', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.ListJobTemplatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.JobTemplate() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.JobTemplate() + ), + generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.JobTemplate() + ), + ]; + client.descriptors.page.listJobTemplates.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.video.transcoder.v1.IJobTemplate[] = + []; + const iterable = client.listJobTemplatesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listJobTemplates.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listJobTemplates.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listJobTemplates with error', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.ListJobTemplatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listJobTemplates.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listJobTemplatesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.video.transcoder.v1.IJobTemplate[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listJobTemplates.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.descriptors.page.listJobTemplates.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('job', () => { + const fakePath = '/rendered/path/job'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + job: 'jobValue', + }; + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.jobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.jobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('jobPath', () => { + const result = client.jobPath( + 'projectValue', + 'locationValue', + 'jobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.jobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromJobName', () => { + const result = client.matchProjectFromJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromJobName', () => { + const result = client.matchLocationFromJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchJobFromJobName', () => { + const result = client.matchJobFromJobName(fakePath); + assert.strictEqual(result, 'jobValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('jobTemplate', () => { + const fakePath = '/rendered/path/jobTemplate'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + job_template: 'jobTemplateValue', + }; + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.jobTemplatePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.jobTemplatePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('jobTemplatePath', () => { + const result = client.jobTemplatePath( + 'projectValue', + 'locationValue', + 'jobTemplateValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.jobTemplatePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromJobTemplateName', () => { + const result = client.matchProjectFromJobTemplateName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.jobTemplatePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromJobTemplateName', () => { + const result = client.matchLocationFromJobTemplateName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.jobTemplatePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchJobTemplateFromJobTemplateName', () => { + const result = client.matchJobTemplateFromJobTemplateName(fakePath); + assert.strictEqual(result, 'jobTemplateValue'); + assert( + (client.pathTemplates.jobTemplatePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + 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) + ); + }); + }); + }); +}); From aaf851ff730abf1feaf7ab48f21c2212029b2850 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 16 Jul 2021 09:14:22 -0700 Subject: [PATCH 048/116] fix: Updating WORKSPACE files to use the newest version of the Typescript generator. (#87) See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../src/v1/transcoder_service_client.ts | 11 ++++++++++- .../src/v1beta1/transcoder_service_client.ts | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts b/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts index a3367dda48c..2fdccf3d34a 100644 --- a/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts +++ b/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts @@ -53,6 +53,7 @@ const version = require('../../../package.json').version; export class TranscoderServiceClient { 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: {}; @@ -64,6 +65,7 @@ export class TranscoderServiceClient { longrunning: {}, batching: {}, }; + warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; pathTemplates: {[name: string]: gax.PathTemplate}; transcoderServiceStub?: Promise<{[name: string]: Function}>; @@ -107,6 +109,9 @@ export class TranscoderServiceClient { const staticMembers = this.constructor as typeof TranscoderServiceClient; 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 = @@ -197,6 +202,9 @@ export class TranscoderServiceClient { // 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 = gax.warn; } /** @@ -226,7 +234,8 @@ export class TranscoderServiceClient { : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.cloud.video.transcoder.v1 .TranscoderService, - this._opts + this._opts, + this._providedCustomServicePath ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides diff --git a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts index 4866e174512..01f022148e1 100644 --- a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts +++ b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts @@ -53,6 +53,7 @@ const version = require('../../../package.json').version; export class TranscoderServiceClient { 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: {}; @@ -64,6 +65,7 @@ export class TranscoderServiceClient { longrunning: {}, batching: {}, }; + warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; pathTemplates: {[name: string]: gax.PathTemplate}; transcoderServiceStub?: Promise<{[name: string]: Function}>; @@ -107,6 +109,9 @@ export class TranscoderServiceClient { const staticMembers = this.constructor as typeof TranscoderServiceClient; 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 = @@ -197,6 +202,9 @@ export class TranscoderServiceClient { // 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 = gax.warn; } /** @@ -226,7 +234,8 @@ export class TranscoderServiceClient { : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.cloud.video.transcoder.v1beta1 .TranscoderService, - this._opts + this._opts, + this._providedCustomServicePath ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides From 1d81a47d186e126223a65fbfbcc07c899e8d7f5b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 16 Jul 2021 10:02:43 -0700 Subject: [PATCH 049/116] chore: release 1.5.0 (#85) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: bcoe Co-authored-by: Owl Bot --- .../.repo-metadata.json | 2 +- packages/google-cloud-video-transcoder/CHANGELOG.md | 13 +++++++++++++ packages/google-cloud-video-transcoder/README.md | 11 ++++++----- packages/google-cloud-video-transcoder/package.json | 2 +- .../samples/package.json | 2 +- 5 files changed, 22 insertions(+), 8 deletions(-) diff --git a/packages/google-cloud-video-transcoder/.repo-metadata.json b/packages/google-cloud-video-transcoder/.repo-metadata.json index 6022656a642..d8d62554e6e 100644 --- a/packages/google-cloud-video-transcoder/.repo-metadata.json +++ b/packages/google-cloud-video-transcoder/.repo-metadata.json @@ -3,7 +3,7 @@ "product_documentation": "https://googleapis.dev/nodejs/transcoder/latest", "name": "transcoder", "requires_billing": true, - "release_level": "beta", + "release_level": "ga", "language": "nodejs", "api_id": "transcoder.googleapis.com", "distribution_name": "@google-cloud/video-transcoder", diff --git a/packages/google-cloud-video-transcoder/CHANGELOG.md b/packages/google-cloud-video-transcoder/CHANGELOG.md index d22ca637c21..137157fb052 100644 --- a/packages/google-cloud-video-transcoder/CHANGELOG.md +++ b/packages/google-cloud-video-transcoder/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [1.5.0](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.4.4...v1.5.0) (2021-07-16) + + +### Features + +* Enables generation of client libraries for C#, php and ruby. ([#82](https://www.github.com/googleapis/nodejs-video-transcoder/issues/82)) ([721a9f9](https://www.github.com/googleapis/nodejs-video-transcoder/commit/721a9f92f1ca280077c728129550977638b6ef3f)) +* Initial commit for the Transcoder V1 client libraries ([#86](https://www.github.com/googleapis/nodejs-video-transcoder/issues/86)) ([578abcb](https://www.github.com/googleapis/nodejs-video-transcoder/commit/578abcb2fd5957f4845e5078af9c881120220288)) + + +### Bug Fixes + +* Updating WORKSPACE files to use the newest version of the Typescript generator. ([#87](https://www.github.com/googleapis/nodejs-video-transcoder/issues/87)) ([00b82af](https://www.github.com/googleapis/nodejs-video-transcoder/commit/00b82af26623a90c65dd3618e070693ec5df5db5)) + ### [1.4.4](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.4.3...v1.4.4) (2021-07-12) diff --git a/packages/google-cloud-video-transcoder/README.md b/packages/google-cloud-video-transcoder/README.md index 704d4b2fb48..b2345869799 100644 --- a/packages/google-cloud-video-transcoder/README.md +++ b/packages/google-cloud-video-transcoder/README.md @@ -4,7 +4,7 @@ # [Transcoder API: Node.js Client](https://github.com/googleapis/nodejs-video-transcoder) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/video-transcoder.svg)](https://www.npmjs.org/package/@google-cloud/video-transcoder) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-video-transcoder/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-video-transcoder) @@ -134,11 +134,12 @@ _Legacy Node.js versions are supported as a best effort:_ This library follows [Semantic Versioning](http://semver.org/). +This library is considered to be **General Availability (GA)**. This means it +is stable; the code surface will not change in backwards-incompatible ways +unless absolutely necessary (e.g. because of critical security issues) or with +an extensive deprecation period. Issues and requests against **GA** libraries +are addressed with the highest priority. -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. diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index a8a7a21f2bc..37ba53c8077 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/video-transcoder", - "version": "1.4.4", + "version": "1.5.0", "description": "Transcoder client for Node.js", "repository": "googleapis/nodejs-video-transcoder", "license": "Apache-2.0", diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index 6e81863901d..cba93c73598 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/video-transcoder": "^1.4.4" + "@google-cloud/video-transcoder": "^1.5.0" }, "devDependencies": { "@google-cloud/storage": "^5.4.0", From 284c56f8d58ba7925b8664823e744b50c0b0da8d Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Wed, 4 Aug 2021 16:02:24 -0400 Subject: [PATCH 050/116] chore(nodejs): update client ref docs link in metadata (#94) --- packages/google-cloud-video-transcoder/.repo-metadata.json | 2 +- packages/google-cloud-video-transcoder/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-video-transcoder/.repo-metadata.json b/packages/google-cloud-video-transcoder/.repo-metadata.json index d8d62554e6e..2fa6676d696 100644 --- a/packages/google-cloud-video-transcoder/.repo-metadata.json +++ b/packages/google-cloud-video-transcoder/.repo-metadata.json @@ -1,5 +1,5 @@ { - "client_documentation": "https://googleapis.dev/nodejs/transcoder/latest", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/video-transcoder/latest", "product_documentation": "https://googleapis.dev/nodejs/transcoder/latest", "name": "transcoder", "requires_billing": true, diff --git a/packages/google-cloud-video-transcoder/README.md b/packages/google-cloud-video-transcoder/README.md index b2345869799..9c4578231c6 100644 --- a/packages/google-cloud-video-transcoder/README.md +++ b/packages/google-cloud-video-transcoder/README.md @@ -164,7 +164,7 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-video-transcoder/blob/master/LICENSE) -[client-docs]: https://googleapis.dev/nodejs/transcoder/latest +[client-docs]: https://cloud.google.com/nodejs/docs/reference/video-transcoder/latest [product-docs]: https://googleapis.dev/nodejs/transcoder/latest [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [projects]: https://console.cloud.google.com/project From d08ca21307b273ed2f4a34306b67433b385b8615 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 9 Aug 2021 17:12:19 -0700 Subject: [PATCH 051/116] feat: Add video cropping feature feat: Add video padding feature feat: Add ttl_after_completion_days field to Job docs: Update proto documentation docs: Indicate v1beta1 deprecation (#95) PiperOrigin-RevId: 389250478 --- .../video/transcoder/v1beta1/resources.proto | 192 ++++-- .../video/transcoder/v1beta1/services.proto | 3 +- .../protos/protos.d.ts | 240 +++++++ .../protos/protos.js | 606 ++++++++++++++++++ .../protos/protos.json | 57 ++ .../src/v1beta1/transcoder_service_client.ts | 11 + 6 files changed, 1047 insertions(+), 62 deletions(-) diff --git a/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1beta1/resources.proto b/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1beta1/resources.proto index 71ba38f9752..650b79885c6 100644 --- a/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1beta1/resources.proto +++ b/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1beta1/resources.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. @@ -35,8 +35,8 @@ message Job { // The origin URI. message OriginUri { - // HLS master manifest URI. If multiple HLS master manifests are created - // only first one is listed. + // HLS manifest URI per https://tools.ietf.org/html/rfc8216#section-4.3.4. + // If multiple HLS manifests are created, only the first one is listed. string hls = 1; // Dash manifest URI. If multiple Dash manifests are created, only the first @@ -69,8 +69,8 @@ message Job { // Input only. Specify the `input_uri` to populate empty `uri` fields in each element of // `Job.config.inputs` or `JobTemplate.config.inputs` when using template. - // URI of the media. It must be stored in Cloud Storage. For example, - // `gs://bucket/inputs/file.mp4`. + // URI of the media. Input files must be at least 5 seconds in duration and + // stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). string input_uri = 2 [(google.api.field_behavior) = INPUT_ONLY]; // Input only. Specify the `output_uri` to populate an empty `Job.config.output.uri` or @@ -78,8 +78,10 @@ message Job { // URI for the output file(s). For example, `gs://my-bucket/outputs/`. string output_uri = 3 [(google.api.field_behavior) = INPUT_ONLY]; - // Specify the `job_config` for transcoding job. When you use a `template_id` - // to create a job, the `Job.config` is populated by the `JobTemplate.config`. + // Specify the `job_config` for the transcoding job. If you don't specify the + // `job_config`, the API selects `templateId`; this template ID is set to + // `preset/web-hd` by default. When you use a `template_id` to create a job, + // the `Job.config` is populated by the `JobTemplate.config`.
oneof job_config { // Input only. Specify the `template_id` to use for populating `Job.config`. The default // is `preset/web-hd`. @@ -100,6 +102,7 @@ message Job { int32 priority = 6; // Output only. The origin URI. + // OriginUri origin_uri = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The current state of the job. @@ -107,6 +110,7 @@ message Job { // Output only. Estimated fractional progress, from `0` to `1` for each // step. + // Progress progress = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. A description of the reason for the failure. This property is @@ -115,6 +119,7 @@ message Job { // Output only. List of failure details. This property may contain additional // information about the failure when `failure_reason` is present. + // repeated FailureDetail failure_details = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time the job was created. @@ -125,6 +130,11 @@ message Job { // Output only. The time the transcoding finished. google.protobuf.Timestamp end_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Job time to live value in days, which will be effective after job + // completion. Job should be deleted automatically after the given TTL. Enter + // a value between 1 and 90. The default is 30. + int32 ttl_after_completion_days = 15; } // Transcoding job template resource. @@ -184,9 +194,9 @@ message Input { // mapping and edit lists. string key = 1; - // URI of the media. It must be stored in Cloud Storage. Example - // `gs://bucket/inputs/file.mp4`. - // If empty the value will be populated from `Job.input_uri`. + // URI of the media. Input files must be at least 5 seconds in duration and + // stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). + // If empty, the value will be populated from `Job.input_uri`. string uri = 2; // Preprocessing configurations. @@ -329,10 +339,16 @@ message SpriteSheet { // from 0 before the extension, such as `"sprite_sheet0000000123.jpeg"`. string file_prefix = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. The width of sprite in pixels. Must be an even integer. + // Required. The width of sprite in pixels. Must be an even integer. To preserve the + // source aspect ratio, set the [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1beta1.SpriteSheet.sprite_width_pixels] field or + // the [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1beta1.SpriteSheet.sprite_height_pixels] field, but not both (the API will + // automatically calculate the missing field). int32 sprite_width_pixels = 3 [(google.api.field_behavior) = REQUIRED]; - // Required. The height of sprite in pixels. Must be an even integer. + // Required. The height of sprite in pixels. Must be an even integer. To preserve the + // source aspect ratio, set the [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1beta1.SpriteSheet.sprite_height_pixels] field or + // the [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1beta1.SpriteSheet.sprite_width_pixels] field, but not both (the API will + // automatically calculate the missing field). int32 sprite_height_pixels = 4 [(google.api.field_behavior) = REQUIRED]; // The maximum number of sprites per row in a sprite sheet. The default is 0, @@ -364,6 +380,12 @@ message SpriteSheet { // interval value in seconds. google.protobuf.Duration interval = 10; } + + // The quality of the generated sprite sheet. Enter a value between 1 + // and 100, where 1 is the lowest quality and 100 is the highest quality. + // The default is 100. A high quality value corresponds to a low image data + // compression ratio. + int32 quality = 11; } // Overlay configuration. @@ -379,8 +401,8 @@ message Overlay { // Overlaid jpeg image. message Image { - // Required. URI of the image in Cloud Storage. For example, - // `gs://bucket/inputs/image.jpeg`. + // Required. URI of the JPEG image in Cloud Storage. For example, + // `gs://bucket/inputs/image.jpeg`. JPEG is the only supported image type. string uri = 1 [(google.api.field_behavior) = REQUIRED]; // Normalized image resolution, based on output video resolution. Valid @@ -389,8 +411,8 @@ message Overlay { // both `x` and `y` to `0.0`. NormalizedCoordinate resolution = 2; - // Target image opacity. Valid values: `1` (solid, default), - // `0` (transparent). + // Target image opacity. Valid values are from `1.0` (solid, default) to + // `0.0` (transparent), exclusive. Set this to a value greater than `0.0`. double alpha = 3; } @@ -398,7 +420,9 @@ message Overlay { message AnimationStatic { // Normalized coordinates based on output video resolution. Valid // values: `0.0`โ€“`1.0`. `xy` is the upper-left coordinate of the overlay - // object. + // object. For example, use the x and y coordinates {0,0} to position the + // top-left corner of the overlay animation in the top-left corner of the + // output video. NormalizedCoordinate xy = 1; // The time to start displaying the overlay object, in seconds. Default: 0 @@ -412,7 +436,9 @@ message Overlay { // Normalized coordinates based on output video resolution. Valid // values: `0.0`โ€“`1.0`. `xy` is the upper-left coordinate of the overlay - // object. + // object. For example, use the x and y coordinates {0,0} to position the + // top-left corner of the overlay animation in the top-left corner of the + // output video. NormalizedCoordinate xy = 2; // The time to start the fade animation, in seconds. Default: 0 @@ -514,12 +540,16 @@ message PreprocessingConfig { // Audio preprocessing configuration. message Audio { // Specify audio loudness normalization in loudness units relative to full - // scale (LUFS). Enter a value between -24 and 0, where -24 is the Advanced - // Television Systems Committee (ATSC A/85), -23 is the EU R128 broadcast - // standard, -19 is the prior standard for online mono audio, -18 is the - // ReplayGain standard, -16 is the prior standard for stereo audio, -14 is - // the new online audio standard recommended by Spotify, as well as Amazon - // Echo, and 0 disables normalization. The default is 0. + // scale (LUFS). Enter a value between -24 and 0 (the default), where: + // + // * -24 is the Advanced Television Systems Committee (ATSC A/85) standard + // * -23 is the EU R128 broadcast standard + // * -19 is the prior standard for online mono audio + // * -18 is the ReplayGain standard + // * -16 is the prior standard for stereo audio + // * -14 is the new online audio standard recommended by Spotify, as well + // as Amazon Echo + // * 0 disables normalization double lufs = 1; // Enable boosting high frequency components. The default is `false`. @@ -529,6 +559,38 @@ message PreprocessingConfig { bool low_boost = 3; } + // Video cropping configuration for the input video. The cropped input video + // is scaled to match the output resolution. + message Crop { + // The number of pixels to crop from the top. The default is 0. + int32 top_pixels = 1; + + // The number of pixels to crop from the bottom. The default is 0. + int32 bottom_pixels = 2; + + // The number of pixels to crop from the left. The default is 0. + int32 left_pixels = 3; + + // The number of pixels to crop from the right. The default is 0. + int32 right_pixels = 4; + } + + // Pad filter configuration for the input video. The padded input video + // is scaled after padding with black to match the output resolution. + message Pad { + // The number of pixels to add to the top. The default is 0. + int32 top_pixels = 1; + + // The number of pixels to add to the bottom. The default is 0. + int32 bottom_pixels = 2; + + // The number of pixels to add to the left. The default is 0. + int32 left_pixels = 3; + + // The number of pixels to add to the right. The default is 0. + int32 right_pixels = 4; + } + // Color preprocessing configuration. Color color = 1; @@ -540,30 +602,49 @@ message PreprocessingConfig { // Audio preprocessing configuration. Audio audio = 4; + + // Specify the video cropping configuration. + Crop crop = 5; + + // Specify the video pad filter configuration. + Pad pad = 6; } // Video stream resource. message VideoStream { - // Codec type. The default is `"h264"`. + // Codec type. The following codecs are supported: // - // Supported codecs: - // - 'h264' - // - 'h265' - // - 'vp9' + // * `h264` (default) + // * `h265` + // * `vp9` string codec = 1; - // Enforce specified codec profile. The default is `"high"`. + // Enforces the specified codec profile. The following profiles are supported: // - // Supported codec profiles: - // - 'baseline' - // - 'main' - // - 'high' + // * `baseline` + // * `main` + // * `high` (default) + // + // The available options are + // FFmpeg-compatible. Note that certain values for this + // field may cause the transcoder to override other fields you set in the + // `VideoStream` message. string profile = 2; - // Enforce specified codec tune. + // Enforces the specified codec tune. The available options are + // FFmpeg-compatible. Note that certain values for this + // field may cause the transcoder to override other fields you set in the + // `VideoStream` message. string tune = 3; - // Enforce specified codec preset. The default is `"veryfast"`. + // Enforces the specified codec preset. The default is `veryfast`. The + // available options are + // FFmpeg-compatible. Note that certain values for this + // field may cause the transcoder to override other fields you set in the + // `VideoStream` message. string preset = 4; // The height of the video in pixels. Must be an even integer. @@ -590,7 +671,9 @@ message VideoStream { // - 'yuv444p12' 12-bit HDR pixel format. string pixel_format = 7; - // Required. The video bitrate in bits per second. Must be between 1 and 1,000,000,000. + // Required. The video bitrate in bits per second. The minimum value is 1,000. + // The maximum value for H264/H265 is 800,000,000. The maximum value for VP9 + // is 480,000,000. int32 bitrate_bps = 8 [(google.api.field_behavior) = REQUIRED]; // Specify the `rate_control_mode`. The default is `"vbr"`. @@ -628,7 +711,9 @@ message VideoStream { int32 gop_frame_count = 15; // Select the GOP size based on the specified duration. The default is - // `"3s"`. + // `"3s"`. Note that `gopDuration` must be less than or equal to + // [`segmentDuration`](#SegmentSettings), and + // [`segmentDuration`](#SegmentSettings) must be divisible by `gopDuration`. google.protobuf.Duration gop_duration = 16; } @@ -650,28 +735,10 @@ message VideoStream { // Required. The target video frame rate in frames per second (FPS). Must be less than // or equal to 120. Will default to the input frame rate if larger than the // input frame rate. The API will generate an output FPS that is divisible by - // the input FPS, and smaller or equal to the target FPS. - // - // The following table shows the computed video FPS given the target FPS (in - // parenthesis) and input FPS (in the first column): - // ``` - // | | (30) | (60) | (25) | (50) | - // |--------|--------|--------|------|------| - // | 240 | Fail | Fail | Fail | Fail | - // | 120 | 30 | 60 | 20 | 30 | - // | 100 | 25 | 50 | 20 | 30 | - // | 50 | 25 | 50 | 20 | 30 | - // | 60 | 30 | 60 | 20 | 30 | - // | 59.94 | 29.97 | 59.94 | 20 | 30 | - // | 48 | 24 | 48 | 20 | 30 | - // | 30 | 30 | 30 | 20 | 30 | - // | 25 | 25 | 25 | 20 | 30 | - // | 24 | 24 | 24 | 20 | 30 | - // | 23.976 | 23.976 | 23.976 | 20 | 30 | - // | 15 | 15 | 15 | 20 | 30 | - // | 12 | 12 | 12 | 20 | 30 | - // | 10 | 10 | 10 | 20 | 30 | - // ``` + // the input FPS, and smaller or equal to the target FPS. See + // [Calculate frame + // rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + // more information. double frame_rate = 20 [(google.api.field_behavior) = REQUIRED]; // Specify the intensity of the adaptive quantizer (AQ). Must be between 0 and @@ -795,7 +862,10 @@ message TextStream { // Segment settings for `"ts"`, `"fmp4"` and `"vtt"`. message SegmentSettings { - // Duration of the segments in seconds. The default is `"6.0s"`. + // Duration of the segments in seconds. The default is `"6.0s"`. Note that + // `segmentDuration` must be greater than or equal to + // [`gopDuration`](#videostream), and `segmentDuration` must be divisible by + // [`gopDuration`](#videostream). google.protobuf.Duration segment_duration = 1; // Required. Create an individual segment file. The default is `false`. diff --git a/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1beta1/services.proto b/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1beta1/services.proto index 0ec2e05cb97..1cfa185e600 100644 --- a/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1beta1/services.proto +++ b/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1beta1/services.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. @@ -35,6 +35,7 @@ option java_package = "com.google.cloud.video.transcoder.v1beta1"; // features such as Digital Rights Management (DRM), audio equalization, content // concatenation, and digital ad-stitch ready content generation. service TranscoderService { + option deprecated = true; option (google.api.default_host) = "transcoder.googleapis.com"; option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; diff --git a/packages/google-cloud-video-transcoder/protos/protos.d.ts b/packages/google-cloud-video-transcoder/protos/protos.d.ts index 1cc5cbc2727..0819452ff2c 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.d.ts +++ b/packages/google-cloud-video-transcoder/protos/protos.d.ts @@ -5677,6 +5677,9 @@ export namespace google { /** Job endTime */ endTime?: (google.protobuf.ITimestamp|null); + + /** Job ttlAfterCompletionDays */ + ttlAfterCompletionDays?: (number|null); } /** Represents a Job. */ @@ -5730,6 +5733,9 @@ export namespace google { /** Job endTime. */ public endTime?: (google.protobuf.ITimestamp|null); + /** Job ttlAfterCompletionDays. */ + public ttlAfterCompletionDays: number; + /** Job jobConfig. */ public jobConfig?: ("templateId"|"config"); @@ -7007,6 +7013,9 @@ export namespace google { /** SpriteSheet interval */ interval?: (google.protobuf.IDuration|null); + + /** SpriteSheet quality */ + quality?: (number|null); } /** Represents a SpriteSheet. */ @@ -7048,6 +7057,9 @@ export namespace google { /** SpriteSheet interval. */ public interval?: (google.protobuf.IDuration|null); + /** SpriteSheet quality. */ + public quality: number; + /** SpriteSheet extractionStrategy. */ public extractionStrategy?: ("totalCount"|"interval"); @@ -7839,6 +7851,12 @@ export namespace google { /** PreprocessingConfig audio */ audio?: (google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IAudio|null); + + /** PreprocessingConfig crop */ + crop?: (google.cloud.video.transcoder.v1beta1.PreprocessingConfig.ICrop|null); + + /** PreprocessingConfig pad */ + pad?: (google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IPad|null); } /** Represents a PreprocessingConfig. */ @@ -7862,6 +7880,12 @@ export namespace google { /** PreprocessingConfig audio. */ public audio?: (google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IAudio|null); + /** PreprocessingConfig crop. */ + public crop?: (google.cloud.video.transcoder.v1beta1.PreprocessingConfig.ICrop|null); + + /** PreprocessingConfig pad. */ + public pad?: (google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IPad|null); + /** * Creates a new PreprocessingConfig instance using the specified properties. * @param [properties] Properties to set @@ -8330,6 +8354,222 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } + + /** Properties of a Crop. */ + interface ICrop { + + /** Crop topPixels */ + topPixels?: (number|null); + + /** Crop bottomPixels */ + bottomPixels?: (number|null); + + /** Crop leftPixels */ + leftPixels?: (number|null); + + /** Crop rightPixels */ + rightPixels?: (number|null); + } + + /** Represents a Crop. */ + class Crop implements ICrop { + + /** + * Constructs a new Crop. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.ICrop); + + /** Crop topPixels. */ + public topPixels: number; + + /** Crop bottomPixels. */ + public bottomPixels: number; + + /** Crop leftPixels. */ + public leftPixels: number; + + /** Crop rightPixels. */ + public rightPixels: number; + + /** + * Creates a new Crop instance using the specified properties. + * @param [properties] Properties to set + * @returns Crop instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.ICrop): google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop; + + /** + * Encodes the specified Crop message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop.verify|verify} messages. + * @param message Crop message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.ICrop, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Crop message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop.verify|verify} messages. + * @param message Crop message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.ICrop, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Crop message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Crop + * @throws {Error} If the payload is not 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.transcoder.v1beta1.PreprocessingConfig.Crop; + + /** + * Decodes a Crop message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Crop + * @throws {Error} If the payload 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.transcoder.v1beta1.PreprocessingConfig.Crop; + + /** + * Verifies a Crop message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Crop message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Crop + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop; + + /** + * Creates a plain object from a Crop message. Also converts values to other types if specified. + * @param message Crop + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Crop to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Pad. */ + interface IPad { + + /** Pad topPixels */ + topPixels?: (number|null); + + /** Pad bottomPixels */ + bottomPixels?: (number|null); + + /** Pad leftPixels */ + leftPixels?: (number|null); + + /** Pad rightPixels */ + rightPixels?: (number|null); + } + + /** Represents a Pad. */ + class Pad implements IPad { + + /** + * Constructs a new Pad. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IPad); + + /** Pad topPixels. */ + public topPixels: number; + + /** Pad bottomPixels. */ + public bottomPixels: number; + + /** Pad leftPixels. */ + public leftPixels: number; + + /** Pad rightPixels. */ + public rightPixels: number; + + /** + * Creates a new Pad instance using the specified properties. + * @param [properties] Properties to set + * @returns Pad instance + */ + public static create(properties?: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IPad): google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad; + + /** + * Encodes the specified Pad message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad.verify|verify} messages. + * @param message Pad message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IPad, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Pad message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad.verify|verify} messages. + * @param message Pad message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IPad, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Pad message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Pad + * @throws {Error} If the payload is not 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.transcoder.v1beta1.PreprocessingConfig.Pad; + + /** + * Decodes a Pad message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Pad + * @throws {Error} If the payload 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.transcoder.v1beta1.PreprocessingConfig.Pad; + + /** + * Verifies a Pad message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Pad message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Pad + */ + public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad; + + /** + * Creates a plain object from a Pad message. Also converts values to other types if specified. + * @param message Pad + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Pad to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } /** Properties of a VideoStream. */ diff --git a/packages/google-cloud-video-transcoder/protos/protos.js b/packages/google-cloud-video-transcoder/protos/protos.js index cb997d0739a..6545b1231f9 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.js +++ b/packages/google-cloud-video-transcoder/protos/protos.js @@ -13996,6 +13996,7 @@ * @property {google.protobuf.ITimestamp|null} [createTime] Job createTime * @property {google.protobuf.ITimestamp|null} [startTime] Job startTime * @property {google.protobuf.ITimestamp|null} [endTime] Job endTime + * @property {number|null} [ttlAfterCompletionDays] Job ttlAfterCompletionDays */ /** @@ -14126,6 +14127,14 @@ */ Job.prototype.endTime = null; + /** + * Job ttlAfterCompletionDays. + * @member {number} ttlAfterCompletionDays + * @memberof google.cloud.video.transcoder.v1beta1.Job + * @instance + */ + Job.prototype.ttlAfterCompletionDays = 0; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -14193,6 +14202,8 @@ $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.ttlAfterCompletionDays != null && Object.hasOwnProperty.call(message, "ttlAfterCompletionDays")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.ttlAfterCompletionDays); return writer; }; @@ -14271,6 +14282,9 @@ case 14: message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; + case 15: + message.ttlAfterCompletionDays = reader.int32(); + break; default: reader.skipType(tag & 7); break; @@ -14382,6 +14396,9 @@ if (error) return "endTime." + error; } + if (message.ttlAfterCompletionDays != null && message.hasOwnProperty("ttlAfterCompletionDays")) + if (!$util.isInteger(message.ttlAfterCompletionDays)) + return "ttlAfterCompletionDays: integer expected"; return null; }; @@ -14471,6 +14488,8 @@ throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.endTime: object expected"); message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); } + if (object.ttlAfterCompletionDays != null) + message.ttlAfterCompletionDays = object.ttlAfterCompletionDays | 0; return message; }; @@ -14501,6 +14520,7 @@ object.createTime = null; object.startTime = null; object.endTime = null; + object.ttlAfterCompletionDays = 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -14539,6 +14559,8 @@ object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); if (message.endTime != null && message.hasOwnProperty("endTime")) object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.ttlAfterCompletionDays != null && message.hasOwnProperty("ttlAfterCompletionDays")) + object.ttlAfterCompletionDays = message.ttlAfterCompletionDays; return object; }; @@ -17577,6 +17599,7 @@ * @property {google.protobuf.IDuration|null} [endTimeOffset] SpriteSheet endTimeOffset * @property {number|null} [totalCount] SpriteSheet totalCount * @property {google.protobuf.IDuration|null} [interval] SpriteSheet interval + * @property {number|null} [quality] SpriteSheet quality */ /** @@ -17674,6 +17697,14 @@ */ SpriteSheet.prototype.interval = null; + /** + * SpriteSheet quality. + * @member {number} quality + * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet + * @instance + */ + SpriteSheet.prototype.quality = 0; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -17732,6 +17763,8 @@ writer.uint32(/* id 9, wireType 0 =*/72).int32(message.totalCount); if (message.interval != null && Object.hasOwnProperty.call(message, "interval")) $root.google.protobuf.Duration.encode(message.interval, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.quality != null && Object.hasOwnProperty.call(message, "quality")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.quality); return writer; }; @@ -17796,6 +17829,9 @@ case 10: message.interval = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; + case 11: + message.quality = reader.int32(); + break; default: reader.skipType(tag & 7); break; @@ -17875,6 +17911,9 @@ return "interval." + error; } } + if (message.quality != null && message.hasOwnProperty("quality")) + if (!$util.isInteger(message.quality)) + return "quality: integer expected"; return null; }; @@ -17919,6 +17958,8 @@ throw TypeError(".google.cloud.video.transcoder.v1beta1.SpriteSheet.interval: object expected"); message.interval = $root.google.protobuf.Duration.fromObject(object.interval); } + if (object.quality != null) + message.quality = object.quality | 0; return message; }; @@ -17944,6 +17985,7 @@ object.rowCount = 0; object.startTimeOffset = null; object.endTimeOffset = null; + object.quality = 0; } if (message.format != null && message.hasOwnProperty("format")) object.format = message.format; @@ -17971,6 +18013,8 @@ if (options.oneofs) object.extractionStrategy = "interval"; } + if (message.quality != null && message.hasOwnProperty("quality")) + object.quality = message.quality; return object; }; @@ -19675,6 +19719,8 @@ * @property {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDenoise|null} [denoise] PreprocessingConfig denoise * @property {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDeblock|null} [deblock] PreprocessingConfig deblock * @property {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IAudio|null} [audio] PreprocessingConfig audio + * @property {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.ICrop|null} [crop] PreprocessingConfig crop + * @property {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IPad|null} [pad] PreprocessingConfig pad */ /** @@ -19724,6 +19770,22 @@ */ PreprocessingConfig.prototype.audio = null; + /** + * PreprocessingConfig crop. + * @member {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.ICrop|null|undefined} crop + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig + * @instance + */ + PreprocessingConfig.prototype.crop = null; + + /** + * PreprocessingConfig pad. + * @member {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IPad|null|undefined} pad + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig + * @instance + */ + PreprocessingConfig.prototype.pad = null; + /** * Creates a new PreprocessingConfig instance using the specified properties. * @function create @@ -19756,6 +19818,10 @@ $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock.encode(message.deblock, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio.encode(message.audio, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.crop != null && Object.hasOwnProperty.call(message, "crop")) + $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop.encode(message.crop, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.pad != null && Object.hasOwnProperty.call(message, "pad")) + $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad.encode(message.pad, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -19802,6 +19868,12 @@ case 4: message.audio = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio.decode(reader, reader.uint32()); break; + case 5: + message.crop = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop.decode(reader, reader.uint32()); + break; + case 6: + message.pad = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -19857,6 +19929,16 @@ if (error) return "audio." + error; } + if (message.crop != null && message.hasOwnProperty("crop")) { + var error = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop.verify(message.crop); + if (error) + return "crop." + error; + } + if (message.pad != null && message.hasOwnProperty("pad")) { + var error = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad.verify(message.pad); + if (error) + return "pad." + error; + } return null; }; @@ -19892,6 +19974,16 @@ throw TypeError(".google.cloud.video.transcoder.v1beta1.PreprocessingConfig.audio: object expected"); message.audio = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio.fromObject(object.audio); } + if (object.crop != null) { + if (typeof object.crop !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.PreprocessingConfig.crop: object expected"); + message.crop = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop.fromObject(object.crop); + } + if (object.pad != null) { + if (typeof object.pad !== "object") + throw TypeError(".google.cloud.video.transcoder.v1beta1.PreprocessingConfig.pad: object expected"); + message.pad = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad.fromObject(object.pad); + } return message; }; @@ -19913,6 +20005,8 @@ object.denoise = null; object.deblock = null; object.audio = null; + object.crop = null; + object.pad = null; } if (message.color != null && message.hasOwnProperty("color")) object.color = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color.toObject(message.color, options); @@ -19922,6 +20016,10 @@ object.deblock = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock.toObject(message.deblock, options); if (message.audio != null && message.hasOwnProperty("audio")) object.audio = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio.toObject(message.audio, options); + if (message.crop != null && message.hasOwnProperty("crop")) + object.crop = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop.toObject(message.crop, options); + if (message.pad != null && message.hasOwnProperty("pad")) + object.pad = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad.toObject(message.pad, options); return object; }; @@ -20820,6 +20918,514 @@ return Audio; })(); + PreprocessingConfig.Crop = (function() { + + /** + * Properties of a Crop. + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig + * @interface ICrop + * @property {number|null} [topPixels] Crop topPixels + * @property {number|null} [bottomPixels] Crop bottomPixels + * @property {number|null} [leftPixels] Crop leftPixels + * @property {number|null} [rightPixels] Crop rightPixels + */ + + /** + * Constructs a new Crop. + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig + * @classdesc Represents a Crop. + * @implements ICrop + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.ICrop=} [properties] Properties to set + */ + function Crop(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Crop topPixels. + * @member {number} topPixels + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop + * @instance + */ + Crop.prototype.topPixels = 0; + + /** + * Crop bottomPixels. + * @member {number} bottomPixels + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop + * @instance + */ + Crop.prototype.bottomPixels = 0; + + /** + * Crop leftPixels. + * @member {number} leftPixels + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop + * @instance + */ + Crop.prototype.leftPixels = 0; + + /** + * Crop rightPixels. + * @member {number} rightPixels + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop + * @instance + */ + Crop.prototype.rightPixels = 0; + + /** + * Creates a new Crop instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop + * @static + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.ICrop=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop} Crop instance + */ + Crop.create = function create(properties) { + return new Crop(properties); + }; + + /** + * Encodes the specified Crop message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop + * @static + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.ICrop} message Crop message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Crop.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.topPixels != null && Object.hasOwnProperty.call(message, "topPixels")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.topPixels); + if (message.bottomPixels != null && Object.hasOwnProperty.call(message, "bottomPixels")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.bottomPixels); + if (message.leftPixels != null && Object.hasOwnProperty.call(message, "leftPixels")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.leftPixels); + if (message.rightPixels != null && Object.hasOwnProperty.call(message, "rightPixels")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.rightPixels); + return writer; + }; + + /** + * Encodes the specified Crop message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop + * @static + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.ICrop} message Crop message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Crop.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Crop message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop} Crop + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Crop.decode = function 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.transcoder.v1beta1.PreprocessingConfig.Crop(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.topPixels = reader.int32(); + break; + case 2: + message.bottomPixels = reader.int32(); + break; + case 3: + message.leftPixels = reader.int32(); + break; + case 4: + message.rightPixels = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Crop message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop} Crop + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Crop.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Crop message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Crop.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.topPixels != null && message.hasOwnProperty("topPixels")) + if (!$util.isInteger(message.topPixels)) + return "topPixels: integer expected"; + if (message.bottomPixels != null && message.hasOwnProperty("bottomPixels")) + if (!$util.isInteger(message.bottomPixels)) + return "bottomPixels: integer expected"; + if (message.leftPixels != null && message.hasOwnProperty("leftPixels")) + if (!$util.isInteger(message.leftPixels)) + return "leftPixels: integer expected"; + if (message.rightPixels != null && message.hasOwnProperty("rightPixels")) + if (!$util.isInteger(message.rightPixels)) + return "rightPixels: integer expected"; + return null; + }; + + /** + * Creates a Crop message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop} Crop + */ + Crop.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop(); + if (object.topPixels != null) + message.topPixels = object.topPixels | 0; + if (object.bottomPixels != null) + message.bottomPixels = object.bottomPixels | 0; + if (object.leftPixels != null) + message.leftPixels = object.leftPixels | 0; + if (object.rightPixels != null) + message.rightPixels = object.rightPixels | 0; + return message; + }; + + /** + * Creates a plain object from a Crop message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop + * @static + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop} message Crop + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Crop.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.topPixels = 0; + object.bottomPixels = 0; + object.leftPixels = 0; + object.rightPixels = 0; + } + if (message.topPixels != null && message.hasOwnProperty("topPixels")) + object.topPixels = message.topPixels; + if (message.bottomPixels != null && message.hasOwnProperty("bottomPixels")) + object.bottomPixels = message.bottomPixels; + if (message.leftPixels != null && message.hasOwnProperty("leftPixels")) + object.leftPixels = message.leftPixels; + if (message.rightPixels != null && message.hasOwnProperty("rightPixels")) + object.rightPixels = message.rightPixels; + return object; + }; + + /** + * Converts this Crop to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop + * @instance + * @returns {Object.} JSON object + */ + Crop.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Crop; + })(); + + PreprocessingConfig.Pad = (function() { + + /** + * Properties of a Pad. + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig + * @interface IPad + * @property {number|null} [topPixels] Pad topPixels + * @property {number|null} [bottomPixels] Pad bottomPixels + * @property {number|null} [leftPixels] Pad leftPixels + * @property {number|null} [rightPixels] Pad rightPixels + */ + + /** + * Constructs a new Pad. + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig + * @classdesc Represents a Pad. + * @implements IPad + * @constructor + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IPad=} [properties] Properties to set + */ + function Pad(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Pad topPixels. + * @member {number} topPixels + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad + * @instance + */ + Pad.prototype.topPixels = 0; + + /** + * Pad bottomPixels. + * @member {number} bottomPixels + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad + * @instance + */ + Pad.prototype.bottomPixels = 0; + + /** + * Pad leftPixels. + * @member {number} leftPixels + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad + * @instance + */ + Pad.prototype.leftPixels = 0; + + /** + * Pad rightPixels. + * @member {number} rightPixels + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad + * @instance + */ + Pad.prototype.rightPixels = 0; + + /** + * Creates a new Pad instance using the specified properties. + * @function create + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad + * @static + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IPad=} [properties] Properties to set + * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad} Pad instance + */ + Pad.create = function create(properties) { + return new Pad(properties); + }; + + /** + * Encodes the specified Pad message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad.verify|verify} messages. + * @function encode + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad + * @static + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IPad} message Pad message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pad.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.topPixels != null && Object.hasOwnProperty.call(message, "topPixels")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.topPixels); + if (message.bottomPixels != null && Object.hasOwnProperty.call(message, "bottomPixels")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.bottomPixels); + if (message.leftPixels != null && Object.hasOwnProperty.call(message, "leftPixels")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.leftPixels); + if (message.rightPixels != null && Object.hasOwnProperty.call(message, "rightPixels")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.rightPixels); + return writer; + }; + + /** + * Encodes the specified Pad message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad + * @static + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IPad} message Pad message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pad.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Pad message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad} Pad + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pad.decode = function 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.transcoder.v1beta1.PreprocessingConfig.Pad(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.topPixels = reader.int32(); + break; + case 2: + message.bottomPixels = reader.int32(); + break; + case 3: + message.leftPixels = reader.int32(); + break; + case 4: + message.rightPixels = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Pad message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad} Pad + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pad.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Pad message. + * @function verify + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Pad.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.topPixels != null && message.hasOwnProperty("topPixels")) + if (!$util.isInteger(message.topPixels)) + return "topPixels: integer expected"; + if (message.bottomPixels != null && message.hasOwnProperty("bottomPixels")) + if (!$util.isInteger(message.bottomPixels)) + return "bottomPixels: integer expected"; + if (message.leftPixels != null && message.hasOwnProperty("leftPixels")) + if (!$util.isInteger(message.leftPixels)) + return "leftPixels: integer expected"; + if (message.rightPixels != null && message.hasOwnProperty("rightPixels")) + if (!$util.isInteger(message.rightPixels)) + return "rightPixels: integer expected"; + return null; + }; + + /** + * Creates a Pad message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad} Pad + */ + Pad.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad) + return object; + var message = new $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad(); + if (object.topPixels != null) + message.topPixels = object.topPixels | 0; + if (object.bottomPixels != null) + message.bottomPixels = object.bottomPixels | 0; + if (object.leftPixels != null) + message.leftPixels = object.leftPixels | 0; + if (object.rightPixels != null) + message.rightPixels = object.rightPixels | 0; + return message; + }; + + /** + * Creates a plain object from a Pad message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad + * @static + * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad} message Pad + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Pad.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.topPixels = 0; + object.bottomPixels = 0; + object.leftPixels = 0; + object.rightPixels = 0; + } + if (message.topPixels != null && message.hasOwnProperty("topPixels")) + object.topPixels = message.topPixels; + if (message.bottomPixels != null && message.hasOwnProperty("bottomPixels")) + object.bottomPixels = message.bottomPixels; + if (message.leftPixels != null && message.hasOwnProperty("leftPixels")) + object.leftPixels = message.leftPixels; + if (message.rightPixels != null && message.hasOwnProperty("rightPixels")) + object.rightPixels = message.rightPixels; + return object; + }; + + /** + * Converts this Pad to JSON. + * @function toJSON + * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad + * @instance + * @returns {Object.} JSON object + */ + Pad.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Pad; + })(); + return PreprocessingConfig; })(); diff --git a/packages/google-cloud-video-transcoder/protos/protos.json b/packages/google-cloud-video-transcoder/protos/protos.json index 795e2e4dbd3..e91c307e808 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.json +++ b/packages/google-cloud-video-transcoder/protos/protos.json @@ -1590,6 +1590,10 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "ttlAfterCompletionDays": { + "type": "int32", + "id": 15 } }, "nested": { @@ -1893,6 +1897,10 @@ "interval": { "type": "google.protobuf.Duration", "id": 10 + }, + "quality": { + "type": "int32", + "id": 11 } } }, @@ -2034,6 +2042,14 @@ "audio": { "type": "Audio", "id": 4 + }, + "crop": { + "type": "Crop", + "id": 5 + }, + "pad": { + "type": "Pad", + "id": 6 } }, "nested": { @@ -2092,6 +2108,46 @@ "id": 3 } } + }, + "Crop": { + "fields": { + "topPixels": { + "type": "int32", + "id": 1 + }, + "bottomPixels": { + "type": "int32", + "id": 2 + }, + "leftPixels": { + "type": "int32", + "id": 3 + }, + "rightPixels": { + "type": "int32", + "id": 4 + } + } + }, + "Pad": { + "fields": { + "topPixels": { + "type": "int32", + "id": 1 + }, + "bottomPixels": { + "type": "int32", + "id": 2 + }, + "leftPixels": { + "type": "int32", + "id": 3 + }, + "rightPixels": { + "type": "int32", + "id": 4 + } + } } } }, @@ -2474,6 +2530,7 @@ }, "TranscoderService": { "options": { + "deprecated": true, "(google.api.default_host)": "transcoder.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" }, diff --git a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts index 01f022148e1..7e7f4114b73 100644 --- a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts +++ b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts @@ -49,6 +49,7 @@ const version = require('../../../package.json').version; * concatenation, and digital ad-stitch ready content generation. * @class * @memberof v1beta1 + * @deprecated TranscoderService is deprecated and may be removed in a future version. */ export class TranscoderServiceClient { private _terminated = false; @@ -221,6 +222,11 @@ export class TranscoderServiceClient { initialize() { // If the client stub promise is already initialized, return immediately. if (this.transcoderServiceStub) { + this.warn( + 'DEP$TranscoderService', + 'TranscoderService is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); return this.transcoderServiceStub; } @@ -274,6 +280,11 @@ export class TranscoderServiceClient { this.innerApiCalls[methodName] = apiCall; } + this.warn( + 'DEP$TranscoderService', + 'TranscoderService is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); return this.transcoderServiceStub; } From 10139f4facc64e3bef8c25ba155032f60aadb6aa Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 11 Aug 2021 14:32:46 -0700 Subject: [PATCH 052/116] chore: release 1.6.0 (#97) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-video-transcoder/CHANGELOG.md | 9 +++++++++ packages/google-cloud-video-transcoder/package.json | 2 +- .../google-cloud-video-transcoder/samples/package.json | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-video-transcoder/CHANGELOG.md b/packages/google-cloud-video-transcoder/CHANGELOG.md index 137157fb052..04b6654531b 100644 --- a/packages/google-cloud-video-transcoder/CHANGELOG.md +++ b/packages/google-cloud-video-transcoder/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [1.6.0](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.5.0...v1.6.0) (2021-08-10) + + +### Features + +* Add ttl_after_completion_days field to Job ([75ea7d8](https://www.github.com/googleapis/nodejs-video-transcoder/commit/75ea7d8358da15d795556b7d9bb6777bb7ae4b04)) +* Add video cropping feature ([75ea7d8](https://www.github.com/googleapis/nodejs-video-transcoder/commit/75ea7d8358da15d795556b7d9bb6777bb7ae4b04)) +* Add video padding feature ([75ea7d8](https://www.github.com/googleapis/nodejs-video-transcoder/commit/75ea7d8358da15d795556b7d9bb6777bb7ae4b04)) + ## [1.5.0](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.4.4...v1.5.0) (2021-07-16) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 37ba53c8077..086fd415e07 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/video-transcoder", - "version": "1.5.0", + "version": "1.6.0", "description": "Transcoder client for Node.js", "repository": "googleapis/nodejs-video-transcoder", "license": "Apache-2.0", diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index cba93c73598..b81dae45990 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/video-transcoder": "^1.5.0" + "@google-cloud/video-transcoder": "^1.6.0" }, "devDependencies": { "@google-cloud/storage": "^5.4.0", From 8189528e95caf024d7bd8b090b28ec69ee42bb04 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 16 Aug 2021 22:42:39 -0400 Subject: [PATCH 053/116] fix(deps): google-gax v2.24.1 (#100) --- packages/google-cloud-video-transcoder/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 086fd415e07..a1cf31fdfc3 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -39,7 +39,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^2.17.1" + "google-gax": "^2.24.1" }, "devDependencies": { "@types/mocha": "^8.0.3", From 59e7b18ee2659172553ae66a67af9bc1f90b87ae Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 19 Aug 2021 14:16:19 -0700 Subject: [PATCH 054/116] chore: release 1.6.1 (#101) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-video-transcoder/CHANGELOG.md | 7 +++++++ packages/google-cloud-video-transcoder/package.json | 2 +- .../google-cloud-video-transcoder/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-video-transcoder/CHANGELOG.md b/packages/google-cloud-video-transcoder/CHANGELOG.md index 04b6654531b..1edf833c5fa 100644 --- a/packages/google-cloud-video-transcoder/CHANGELOG.md +++ b/packages/google-cloud-video-transcoder/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.6.1](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.6.0...v1.6.1) (2021-08-19) + + +### Bug Fixes + +* **deps:** google-gax v2.24.1 ([#100](https://www.github.com/googleapis/nodejs-video-transcoder/issues/100)) ([ae57011](https://www.github.com/googleapis/nodejs-video-transcoder/commit/ae570110ed04943908190c85d91e5204abf8e1b3)) + ## [1.6.0](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.5.0...v1.6.0) (2021-08-10) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index a1cf31fdfc3..524b548dcc2 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/video-transcoder", - "version": "1.6.0", + "version": "1.6.1", "description": "Transcoder client for Node.js", "repository": "googleapis/nodejs-video-transcoder", "license": "Apache-2.0", diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index b81dae45990..bc3ed359c1a 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/video-transcoder": "^1.6.0" + "@google-cloud/video-transcoder": "^1.6.1" }, "devDependencies": { "@google-cloud/storage": "^5.4.0", From d296c8ce53f2ad50bfd5b3bbe0eca229c14fe5d0 Mon Sep 17 00:00:00 2001 From: Nicholas Cook Date: Fri, 20 Aug 2021 12:56:15 -0700 Subject: [PATCH 055/116] docs: update Transcoder API samples to v1 (#99) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: update Transcoder API samples to v1 * ๐Ÿฆ‰ Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Address feedback. Co-authored-by: Owl Bot Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- packages/google-cloud-video-transcoder/README.md | 3 ++- packages/google-cloud-video-transcoder/samples/quickstart.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-video-transcoder/README.md b/packages/google-cloud-video-transcoder/README.md index 9c4578231c6..ffc79974a3c 100644 --- a/packages/google-cloud-video-transcoder/README.md +++ b/packages/google-cloud-video-transcoder/README.md @@ -63,7 +63,8 @@ npm install @google-cloud/video-transcoder */ // const projectId = 'my-project'; // const location = 'us-central1'; -const {TranscoderServiceClient} = require('@google-cloud/video-transcoder'); +const {TranscoderServiceClient} = + require('@google-cloud/video-transcoder').v1; const client = new TranscoderServiceClient(); async function listJobs() { const [jobs] = await client.listJobs({ diff --git a/packages/google-cloud-video-transcoder/samples/quickstart.js b/packages/google-cloud-video-transcoder/samples/quickstart.js index 797c0523f14..78e00252ebf 100644 --- a/packages/google-cloud-video-transcoder/samples/quickstart.js +++ b/packages/google-cloud-video-transcoder/samples/quickstart.js @@ -21,7 +21,8 @@ async function main(projectId, location) { */ // const projectId = 'my-project'; // const location = 'us-central1'; - const {TranscoderServiceClient} = require('@google-cloud/video-transcoder'); + const {TranscoderServiceClient} = + require('@google-cloud/video-transcoder').v1; const client = new TranscoderServiceClient(); async function listJobs() { const [jobs] = await client.listJobs({ From a86994202af9bc92f43b20cc70175fc4551e80aa Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 18:30:39 +0000 Subject: [PATCH 056/116] feat: turns on self-signed JWT feature flag (#103) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 392067151 Source-Link: https://github.com/googleapis/googleapis/commit/06345f7b95c4b4a3ffe4303f1f2984ccc304b2e0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/95882b37970e41e4cd51b22fa507cfd46dc7c4b6 --- .../src/v1/transcoder_service_client.ts | 6 ++++++ .../src/v1beta1/transcoder_service_client.ts | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts b/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts index 2fdccf3d34a..b896be3825f 100644 --- a/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts +++ b/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts @@ -136,6 +136,12 @@ export class TranscoderServiceClient { // 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; diff --git a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts index 7e7f4114b73..c527c36e896 100644 --- a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts +++ b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts @@ -137,6 +137,12 @@ export class TranscoderServiceClient { // 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; From 5f2762583e5f0eacb1cf8d58c49bb917cfeeddc9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 25 Aug 2021 23:54:27 +0000 Subject: [PATCH 057/116] chore: disable renovate dependency dashboard (#1194) (#105) --- packages/google-cloud-video-transcoder/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-video-transcoder/README.md b/packages/google-cloud-video-transcoder/README.md index ffc79974a3c..2f5c8d76944 100644 --- a/packages/google-cloud-video-transcoder/README.md +++ b/packages/google-cloud-video-transcoder/README.md @@ -156,8 +156,8 @@ Contributions welcome! See the [Contributing Guide](https://github.com/googleapi 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 template in this -[directory](https://github.com/googleapis/synthtool/tree/master/synthtool/gcp/templates/node_library). +to its templates in +[directory](https://github.com/googleapis/synthtool). ## License From be083aa89638cefdd637dd5df0fb871dd7099244 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Sat, 28 Aug 2021 09:41:46 -0700 Subject: [PATCH 058/116] chore: release 1.7.0 (#104) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-video-transcoder/CHANGELOG.md | 7 +++++++ packages/google-cloud-video-transcoder/package.json | 2 +- .../google-cloud-video-transcoder/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-video-transcoder/CHANGELOG.md b/packages/google-cloud-video-transcoder/CHANGELOG.md index 1edf833c5fa..840df7db42a 100644 --- a/packages/google-cloud-video-transcoder/CHANGELOG.md +++ b/packages/google-cloud-video-transcoder/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.7.0](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.6.1...v1.7.0) (2021-08-27) + + +### Features + +* turns on self-signed JWT feature flag ([#103](https://www.github.com/googleapis/nodejs-video-transcoder/issues/103)) ([1fba447](https://www.github.com/googleapis/nodejs-video-transcoder/commit/1fba447cd05e0e921198dd0fa9248271f4c48ca3)) + ### [1.6.1](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.6.0...v1.6.1) (2021-08-19) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 524b548dcc2..69263cfbeb5 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/video-transcoder", - "version": "1.6.1", + "version": "1.7.0", "description": "Transcoder client for Node.js", "repository": "googleapis/nodejs-video-transcoder", "license": "Apache-2.0", diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index bc3ed359c1a..686d7232af0 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/video-transcoder": "^1.6.1" + "@google-cloud/video-transcoder": "^1.7.0" }, "devDependencies": { "@google-cloud/storage": "^5.4.0", From 4912ea8c2d216c4ba0c8754e981461fa7215abcb Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Thu, 9 Sep 2021 10:48:35 -0700 Subject: [PATCH 059/116] fix(build): migrate to using main branch (#109) --- .../google-cloud-video-transcoder/README.md | 42 +++++++++---------- .../samples/README.md | 32 +++++++------- 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/packages/google-cloud-video-transcoder/README.md b/packages/google-cloud-video-transcoder/README.md index 2f5c8d76944..498a120119e 100644 --- a/packages/google-cloud-video-transcoder/README.md +++ b/packages/google-cloud-video-transcoder/README.md @@ -6,7 +6,7 @@ [![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/video-transcoder.svg)](https://www.npmjs.org/package/@google-cloud/video-transcoder) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-video-transcoder/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-video-transcoder) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-video-transcoder/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-video-transcoder) @@ -15,7 +15,7 @@ Transcoder client for Node.js A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-video-transcoder/blob/master/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/nodejs-video-transcoder/blob/main/CHANGELOG.md). * [Transcoder API Node.js Client API Reference][client-docs] * [Transcoder API Documentation][product-docs] @@ -83,26 +83,26 @@ listJobs(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-video-transcoder/tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-video-transcoder/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Create Job From Ad Hoc | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobFromAdHoc.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobFromAdHoc.js,samples/README.md) | -| Create Job From Preset | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobFromPreset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobFromPreset.js,samples/README.md) | -| Create Job From Template | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobFromTemplate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobFromTemplate.js,samples/README.md) | -| Create Job Template | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobTemplate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobTemplate.js,samples/README.md) | -| Create Job With Animated Overlay | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobWithAnimatedOverlay.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithAnimatedOverlay.js,samples/README.md) | -| Create Job With Periodic Images Spritesheet | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobWithPeriodicImagesSpritesheet.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithPeriodicImagesSpritesheet.js,samples/README.md) | -| Create Job With Set Number Images Spritesheet | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobWithSetNumberImagesSpritesheet.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithSetNumberImagesSpritesheet.js,samples/README.md) | -| Create Job With Static Overlay | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobWithStaticOverlay.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithStaticOverlay.js,samples/README.md) | -| Delete Job | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/deleteJob.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/deleteJob.js,samples/README.md) | -| Delete Job Template | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/deleteJobTemplate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/deleteJobTemplate.js,samples/README.md) | -| Get Job | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/getJob.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/getJob.js,samples/README.md) | -| Get Job State | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/getJobState.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/getJobState.js,samples/README.md) | -| Get Job Template | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/getJobTemplate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/getJobTemplate.js,samples/README.md) | -| List Job Templates | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/listJobTemplates.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/listJobTemplates.js,samples/README.md) | -| List Jobs | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/listJobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/listJobs.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | +| Create Job From Ad Hoc | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobFromAdHoc.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobFromAdHoc.js,samples/README.md) | +| Create Job From Preset | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobFromPreset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobFromPreset.js,samples/README.md) | +| Create Job From Template | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobFromTemplate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobFromTemplate.js,samples/README.md) | +| Create Job Template | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobTemplate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobTemplate.js,samples/README.md) | +| Create Job With Animated Overlay | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobWithAnimatedOverlay.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithAnimatedOverlay.js,samples/README.md) | +| Create Job With Periodic Images Spritesheet | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobWithPeriodicImagesSpritesheet.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithPeriodicImagesSpritesheet.js,samples/README.md) | +| Create Job With Set Number Images Spritesheet | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobWithSetNumberImagesSpritesheet.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithSetNumberImagesSpritesheet.js,samples/README.md) | +| Create Job With Static Overlay | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobWithStaticOverlay.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithStaticOverlay.js,samples/README.md) | +| Delete Job | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/deleteJob.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/deleteJob.js,samples/README.md) | +| Delete Job Template | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/deleteJobTemplate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/deleteJobTemplate.js,samples/README.md) | +| Get Job | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/getJob.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/getJob.js,samples/README.md) | +| Get Job State | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/getJobState.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/getJobState.js,samples/README.md) | +| Get Job Template | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/getJobTemplate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/getJobTemplate.js,samples/README.md) | +| List Job Templates | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/listJobTemplates.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/listJobTemplates.js,samples/README.md) | +| List Jobs | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/listJobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/listJobs.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | @@ -151,7 +151,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-video-transcoder/blob/master/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-video-transcoder/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`) @@ -163,7 +163,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-video-transcoder/blob/master/LICENSE) +See [LICENSE](https://github.com/googleapis/nodejs-video-transcoder/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/video-transcoder/latest [product-docs]: https://googleapis.dev/nodejs/transcoder/latest diff --git a/packages/google-cloud-video-transcoder/samples/README.md b/packages/google-cloud-video-transcoder/samples/README.md index 5baa65de620..11c357fe8a8 100644 --- a/packages/google-cloud-video-transcoder/samples/README.md +++ b/packages/google-cloud-video-transcoder/samples/README.md @@ -46,7 +46,7 @@ Before running the samples, make sure you've followed the steps outlined in ### Create Job From Ad Hoc -View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobFromAdHoc.js). +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobFromAdHoc.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobFromAdHoc.js,samples/README.md) @@ -63,7 +63,7 @@ __Usage:__ ### Create Job From Preset -View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobFromPreset.js). +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobFromPreset.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobFromPreset.js,samples/README.md) @@ -80,7 +80,7 @@ __Usage:__ ### Create Job From Template -View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobFromTemplate.js). +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobFromTemplate.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobFromTemplate.js,samples/README.md) @@ -97,7 +97,7 @@ __Usage:__ ### Create Job Template -View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobTemplate.js). +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobTemplate.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobTemplate.js,samples/README.md) @@ -114,7 +114,7 @@ __Usage:__ ### Create Job With Animated Overlay -View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobWithAnimatedOverlay.js). +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobWithAnimatedOverlay.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithAnimatedOverlay.js,samples/README.md) @@ -131,7 +131,7 @@ __Usage:__ ### Create Job With Periodic Images Spritesheet -View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobWithPeriodicImagesSpritesheet.js). +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobWithPeriodicImagesSpritesheet.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithPeriodicImagesSpritesheet.js,samples/README.md) @@ -148,7 +148,7 @@ __Usage:__ ### Create Job With Set Number Images Spritesheet -View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobWithSetNumberImagesSpritesheet.js). +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobWithSetNumberImagesSpritesheet.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithSetNumberImagesSpritesheet.js,samples/README.md) @@ -165,7 +165,7 @@ __Usage:__ ### Create Job With Static Overlay -View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/createJobWithStaticOverlay.js). +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobWithStaticOverlay.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithStaticOverlay.js,samples/README.md) @@ -182,7 +182,7 @@ __Usage:__ ### Delete Job -View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/deleteJob.js). +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/deleteJob.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/deleteJob.js,samples/README.md) @@ -199,7 +199,7 @@ __Usage:__ ### Delete Job Template -View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/deleteJobTemplate.js). +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/deleteJobTemplate.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/deleteJobTemplate.js,samples/README.md) @@ -216,7 +216,7 @@ __Usage:__ ### Get Job -View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/getJob.js). +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/getJob.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/getJob.js,samples/README.md) @@ -233,7 +233,7 @@ __Usage:__ ### Get Job State -View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/getJobState.js). +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/getJobState.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/getJobState.js,samples/README.md) @@ -250,7 +250,7 @@ __Usage:__ ### Get Job Template -View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/getJobTemplate.js). +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/getJobTemplate.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/getJobTemplate.js,samples/README.md) @@ -267,7 +267,7 @@ __Usage:__ ### List Job Templates -View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/listJobTemplates.js). +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/listJobTemplates.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/listJobTemplates.js,samples/README.md) @@ -284,7 +284,7 @@ __Usage:__ ### List Jobs -View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/listJobs.js). +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/listJobs.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/listJobs.js,samples/README.md) @@ -301,7 +301,7 @@ __Usage:__ ### Quickstart -View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/master/samples/quickstart.js). +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/quickstart.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) From 96919d2b46f546d8d38570fa32dcd95026a194bd Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 9 Sep 2021 18:06:15 +0000 Subject: [PATCH 060/116] chore: release 1.7.1 (#110) :robot: I have created a release \*beep\* \*boop\* --- ### [1.7.1](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.7.0...v1.7.1) (2021-09-09) ### Bug Fixes * **build:** migrate to using main branch ([#109](https://www.github.com/googleapis/nodejs-video-transcoder/issues/109)) ([5612895](https://www.github.com/googleapis/nodejs-video-transcoder/commit/5612895e1e4a0cfaaf5722b52da20fba249890c6)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-video-transcoder/CHANGELOG.md | 7 +++++++ packages/google-cloud-video-transcoder/package.json | 2 +- .../google-cloud-video-transcoder/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-video-transcoder/CHANGELOG.md b/packages/google-cloud-video-transcoder/CHANGELOG.md index 840df7db42a..52e3169fd8c 100644 --- a/packages/google-cloud-video-transcoder/CHANGELOG.md +++ b/packages/google-cloud-video-transcoder/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.7.1](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.7.0...v1.7.1) (2021-09-09) + + +### Bug Fixes + +* **build:** migrate to using main branch ([#109](https://www.github.com/googleapis/nodejs-video-transcoder/issues/109)) ([5612895](https://www.github.com/googleapis/nodejs-video-transcoder/commit/5612895e1e4a0cfaaf5722b52da20fba249890c6)) + ## [1.7.0](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.6.1...v1.7.0) (2021-08-27) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 69263cfbeb5..fc0ea654257 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/video-transcoder", - "version": "1.7.0", + "version": "1.7.1", "description": "Transcoder client for Node.js", "repository": "googleapis/nodejs-video-transcoder", "license": "Apache-2.0", diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index 686d7232af0..da887d4625b 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/video-transcoder": "^1.7.0" + "@google-cloud/video-transcoder": "^1.7.1" }, "devDependencies": { "@google-cloud/storage": "^5.4.0", From a0371d584e8a1665cd620b7942d202acd445f364 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 13 Oct 2021 10:00:29 -0700 Subject: [PATCH 061/116] fix: update nodejs package name to video-transcoder (#119) docs: clarify that project number is used as the canonical project identifier for job and job template names docs: fix broken link and code formatting feat: add support for allow_missing param on DELETE request fix: remove Encryption settings that were published due to a sync issue BREAKING CHANGE: requests specifying Encryption settings are rejected by the server PiperOrigin-RevId: 401033248 PiperOrigin-RevId: 402666373 Source-Link: https://github.com/googleapis/googleapis/commit/7bfeecb83a0ab5f76f60b6c33414b089ba04bcf0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/ecb2e76de83851ff4c4808476a8c2080dd562c21 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWNiMmU3NmRlODM4NTFmZjRjNDgwODQ3NmE4YzIwODBkZDU2MmMyMSJ9 --- .../cloud/video/transcoder/v1/resources.proto | 322 ++--- .../cloud/video/transcoder/v1/services.proto | 8 + .../protos/protos.d.ts | 414 +----- .../protos/protos.js | 1238 +++-------------- .../protos/protos.json | 93 +- .../v1/transcoder_service.create_job.js | 59 + .../transcoder_service.create_job_template.js | 67 + .../v1/transcoder_service.delete_job.js | 59 + .../transcoder_service.delete_job_template.js | 59 + .../v1/transcoder_service.get_job.js | 54 + .../v1/transcoder_service.get_job_template.js | 55 + .../transcoder_service.list_job_templates.js | 75 + .../v1/transcoder_service.list_jobs.js | 74 + .../v1beta1/transcoder_service.create_job.js | 59 + .../transcoder_service.create_job_template.js | 67 + .../v1beta1/transcoder_service.delete_job.js | 54 + .../transcoder_service.delete_job_template.js | 54 + .../v1beta1/transcoder_service.get_job.js | 54 + .../transcoder_service.get_job_template.js | 55 + .../transcoder_service.list_job_templates.js | 65 + .../v1beta1/transcoder_service.list_jobs.js | 64 + .../src/v1/gapic_metadata.json | 2 +- .../src/v1/transcoder_service_client.ts | 18 +- .../src/v1beta1/transcoder_service_client.ts | 12 +- 24 files changed, 1339 insertions(+), 1742 deletions(-) create mode 100644 packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job.js create mode 100644 packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job_template.js create mode 100644 packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job.js create mode 100644 packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job_template.js create mode 100644 packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job.js create mode 100644 packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job_template.js create mode 100644 packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_job_templates.js create mode 100644 packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_jobs.js create mode 100644 packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job.js create mode 100644 packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job_template.js create mode 100644 packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job.js create mode 100644 packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job_template.js create mode 100644 packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job.js create mode 100644 packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job_template.js create mode 100644 packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_job_templates.js create mode 100644 packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_jobs.js diff --git a/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/resources.proto b/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/resources.proto index 1677868b200..42b9d62fac6 100644 --- a/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/resources.proto +++ b/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/resources.proto @@ -54,7 +54,7 @@ message Job { } // The resource name of the job. - // Format: `projects/{project}/locations/{location}/jobs/{job}` + // Format: `projects/{project_number}/locations/{location}/jobs/{job}` string name = 1; // Input only. Specify the `input_uri` to populate empty `uri` fields in each element of @@ -118,7 +118,7 @@ message JobTemplate { // The resource name of the job template. // Format: - // `projects/{project}/locations/{location}/jobTemplates/{job_template}` + // `projects/{project_number}/locations/{location}/jobTemplates/{job_template}` string name = 1; // The configuration for this template. @@ -232,54 +232,52 @@ message ElementaryStream { // Multiplexing settings for output stream. message MuxStream { // A unique key for this multiplexed stream. HLS media manifests will be - // named `MuxStream.key` with the `".m3u8"` extension suffix. + // named `MuxStream.key` with the `.m3u8` extension suffix. string key = 1; // The name of the generated file. The default is `MuxStream.key` with the // extension suffix corresponding to the `MuxStream.container`. // // Individual segments also have an incremental 10-digit zero-padded suffix - // starting from 0 before the extension, such as `"mux_stream0000000123.ts"`. + // starting from 0 before the extension, such as `mux_stream0000000123.ts`. string file_name = 2; - // The container format. The default is `"mp4"` + // The container format. The default is `mp4` // // Supported container formats: - // - 'ts' - // - 'fmp4'- the corresponding file extension is `".m4s"` - // - 'mp4' - // - 'vtt' + // + // - `ts` + // - `fmp4`- the corresponding file extension is `.m4s` + // - `mp4` + // - `vtt` string container = 3; // List of `ElementaryStream.key`s multiplexed in this stream. repeated string elementary_streams = 4; - // Segment settings for `"ts"`, `"fmp4"` and `"vtt"`. + // Segment settings for `ts`, `fmp4` and `vtt`. SegmentSettings segment_settings = 5; - - // Encryption settings. - Encryption encryption = 6; } // Manifest configuration. message Manifest { - // The manifest type can be either `"HLS"` or `"DASH"`. + // The manifest type can be either `HLS` or `DASH`. enum ManifestType { // The manifest type is not specified. MANIFEST_TYPE_UNSPECIFIED = 0; - // Create `"HLS"` manifest. The corresponding file extension is `".m3u8"`. + // Create `HLS` manifest. The corresponding file extension is `.m3u8`. HLS = 1; - // Create `"DASH"` manifest. The corresponding file extension is `".mpd"`. + // Create `DASH` manifest. The corresponding file extension is `.mpd`. DASH = 2; } - // The name of the generated file. The default is `"manifest"` with the + // The name of the generated file. The default is `manifest` with the // extension suffix corresponding to the `Manifest.type`. string file_name = 1; - // Required. Type of the manifest, can be "HLS" or "DASH". + // Required. Type of the manifest, can be `HLS` or `DASH`. ManifestType type = 2 [(google.api.field_behavior) = REQUIRED]; // Required. List of user given `MuxStream.key`s that should appear in this manifest. @@ -299,16 +297,17 @@ message PubsubDestination { // Sprite sheet configuration. message SpriteSheet { - // Format type. The default is `"jpeg"`. + // Format type. The default is `jpeg`. // // Supported formats: - // - 'jpeg' + // + // - `jpeg` string format = 1; // Required. File name prefix for the generated sprite sheets. // // Each sprite sheet has an incremental 10-digit zero-padded suffix starting - // from 0 before the extension, such as `"sprite_sheet0000000123.jpeg"`. + // from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. string file_prefix = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The width of sprite in pixels. Must be an even integer. To preserve the @@ -490,11 +489,12 @@ message PreprocessingConfig { // the value, the smoother the image. 0 is no denoising. The default is 0. double strength = 1; - // Set the denoiser mode. The default is `"standard"`. + // Set the denoiser mode. The default is `standard`. // // Supported denoiser modes: - // - 'standard' - // - 'grain' + // + // - `standard` + // - `grain` string tune = 2; } @@ -605,29 +605,31 @@ message VideoStream { // more information. double frame_rate = 3 [(google.api.field_behavior) = REQUIRED]; - // Required. The video bitrate in bits per second. Must be between 1 and - // 1,000,000,000. + // Required. The video bitrate in bits per second. The minimum value is 1,000. + // The maximum value is 800,000,000. int32 bitrate_bps = 4 [(google.api.field_behavior) = REQUIRED]; - // Pixel format to use. The default is `"yuv420p"`. + // Pixel format to use. The default is `yuv420p`. // // Supported pixel formats: - // - 'yuv420p' pixel format. - // - 'yuv422p' pixel format. - // - 'yuv444p' pixel format. - // - 'yuv420p10' 10-bit HDR pixel format. - // - 'yuv422p10' 10-bit HDR pixel format. - // - 'yuv444p10' 10-bit HDR pixel format. - // - 'yuv420p12' 12-bit HDR pixel format. - // - 'yuv422p12' 12-bit HDR pixel format. - // - 'yuv444p12' 12-bit HDR pixel format. + // + // - `yuv420p` pixel format + // - `yuv422p` pixel format + // - `yuv444p` pixel format + // - `yuv420p10` 10-bit HDR pixel format + // - `yuv422p10` 10-bit HDR pixel format + // - `yuv444p10` 10-bit HDR pixel format + // - `yuv420p12` 12-bit HDR pixel format + // - `yuv422p12` 12-bit HDR pixel format + // - `yuv444p12` 12-bit HDR pixel format string pixel_format = 5; - // Specify the `rate_control_mode`. The default is `"vbr"`. + // Specify the `rate_control_mode`. The default is `vbr`. // // Supported rate control modes: - // - 'vbr' - variable bitrate - // - 'crf' - constant rate factor + // + // - `vbr` - variable bitrate + // - `crf` - constant rate factor string rate_control_mode = 6; // Target CRF level. Must be between 10 and 36, where 10 is the highest @@ -645,7 +647,7 @@ message VideoStream { int32 gop_frame_count = 9; // Select the GOP size based on the specified duration. The default is - // `"3s"`. Note that `gopDuration` must be less than or equal to + // `3s`. Note that `gopDuration` must be less than or equal to // [`segmentDuration`](#SegmentSettings), and // [`segmentDuration`](#SegmentSettings) must be divisible by // `gopDuration`. @@ -653,7 +655,7 @@ message VideoStream { } // Use two-pass encoding strategy to achieve better video quality. - // `VideoStream.rate_control_mode` must be `"vbr"`. The default is `false`. + // `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. bool enable_two_pass = 11; // Size of the Video Buffering Verifier (VBV) buffer in bits. Must be @@ -665,11 +667,12 @@ message VideoStream { // `VideoStream.vbv_size_bits`. int32 vbv_fullness_bits = 13; - // The entropy coder to use. The default is `"cabac"`. + // The entropy coder to use. The default is `cabac`. // // Supported entropy coders: - // - 'cavlc' - // - 'cabac' + // + // - `cavlc` + // - `cabac` string entropy_coder = 14; // Allow B-pyramid for reference frame selection. This may not be supported @@ -694,23 +697,23 @@ message VideoStream { // * `high` (default) // // The available options are - // [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Profile){: - // class="external" }. Note that certain values for this field may cause the + // [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). + // Note that certain values for this field may cause the // transcoder to override other fields you set in the `H264CodecSettings` // message. string profile = 18; // Enforces the specified codec tune. The available options are - // [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune){: - // class="external" }. Note that certain values for this field may cause the + // [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). + // Note that certain values for this field may cause the // transcoder to override other fields you set in the `H264CodecSettings` // message. string tune = 19; // Enforces the specified codec preset. The default is `veryfast`. The // available options are - // [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Preset){: - // class="external" }. Note that certain values for this field may cause the + // [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Preset). + // Note that certain values for this field may cause the // transcoder to override other fields you set in the `H264CodecSettings` // message. string preset = 20; @@ -737,29 +740,31 @@ message VideoStream { // more information. double frame_rate = 3 [(google.api.field_behavior) = REQUIRED]; - // Required. The video bitrate in bits per second. Must be between 1 and - // 1,000,000,000. + // Required. The video bitrate in bits per second. The minimum value is 1,000. + // The maximum value is 800,000,000. int32 bitrate_bps = 4 [(google.api.field_behavior) = REQUIRED]; - // Pixel format to use. The default is `"yuv420p"`. + // Pixel format to use. The default is `yuv420p`. // // Supported pixel formats: - // - 'yuv420p' pixel format. - // - 'yuv422p' pixel format. - // - 'yuv444p' pixel format. - // - 'yuv420p10' 10-bit HDR pixel format. - // - 'yuv422p10' 10-bit HDR pixel format. - // - 'yuv444p10' 10-bit HDR pixel format. - // - 'yuv420p12' 12-bit HDR pixel format. - // - 'yuv422p12' 12-bit HDR pixel format. - // - 'yuv444p12' 12-bit HDR pixel format. + // + // - `yuv420p` pixel format + // - `yuv422p` pixel format + // - `yuv444p` pixel format + // - `yuv420p10` 10-bit HDR pixel format + // - `yuv422p10` 10-bit HDR pixel format + // - `yuv444p10` 10-bit HDR pixel format + // - `yuv420p12` 12-bit HDR pixel format + // - `yuv422p12` 12-bit HDR pixel format + // - `yuv444p12` 12-bit HDR pixel format string pixel_format = 5; - // Specify the `rate_control_mode`. The default is `"vbr"`. + // Specify the `rate_control_mode`. The default is `vbr`. // // Supported rate control modes: - // - 'vbr' - variable bitrate - // - 'crf' - constant rate factor + // + // - `vbr` - variable bitrate + // - `crf` - constant rate factor string rate_control_mode = 6; // Target CRF level. Must be between 10 and 36, where 10 is the highest @@ -777,7 +782,7 @@ message VideoStream { int32 gop_frame_count = 9; // Select the GOP size based on the specified duration. The default is - // `"3s"`. Note that `gopDuration` must be less than or equal to + // `3s`. Note that `gopDuration` must be less than or equal to // [`segmentDuration`](#SegmentSettings), and // [`segmentDuration`](#SegmentSettings) must be divisible by // `gopDuration`. @@ -785,7 +790,7 @@ message VideoStream { } // Use two-pass encoding strategy to achieve better video quality. - // `VideoStream.rate_control_mode` must be `"vbr"`. The default is `false`. + // `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. bool enable_two_pass = 11; // Size of the Video Buffering Verifier (VBV) buffer in bits. Must be @@ -814,45 +819,43 @@ message VideoStream { // Enforces the specified codec profile. The following profiles are // supported: // - // 8bit profiles - // * `main` (default) - // * `main-intra` - // * `mainstillpicture` - // - // 10bit profiles - // * `main10` (default) - // * `main10-intra` - // * `main422-10` - // * `main422-10-intra` - // * `main444-10` - // * `main444-10-intra` - // - // 12bit profiles - // * `main12` (default) - // * `main12-intra` - // * `main422-12` - // * `main422-12-intra` - // * `main444-12` - // * `main444-12-intra` + // * 8-bit profiles + // * `main` (default) + // * `main-intra` + // * `mainstillpicture` + // * 10-bit profiles + // * `main10` (default) + // * `main10-intra` + // * `main422-10` + // * `main422-10-intra` + // * `main444-10` + // * `main444-10-intra` + // * 12-bit profiles + // * `main12` (default) + // * `main12-intra` + // * `main422-12` + // * `main422-12-intra` + // * `main444-12` + // * `main444-12-intra` // // The available options are - // [FFmpeg-compatible](https://x265.readthedocs.io/){: - // class="external" }. Note that certain values for this field may cause the + // [FFmpeg-compatible](https://x265.readthedocs.io/). + // Note that certain values for this field may cause the // transcoder to override other fields you set in the `H265CodecSettings` // message. string profile = 17; // Enforces the specified codec tune. The available options are - // [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265){: - // class="external" }. Note that certain values for this field may cause the + // [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). + // Note that certain values for this field may cause the // transcoder to override other fields you set in the `H265CodecSettings` // message. string tune = 18; // Enforces the specified codec preset. The default is `veryfast`. The // available options are - // [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265){: - // class="external" }. Note that certain values for this field may cause the + // [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). + // Note that certain values for this field may cause the // transcoder to override other fields you set in the `H265CodecSettings` // message. string preset = 19; @@ -879,29 +882,31 @@ message VideoStream { // more information. double frame_rate = 3 [(google.api.field_behavior) = REQUIRED]; - // Required. The video bitrate in bits per second. Must be between 1 and - // 1,000,000,000. + // Required. The video bitrate in bits per second. The minimum value is 1,000. + // The maximum value is 480,000,000. int32 bitrate_bps = 4 [(google.api.field_behavior) = REQUIRED]; - // Pixel format to use. The default is `"yuv420p"`. + // Pixel format to use. The default is `yuv420p`. // // Supported pixel formats: - // - 'yuv420p' pixel format. - // - 'yuv422p' pixel format. - // - 'yuv444p' pixel format. - // - 'yuv420p10' 10-bit HDR pixel format. - // - 'yuv422p10' 10-bit HDR pixel format. - // - 'yuv444p10' 10-bit HDR pixel format. - // - 'yuv420p12' 12-bit HDR pixel format. - // - 'yuv422p12' 12-bit HDR pixel format. - // - 'yuv444p12' 12-bit HDR pixel format. + // + // - `yuv420p` pixel format + // - `yuv422p` pixel format + // - `yuv444p` pixel format + // - `yuv420p10` 10-bit HDR pixel format + // - `yuv422p10` 10-bit HDR pixel format + // - `yuv444p10` 10-bit HDR pixel format + // - `yuv420p12` 12-bit HDR pixel format + // - `yuv422p12` 12-bit HDR pixel format + // - `yuv444p12` 12-bit HDR pixel format string pixel_format = 5; - // Specify the `rate_control_mode`. The default is `"vbr"`. + // Specify the `rate_control_mode`. The default is `vbr`. // // Supported rate control modes: - // - 'vbr' - variable bitrate - // - 'crf' - constant rate factor + // + // - `vbr` - variable bitrate + // - `crf` - constant rate factor string rate_control_mode = 6; // Target CRF level. Must be between 10 and 36, where 10 is the highest @@ -915,7 +920,7 @@ message VideoStream { int32 gop_frame_count = 8; // Select the GOP size based on the specified duration. The default is - // `"3s"`. Note that `gopDuration` must be less than or equal to + // `3s`. Note that `gopDuration` must be less than or equal to // [`segmentDuration`](#SegmentSettings), and // [`segmentDuration`](#SegmentSettings) must be divisible by // `gopDuration`. @@ -931,8 +936,8 @@ message VideoStream { // * `profile3` // // The available options are - // [WebM-compatible](https://www.webmproject.org/vp9/profiles/){: - // class="external" }. Note that certain values for this field may cause the + // [WebM-compatible](https://www.webmproject.org/vp9/profiles/). + // Note that certain values for this field may cause the // transcoder to override other fields you set in the `Vp9CodecSettings` // message. string profile = 10; @@ -976,15 +981,16 @@ message AudioStream { double gain_db = 6; } - // The codec for this audio stream. The default is `"aac"`. + // The codec for this audio stream. The default is `aac`. // // Supported audio codecs: - // - 'aac' - // - 'aac-he' - // - 'aac-he-v2' - // - 'mp3' - // - 'ac3' - // - 'eac3' + // + // - `aac` + // - `aac-he` + // - `aac-he-v2` + // - `mp3` + // - `ac3` + // - `eac3` string codec = 1; // Required. Audio bitrate in bits per second. Must be between 1 and 10,000,000. @@ -998,12 +1004,13 @@ message AudioStream { // supported by the specified format. The default is `["fl", "fr"]`. // // Supported channel names: - // - 'fl' - Front left channel - // - 'fr' - Front right channel - // - 'sl' - Side left channel - // - 'sr' - Side right channel - // - 'fc' - Front center channel - // - 'lfe' - Low frequency + // + // - `fl` - Front left channel + // - `fr` - Front right channel + // - `sl` - Side left channel + // - `sr` - Side right channel + // - `fc` - Front center channel + // - `lfe` - Low frequency repeated string channel_layout = 4; // The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`. @@ -1028,23 +1035,24 @@ message TextStream { int32 input_track = 3 [(google.api.field_behavior) = REQUIRED]; } - // The codec for this text stream. The default is `"webvtt"`. + // The codec for this text stream. The default is `webvtt`. // // Supported text codecs: - // - 'srt' - // - 'ttml' - // - 'cea608' - // - 'cea708' - // - 'webvtt' + // + // - `srt` + // - `ttml` + // - `cea608` + // - `cea708` + // - `webvtt` string codec = 1; // The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`. repeated TextMapping mapping = 3; } -// Segment settings for `"ts"`, `"fmp4"` and `"vtt"`. +// Segment settings for `ts`, `fmp4` and `vtt`. message SegmentSettings { - // Duration of the segments in seconds. The default is `"6.0s"`. Note that + // Duration of the segments in seconds. The default is `6.0s`. Note that // `segmentDuration` must be greater than or equal to // [`gopDuration`](#videostream), and `segmentDuration` must be divisible by // [`gopDuration`](#videostream). @@ -1053,53 +1061,3 @@ message SegmentSettings { // Required. Create an individual segment file. The default is `false`. bool individual_segments = 3 [(google.api.field_behavior) = REQUIRED]; } - -// Encryption settings. -message Encryption { - // Configuration for AES-128 encryption. - message Aes128Encryption { - // Required. URI of the key delivery service. This URI is inserted into the M3U8 - // header. - string key_uri = 1 [(google.api.field_behavior) = REQUIRED]; - } - - // Configuration for SAMPLE-AES encryption. - message SampleAesEncryption { - // Required. URI of the key delivery service. This URI is inserted into the M3U8 - // header. - string key_uri = 1 [(google.api.field_behavior) = REQUIRED]; - } - - // Configuration for MPEG Common Encryption (MPEG-CENC). - message MpegCommonEncryption { - // Required. 128 bit Key ID represented as lowercase hexadecimal digits for use with - // common encryption. - string key_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Specify the encryption scheme. - // - // Supported encryption schemes: - // - 'cenc' - // - 'cbcs' - string scheme = 2 [(google.api.field_behavior) = REQUIRED]; - } - - // Required. 128 bit encryption key represented as lowercase hexadecimal digits. - string key = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. 128 bit Initialization Vector (IV) represented as lowercase hexadecimal - // digits. - string iv = 2 [(google.api.field_behavior) = REQUIRED]; - - // Encryption mode can be either `aes` or `cenc`. - oneof encryption_mode { - // Configuration for AES-128 encryption. - Aes128Encryption aes_128 = 3; - - // Configuration for SAMPLE-AES encryption. - SampleAesEncryption sample_aes = 4; - - // Configuration for MPEG Common Encryption (MPEG-CENC). - MpegCommonEncryption mpeg_cenc = 5; - } -} diff --git a/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/services.proto b/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/services.proto index 1fadf816d41..992b3a1eb33 100644 --- a/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/services.proto +++ b/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/services.proto @@ -172,6 +172,10 @@ message DeleteJobRequest { type: "transcoder.googleapis.com/Job" } ]; + + // If set to true, and the job is not found, the request will succeed but no + // action will be taken on the server. + bool allow_missing = 2; } // Response message for `TranscoderService.ListJobs`. @@ -258,6 +262,10 @@ message DeleteJobTemplateRequest { type: "transcoder.googleapis.com/JobTemplate" } ]; + + // If set to true, and the job template is not found, the request will succeed + // but no action will be taken on the server. + bool allow_missing = 2; } // Response message for `TranscoderService.ListJobTemplates`. diff --git a/packages/google-cloud-video-transcoder/protos/protos.d.ts b/packages/google-cloud-video-transcoder/protos/protos.d.ts index 0819452ff2c..e4536f373c5 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.d.ts +++ b/packages/google-cloud-video-transcoder/protos/protos.d.ts @@ -952,9 +952,6 @@ export namespace google { /** MuxStream segmentSettings */ segmentSettings?: (google.cloud.video.transcoder.v1.ISegmentSettings|null); - - /** MuxStream encryption */ - encryption?: (google.cloud.video.transcoder.v1.IEncryption|null); } /** Represents a MuxStream. */ @@ -981,9 +978,6 @@ export namespace google { /** MuxStream segmentSettings. */ public segmentSettings?: (google.cloud.video.transcoder.v1.ISegmentSettings|null); - /** MuxStream encryption. */ - public encryption?: (google.cloud.video.transcoder.v1.IEncryption|null); - /** * Creates a new MuxStream instance using the specified properties. * @param [properties] Properties to set @@ -4051,402 +4045,6 @@ export namespace google { public toJSON(): { [k: string]: any }; } - /** Properties of an Encryption. */ - interface IEncryption { - - /** Encryption key */ - key?: (string|null); - - /** Encryption iv */ - iv?: (string|null); - - /** Encryption aes_128 */ - aes_128?: (google.cloud.video.transcoder.v1.Encryption.IAes128Encryption|null); - - /** Encryption sampleAes */ - sampleAes?: (google.cloud.video.transcoder.v1.Encryption.ISampleAesEncryption|null); - - /** Encryption mpegCenc */ - mpegCenc?: (google.cloud.video.transcoder.v1.Encryption.IMpegCommonEncryption|null); - } - - /** Represents an Encryption. */ - class Encryption implements IEncryption { - - /** - * Constructs a new Encryption. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1.IEncryption); - - /** Encryption key. */ - public key: string; - - /** Encryption iv. */ - public iv: string; - - /** Encryption aes_128. */ - public aes_128?: (google.cloud.video.transcoder.v1.Encryption.IAes128Encryption|null); - - /** Encryption sampleAes. */ - public sampleAes?: (google.cloud.video.transcoder.v1.Encryption.ISampleAesEncryption|null); - - /** Encryption mpegCenc. */ - public mpegCenc?: (google.cloud.video.transcoder.v1.Encryption.IMpegCommonEncryption|null); - - /** Encryption encryptionMode. */ - public encryptionMode?: ("aes_128"|"sampleAes"|"mpegCenc"); - - /** - * Creates a new Encryption instance using the specified properties. - * @param [properties] Properties to set - * @returns Encryption instance - */ - public static create(properties?: google.cloud.video.transcoder.v1.IEncryption): google.cloud.video.transcoder.v1.Encryption; - - /** - * Encodes the specified Encryption message. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.verify|verify} messages. - * @param message Encryption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1.IEncryption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Encryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.verify|verify} messages. - * @param message Encryption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1.IEncryption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Encryption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Encryption - * @throws {Error} If the payload is not 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.transcoder.v1.Encryption; - - /** - * Decodes an Encryption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Encryption - * @throws {Error} If the payload 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.transcoder.v1.Encryption; - - /** - * Verifies an Encryption message. - * @param message Plain 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 Encryption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Encryption - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.Encryption; - - /** - * Creates a plain object from an Encryption message. Also converts values to other types if specified. - * @param message Encryption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1.Encryption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Encryption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace Encryption { - - /** Properties of an Aes128Encryption. */ - interface IAes128Encryption { - - /** Aes128Encryption keyUri */ - keyUri?: (string|null); - } - - /** Represents an Aes128Encryption. */ - class Aes128Encryption implements IAes128Encryption { - - /** - * Constructs a new Aes128Encryption. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1.Encryption.IAes128Encryption); - - /** Aes128Encryption keyUri. */ - public keyUri: string; - - /** - * Creates a new Aes128Encryption instance using the specified properties. - * @param [properties] Properties to set - * @returns Aes128Encryption instance - */ - public static create(properties?: google.cloud.video.transcoder.v1.Encryption.IAes128Encryption): google.cloud.video.transcoder.v1.Encryption.Aes128Encryption; - - /** - * Encodes the specified Aes128Encryption message. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.Aes128Encryption.verify|verify} messages. - * @param message Aes128Encryption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1.Encryption.IAes128Encryption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Aes128Encryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.Aes128Encryption.verify|verify} messages. - * @param message Aes128Encryption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1.Encryption.IAes128Encryption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Aes128Encryption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Aes128Encryption - * @throws {Error} If the payload is not 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.transcoder.v1.Encryption.Aes128Encryption; - - /** - * Decodes an Aes128Encryption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Aes128Encryption - * @throws {Error} If the payload 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.transcoder.v1.Encryption.Aes128Encryption; - - /** - * Verifies an Aes128Encryption message. - * @param message Plain 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 Aes128Encryption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Aes128Encryption - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.Encryption.Aes128Encryption; - - /** - * Creates a plain object from an Aes128Encryption message. Also converts values to other types if specified. - * @param message Aes128Encryption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1.Encryption.Aes128Encryption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Aes128Encryption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SampleAesEncryption. */ - interface ISampleAesEncryption { - - /** SampleAesEncryption keyUri */ - keyUri?: (string|null); - } - - /** Represents a SampleAesEncryption. */ - class SampleAesEncryption implements ISampleAesEncryption { - - /** - * Constructs a new SampleAesEncryption. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1.Encryption.ISampleAesEncryption); - - /** SampleAesEncryption keyUri. */ - public keyUri: string; - - /** - * Creates a new SampleAesEncryption instance using the specified properties. - * @param [properties] Properties to set - * @returns SampleAesEncryption instance - */ - public static create(properties?: google.cloud.video.transcoder.v1.Encryption.ISampleAesEncryption): google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption; - - /** - * Encodes the specified SampleAesEncryption message. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption.verify|verify} messages. - * @param message SampleAesEncryption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1.Encryption.ISampleAesEncryption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SampleAesEncryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption.verify|verify} messages. - * @param message SampleAesEncryption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1.Encryption.ISampleAesEncryption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SampleAesEncryption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SampleAesEncryption - * @throws {Error} If the payload is not 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.transcoder.v1.Encryption.SampleAesEncryption; - - /** - * Decodes a SampleAesEncryption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SampleAesEncryption - * @throws {Error} If the payload 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.transcoder.v1.Encryption.SampleAesEncryption; - - /** - * Verifies a SampleAesEncryption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SampleAesEncryption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SampleAesEncryption - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption; - - /** - * Creates a plain object from a SampleAesEncryption message. Also converts values to other types if specified. - * @param message SampleAesEncryption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SampleAesEncryption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MpegCommonEncryption. */ - interface IMpegCommonEncryption { - - /** MpegCommonEncryption keyId */ - keyId?: (string|null); - - /** MpegCommonEncryption scheme */ - scheme?: (string|null); - } - - /** Represents a MpegCommonEncryption. */ - class MpegCommonEncryption implements IMpegCommonEncryption { - - /** - * Constructs a new MpegCommonEncryption. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1.Encryption.IMpegCommonEncryption); - - /** MpegCommonEncryption keyId. */ - public keyId: string; - - /** MpegCommonEncryption scheme. */ - public scheme: string; - - /** - * Creates a new MpegCommonEncryption instance using the specified properties. - * @param [properties] Properties to set - * @returns MpegCommonEncryption instance - */ - public static create(properties?: google.cloud.video.transcoder.v1.Encryption.IMpegCommonEncryption): google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption; - - /** - * Encodes the specified MpegCommonEncryption message. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption.verify|verify} messages. - * @param message MpegCommonEncryption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1.Encryption.IMpegCommonEncryption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MpegCommonEncryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption.verify|verify} messages. - * @param message MpegCommonEncryption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1.Encryption.IMpegCommonEncryption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MpegCommonEncryption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MpegCommonEncryption - * @throws {Error} If the payload is not 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.transcoder.v1.Encryption.MpegCommonEncryption; - - /** - * Decodes a MpegCommonEncryption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MpegCommonEncryption - * @throws {Error} If the payload 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.transcoder.v1.Encryption.MpegCommonEncryption; - - /** - * Verifies a MpegCommonEncryption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MpegCommonEncryption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MpegCommonEncryption - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption; - - /** - * Creates a plain object from a MpegCommonEncryption message. Also converts values to other types if specified. - * @param message MpegCommonEncryption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MpegCommonEncryption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - /** Represents a TranscoderService */ class TranscoderService extends $protobuf.rpc.Service { @@ -4944,6 +4542,9 @@ export namespace google { /** DeleteJobRequest name */ name?: (string|null); + + /** DeleteJobRequest allowMissing */ + allowMissing?: (boolean|null); } /** Represents a DeleteJobRequest. */ @@ -4958,6 +4559,9 @@ export namespace google { /** DeleteJobRequest name. */ public name: string; + /** DeleteJobRequest allowMissing. */ + public allowMissing: boolean; + /** * Creates a new DeleteJobRequest instance using the specified properties. * @param [properties] Properties to set @@ -5442,6 +5046,9 @@ export namespace google { /** DeleteJobTemplateRequest name */ name?: (string|null); + + /** DeleteJobTemplateRequest allowMissing */ + allowMissing?: (boolean|null); } /** Represents a DeleteJobTemplateRequest. */ @@ -5456,6 +5063,9 @@ export namespace google { /** DeleteJobTemplateRequest name. */ public name: string; + /** DeleteJobTemplateRequest allowMissing. */ + public allowMissing: boolean; + /** * Creates a new DeleteJobTemplateRequest instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-video-transcoder/protos/protos.js b/packages/google-cloud-video-transcoder/protos/protos.js index 6545b1231f9..d5e4ef043d7 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.js +++ b/packages/google-cloud-video-transcoder/protos/protos.js @@ -2573,7 +2573,6 @@ * @property {string|null} [container] MuxStream container * @property {Array.|null} [elementaryStreams] MuxStream elementaryStreams * @property {google.cloud.video.transcoder.v1.ISegmentSettings|null} [segmentSettings] MuxStream segmentSettings - * @property {google.cloud.video.transcoder.v1.IEncryption|null} [encryption] MuxStream encryption */ /** @@ -2632,14 +2631,6 @@ */ MuxStream.prototype.segmentSettings = null; - /** - * MuxStream encryption. - * @member {google.cloud.video.transcoder.v1.IEncryption|null|undefined} encryption - * @memberof google.cloud.video.transcoder.v1.MuxStream - * @instance - */ - MuxStream.prototype.encryption = null; - /** * Creates a new MuxStream instance using the specified properties. * @function create @@ -2675,8 +2666,6 @@ writer.uint32(/* id 4, wireType 2 =*/34).string(message.elementaryStreams[i]); if (message.segmentSettings != null && Object.hasOwnProperty.call(message, "segmentSettings")) $root.google.cloud.video.transcoder.v1.SegmentSettings.encode(message.segmentSettings, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.encryption != null && Object.hasOwnProperty.call(message, "encryption")) - $root.google.cloud.video.transcoder.v1.Encryption.encode(message.encryption, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -2728,9 +2717,6 @@ case 5: message.segmentSettings = $root.google.cloud.video.transcoder.v1.SegmentSettings.decode(reader, reader.uint32()); break; - case 6: - message.encryption = $root.google.cloud.video.transcoder.v1.Encryption.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -2787,11 +2773,6 @@ if (error) return "segmentSettings." + error; } - if (message.encryption != null && message.hasOwnProperty("encryption")) { - var error = $root.google.cloud.video.transcoder.v1.Encryption.verify(message.encryption); - if (error) - return "encryption." + error; - } return null; }; @@ -2825,11 +2806,6 @@ throw TypeError(".google.cloud.video.transcoder.v1.MuxStream.segmentSettings: object expected"); message.segmentSettings = $root.google.cloud.video.transcoder.v1.SegmentSettings.fromObject(object.segmentSettings); } - if (object.encryption != null) { - if (typeof object.encryption !== "object") - throw TypeError(".google.cloud.video.transcoder.v1.MuxStream.encryption: object expected"); - message.encryption = $root.google.cloud.video.transcoder.v1.Encryption.fromObject(object.encryption); - } return message; }; @@ -2853,7 +2829,6 @@ object.fileName = ""; object.container = ""; object.segmentSettings = null; - object.encryption = null; } if (message.key != null && message.hasOwnProperty("key")) object.key = message.key; @@ -2868,8 +2843,6 @@ } if (message.segmentSettings != null && message.hasOwnProperty("segmentSettings")) object.segmentSettings = $root.google.cloud.video.transcoder.v1.SegmentSettings.toObject(message.segmentSettings, options); - if (message.encryption != null && message.hasOwnProperty("encryption")) - object.encryption = $root.google.cloud.video.transcoder.v1.Encryption.toObject(message.encryption, options); return object; }; @@ -10464,1086 +10437,177 @@ return SegmentSettings; })(); - v1.Encryption = (function() { + v1.TranscoderService = (function() { /** - * Properties of an Encryption. + * Constructs a new TranscoderService service. * @memberof google.cloud.video.transcoder.v1 - * @interface IEncryption - * @property {string|null} [key] Encryption key - * @property {string|null} [iv] Encryption iv - * @property {google.cloud.video.transcoder.v1.Encryption.IAes128Encryption|null} [aes_128] Encryption aes_128 - * @property {google.cloud.video.transcoder.v1.Encryption.ISampleAesEncryption|null} [sampleAes] Encryption sampleAes - * @property {google.cloud.video.transcoder.v1.Encryption.IMpegCommonEncryption|null} [mpegCenc] Encryption mpegCenc + * @classdesc Represents a TranscoderService + * @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 TranscoderService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (TranscoderService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = TranscoderService; /** - * Constructs a new Encryption. - * @memberof google.cloud.video.transcoder.v1 - * @classdesc Represents an Encryption. - * @implements IEncryption - * @constructor - * @param {google.cloud.video.transcoder.v1.IEncryption=} [properties] Properties to set + * Creates new TranscoderService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @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 {TranscoderService} RPC service. Useful where requests and/or responses are streamed. */ - function Encryption(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + TranscoderService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * Encryption key. - * @member {string} key - * @memberof google.cloud.video.transcoder.v1.Encryption - * @instance + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#createJob}. + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @typedef CreateJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.transcoder.v1.Job} [response] Job */ - Encryption.prototype.key = ""; /** - * Encryption iv. - * @member {string} iv - * @memberof google.cloud.video.transcoder.v1.Encryption + * Calls CreateJob. + * @function createJob + * @memberof google.cloud.video.transcoder.v1.TranscoderService * @instance + * @param {google.cloud.video.transcoder.v1.ICreateJobRequest} request CreateJobRequest message or plain object + * @param {google.cloud.video.transcoder.v1.TranscoderService.CreateJobCallback} callback Node-style callback called with the error, if any, and Job + * @returns {undefined} + * @variation 1 */ - Encryption.prototype.iv = ""; + Object.defineProperty(TranscoderService.prototype.createJob = function createJob(request, callback) { + return this.rpcCall(createJob, $root.google.cloud.video.transcoder.v1.CreateJobRequest, $root.google.cloud.video.transcoder.v1.Job, request, callback); + }, "name", { value: "CreateJob" }); /** - * Encryption aes_128. - * @member {google.cloud.video.transcoder.v1.Encryption.IAes128Encryption|null|undefined} aes_128 - * @memberof google.cloud.video.transcoder.v1.Encryption + * Calls CreateJob. + * @function createJob + * @memberof google.cloud.video.transcoder.v1.TranscoderService * @instance + * @param {google.cloud.video.transcoder.v1.ICreateJobRequest} request CreateJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Encryption.prototype.aes_128 = null; /** - * Encryption sampleAes. - * @member {google.cloud.video.transcoder.v1.Encryption.ISampleAesEncryption|null|undefined} sampleAes - * @memberof google.cloud.video.transcoder.v1.Encryption + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#listJobs}. + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @typedef ListJobsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.transcoder.v1.ListJobsResponse} [response] ListJobsResponse + */ + + /** + * Calls ListJobs. + * @function listJobs + * @memberof google.cloud.video.transcoder.v1.TranscoderService * @instance + * @param {google.cloud.video.transcoder.v1.IListJobsRequest} request ListJobsRequest message or plain object + * @param {google.cloud.video.transcoder.v1.TranscoderService.ListJobsCallback} callback Node-style callback called with the error, if any, and ListJobsResponse + * @returns {undefined} + * @variation 1 */ - Encryption.prototype.sampleAes = null; + Object.defineProperty(TranscoderService.prototype.listJobs = function listJobs(request, callback) { + return this.rpcCall(listJobs, $root.google.cloud.video.transcoder.v1.ListJobsRequest, $root.google.cloud.video.transcoder.v1.ListJobsResponse, request, callback); + }, "name", { value: "ListJobs" }); /** - * Encryption mpegCenc. - * @member {google.cloud.video.transcoder.v1.Encryption.IMpegCommonEncryption|null|undefined} mpegCenc - * @memberof google.cloud.video.transcoder.v1.Encryption + * Calls ListJobs. + * @function listJobs + * @memberof google.cloud.video.transcoder.v1.TranscoderService * @instance + * @param {google.cloud.video.transcoder.v1.IListJobsRequest} request ListJobsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Encryption.prototype.mpegCenc = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#getJob}. + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @typedef GetJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.transcoder.v1.Job} [response] Job + */ /** - * Encryption encryptionMode. - * @member {"aes_128"|"sampleAes"|"mpegCenc"|undefined} encryptionMode - * @memberof google.cloud.video.transcoder.v1.Encryption + * Calls GetJob. + * @function getJob + * @memberof google.cloud.video.transcoder.v1.TranscoderService * @instance + * @param {google.cloud.video.transcoder.v1.IGetJobRequest} request GetJobRequest message or plain object + * @param {google.cloud.video.transcoder.v1.TranscoderService.GetJobCallback} callback Node-style callback called with the error, if any, and Job + * @returns {undefined} + * @variation 1 */ - Object.defineProperty(Encryption.prototype, "encryptionMode", { - get: $util.oneOfGetter($oneOfFields = ["aes_128", "sampleAes", "mpegCenc"]), - set: $util.oneOfSetter($oneOfFields) - }); + Object.defineProperty(TranscoderService.prototype.getJob = function getJob(request, callback) { + return this.rpcCall(getJob, $root.google.cloud.video.transcoder.v1.GetJobRequest, $root.google.cloud.video.transcoder.v1.Job, request, callback); + }, "name", { value: "GetJob" }); /** - * Creates a new Encryption instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1.Encryption - * @static - * @param {google.cloud.video.transcoder.v1.IEncryption=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1.Encryption} Encryption instance + * Calls GetJob. + * @function getJob + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1.IGetJobRequest} request GetJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Encryption.create = function create(properties) { - return new Encryption(properties); - }; /** - * Encodes the specified Encryption message. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1.Encryption - * @static - * @param {google.cloud.video.transcoder.v1.IEncryption} message Encryption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#deleteJob}. + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @typedef DeleteJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - Encryption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.iv != null && Object.hasOwnProperty.call(message, "iv")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.iv); - if (message.aes_128 != null && Object.hasOwnProperty.call(message, "aes_128")) - $root.google.cloud.video.transcoder.v1.Encryption.Aes128Encryption.encode(message.aes_128, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.sampleAes != null && Object.hasOwnProperty.call(message, "sampleAes")) - $root.google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption.encode(message.sampleAes, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.mpegCenc != null && Object.hasOwnProperty.call(message, "mpegCenc")) - $root.google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption.encode(message.mpegCenc, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; /** - * Encodes the specified Encryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1.Encryption - * @static - * @param {google.cloud.video.transcoder.v1.IEncryption} message Encryption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls DeleteJob. + * @function deleteJob + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1.IDeleteJobRequest} request DeleteJobRequest message or plain object + * @param {google.cloud.video.transcoder.v1.TranscoderService.DeleteJobCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - Encryption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(TranscoderService.prototype.deleteJob = function deleteJob(request, callback) { + return this.rpcCall(deleteJob, $root.google.cloud.video.transcoder.v1.DeleteJobRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteJob" }); /** - * Decodes an Encryption message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1.Encryption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1.Encryption} Encryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteJob. + * @function deleteJob + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @instance + * @param {google.cloud.video.transcoder.v1.IDeleteJobRequest} request DeleteJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Encryption.decode = function 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.transcoder.v1.Encryption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.iv = reader.string(); - break; - case 3: - message.aes_128 = $root.google.cloud.video.transcoder.v1.Encryption.Aes128Encryption.decode(reader, reader.uint32()); - break; - case 4: - message.sampleAes = $root.google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption.decode(reader, reader.uint32()); - break; - case 5: - message.mpegCenc = $root.google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes an Encryption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1.Encryption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1.Encryption} Encryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Encryption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Encryption message. - * @function verify - * @memberof google.cloud.video.transcoder.v1.Encryption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Encryption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; - if (message.iv != null && message.hasOwnProperty("iv")) - if (!$util.isString(message.iv)) - return "iv: string expected"; - if (message.aes_128 != null && message.hasOwnProperty("aes_128")) { - properties.encryptionMode = 1; - { - var error = $root.google.cloud.video.transcoder.v1.Encryption.Aes128Encryption.verify(message.aes_128); - if (error) - return "aes_128." + error; - } - } - if (message.sampleAes != null && message.hasOwnProperty("sampleAes")) { - if (properties.encryptionMode === 1) - return "encryptionMode: multiple values"; - properties.encryptionMode = 1; - { - var error = $root.google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption.verify(message.sampleAes); - if (error) - return "sampleAes." + error; - } - } - if (message.mpegCenc != null && message.hasOwnProperty("mpegCenc")) { - if (properties.encryptionMode === 1) - return "encryptionMode: multiple values"; - properties.encryptionMode = 1; - { - var error = $root.google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption.verify(message.mpegCenc); - if (error) - return "mpegCenc." + error; - } - } - return null; - }; - - /** - * Creates an Encryption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1.Encryption - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1.Encryption} Encryption - */ - Encryption.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1.Encryption) - return object; - var message = new $root.google.cloud.video.transcoder.v1.Encryption(); - if (object.key != null) - message.key = String(object.key); - if (object.iv != null) - message.iv = String(object.iv); - if (object.aes_128 != null) { - if (typeof object.aes_128 !== "object") - throw TypeError(".google.cloud.video.transcoder.v1.Encryption.aes_128: object expected"); - message.aes_128 = $root.google.cloud.video.transcoder.v1.Encryption.Aes128Encryption.fromObject(object.aes_128); - } - if (object.sampleAes != null) { - if (typeof object.sampleAes !== "object") - throw TypeError(".google.cloud.video.transcoder.v1.Encryption.sampleAes: object expected"); - message.sampleAes = $root.google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption.fromObject(object.sampleAes); - } - if (object.mpegCenc != null) { - if (typeof object.mpegCenc !== "object") - throw TypeError(".google.cloud.video.transcoder.v1.Encryption.mpegCenc: object expected"); - message.mpegCenc = $root.google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption.fromObject(object.mpegCenc); - } - return message; - }; - - /** - * Creates a plain object from an Encryption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1.Encryption - * @static - * @param {google.cloud.video.transcoder.v1.Encryption} message Encryption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Encryption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.key = ""; - object.iv = ""; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.iv != null && message.hasOwnProperty("iv")) - object.iv = message.iv; - if (message.aes_128 != null && message.hasOwnProperty("aes_128")) { - object.aes_128 = $root.google.cloud.video.transcoder.v1.Encryption.Aes128Encryption.toObject(message.aes_128, options); - if (options.oneofs) - object.encryptionMode = "aes_128"; - } - if (message.sampleAes != null && message.hasOwnProperty("sampleAes")) { - object.sampleAes = $root.google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption.toObject(message.sampleAes, options); - if (options.oneofs) - object.encryptionMode = "sampleAes"; - } - if (message.mpegCenc != null && message.hasOwnProperty("mpegCenc")) { - object.mpegCenc = $root.google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption.toObject(message.mpegCenc, options); - if (options.oneofs) - object.encryptionMode = "mpegCenc"; - } - return object; - }; - - /** - * Converts this Encryption to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1.Encryption - * @instance - * @returns {Object.} JSON object - */ - Encryption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - Encryption.Aes128Encryption = (function() { - - /** - * Properties of an Aes128Encryption. - * @memberof google.cloud.video.transcoder.v1.Encryption - * @interface IAes128Encryption - * @property {string|null} [keyUri] Aes128Encryption keyUri - */ - - /** - * Constructs a new Aes128Encryption. - * @memberof google.cloud.video.transcoder.v1.Encryption - * @classdesc Represents an Aes128Encryption. - * @implements IAes128Encryption - * @constructor - * @param {google.cloud.video.transcoder.v1.Encryption.IAes128Encryption=} [properties] Properties to set - */ - function Aes128Encryption(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Aes128Encryption keyUri. - * @member {string} keyUri - * @memberof google.cloud.video.transcoder.v1.Encryption.Aes128Encryption - * @instance - */ - Aes128Encryption.prototype.keyUri = ""; - - /** - * Creates a new Aes128Encryption instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1.Encryption.Aes128Encryption - * @static - * @param {google.cloud.video.transcoder.v1.Encryption.IAes128Encryption=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1.Encryption.Aes128Encryption} Aes128Encryption instance - */ - Aes128Encryption.create = function create(properties) { - return new Aes128Encryption(properties); - }; - - /** - * Encodes the specified Aes128Encryption message. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.Aes128Encryption.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1.Encryption.Aes128Encryption - * @static - * @param {google.cloud.video.transcoder.v1.Encryption.IAes128Encryption} message Aes128Encryption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Aes128Encryption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyUri != null && Object.hasOwnProperty.call(message, "keyUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyUri); - return writer; - }; - - /** - * Encodes the specified Aes128Encryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.Aes128Encryption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1.Encryption.Aes128Encryption - * @static - * @param {google.cloud.video.transcoder.v1.Encryption.IAes128Encryption} message Aes128Encryption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Aes128Encryption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Aes128Encryption message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1.Encryption.Aes128Encryption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1.Encryption.Aes128Encryption} Aes128Encryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Aes128Encryption.decode = function 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.transcoder.v1.Encryption.Aes128Encryption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyUri = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Aes128Encryption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1.Encryption.Aes128Encryption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1.Encryption.Aes128Encryption} Aes128Encryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Aes128Encryption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Aes128Encryption message. - * @function verify - * @memberof google.cloud.video.transcoder.v1.Encryption.Aes128Encryption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Aes128Encryption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyUri != null && message.hasOwnProperty("keyUri")) - if (!$util.isString(message.keyUri)) - return "keyUri: string expected"; - return null; - }; - - /** - * Creates an Aes128Encryption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1.Encryption.Aes128Encryption - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1.Encryption.Aes128Encryption} Aes128Encryption - */ - Aes128Encryption.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1.Encryption.Aes128Encryption) - return object; - var message = new $root.google.cloud.video.transcoder.v1.Encryption.Aes128Encryption(); - if (object.keyUri != null) - message.keyUri = String(object.keyUri); - return message; - }; - - /** - * Creates a plain object from an Aes128Encryption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1.Encryption.Aes128Encryption - * @static - * @param {google.cloud.video.transcoder.v1.Encryption.Aes128Encryption} message Aes128Encryption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Aes128Encryption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.keyUri = ""; - if (message.keyUri != null && message.hasOwnProperty("keyUri")) - object.keyUri = message.keyUri; - return object; - }; - - /** - * Converts this Aes128Encryption to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1.Encryption.Aes128Encryption - * @instance - * @returns {Object.} JSON object - */ - Aes128Encryption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Aes128Encryption; - })(); - - Encryption.SampleAesEncryption = (function() { - - /** - * Properties of a SampleAesEncryption. - * @memberof google.cloud.video.transcoder.v1.Encryption - * @interface ISampleAesEncryption - * @property {string|null} [keyUri] SampleAesEncryption keyUri - */ - - /** - * Constructs a new SampleAesEncryption. - * @memberof google.cloud.video.transcoder.v1.Encryption - * @classdesc Represents a SampleAesEncryption. - * @implements ISampleAesEncryption - * @constructor - * @param {google.cloud.video.transcoder.v1.Encryption.ISampleAesEncryption=} [properties] Properties to set - */ - function SampleAesEncryption(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SampleAesEncryption keyUri. - * @member {string} keyUri - * @memberof google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption - * @instance - */ - SampleAesEncryption.prototype.keyUri = ""; - - /** - * Creates a new SampleAesEncryption instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption - * @static - * @param {google.cloud.video.transcoder.v1.Encryption.ISampleAesEncryption=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption} SampleAesEncryption instance - */ - SampleAesEncryption.create = function create(properties) { - return new SampleAesEncryption(properties); - }; - - /** - * Encodes the specified SampleAesEncryption message. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption - * @static - * @param {google.cloud.video.transcoder.v1.Encryption.ISampleAesEncryption} message SampleAesEncryption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SampleAesEncryption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyUri != null && Object.hasOwnProperty.call(message, "keyUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyUri); - return writer; - }; - - /** - * Encodes the specified SampleAesEncryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption - * @static - * @param {google.cloud.video.transcoder.v1.Encryption.ISampleAesEncryption} message SampleAesEncryption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SampleAesEncryption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SampleAesEncryption message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption} SampleAesEncryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SampleAesEncryption.decode = function 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.transcoder.v1.Encryption.SampleAesEncryption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyUri = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SampleAesEncryption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption} SampleAesEncryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SampleAesEncryption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SampleAesEncryption message. - * @function verify - * @memberof google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SampleAesEncryption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyUri != null && message.hasOwnProperty("keyUri")) - if (!$util.isString(message.keyUri)) - return "keyUri: string expected"; - return null; - }; - - /** - * Creates a SampleAesEncryption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption} SampleAesEncryption - */ - SampleAesEncryption.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption) - return object; - var message = new $root.google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption(); - if (object.keyUri != null) - message.keyUri = String(object.keyUri); - return message; - }; - - /** - * Creates a plain object from a SampleAesEncryption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption - * @static - * @param {google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption} message SampleAesEncryption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SampleAesEncryption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.keyUri = ""; - if (message.keyUri != null && message.hasOwnProperty("keyUri")) - object.keyUri = message.keyUri; - return object; - }; - - /** - * Converts this SampleAesEncryption to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption - * @instance - * @returns {Object.} JSON object - */ - SampleAesEncryption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SampleAesEncryption; - })(); - - Encryption.MpegCommonEncryption = (function() { - - /** - * Properties of a MpegCommonEncryption. - * @memberof google.cloud.video.transcoder.v1.Encryption - * @interface IMpegCommonEncryption - * @property {string|null} [keyId] MpegCommonEncryption keyId - * @property {string|null} [scheme] MpegCommonEncryption scheme - */ - - /** - * Constructs a new MpegCommonEncryption. - * @memberof google.cloud.video.transcoder.v1.Encryption - * @classdesc Represents a MpegCommonEncryption. - * @implements IMpegCommonEncryption - * @constructor - * @param {google.cloud.video.transcoder.v1.Encryption.IMpegCommonEncryption=} [properties] Properties to set - */ - function MpegCommonEncryption(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MpegCommonEncryption keyId. - * @member {string} keyId - * @memberof google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption - * @instance - */ - MpegCommonEncryption.prototype.keyId = ""; - - /** - * MpegCommonEncryption scheme. - * @member {string} scheme - * @memberof google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption - * @instance - */ - MpegCommonEncryption.prototype.scheme = ""; - - /** - * Creates a new MpegCommonEncryption instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption - * @static - * @param {google.cloud.video.transcoder.v1.Encryption.IMpegCommonEncryption=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption} MpegCommonEncryption instance - */ - MpegCommonEncryption.create = function create(properties) { - return new MpegCommonEncryption(properties); - }; - - /** - * Encodes the specified MpegCommonEncryption message. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption - * @static - * @param {google.cloud.video.transcoder.v1.Encryption.IMpegCommonEncryption} message MpegCommonEncryption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MpegCommonEncryption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyId != null && Object.hasOwnProperty.call(message, "keyId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyId); - if (message.scheme != null && Object.hasOwnProperty.call(message, "scheme")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.scheme); - return writer; - }; - - /** - * Encodes the specified MpegCommonEncryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption - * @static - * @param {google.cloud.video.transcoder.v1.Encryption.IMpegCommonEncryption} message MpegCommonEncryption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MpegCommonEncryption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MpegCommonEncryption message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption} MpegCommonEncryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MpegCommonEncryption.decode = function 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.transcoder.v1.Encryption.MpegCommonEncryption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyId = reader.string(); - break; - case 2: - message.scheme = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MpegCommonEncryption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption} MpegCommonEncryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MpegCommonEncryption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MpegCommonEncryption message. - * @function verify - * @memberof google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MpegCommonEncryption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyId != null && message.hasOwnProperty("keyId")) - if (!$util.isString(message.keyId)) - return "keyId: string expected"; - if (message.scheme != null && message.hasOwnProperty("scheme")) - if (!$util.isString(message.scheme)) - return "scheme: string expected"; - return null; - }; - - /** - * Creates a MpegCommonEncryption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption} MpegCommonEncryption - */ - MpegCommonEncryption.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption) - return object; - var message = new $root.google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption(); - if (object.keyId != null) - message.keyId = String(object.keyId); - if (object.scheme != null) - message.scheme = String(object.scheme); - return message; - }; - - /** - * Creates a plain object from a MpegCommonEncryption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption - * @static - * @param {google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption} message MpegCommonEncryption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MpegCommonEncryption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.keyId = ""; - object.scheme = ""; - } - if (message.keyId != null && message.hasOwnProperty("keyId")) - object.keyId = message.keyId; - if (message.scheme != null && message.hasOwnProperty("scheme")) - object.scheme = message.scheme; - return object; - }; - - /** - * Converts this MpegCommonEncryption to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption - * @instance - * @returns {Object.} JSON object - */ - MpegCommonEncryption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MpegCommonEncryption; - })(); - - return Encryption; - })(); - - v1.TranscoderService = (function() { - - /** - * Constructs a new TranscoderService service. - * @memberof google.cloud.video.transcoder.v1 - * @classdesc Represents a TranscoderService - * @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 TranscoderService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (TranscoderService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = TranscoderService; - - /** - * Creates new TranscoderService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.video.transcoder.v1.TranscoderService - * @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 {TranscoderService} RPC service. Useful where requests and/or responses are streamed. - */ - TranscoderService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#createJob}. - * @memberof google.cloud.video.transcoder.v1.TranscoderService - * @typedef CreateJobCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.video.transcoder.v1.Job} [response] Job - */ - - /** - * Calls CreateJob. - * @function createJob - * @memberof google.cloud.video.transcoder.v1.TranscoderService - * @instance - * @param {google.cloud.video.transcoder.v1.ICreateJobRequest} request CreateJobRequest message or plain object - * @param {google.cloud.video.transcoder.v1.TranscoderService.CreateJobCallback} callback Node-style callback called with the error, if any, and Job - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TranscoderService.prototype.createJob = function createJob(request, callback) { - return this.rpcCall(createJob, $root.google.cloud.video.transcoder.v1.CreateJobRequest, $root.google.cloud.video.transcoder.v1.Job, request, callback); - }, "name", { value: "CreateJob" }); - - /** - * Calls CreateJob. - * @function createJob - * @memberof google.cloud.video.transcoder.v1.TranscoderService - * @instance - * @param {google.cloud.video.transcoder.v1.ICreateJobRequest} request CreateJobRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#listJobs}. - * @memberof google.cloud.video.transcoder.v1.TranscoderService - * @typedef ListJobsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.video.transcoder.v1.ListJobsResponse} [response] ListJobsResponse - */ - - /** - * Calls ListJobs. - * @function listJobs - * @memberof google.cloud.video.transcoder.v1.TranscoderService - * @instance - * @param {google.cloud.video.transcoder.v1.IListJobsRequest} request ListJobsRequest message or plain object - * @param {google.cloud.video.transcoder.v1.TranscoderService.ListJobsCallback} callback Node-style callback called with the error, if any, and ListJobsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TranscoderService.prototype.listJobs = function listJobs(request, callback) { - return this.rpcCall(listJobs, $root.google.cloud.video.transcoder.v1.ListJobsRequest, $root.google.cloud.video.transcoder.v1.ListJobsResponse, request, callback); - }, "name", { value: "ListJobs" }); - - /** - * Calls ListJobs. - * @function listJobs - * @memberof google.cloud.video.transcoder.v1.TranscoderService - * @instance - * @param {google.cloud.video.transcoder.v1.IListJobsRequest} request ListJobsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#getJob}. - * @memberof google.cloud.video.transcoder.v1.TranscoderService - * @typedef GetJobCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.video.transcoder.v1.Job} [response] Job - */ - - /** - * Calls GetJob. - * @function getJob - * @memberof google.cloud.video.transcoder.v1.TranscoderService - * @instance - * @param {google.cloud.video.transcoder.v1.IGetJobRequest} request GetJobRequest message or plain object - * @param {google.cloud.video.transcoder.v1.TranscoderService.GetJobCallback} callback Node-style callback called with the error, if any, and Job - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TranscoderService.prototype.getJob = function getJob(request, callback) { - return this.rpcCall(getJob, $root.google.cloud.video.transcoder.v1.GetJobRequest, $root.google.cloud.video.transcoder.v1.Job, request, callback); - }, "name", { value: "GetJob" }); - - /** - * Calls GetJob. - * @function getJob - * @memberof google.cloud.video.transcoder.v1.TranscoderService - * @instance - * @param {google.cloud.video.transcoder.v1.IGetJobRequest} request GetJobRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#deleteJob}. - * @memberof google.cloud.video.transcoder.v1.TranscoderService - * @typedef DeleteJobCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteJob. - * @function deleteJob - * @memberof google.cloud.video.transcoder.v1.TranscoderService - * @instance - * @param {google.cloud.video.transcoder.v1.IDeleteJobRequest} request DeleteJobRequest message or plain object - * @param {google.cloud.video.transcoder.v1.TranscoderService.DeleteJobCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TranscoderService.prototype.deleteJob = function deleteJob(request, callback) { - return this.rpcCall(deleteJob, $root.google.cloud.video.transcoder.v1.DeleteJobRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteJob" }); - - /** - * Calls DeleteJob. - * @function deleteJob - * @memberof google.cloud.video.transcoder.v1.TranscoderService - * @instance - * @param {google.cloud.video.transcoder.v1.IDeleteJobRequest} request DeleteJobRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#createJobTemplate}. - * @memberof google.cloud.video.transcoder.v1.TranscoderService - * @typedef CreateJobTemplateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.video.transcoder.v1.JobTemplate} [response] JobTemplate + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#createJobTemplate}. + * @memberof google.cloud.video.transcoder.v1.TranscoderService + * @typedef CreateJobTemplateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.video.transcoder.v1.JobTemplate} [response] JobTemplate */ /** @@ -12357,6 +11421,7 @@ * @memberof google.cloud.video.transcoder.v1 * @interface IDeleteJobRequest * @property {string|null} [name] DeleteJobRequest name + * @property {boolean|null} [allowMissing] DeleteJobRequest allowMissing */ /** @@ -12382,6 +11447,14 @@ */ DeleteJobRequest.prototype.name = ""; + /** + * DeleteJobRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.video.transcoder.v1.DeleteJobRequest + * @instance + */ + DeleteJobRequest.prototype.allowMissing = false; + /** * Creates a new DeleteJobRequest instance using the specified properties. * @function create @@ -12408,6 +11481,8 @@ writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowMissing); return writer; }; @@ -12445,6 +11520,9 @@ case 1: message.name = reader.string(); break; + case 2: + message.allowMissing = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -12483,6 +11561,9 @@ if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; return null; }; @@ -12500,6 +11581,8 @@ var message = new $root.google.cloud.video.transcoder.v1.DeleteJobRequest(); if (object.name != null) message.name = String(object.name); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); return message; }; @@ -12516,10 +11599,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.allowMissing = false; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; return object; }; @@ -13514,6 +12601,7 @@ * @memberof google.cloud.video.transcoder.v1 * @interface IDeleteJobTemplateRequest * @property {string|null} [name] DeleteJobTemplateRequest name + * @property {boolean|null} [allowMissing] DeleteJobTemplateRequest allowMissing */ /** @@ -13539,6 +12627,14 @@ */ DeleteJobTemplateRequest.prototype.name = ""; + /** + * DeleteJobTemplateRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.video.transcoder.v1.DeleteJobTemplateRequest + * @instance + */ + DeleteJobTemplateRequest.prototype.allowMissing = false; + /** * Creates a new DeleteJobTemplateRequest instance using the specified properties. * @function create @@ -13565,6 +12661,8 @@ writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowMissing); return writer; }; @@ -13602,6 +12700,9 @@ case 1: message.name = reader.string(); break; + case 2: + message.allowMissing = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -13640,6 +12741,9 @@ if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; return null; }; @@ -13657,6 +12761,8 @@ var message = new $root.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest(); if (object.name != null) message.name = String(object.name); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); return message; }; @@ -13673,10 +12779,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.allowMissing = false; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; return object; }; diff --git a/packages/google-cloud-video-transcoder/protos/protos.json b/packages/google-cloud-video-transcoder/protos/protos.json index e91c307e808..f127cfd7a2c 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.json +++ b/packages/google-cloud-video-transcoder/protos/protos.json @@ -286,10 +286,6 @@ "segmentSettings": { "type": "SegmentSettings", "id": 5 - }, - "encryption": { - "type": "Encryption", - "id": 6 } } }, @@ -1055,87 +1051,6 @@ } } }, - "Encryption": { - "oneofs": { - "encryptionMode": { - "oneof": [ - "aes_128", - "sampleAes", - "mpegCenc" - ] - } - }, - "fields": { - "key": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "iv": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "aes_128": { - "type": "Aes128Encryption", - "id": 3 - }, - "sampleAes": { - "type": "SampleAesEncryption", - "id": 4 - }, - "mpegCenc": { - "type": "MpegCommonEncryption", - "id": 5 - } - }, - "nested": { - "Aes128Encryption": { - "fields": { - "keyUri": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "SampleAesEncryption": { - "fields": { - "keyUri": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "MpegCommonEncryption": { - "fields": { - "keyId": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "scheme": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - } - } - }, "TranscoderService": { "options": { "(google.api.default_host)": "transcoder.googleapis.com", @@ -1360,6 +1275,10 @@ "(google.api.field_behavior)": "REQUIRED", "(google.api.resource_reference).type": "transcoder.googleapis.com/Job" } + }, + "allowMissing": { + "type": "bool", + "id": 2 } } }, @@ -1456,6 +1375,10 @@ "(google.api.field_behavior)": "REQUIRED", "(google.api.resource_reference).type": "transcoder.googleapis.com/JobTemplate" } + }, + "allowMissing": { + "type": "bool", + "id": 2 } } }, diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job.js new file mode 100644 index 00000000000..48f0670b113 --- /dev/null +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job.js @@ -0,0 +1,59 @@ +// 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. + +'use strict'; + +function main(parent, job) { + // [START transcoder_v1_generated_TranscoderService_CreateJob_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent location to create and process this job. + * Format: `projects/{project}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Required. Parameters for creating transcoding job. + */ + // const job = '' + + // Imports the Transcoder library + const {TranscoderServiceClient} = + require('@google-cloud/video-transcoder').v1; + + // Instantiates a client + const transcoderClient = new TranscoderServiceClient(); + + async function createJob() { + // Construct request + const request = { + parent, + job, + }; + + // Run request + const response = await transcoderClient.createJob(request); + console.log(response); + } + + createJob(); + // [END transcoder_v1_generated_TranscoderService_CreateJob_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job_template.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job_template.js new file mode 100644 index 00000000000..d97099c3491 --- /dev/null +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job_template.js @@ -0,0 +1,67 @@ +// 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. + +'use strict'; + +function main(parent, jobTemplate, jobTemplateId) { + // [START transcoder_v1_generated_TranscoderService_CreateJobTemplate_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent location to create this job template. + * Format: `projects/{project}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Required. Parameters for creating job template. + */ + // const jobTemplate = '' + /** + * Required. The ID to use for the job template, which will become the final component + * of the job template's resource name. + * This value should be 4-63 characters, and valid characters must match the + * regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. + */ + // const jobTemplateId = 'abc123' + + // Imports the Transcoder library + const {TranscoderServiceClient} = + require('@google-cloud/video-transcoder').v1; + + // Instantiates a client + const transcoderClient = new TranscoderServiceClient(); + + async function createJobTemplate() { + // Construct request + const request = { + parent, + jobTemplate, + jobTemplateId, + }; + + // Run request + const response = await transcoderClient.createJobTemplate(request); + console.log(response); + } + + createJobTemplate(); + // [END transcoder_v1_generated_TranscoderService_CreateJobTemplate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job.js new file mode 100644 index 00000000000..785d4a33452 --- /dev/null +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job.js @@ -0,0 +1,59 @@ +// 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. + +'use strict'; + +function main(name) { + // [START transcoder_v1_generated_TranscoderService_DeleteJob_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the job to delete. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + */ + // const name = 'abc123' + /** + * If set to true, and the job is not found, the request will succeed but no + * action will be taken on the server. + */ + // const allowMissing = true + + // Imports the Transcoder library + const {TranscoderServiceClient} = + require('@google-cloud/video-transcoder').v1; + + // Instantiates a client + const transcoderClient = new TranscoderServiceClient(); + + async function deleteJob() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await transcoderClient.deleteJob(request); + console.log(response); + } + + deleteJob(); + // [END transcoder_v1_generated_TranscoderService_DeleteJob_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job_template.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job_template.js new file mode 100644 index 00000000000..821bd8075f2 --- /dev/null +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job_template.js @@ -0,0 +1,59 @@ +// 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. + +'use strict'; + +function main(name) { + // [START transcoder_v1_generated_TranscoderService_DeleteJobTemplate_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the job template to delete. + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + */ + // const name = 'abc123' + /** + * If set to true, and the job template is not found, the request will succeed + * but no action will be taken on the server. + */ + // const allowMissing = true + + // Imports the Transcoder library + const {TranscoderServiceClient} = + require('@google-cloud/video-transcoder').v1; + + // Instantiates a client + const transcoderClient = new TranscoderServiceClient(); + + async function deleteJobTemplate() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await transcoderClient.deleteJobTemplate(request); + console.log(response); + } + + deleteJobTemplate(); + // [END transcoder_v1_generated_TranscoderService_DeleteJobTemplate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job.js new file mode 100644 index 00000000000..5961db3b93c --- /dev/null +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job.js @@ -0,0 +1,54 @@ +// 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. + +'use strict'; + +function main(name) { + // [START transcoder_v1_generated_TranscoderService_GetJob_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the job to retrieve. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + */ + // const name = 'abc123' + + // Imports the Transcoder library + const {TranscoderServiceClient} = + require('@google-cloud/video-transcoder').v1; + + // Instantiates a client + const transcoderClient = new TranscoderServiceClient(); + + async function getJob() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await transcoderClient.getJob(request); + console.log(response); + } + + getJob(); + // [END transcoder_v1_generated_TranscoderService_GetJob_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job_template.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job_template.js new file mode 100644 index 00000000000..fcef2c45473 --- /dev/null +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job_template.js @@ -0,0 +1,55 @@ +// 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. + +'use strict'; + +function main(name) { + // [START transcoder_v1_generated_TranscoderService_GetJobTemplate_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the job template to retrieve. + * Format: + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + */ + // const name = 'abc123' + + // Imports the Transcoder library + const {TranscoderServiceClient} = + require('@google-cloud/video-transcoder').v1; + + // Instantiates a client + const transcoderClient = new TranscoderServiceClient(); + + async function getJobTemplate() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await transcoderClient.getJobTemplate(request); + console.log(response); + } + + getJobTemplate(); + // [END transcoder_v1_generated_TranscoderService_GetJobTemplate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_job_templates.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_job_templates.js new file mode 100644 index 00000000000..e28b6f52be6 --- /dev/null +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_job_templates.js @@ -0,0 +1,75 @@ +// 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. + +'use strict'; + +function main(parent) { + // [START transcoder_v1_generated_TranscoderService_ListJobTemplates_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent location from which to retrieve the collection of job templates. + * Format: `projects/{project}/locations/{location}` + */ + // 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' + /** + * The filter expression, following the syntax outlined in + * https://google.aip.dev/160. + */ + // const filter = 'abc123' + /** + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + */ + // const orderBy = 'abc123' + + // Imports the Transcoder library + const {TranscoderServiceClient} = + require('@google-cloud/video-transcoder').v1; + + // Instantiates a client + const transcoderClient = new TranscoderServiceClient(); + + async function listJobTemplates() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await transcoderClient.listJobTemplatesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + listJobTemplates(); + // [END transcoder_v1_generated_TranscoderService_ListJobTemplates_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_jobs.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_jobs.js new file mode 100644 index 00000000000..924e9aab9ac --- /dev/null +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_jobs.js @@ -0,0 +1,74 @@ +// 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. + +'use strict'; + +function main(parent) { + // [START transcoder_v1_generated_TranscoderService_ListJobs_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Format: `projects/{project}/locations/{location}` + */ + // 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' + /** + * The filter expression, following the syntax outlined in + * https://google.aip.dev/160. + */ + // const filter = 'abc123' + /** + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + */ + // const orderBy = 'abc123' + + // Imports the Transcoder library + const {TranscoderServiceClient} = + require('@google-cloud/video-transcoder').v1; + + // Instantiates a client + const transcoderClient = new TranscoderServiceClient(); + + async function listJobs() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await transcoderClient.listJobsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + listJobs(); + // [END transcoder_v1_generated_TranscoderService_ListJobs_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job.js new file mode 100644 index 00000000000..f2130574ff9 --- /dev/null +++ b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job.js @@ -0,0 +1,59 @@ +// 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. + +'use strict'; + +function main(parent, job) { + // [START transcoder_v1beta1_generated_TranscoderService_CreateJob_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent location to create and process this job. + * Format: `projects/{project}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Required. Parameters for creating transcoding job. + */ + // const job = '' + + // Imports the Transcoder library + const {TranscoderServiceClient} = + require('@google-cloud/video-transcoder').v1beta1; + + // Instantiates a client + const transcoderClient = new TranscoderServiceClient(); + + async function createJob() { + // Construct request + const request = { + parent, + job, + }; + + // Run request + const response = await transcoderClient.createJob(request); + console.log(response); + } + + createJob(); + // [END transcoder_v1beta1_generated_TranscoderService_CreateJob_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job_template.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job_template.js new file mode 100644 index 00000000000..e136fcdcf90 --- /dev/null +++ b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job_template.js @@ -0,0 +1,67 @@ +// 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. + +'use strict'; + +function main(parent, jobTemplate, jobTemplateId) { + // [START transcoder_v1beta1_generated_TranscoderService_CreateJobTemplate_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent location to create this job template. + * Format: `projects/{project}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Required. Parameters for creating job template. + */ + // const jobTemplate = '' + /** + * Required. The ID to use for the job template, which will become the final component + * of the job template's resource name. + * This value should be 4-63 characters, and valid characters must match the + * regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. + */ + // const jobTemplateId = 'abc123' + + // Imports the Transcoder library + const {TranscoderServiceClient} = + require('@google-cloud/video-transcoder').v1beta1; + + // Instantiates a client + const transcoderClient = new TranscoderServiceClient(); + + async function createJobTemplate() { + // Construct request + const request = { + parent, + jobTemplate, + jobTemplateId, + }; + + // Run request + const response = await transcoderClient.createJobTemplate(request); + console.log(response); + } + + createJobTemplate(); + // [END transcoder_v1beta1_generated_TranscoderService_CreateJobTemplate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job.js new file mode 100644 index 00000000000..5adb2a073e8 --- /dev/null +++ b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job.js @@ -0,0 +1,54 @@ +// 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. + +'use strict'; + +function main(name) { + // [START transcoder_v1beta1_generated_TranscoderService_DeleteJob_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the job to delete. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + */ + // const name = 'abc123' + + // Imports the Transcoder library + const {TranscoderServiceClient} = + require('@google-cloud/video-transcoder').v1beta1; + + // Instantiates a client + const transcoderClient = new TranscoderServiceClient(); + + async function deleteJob() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await transcoderClient.deleteJob(request); + console.log(response); + } + + deleteJob(); + // [END transcoder_v1beta1_generated_TranscoderService_DeleteJob_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job_template.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job_template.js new file mode 100644 index 00000000000..029c7daeac8 --- /dev/null +++ b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job_template.js @@ -0,0 +1,54 @@ +// 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. + +'use strict'; + +function main(name) { + // [START transcoder_v1beta1_generated_TranscoderService_DeleteJobTemplate_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the job template to delete. + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + */ + // const name = 'abc123' + + // Imports the Transcoder library + const {TranscoderServiceClient} = + require('@google-cloud/video-transcoder').v1beta1; + + // Instantiates a client + const transcoderClient = new TranscoderServiceClient(); + + async function deleteJobTemplate() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await transcoderClient.deleteJobTemplate(request); + console.log(response); + } + + deleteJobTemplate(); + // [END transcoder_v1beta1_generated_TranscoderService_DeleteJobTemplate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job.js new file mode 100644 index 00000000000..c78f10d1b69 --- /dev/null +++ b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job.js @@ -0,0 +1,54 @@ +// 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. + +'use strict'; + +function main(name) { + // [START transcoder_v1beta1_generated_TranscoderService_GetJob_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the job to retrieve. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + */ + // const name = 'abc123' + + // Imports the Transcoder library + const {TranscoderServiceClient} = + require('@google-cloud/video-transcoder').v1beta1; + + // Instantiates a client + const transcoderClient = new TranscoderServiceClient(); + + async function getJob() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await transcoderClient.getJob(request); + console.log(response); + } + + getJob(); + // [END transcoder_v1beta1_generated_TranscoderService_GetJob_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job_template.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job_template.js new file mode 100644 index 00000000000..0e0fe66169c --- /dev/null +++ b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job_template.js @@ -0,0 +1,55 @@ +// 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. + +'use strict'; + +function main(name) { + // [START transcoder_v1beta1_generated_TranscoderService_GetJobTemplate_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the job template to retrieve. + * Format: + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + */ + // const name = 'abc123' + + // Imports the Transcoder library + const {TranscoderServiceClient} = + require('@google-cloud/video-transcoder').v1beta1; + + // Instantiates a client + const transcoderClient = new TranscoderServiceClient(); + + async function getJobTemplate() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await transcoderClient.getJobTemplate(request); + console.log(response); + } + + getJobTemplate(); + // [END transcoder_v1beta1_generated_TranscoderService_GetJobTemplate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_job_templates.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_job_templates.js new file mode 100644 index 00000000000..7ecc4fc3aca --- /dev/null +++ b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_job_templates.js @@ -0,0 +1,65 @@ +// 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. + +'use strict'; + +function main(parent) { + // [START transcoder_v1beta1_generated_TranscoderService_ListJobTemplates_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent location from which to retrieve the collection of job templates. + * Format: `projects/{project}/locations/{location}` + */ + // 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 Transcoder library + const {TranscoderServiceClient} = + require('@google-cloud/video-transcoder').v1beta1; + + // Instantiates a client + const transcoderClient = new TranscoderServiceClient(); + + async function listJobTemplates() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await transcoderClient.listJobTemplatesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + listJobTemplates(); + // [END transcoder_v1beta1_generated_TranscoderService_ListJobTemplates_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_jobs.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_jobs.js new file mode 100644 index 00000000000..067afbe6df2 --- /dev/null +++ b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_jobs.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 +// +// 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. + +'use strict'; + +function main(parent) { + // [START transcoder_v1beta1_generated_TranscoderService_ListJobs_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Format: `projects/{project}/locations/{location}` + */ + // 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 Transcoder library + const {TranscoderServiceClient} = + require('@google-cloud/video-transcoder').v1beta1; + + // Instantiates a client + const transcoderClient = new TranscoderServiceClient(); + + async function listJobs() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await transcoderClient.listJobsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + listJobs(); + // [END transcoder_v1beta1_generated_TranscoderService_ListJobs_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-transcoder/src/v1/gapic_metadata.json b/packages/google-cloud-video-transcoder/src/v1/gapic_metadata.json index d4f8949e0d3..5898b0efba3 100644 --- a/packages/google-cloud-video-transcoder/src/v1/gapic_metadata.json +++ b/packages/google-cloud-video-transcoder/src/v1/gapic_metadata.json @@ -3,7 +3,7 @@ "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", "language": "typescript", "protoPackage": "google.cloud.video.transcoder.v1", - "libraryPackage": "@google-cloud/transcoder", + "libraryPackage": "@google-cloud/video-transcoder", "services": { "TranscoderService": { "clients": { diff --git a/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts b/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts index b896be3825f..bd69963514a 100644 --- a/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts +++ b/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts @@ -556,6 +556,9 @@ export class TranscoderServiceClient { * @param {string} request.name * Required. The name of the job to delete. * Format: `projects/{project}/locations/{location}/jobs/{job}` + * @param {boolean} request.allowMissing + * If set to true, and the job is not found, the request will succeed but no + * action will be taken on the server. * @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. @@ -856,6 +859,9 @@ export class TranscoderServiceClient { * @param {string} request.name * Required. The name of the job template to delete. * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * @param {boolean} request.allowMissing + * If set to true, and the job template is not found, the request will succeed + * but no action will be taken on the server. * @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. @@ -1060,7 +1066,8 @@ export class TranscoderServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listJobs']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listJobs.createStream( this.innerApiCalls.listJobs as gax.GaxCall, @@ -1117,7 +1124,8 @@ export class TranscoderServiceClient { parent: request.parent || '', }); options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listJobs']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listJobs.asyncIterate( this.innerApiCalls['listJobs'] as GaxCall, @@ -1274,7 +1282,8 @@ export class TranscoderServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listJobTemplates']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listJobTemplates.createStream( this.innerApiCalls.listJobTemplates as gax.GaxCall, @@ -1332,7 +1341,8 @@ export class TranscoderServiceClient { parent: request.parent || '', }); options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listJobTemplates']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listJobTemplates.asyncIterate( this.innerApiCalls['listJobTemplates'] as GaxCall, diff --git a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts index c527c36e896..2a03892709a 100644 --- a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts +++ b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts @@ -1077,7 +1077,8 @@ export class TranscoderServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listJobs']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listJobs.createStream( this.innerApiCalls.listJobs as gax.GaxCall, @@ -1128,7 +1129,8 @@ export class TranscoderServiceClient { parent: request.parent || '', }); options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listJobs']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listJobs.asyncIterate( this.innerApiCalls['listJobs'] as GaxCall, @@ -1273,7 +1275,8 @@ export class TranscoderServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listJobTemplates']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listJobTemplates.createStream( this.innerApiCalls.listJobTemplates as gax.GaxCall, @@ -1325,7 +1328,8 @@ export class TranscoderServiceClient { parent: request.parent || '', }); options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listJobTemplates']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listJobTemplates.asyncIterate( this.innerApiCalls['listJobTemplates'] as GaxCall, From 0b4be8d5de28f6457d7282a32daae3e6f1a44f46 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 13 Oct 2021 17:18:13 +0000 Subject: [PATCH 062/116] chore: release 1.7.2 (#120) :robot: I have created a release \*beep\* \*boop\* --- ### [1.7.2](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.7.1...v1.7.2) (2021-10-13) ### Bug Fixes * remove Encryption settings that were published due to a sync issue BREAKING CHANGE: requests specifying Encryption settings are rejected by the server ([1509f5c](https://www.github.com/googleapis/nodejs-video-transcoder/commit/1509f5ce94912bb64fc48103bbc21fe79d81b277)) * update nodejs package name to video-transcoder ([#119](https://www.github.com/googleapis/nodejs-video-transcoder/issues/119)) ([1509f5c](https://www.github.com/googleapis/nodejs-video-transcoder/commit/1509f5ce94912bb64fc48103bbc21fe79d81b277)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-video-transcoder/CHANGELOG.md | 8 ++++++++ packages/google-cloud-video-transcoder/package.json | 2 +- .../google-cloud-video-transcoder/samples/package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-video-transcoder/CHANGELOG.md b/packages/google-cloud-video-transcoder/CHANGELOG.md index 52e3169fd8c..444cc2445c5 100644 --- a/packages/google-cloud-video-transcoder/CHANGELOG.md +++ b/packages/google-cloud-video-transcoder/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +### [1.7.2](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.7.1...v1.7.2) (2021-10-13) + + +### Bug Fixes + +* remove Encryption settings that were published due to a sync issue BREAKING CHANGE: requests specifying Encryption settings are rejected by the server ([1509f5c](https://www.github.com/googleapis/nodejs-video-transcoder/commit/1509f5ce94912bb64fc48103bbc21fe79d81b277)) +* update nodejs package name to video-transcoder ([#119](https://www.github.com/googleapis/nodejs-video-transcoder/issues/119)) ([1509f5c](https://www.github.com/googleapis/nodejs-video-transcoder/commit/1509f5ce94912bb64fc48103bbc21fe79d81b277)) + ### [1.7.1](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.7.0...v1.7.1) (2021-09-09) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index fc0ea654257..8010119bae1 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/video-transcoder", - "version": "1.7.1", + "version": "1.7.2", "description": "Transcoder client for Node.js", "repository": "googleapis/nodejs-video-transcoder", "license": "Apache-2.0", diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index da887d4625b..d54ef3d00ba 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/video-transcoder": "^1.7.1" + "@google-cloud/video-transcoder": "^1.7.2" }, "devDependencies": { "@google-cloud/storage": "^5.4.0", From 01f038317e2173b6b5e1735a17a028d547dd8850 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 14 Oct 2021 00:48:21 +0000 Subject: [PATCH 063/116] build(node): update deps used during postprocessing (#1243) (#121) --- .../protos/protos.d.ts | 3 ++- .../protos/protos.js | 7 +++++++ .../protos/protos.json | 15 ++++++++++++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-video-transcoder/protos/protos.d.ts b/packages/google-cloud-video-transcoder/protos/protos.d.ts index e4536f373c5..341ab38f66a 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.d.ts +++ b/packages/google-cloud-video-transcoder/protos/protos.d.ts @@ -10969,7 +10969,8 @@ export namespace google { OUTPUT_ONLY = 3, INPUT_ONLY = 4, IMMUTABLE = 5, - UNORDERED_LIST = 6 + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7 } /** Properties of a ResourceDescriptor. */ diff --git a/packages/google-cloud-video-transcoder/protos/protos.js b/packages/google-cloud-video-transcoder/protos/protos.js index d5e4ef043d7..aa665c9b202 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.js +++ b/packages/google-cloud-video-transcoder/protos/protos.js @@ -26945,6 +26945,7 @@ * @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); @@ -26955,6 +26956,7 @@ 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; })(); @@ -34027,6 +34029,7 @@ case 4: case 5: case 6: + case 7: break; } } @@ -34131,6 +34134,10 @@ case 6: message[".google.api.fieldBehavior"][i] = 6; break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; } } if (object[".google.api.resourceReference"] != null) { diff --git a/packages/google-cloud-video-transcoder/protos/protos.json b/packages/google-cloud-video-transcoder/protos/protos.json index f127cfd7a2c..b1737a7d5f1 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.json +++ b/packages/google-cloud-video-transcoder/protos/protos.json @@ -2799,7 +2799,8 @@ "OUTPUT_ONLY": 3, "INPUT_ONLY": 4, "IMMUTABLE": 5, - "UNORDERED_LIST": 6 + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 } }, "resourceReference": { @@ -3545,6 +3546,18 @@ ] ], "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], [ 8, 8 From ad62727d9a3415c77318391f4630661ec0bbbf8c Mon Sep 17 00:00:00 2001 From: Takashi Matsuo Date: Wed, 27 Oct 2021 06:32:18 -0700 Subject: [PATCH 064/116] chore: fix the wrong post processor image (#123) --- packages/google-cloud-video-transcoder/.github/.OwlBot.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-video-transcoder/.github/.OwlBot.yaml b/packages/google-cloud-video-transcoder/.github/.OwlBot.yaml index 35d34886a77..76f23c31db7 100644 --- a/packages/google-cloud-video-transcoder/.github/.OwlBot.yaml +++ b/packages/google-cloud-video-transcoder/.github/.OwlBot.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. docker: - image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest deep-remove-regex: From 75e28418decbf4cc8d80e45ac44049aa3e7cce46 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 27 Oct 2021 17:32:39 +0200 Subject: [PATCH 065/116] chore(deps): update dependency @types/node to v16 (#122) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/node](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^14.6.1` -> `^16.0.0`](https://renovatebot.com/diffs/npm/@types%2fnode/14.17.32/16.11.6) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/compatibility-slim/14.17.32)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fnode/16.11.6/confidence-slim/14.17.32)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration ๐Ÿ“… **Schedule**: "after 9am and before 3pm" (UTC). ๐Ÿšฆ **Automerge**: Disabled by config. Please merge this manually once you are satisfied. โ™ป **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. ๐Ÿ”• **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-video-transcoder). --- packages/google-cloud-video-transcoder/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 8010119bae1..4c8336c7287 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -43,7 +43,7 @@ }, "devDependencies": { "@types/mocha": "^8.0.3", - "@types/node": "^14.6.1", + "@types/node": "^16.0.0", "@types/sinon": "^10.0.0", "c8": "^7.3.0", "gts": "^3.0.0", From 7bd3fa30ee64ebffe532570e818fcb3b51dd2588 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Thu, 4 Nov 2021 11:52:24 -0400 Subject: [PATCH 066/116] chore(cloud-rad): delete api-extractor config (#126) --- .../api-extractor.json | 369 ------------------ 1 file changed, 369 deletions(-) delete mode 100644 packages/google-cloud-video-transcoder/api-extractor.json diff --git a/packages/google-cloud-video-transcoder/api-extractor.json b/packages/google-cloud-video-transcoder/api-extractor.json deleted file mode 100644 index de228294b23..00000000000 --- a/packages/google-cloud-video-transcoder/api-extractor.json +++ /dev/null @@ -1,369 +0,0 @@ -/** - * Config file for API Extractor. For more info, please visit: https://api-extractor.com - */ -{ - "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - - /** - * Optionally specifies another JSON config file that this file extends from. This provides a way for - * standard settings to be shared across multiple projects. - * - * If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains - * the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be - * resolved using NodeJS require(). - * - * SUPPORTED TOKENS: none - * DEFAULT VALUE: "" - */ - // "extends": "./shared/api-extractor-base.json" - // "extends": "my-package/include/api-extractor-base.json" - - /** - * Determines the "" token that can be used with other config file settings. The project folder - * typically contains the tsconfig.json and package.json config files, but the path is user-defined. - * - * The path is resolved relative to the folder of the config file that contains the setting. - * - * The default value for "projectFolder" is the token "", which means the folder is determined by traversing - * parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder - * that contains a tsconfig.json file. If a tsconfig.json file cannot be found in this way, then an error - * will be reported. - * - * SUPPORTED TOKENS: - * DEFAULT VALUE: "" - */ - // "projectFolder": "..", - - /** - * (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor - * analyzes the symbols exported by this module. - * - * The file extension must be ".d.ts" and not ".ts". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - */ - "mainEntryPointFilePath": "/protos/protos.d.ts", - - /** - * A list of NPM package names whose exports should be treated as part of this package. - * - * For example, suppose that Webpack is used to generate a distributed bundle for the project "library1", - * and another NPM package "library2" is embedded in this bundle. Some types from library2 may become part - * of the exported API for library1, but by default API Extractor would generate a .d.ts rollup that explicitly - * imports library2. To avoid this, we can specify: - * - * "bundledPackages": [ "library2" ], - * - * This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been - * local files for library1. - */ - "bundledPackages": [ ], - - /** - * Determines how the TypeScript compiler engine will be invoked by API Extractor. - */ - "compiler": { - /** - * Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * Note: This setting will be ignored if "overrideTsconfig" is used. - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/tsconfig.json" - */ - // "tsconfigFilePath": "/tsconfig.json", - - /** - * Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. - * The object must conform to the TypeScript tsconfig schema: - * - * http://json.schemastore.org/tsconfig - * - * If omitted, then the tsconfig.json file will be read from the "projectFolder". - * - * DEFAULT VALUE: no overrideTsconfig section - */ - // "overrideTsconfig": { - // . . . - // } - - /** - * This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended - * and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when - * dependencies contain declarations that are incompatible with the TypeScript engine that API Extractor uses - * for its analysis. Where possible, the underlying issue should be fixed rather than relying on skipLibCheck. - * - * DEFAULT VALUE: false - */ - // "skipLibCheck": true, - }, - - /** - * Configures how the API report file (*.api.md) will be generated. - */ - "apiReport": { - /** - * (REQUIRED) Whether to generate an API report. - */ - "enabled": true, - - /** - * The filename for the API report files. It will be combined with "reportFolder" or "reportTempFolder" to produce - * a full file path. - * - * The file extension should be ".api.md", and the string should not contain a path separator such as "\" or "/". - * - * SUPPORTED TOKENS: , - * DEFAULT VALUE: ".api.md" - */ - // "reportFileName": ".api.md", - - /** - * Specifies the folder where the API report file is written. The file name portion is determined by - * the "reportFileName" setting. - * - * The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy, - * e.g. for an API review. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/etc/" - */ - // "reportFolder": "/etc/", - - /** - * Specifies the folder where the temporary report file is written. The file name portion is determined by - * the "reportFileName" setting. - * - * After the temporary file is written to disk, it is compared with the file in the "reportFolder". - * If they are different, a production build will fail. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/temp/" - */ - // "reportTempFolder": "/temp/" - }, - - /** - * Configures how the doc model file (*.api.json) will be generated. - */ - "docModel": { - /** - * (REQUIRED) Whether to generate a doc model file. - */ - "enabled": true, - - /** - * The output path for the doc model file. The file extension should be ".api.json". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/temp/.api.json" - */ - // "apiJsonFilePath": "/temp/.api.json" - }, - - /** - * Configures how the .d.ts rollup file will be generated. - */ - "dtsRollup": { - /** - * (REQUIRED) Whether to generate the .d.ts rollup file. - */ - "enabled": true, - - /** - * Specifies the output path for a .d.ts rollup file to be generated without any trimming. - * This file will include all declarations that are exported by the main entry point. - * - * If the path is an empty string, then this file will not be written. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/dist/.d.ts" - */ - // "untrimmedFilePath": "/dist/.d.ts", - - /** - * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release. - * This file will include only declarations that are marked as "@public" or "@beta". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "betaTrimmedFilePath": "/dist/-beta.d.ts", - - - /** - * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release. - * This file will include only declarations that are marked as "@public". - * - * If the path is an empty string, then this file will not be written. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "publicTrimmedFilePath": "/dist/-public.d.ts", - - /** - * When a declaration is trimmed, by default it will be replaced by a code comment such as - * "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the - * declaration completely. - * - * DEFAULT VALUE: false - */ - // "omitTrimmingComments": true - }, - - /** - * Configures how the tsdoc-metadata.json file will be generated. - */ - "tsdocMetadata": { - /** - * Whether to generate the tsdoc-metadata.json file. - * - * DEFAULT VALUE: true - */ - // "enabled": true, - - /** - * Specifies where the TSDoc metadata file should be written. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * The default value is "", which causes the path to be automatically inferred from the "tsdocMetadata", - * "typings" or "main" fields of the project's package.json. If none of these fields are set, the lookup - * falls back to "tsdoc-metadata.json" in the package folder. - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "tsdocMetadataFilePath": "/dist/tsdoc-metadata.json" - }, - - /** - * Specifies what type of newlines API Extractor should use when writing output files. By default, the output files - * will be written with Windows-style newlines. To use POSIX-style newlines, specify "lf" instead. - * To use the OS's default newline kind, specify "os". - * - * DEFAULT VALUE: "crlf" - */ - // "newlineKind": "crlf", - - /** - * Configures how API Extractor reports error and warning messages produced during analysis. - * - * There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages. - */ - "messages": { - /** - * Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing - * the input .d.ts files. - * - * TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551" - * - * DEFAULT VALUE: A single "default" entry with logLevel=warning. - */ - "compilerMessageReporting": { - /** - * Configures the default routing for messages that don't match an explicit rule in this table. - */ - "default": { - /** - * Specifies whether the message should be written to the the tool's output log. Note that - * the "addToApiReportFile" property may supersede this option. - * - * Possible values: "error", "warning", "none" - * - * Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail - * and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes - * the "--local" option), the warning is displayed but the build will not fail. - * - * DEFAULT VALUE: "warning" - */ - "logLevel": "warning", - - /** - * When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md), - * then the message will be written inside that file; otherwise, the message is instead logged according to - * the "logLevel" option. - * - * DEFAULT VALUE: false - */ - // "addToApiReportFile": false - }, - - // "TS2551": { - // "logLevel": "warning", - // "addToApiReportFile": true - // }, - // - // . . . - }, - - /** - * Configures handling of messages reported by API Extractor during its analysis. - * - * API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag" - * - * DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings - */ - "extractorMessageReporting": { - "default": { - "logLevel": "warning", - // "addToApiReportFile": false - }, - - // "ae-extra-release-tag": { - // "logLevel": "warning", - // "addToApiReportFile": true - // }, - // - // . . . - }, - - /** - * Configures handling of messages reported by the TSDoc parser when analyzing code comments. - * - * TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text" - * - * DEFAULT VALUE: A single "default" entry with logLevel=warning. - */ - "tsdocMessageReporting": { - "default": { - "logLevel": "warning", - // "addToApiReportFile": false - } - - // "tsdoc-link-tag-unescaped-text": { - // "logLevel": "warning", - // "addToApiReportFile": true - // }, - // - // . . . - } - } - -} From 8a0064627cbb7d3dd62a528bf2ca8b1fdb6cf4c3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 4 Nov 2021 20:44:26 +0100 Subject: [PATCH 067/116] chore(deps): update dependency sinon to v12 (#125) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^11.0.0` -> `^12.0.0`](https://renovatebot.com/diffs/npm/sinon/11.1.2/12.0.1) | [![age](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/compatibility-slim/11.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/confidence-slim/11.1.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v12.0.1`](https://togithub.com/sinonjs/sinon/blob/master/CHANGES.md#​1201) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v12.0.0...v12.0.1) - [`3f598221`](https://togithub.com/sinonjs/sinon/commit/3f598221045904681f2b3b3ba1df617ed5e230e3) Fix issue with npm unlink for npm version > 6 (Carl-Erik Kopseng) > 'npm unlink' would implicitly unlink the current dir > until version 7, which requires an argument - [`51417a38`](https://togithub.com/sinonjs/sinon/commit/51417a38111eeeb7cd14338bfb762cc2df487e1b) Fix bundling of cjs module ([#​2412](https://togithub.com/sinonjs/sinon/issues/2412)) (Julian Grinblat) > - Fix bundling of cjs module > > - Run prettier *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2021-11-04.* #### 12.0.0 ### [`v12.0.0`](https://togithub.com/sinonjs/sinon/compare/v11.1.2...v12.0.0) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v11.1.2...v12.0.0)
--- ### Configuration ๐Ÿ“… **Schedule**: "after 9am and before 3pm" (UTC). ๐Ÿšฆ **Automerge**: Disabled by config. Please merge this manually once you are satisfied. โ™ป **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. ๐Ÿ”• **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-video-transcoder). --- packages/google-cloud-video-transcoder/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 4c8336c7287..592f14bfa2a 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -54,7 +54,7 @@ "mocha": "^8.2.1", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", - "sinon": "^11.0.0", + "sinon": "^12.0.0", "ts-loader": "^9.0.0", "typescript": "^3.9.7" }, From 2206a768284dbf0297096345c5d2cd6712ccacd3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 11 Nov 2021 14:57:18 -0500 Subject: [PATCH 068/116] feat(samples): add example tags to generated samples (#128) PiperOrigin-RevId: 408439482 Source-Link: https://github.com/googleapis/googleapis/commit/b9f61843dc80c7c285fc34fd3a40aae55082c2b9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/eb888bc214efc7bf43bf4634b470254565a659a5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWI4ODhiYzIxNGVmYzdiZjQzYmY0NjM0YjQ3MDI1NDU2NWE2NTlhNSJ9 Co-authored-by: Owl Bot --- .../linkinator.config.json | 2 +- .../v1/transcoder_service.create_job.js | 6 +- .../transcoder_service.create_job_template.js | 6 +- .../v1/transcoder_service.delete_job.js | 4 +- .../transcoder_service.delete_job_template.js | 4 +- .../v1/transcoder_service.get_job.js | 4 +- .../v1/transcoder_service.get_job_template.js | 4 +- .../transcoder_service.list_job_templates.js | 4 +- .../v1/transcoder_service.list_jobs.js | 4 +- .../v1beta1/transcoder_service.create_job.js | 6 +- .../transcoder_service.create_job_template.js | 6 +- .../v1beta1/transcoder_service.delete_job.js | 4 +- .../transcoder_service.delete_job_template.js | 4 +- .../v1beta1/transcoder_service.get_job.js | 4 +- .../transcoder_service.get_job_template.js | 4 +- .../transcoder_service.list_job_templates.js | 4 +- .../v1beta1/transcoder_service.list_jobs.js | 4 +- .../src/v1/transcoder_service_client.ts | 390 +++++++++--------- .../src/v1beta1/transcoder_service_client.ts | 356 ++++++++-------- 19 files changed, 402 insertions(+), 418 deletions(-) diff --git a/packages/google-cloud-video-transcoder/linkinator.config.json b/packages/google-cloud-video-transcoder/linkinator.config.json index 29a223b6db6..0121dfa684f 100644 --- a/packages/google-cloud-video-transcoder/linkinator.config.json +++ b/packages/google-cloud-video-transcoder/linkinator.config.json @@ -6,5 +6,5 @@ "img.shields.io" ], "silent": true, - "concurrency": 10 + "concurrency": 5 } diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job.js index 48f0670b113..311d348d1af 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job.js @@ -27,7 +27,7 @@ function main(parent, job) { /** * Required. Parameters for creating transcoding job. */ - // const job = '' + // const job = {} // Imports the Transcoder library const {TranscoderServiceClient} = @@ -36,7 +36,7 @@ function main(parent, job) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function createJob() { + async function callCreateJob() { // Construct request const request = { parent, @@ -48,7 +48,7 @@ function main(parent, job) { console.log(response); } - createJob(); + callCreateJob(); // [END transcoder_v1_generated_TranscoderService_CreateJob_async] } diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job_template.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job_template.js index d97099c3491..f86b9f90fab 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job_template.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job_template.js @@ -27,7 +27,7 @@ function main(parent, jobTemplate, jobTemplateId) { /** * Required. Parameters for creating job template. */ - // const jobTemplate = '' + // const jobTemplate = {} /** * Required. The ID to use for the job template, which will become the final component * of the job template's resource name. @@ -43,7 +43,7 @@ function main(parent, jobTemplate, jobTemplateId) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function createJobTemplate() { + async function callCreateJobTemplate() { // Construct request const request = { parent, @@ -56,7 +56,7 @@ function main(parent, jobTemplate, jobTemplateId) { console.log(response); } - createJobTemplate(); + callCreateJobTemplate(); // [END transcoder_v1_generated_TranscoderService_CreateJobTemplate_async] } diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job.js index 785d4a33452..c0d9b6aa76a 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job.js @@ -37,7 +37,7 @@ function main(name) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function deleteJob() { + async function callDeleteJob() { // Construct request const request = { name, @@ -48,7 +48,7 @@ function main(name) { console.log(response); } - deleteJob(); + callDeleteJob(); // [END transcoder_v1_generated_TranscoderService_DeleteJob_async] } diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job_template.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job_template.js index 821bd8075f2..112941cacfb 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job_template.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job_template.js @@ -37,7 +37,7 @@ function main(name) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function deleteJobTemplate() { + async function callDeleteJobTemplate() { // Construct request const request = { name, @@ -48,7 +48,7 @@ function main(name) { console.log(response); } - deleteJobTemplate(); + callDeleteJobTemplate(); // [END transcoder_v1_generated_TranscoderService_DeleteJobTemplate_async] } diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job.js index 5961db3b93c..91e6e65fc0c 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job.js @@ -32,7 +32,7 @@ function main(name) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function getJob() { + async function callGetJob() { // Construct request const request = { name, @@ -43,7 +43,7 @@ function main(name) { console.log(response); } - getJob(); + callGetJob(); // [END transcoder_v1_generated_TranscoderService_GetJob_async] } diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job_template.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job_template.js index fcef2c45473..adc3dda75aa 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job_template.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job_template.js @@ -33,7 +33,7 @@ function main(name) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function getJobTemplate() { + async function callGetJobTemplate() { // Construct request const request = { name, @@ -44,7 +44,7 @@ function main(name) { console.log(response); } - getJobTemplate(); + callGetJobTemplate(); // [END transcoder_v1_generated_TranscoderService_GetJobTemplate_async] } diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_job_templates.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_job_templates.js index e28b6f52be6..ec112c040e5 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_job_templates.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_job_templates.js @@ -51,7 +51,7 @@ function main(parent) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function listJobTemplates() { + async function callListJobTemplates() { // Construct request const request = { parent, @@ -64,7 +64,7 @@ function main(parent) { } } - listJobTemplates(); + callListJobTemplates(); // [END transcoder_v1_generated_TranscoderService_ListJobTemplates_async] } diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_jobs.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_jobs.js index 924e9aab9ac..fd673c0dc39 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_jobs.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_jobs.js @@ -50,7 +50,7 @@ function main(parent) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function listJobs() { + async function callListJobs() { // Construct request const request = { parent, @@ -63,7 +63,7 @@ function main(parent) { } } - listJobs(); + callListJobs(); // [END transcoder_v1_generated_TranscoderService_ListJobs_async] } diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job.js index f2130574ff9..709befa8f6b 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job.js @@ -27,7 +27,7 @@ function main(parent, job) { /** * Required. Parameters for creating transcoding job. */ - // const job = '' + // const job = {} // Imports the Transcoder library const {TranscoderServiceClient} = @@ -36,7 +36,7 @@ function main(parent, job) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function createJob() { + async function callCreateJob() { // Construct request const request = { parent, @@ -48,7 +48,7 @@ function main(parent, job) { console.log(response); } - createJob(); + callCreateJob(); // [END transcoder_v1beta1_generated_TranscoderService_CreateJob_async] } diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job_template.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job_template.js index e136fcdcf90..a24738ea074 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job_template.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job_template.js @@ -27,7 +27,7 @@ function main(parent, jobTemplate, jobTemplateId) { /** * Required. Parameters for creating job template. */ - // const jobTemplate = '' + // const jobTemplate = {} /** * Required. The ID to use for the job template, which will become the final component * of the job template's resource name. @@ -43,7 +43,7 @@ function main(parent, jobTemplate, jobTemplateId) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function createJobTemplate() { + async function callCreateJobTemplate() { // Construct request const request = { parent, @@ -56,7 +56,7 @@ function main(parent, jobTemplate, jobTemplateId) { console.log(response); } - createJobTemplate(); + callCreateJobTemplate(); // [END transcoder_v1beta1_generated_TranscoderService_CreateJobTemplate_async] } diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job.js index 5adb2a073e8..d475d209361 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job.js @@ -32,7 +32,7 @@ function main(name) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function deleteJob() { + async function callDeleteJob() { // Construct request const request = { name, @@ -43,7 +43,7 @@ function main(name) { console.log(response); } - deleteJob(); + callDeleteJob(); // [END transcoder_v1beta1_generated_TranscoderService_DeleteJob_async] } diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job_template.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job_template.js index 029c7daeac8..bde347df45c 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job_template.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job_template.js @@ -32,7 +32,7 @@ function main(name) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function deleteJobTemplate() { + async function callDeleteJobTemplate() { // Construct request const request = { name, @@ -43,7 +43,7 @@ function main(name) { console.log(response); } - deleteJobTemplate(); + callDeleteJobTemplate(); // [END transcoder_v1beta1_generated_TranscoderService_DeleteJobTemplate_async] } diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job.js index c78f10d1b69..9300f396a6b 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job.js @@ -32,7 +32,7 @@ function main(name) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function getJob() { + async function callGetJob() { // Construct request const request = { name, @@ -43,7 +43,7 @@ function main(name) { console.log(response); } - getJob(); + callGetJob(); // [END transcoder_v1beta1_generated_TranscoderService_GetJob_async] } diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job_template.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job_template.js index 0e0fe66169c..638c6376b49 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job_template.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job_template.js @@ -33,7 +33,7 @@ function main(name) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function getJobTemplate() { + async function callGetJobTemplate() { // Construct request const request = { name, @@ -44,7 +44,7 @@ function main(name) { console.log(response); } - getJobTemplate(); + callGetJobTemplate(); // [END transcoder_v1beta1_generated_TranscoderService_GetJobTemplate_async] } diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_job_templates.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_job_templates.js index 7ecc4fc3aca..990b6a05c44 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_job_templates.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_job_templates.js @@ -41,7 +41,7 @@ function main(parent) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function listJobTemplates() { + async function callListJobTemplates() { // Construct request const request = { parent, @@ -54,7 +54,7 @@ function main(parent) { } } - listJobTemplates(); + callListJobTemplates(); // [END transcoder_v1beta1_generated_TranscoderService_ListJobTemplates_async] } diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_jobs.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_jobs.js index 067afbe6df2..d0b8976b56e 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_jobs.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_jobs.js @@ -40,7 +40,7 @@ function main(parent) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function listJobs() { + async function callListJobs() { // Construct request const request = { parent, @@ -53,7 +53,7 @@ function main(parent) { } } - listJobs(); + callListJobs(); // [END transcoder_v1beta1_generated_TranscoderService_ListJobs_async] } diff --git a/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts b/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts index bd69963514a..e257217cbdd 100644 --- a/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts +++ b/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts @@ -337,6 +337,26 @@ export class TranscoderServiceClient { // ------------------- // -- Service calls -- // ------------------- + /** + * Creates a job in the specified region. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location to create and process this job. + * Format: `projects/{project}/locations/{location}` + * @param {google.cloud.video.transcoder.v1.Job} request.job + * Required. Parameters for creating transcoding job. + * @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 [Job]{@link google.cloud.video.transcoder.v1.Job}. + * 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/transcoder_service.create_job.js + * region_tag:transcoder_v1_generated_TranscoderService_CreateJob_async + */ createJob( request?: protos.google.cloud.video.transcoder.v1.ICreateJobRequest, options?: CallOptions @@ -368,26 +388,6 @@ export class TranscoderServiceClient { {} | null | undefined > ): void; - /** - * Creates a job in the specified region. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent location to create and process this job. - * Format: `projects/{project}/locations/{location}` - * @param {google.cloud.video.transcoder.v1.Job} request.job - * Required. Parameters for creating transcoding job. - * @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 [Job]{@link google.cloud.video.transcoder.v1.Job}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.createJob(request); - */ createJob( request?: protos.google.cloud.video.transcoder.v1.ICreateJobRequest, optionsOrCallback?: @@ -431,6 +431,24 @@ export class TranscoderServiceClient { this.initialize(); return this.innerApiCalls.createJob(request, options, callback); } + /** + * Returns the job data. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the job to retrieve. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * @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 [Job]{@link google.cloud.video.transcoder.v1.Job}. + * 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/transcoder_service.get_job.js + * region_tag:transcoder_v1_generated_TranscoderService_GetJob_async + */ getJob( request?: protos.google.cloud.video.transcoder.v1.IGetJobRequest, options?: CallOptions @@ -458,24 +476,6 @@ export class TranscoderServiceClient { {} | null | undefined > ): void; - /** - * Returns the job data. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the job to retrieve. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * @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 [Job]{@link google.cloud.video.transcoder.v1.Job}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getJob(request); - */ getJob( request?: protos.google.cloud.video.transcoder.v1.IGetJobRequest, optionsOrCallback?: @@ -517,6 +517,27 @@ export class TranscoderServiceClient { this.initialize(); return this.innerApiCalls.getJob(request, options, callback); } + /** + * Deletes a job. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the job to delete. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * @param {boolean} request.allowMissing + * If set to true, and the job is not found, the request will succeed but no + * action will be taken on the server. + * @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/transcoder_service.delete_job.js + * region_tag:transcoder_v1_generated_TranscoderService_DeleteJob_async + */ deleteJob( request?: protos.google.cloud.video.transcoder.v1.IDeleteJobRequest, options?: CallOptions @@ -548,27 +569,6 @@ export class TranscoderServiceClient { {} | null | undefined > ): void; - /** - * Deletes a job. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the job to delete. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * @param {boolean} request.allowMissing - * If set to true, and the job is not found, the request will succeed but no - * action will be taken on the server. - * @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 - * const [response] = await client.deleteJob(request); - */ deleteJob( request?: protos.google.cloud.video.transcoder.v1.IDeleteJobRequest, optionsOrCallback?: @@ -612,6 +612,32 @@ export class TranscoderServiceClient { this.initialize(); return this.innerApiCalls.deleteJob(request, options, callback); } + /** + * Creates a job template in the specified region. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location to create this job template. + * Format: `projects/{project}/locations/{location}` + * @param {google.cloud.video.transcoder.v1.JobTemplate} request.jobTemplate + * Required. Parameters for creating job template. + * @param {string} request.jobTemplateId + * Required. The ID to use for the job template, which will become the final component + * of the job template's resource name. + * + * This value should be 4-63 characters, and valid characters must match the + * regular expression `{@link a-zA-Z0-9_-|a-zA-Z}*`. + * @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 [JobTemplate]{@link google.cloud.video.transcoder.v1.JobTemplate}. + * 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/transcoder_service.create_job_template.js + * region_tag:transcoder_v1_generated_TranscoderService_CreateJobTemplate_async + */ createJobTemplate( request?: protos.google.cloud.video.transcoder.v1.ICreateJobTemplateRequest, options?: CallOptions @@ -646,32 +672,6 @@ export class TranscoderServiceClient { {} | null | undefined > ): void; - /** - * Creates a job template in the specified region. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent location to create this job template. - * Format: `projects/{project}/locations/{location}` - * @param {google.cloud.video.transcoder.v1.JobTemplate} request.jobTemplate - * Required. Parameters for creating job template. - * @param {string} request.jobTemplateId - * Required. The ID to use for the job template, which will become the final component - * of the job template's resource name. - * - * This value should be 4-63 characters, and valid characters must match the - * regular expression `{@link a-zA-Z0-9_-|a-zA-Z}*`. - * @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 [JobTemplate]{@link google.cloud.video.transcoder.v1.JobTemplate}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.createJobTemplate(request); - */ createJobTemplate( request?: protos.google.cloud.video.transcoder.v1.ICreateJobTemplateRequest, optionsOrCallback?: @@ -718,6 +718,25 @@ export class TranscoderServiceClient { this.initialize(); return this.innerApiCalls.createJobTemplate(request, options, callback); } + /** + * Returns the job template data. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the job template to retrieve. + * Format: + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * @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 [JobTemplate]{@link google.cloud.video.transcoder.v1.JobTemplate}. + * 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/transcoder_service.get_job_template.js + * region_tag:transcoder_v1_generated_TranscoderService_GetJobTemplate_async + */ getJobTemplate( request?: protos.google.cloud.video.transcoder.v1.IGetJobTemplateRequest, options?: CallOptions @@ -752,25 +771,6 @@ export class TranscoderServiceClient { {} | null | undefined > ): void; - /** - * Returns the job template data. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the job template to retrieve. - * Format: - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * @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 [JobTemplate]{@link google.cloud.video.transcoder.v1.JobTemplate}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getJobTemplate(request); - */ getJobTemplate( request?: protos.google.cloud.video.transcoder.v1.IGetJobTemplateRequest, optionsOrCallback?: @@ -817,6 +817,27 @@ export class TranscoderServiceClient { this.initialize(); return this.innerApiCalls.getJobTemplate(request, options, callback); } + /** + * Deletes a job template. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the job template to delete. + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * @param {boolean} request.allowMissing + * If set to true, and the job template is not found, the request will succeed + * but no action will be taken on the server. + * @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/transcoder_service.delete_job_template.js + * region_tag:transcoder_v1_generated_TranscoderService_DeleteJobTemplate_async + */ deleteJobTemplate( request?: protos.google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest, options?: CallOptions @@ -851,27 +872,6 @@ export class TranscoderServiceClient { {} | null | undefined > ): void; - /** - * Deletes a job template. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the job template to delete. - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * @param {boolean} request.allowMissing - * If set to true, and the job template is not found, the request will succeed - * but no action will be taken on the server. - * @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 - * const [response] = await client.deleteJobTemplate(request); - */ deleteJobTemplate( request?: protos.google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest, optionsOrCallback?: @@ -919,37 +919,6 @@ export class TranscoderServiceClient { return this.innerApiCalls.deleteJobTemplate(request, options, callback); } - listJobs( - request?: protos.google.cloud.video.transcoder.v1.IListJobsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.video.transcoder.v1.IJob[], - protos.google.cloud.video.transcoder.v1.IListJobsRequest | null, - protos.google.cloud.video.transcoder.v1.IListJobsResponse - ] - >; - listJobs( - request: protos.google.cloud.video.transcoder.v1.IListJobsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.video.transcoder.v1.IListJobsRequest, - | protos.google.cloud.video.transcoder.v1.IListJobsResponse - | null - | undefined, - protos.google.cloud.video.transcoder.v1.IJob - > - ): void; - listJobs( - request: protos.google.cloud.video.transcoder.v1.IListJobsRequest, - callback: PaginationCallback< - protos.google.cloud.video.transcoder.v1.IListJobsRequest, - | protos.google.cloud.video.transcoder.v1.IListJobsResponse - | null - | undefined, - protos.google.cloud.video.transcoder.v1.IJob - > - ): void; /** * Lists jobs in the specified region. * @@ -981,6 +950,37 @@ export class TranscoderServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listJobs( + request?: protos.google.cloud.video.transcoder.v1.IListJobsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.transcoder.v1.IJob[], + protos.google.cloud.video.transcoder.v1.IListJobsRequest | null, + protos.google.cloud.video.transcoder.v1.IListJobsResponse + ] + >; + listJobs( + request: protos.google.cloud.video.transcoder.v1.IListJobsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.video.transcoder.v1.IListJobsRequest, + | protos.google.cloud.video.transcoder.v1.IListJobsResponse + | null + | undefined, + protos.google.cloud.video.transcoder.v1.IJob + > + ): void; + listJobs( + request: protos.google.cloud.video.transcoder.v1.IListJobsRequest, + callback: PaginationCallback< + protos.google.cloud.video.transcoder.v1.IListJobsRequest, + | protos.google.cloud.video.transcoder.v1.IListJobsResponse + | null + | undefined, + protos.google.cloud.video.transcoder.v1.IJob + > + ): void; listJobs( request?: protos.google.cloud.video.transcoder.v1.IListJobsRequest, optionsOrCallback?: @@ -1105,11 +1105,8 @@ export class TranscoderServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listJobsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/transcoder_service.list_jobs.js + * region_tag:transcoder_v1_generated_TranscoderService_ListJobs_async */ listJobsAsync( request?: protos.google.cloud.video.transcoder.v1.IListJobsRequest, @@ -1123,7 +1120,6 @@ export class TranscoderServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); this.initialize(); @@ -1133,37 +1129,6 @@ export class TranscoderServiceClient { callSettings ) as AsyncIterable; } - listJobTemplates( - request?: protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.video.transcoder.v1.IJobTemplate[], - protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest | null, - protos.google.cloud.video.transcoder.v1.IListJobTemplatesResponse - ] - >; - listJobTemplates( - request: protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, - | protos.google.cloud.video.transcoder.v1.IListJobTemplatesResponse - | null - | undefined, - protos.google.cloud.video.transcoder.v1.IJobTemplate - > - ): void; - listJobTemplates( - request: protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, - callback: PaginationCallback< - protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, - | protos.google.cloud.video.transcoder.v1.IListJobTemplatesResponse - | null - | undefined, - protos.google.cloud.video.transcoder.v1.IJobTemplate - > - ): void; /** * Lists job templates in the specified region. * @@ -1196,6 +1161,37 @@ export class TranscoderServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listJobTemplates( + request?: protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.transcoder.v1.IJobTemplate[], + protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest | null, + protos.google.cloud.video.transcoder.v1.IListJobTemplatesResponse + ] + >; + listJobTemplates( + request: protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, + | protos.google.cloud.video.transcoder.v1.IListJobTemplatesResponse + | null + | undefined, + protos.google.cloud.video.transcoder.v1.IJobTemplate + > + ): void; + listJobTemplates( + request: protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, + callback: PaginationCallback< + protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, + | protos.google.cloud.video.transcoder.v1.IListJobTemplatesResponse + | null + | undefined, + protos.google.cloud.video.transcoder.v1.IJobTemplate + > + ): void; listJobTemplates( request?: protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, optionsOrCallback?: @@ -1322,11 +1318,8 @@ export class TranscoderServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listJobTemplatesAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/transcoder_service.list_job_templates.js + * region_tag:transcoder_v1_generated_TranscoderService_ListJobTemplates_async */ listJobTemplatesAsync( request?: protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, @@ -1340,7 +1333,6 @@ export class TranscoderServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listJobTemplates']; const callSettings = defaultCallSettings.merge(options); this.initialize(); diff --git a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts index 2a03892709a..3e5b3e75ccd 100644 --- a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts +++ b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts @@ -348,6 +348,26 @@ export class TranscoderServiceClient { // ------------------- // -- Service calls -- // ------------------- + /** + * Creates a job in the specified region. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location to create and process this job. + * Format: `projects/{project}/locations/{location}` + * @param {google.cloud.video.transcoder.v1beta1.Job} request.job + * Required. Parameters for creating transcoding job. + * @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 [Job]{@link google.cloud.video.transcoder.v1beta1.Job}. + * 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/v1beta1/transcoder_service.create_job.js + * region_tag:transcoder_v1beta1_generated_TranscoderService_CreateJob_async + */ createJob( request?: protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest, options?: CallOptions @@ -382,26 +402,6 @@ export class TranscoderServiceClient { {} | null | undefined > ): void; - /** - * Creates a job in the specified region. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent location to create and process this job. - * Format: `projects/{project}/locations/{location}` - * @param {google.cloud.video.transcoder.v1beta1.Job} request.job - * Required. Parameters for creating transcoding job. - * @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 [Job]{@link google.cloud.video.transcoder.v1beta1.Job}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.createJob(request); - */ createJob( request?: protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest, optionsOrCallback?: @@ -448,6 +448,24 @@ export class TranscoderServiceClient { this.initialize(); return this.innerApiCalls.createJob(request, options, callback); } + /** + * Returns the job data. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the job to retrieve. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * @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 [Job]{@link google.cloud.video.transcoder.v1beta1.Job}. + * 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/v1beta1/transcoder_service.get_job.js + * region_tag:transcoder_v1beta1_generated_TranscoderService_GetJob_async + */ getJob( request?: protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest, options?: CallOptions @@ -479,24 +497,6 @@ export class TranscoderServiceClient { {} | null | undefined > ): void; - /** - * Returns the job data. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the job to retrieve. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * @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 [Job]{@link google.cloud.video.transcoder.v1beta1.Job}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getJob(request); - */ getJob( request?: protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest, optionsOrCallback?: @@ -540,6 +540,24 @@ export class TranscoderServiceClient { this.initialize(); return this.innerApiCalls.getJob(request, options, callback); } + /** + * Deletes a job. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the job to delete. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * @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/v1beta1/transcoder_service.delete_job.js + * region_tag:transcoder_v1beta1_generated_TranscoderService_DeleteJob_async + */ deleteJob( request?: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest, options?: CallOptions @@ -574,24 +592,6 @@ export class TranscoderServiceClient { {} | null | undefined > ): void; - /** - * Deletes a job. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the job to delete. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * @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 - * const [response] = await client.deleteJob(request); - */ deleteJob( request?: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest, optionsOrCallback?: @@ -638,6 +638,32 @@ export class TranscoderServiceClient { this.initialize(); return this.innerApiCalls.deleteJob(request, options, callback); } + /** + * Creates a job template in the specified region. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location to create this job template. + * Format: `projects/{project}/locations/{location}` + * @param {google.cloud.video.transcoder.v1beta1.JobTemplate} request.jobTemplate + * Required. Parameters for creating job template. + * @param {string} request.jobTemplateId + * Required. The ID to use for the job template, which will become the final component + * of the job template's resource name. + * + * This value should be 4-63 characters, and valid characters must match the + * regular expression `{@link a-zA-Z0-9_-|a-zA-Z}*`. + * @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 [JobTemplate]{@link google.cloud.video.transcoder.v1beta1.JobTemplate}. + * 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/v1beta1/transcoder_service.create_job_template.js + * region_tag:transcoder_v1beta1_generated_TranscoderService_CreateJobTemplate_async + */ createJobTemplate( request?: protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest, options?: CallOptions @@ -672,32 +698,6 @@ export class TranscoderServiceClient { {} | null | undefined > ): void; - /** - * Creates a job template in the specified region. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent location to create this job template. - * Format: `projects/{project}/locations/{location}` - * @param {google.cloud.video.transcoder.v1beta1.JobTemplate} request.jobTemplate - * Required. Parameters for creating job template. - * @param {string} request.jobTemplateId - * Required. The ID to use for the job template, which will become the final component - * of the job template's resource name. - * - * This value should be 4-63 characters, and valid characters must match the - * regular expression `{@link a-zA-Z0-9_-|a-zA-Z}*`. - * @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 [JobTemplate]{@link google.cloud.video.transcoder.v1beta1.JobTemplate}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.createJobTemplate(request); - */ createJobTemplate( request?: protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest, optionsOrCallback?: @@ -744,6 +744,25 @@ export class TranscoderServiceClient { this.initialize(); return this.innerApiCalls.createJobTemplate(request, options, callback); } + /** + * Returns the job template data. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the job template to retrieve. + * Format: + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * @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 [JobTemplate]{@link google.cloud.video.transcoder.v1beta1.JobTemplate}. + * 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/v1beta1/transcoder_service.get_job_template.js + * region_tag:transcoder_v1beta1_generated_TranscoderService_GetJobTemplate_async + */ getJobTemplate( request?: protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest, options?: CallOptions @@ -778,25 +797,6 @@ export class TranscoderServiceClient { {} | null | undefined > ): void; - /** - * Returns the job template data. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the job template to retrieve. - * Format: - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * @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 [JobTemplate]{@link google.cloud.video.transcoder.v1beta1.JobTemplate}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getJobTemplate(request); - */ getJobTemplate( request?: protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest, optionsOrCallback?: @@ -843,6 +843,24 @@ export class TranscoderServiceClient { this.initialize(); return this.innerApiCalls.getJobTemplate(request, options, callback); } + /** + * Deletes a job template. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the job template to delete. + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * @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/v1beta1/transcoder_service.delete_job_template.js + * region_tag:transcoder_v1beta1_generated_TranscoderService_DeleteJobTemplate_async + */ deleteJobTemplate( request?: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest, options?: CallOptions @@ -877,24 +895,6 @@ export class TranscoderServiceClient { {} | null | undefined > ): void; - /** - * Deletes a job template. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the job template to delete. - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * @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 - * const [response] = await client.deleteJobTemplate(request); - */ deleteJobTemplate( request?: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest, optionsOrCallback?: @@ -942,6 +942,31 @@ export class TranscoderServiceClient { return this.innerApiCalls.deleteJobTemplate(request, options, callback); } + /** + * Lists jobs in the specified region. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Format: `projects/{project}/locations/{location}` + * @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 [Job]{@link google.cloud.video.transcoder.v1beta1.Job}. + * 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 `listJobsAsync()` + * 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. + */ listJobs( request?: protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, options?: CallOptions @@ -973,31 +998,6 @@ export class TranscoderServiceClient { protos.google.cloud.video.transcoder.v1beta1.IJob > ): void; - /** - * Lists jobs in the specified region. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Format: `projects/{project}/locations/{location}` - * @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 [Job]{@link google.cloud.video.transcoder.v1beta1.Job}. - * 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 `listJobsAsync()` - * 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. - */ listJobs( request?: protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, optionsOrCallback?: @@ -1110,11 +1110,8 @@ export class TranscoderServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listJobsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1beta1/transcoder_service.list_jobs.js + * region_tag:transcoder_v1beta1_generated_TranscoderService_ListJobs_async */ listJobsAsync( request?: protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, @@ -1128,7 +1125,6 @@ export class TranscoderServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); this.initialize(); @@ -1138,6 +1134,32 @@ export class TranscoderServiceClient { callSettings ) as AsyncIterable; } + /** + * Lists job templates in the specified region. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location from which to retrieve the collection of job templates. + * Format: `projects/{project}/locations/{location}` + * @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 [JobTemplate]{@link google.cloud.video.transcoder.v1beta1.JobTemplate}. + * 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 `listJobTemplatesAsync()` + * 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. + */ listJobTemplates( request?: protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, options?: CallOptions @@ -1169,32 +1191,6 @@ export class TranscoderServiceClient { protos.google.cloud.video.transcoder.v1beta1.IJobTemplate > ): void; - /** - * Lists job templates in the specified region. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent location from which to retrieve the collection of job templates. - * Format: `projects/{project}/locations/{location}` - * @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 [JobTemplate]{@link google.cloud.video.transcoder.v1beta1.JobTemplate}. - * 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 `listJobTemplatesAsync()` - * 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. - */ listJobTemplates( request?: protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, optionsOrCallback?: @@ -1309,11 +1305,8 @@ export class TranscoderServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listJobTemplatesAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1beta1/transcoder_service.list_job_templates.js + * region_tag:transcoder_v1beta1_generated_TranscoderService_ListJobTemplates_async */ listJobTemplatesAsync( request?: protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, @@ -1327,7 +1320,6 @@ export class TranscoderServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listJobTemplates']; const callSettings = defaultCallSettings.merge(options); this.initialize(); From ce9ff1090fc7385cdca4a7a32465fa68557ecdf9 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 11 Nov 2021 20:16:13 +0000 Subject: [PATCH 069/116] chore: release 1.8.0 (#129) :robot: I have created a release \*beep\* \*boop\* --- ## [1.8.0](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.7.2...v1.8.0) (2021-11-11) ### Features * **samples:** add example tags to generated samples ([#128](https://www.github.com/googleapis/nodejs-video-transcoder/issues/128)) ([0f2f1a8](https://www.github.com/googleapis/nodejs-video-transcoder/commit/0f2f1a857c154a944521ea230c4295b379450e7f)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-video-transcoder/CHANGELOG.md | 7 +++++++ packages/google-cloud-video-transcoder/package.json | 2 +- .../google-cloud-video-transcoder/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-video-transcoder/CHANGELOG.md b/packages/google-cloud-video-transcoder/CHANGELOG.md index 444cc2445c5..9287ae9f77f 100644 --- a/packages/google-cloud-video-transcoder/CHANGELOG.md +++ b/packages/google-cloud-video-transcoder/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.8.0](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.7.2...v1.8.0) (2021-11-11) + + +### Features + +* **samples:** add example tags to generated samples ([#128](https://www.github.com/googleapis/nodejs-video-transcoder/issues/128)) ([0f2f1a8](https://www.github.com/googleapis/nodejs-video-transcoder/commit/0f2f1a857c154a944521ea230c4295b379450e7f)) + ### [1.7.2](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.7.1...v1.7.2) (2021-10-13) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 592f14bfa2a..203874a2c4c 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/video-transcoder", - "version": "1.7.2", + "version": "1.8.0", "description": "Transcoder client for Node.js", "repository": "googleapis/nodejs-video-transcoder", "license": "Apache-2.0", diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index d54ef3d00ba..022c469b4d5 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/video-transcoder": "^1.7.2" + "@google-cloud/video-transcoder": "^1.8.0" }, "devDependencies": { "@google-cloud/storage": "^5.4.0", From 1c8877551222dee1a4cc175a9284b125d1ce6341 Mon Sep 17 00:00:00 2001 From: Nicholas Cook Date: Thu, 2 Dec 2021 09:19:59 -0800 Subject: [PATCH 070/116] fix: add backoff for test retries and get job state queries (#131) * fix: add backoff for test retries and get job state queries * Propagate changes from last commit --- packages/google-cloud-video-transcoder/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 203874a2c4c..3d476831a7f 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -39,6 +39,7 @@ "test": "c8 mocha build/test" }, "dependencies": { + "@google-cloud/video-transcoder": "^1.8.0", "google-gax": "^2.24.1" }, "devDependencies": { From 2d2336b1ddeb0983c75145f4cc3d2c0d5771b43b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 3 Dec 2021 13:12:02 -0800 Subject: [PATCH 071/116] chore: release 1.8.1 (#132) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-video-transcoder/CHANGELOG.md | 7 +++++++ packages/google-cloud-video-transcoder/package.json | 2 +- .../google-cloud-video-transcoder/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-video-transcoder/CHANGELOG.md b/packages/google-cloud-video-transcoder/CHANGELOG.md index 9287ae9f77f..db2fbd24d38 100644 --- a/packages/google-cloud-video-transcoder/CHANGELOG.md +++ b/packages/google-cloud-video-transcoder/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.8.1](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.8.0...v1.8.1) (2021-12-02) + + +### Bug Fixes + +* add backoff for test retries and get job state queries ([#131](https://www.github.com/googleapis/nodejs-video-transcoder/issues/131)) ([63bba1e](https://www.github.com/googleapis/nodejs-video-transcoder/commit/63bba1ede86c96b3dc1ba2a7616c249525188d9f)) + ## [1.8.0](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.7.2...v1.8.0) (2021-11-11) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 3d476831a7f..595247be2ab 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/video-transcoder", - "version": "1.8.0", + "version": "1.8.1", "description": "Transcoder client for Node.js", "repository": "googleapis/nodejs-video-transcoder", "license": "Apache-2.0", diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index 022c469b4d5..0d9841517af 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/video-transcoder": "^1.8.0" + "@google-cloud/video-transcoder": "^1.8.1" }, "devDependencies": { "@google-cloud/storage": "^5.4.0", From 400aab723cd30bd0c2acb1f02a223e73d454cbdb Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 9 Dec 2021 22:44:23 +0000 Subject: [PATCH 072/116] build: add generated samples to .eslintignore (#134) --- packages/google-cloud-video-transcoder/.eslintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-video-transcoder/.eslintignore b/packages/google-cloud-video-transcoder/.eslintignore index 9340ad9b86d..ea5b04aebe6 100644 --- a/packages/google-cloud-video-transcoder/.eslintignore +++ b/packages/google-cloud-video-transcoder/.eslintignore @@ -4,3 +4,4 @@ test/fixtures build/ docs/ protos/ +samples/generated/ From 1afd321419021fc0e3d077545fbcdf8b2304cfb3 Mon Sep 17 00:00:00 2001 From: Nicholas Cook Date: Mon, 20 Dec 2021 12:51:54 -0800 Subject: [PATCH 073/116] samples: add code sample and test for concatenating two input videos (#133) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add code sample and test for concatenating two input videos * ๐Ÿฆ‰ Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../google-cloud-video-transcoder/README.md | 1 + .../samples/README.md | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/packages/google-cloud-video-transcoder/README.md b/packages/google-cloud-video-transcoder/README.md index 498a120119e..a9f6fd92fc9 100644 --- a/packages/google-cloud-video-transcoder/README.md +++ b/packages/google-cloud-video-transcoder/README.md @@ -92,6 +92,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-video-trans | Create Job From Template | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobFromTemplate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobFromTemplate.js,samples/README.md) | | Create Job Template | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobTemplate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobTemplate.js,samples/README.md) | | Create Job With Animated Overlay | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobWithAnimatedOverlay.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithAnimatedOverlay.js,samples/README.md) | +| Create Job With Concatenated Inputs | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobWithConcatenatedInputs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithConcatenatedInputs.js,samples/README.md) | | Create Job With Periodic Images Spritesheet | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobWithPeriodicImagesSpritesheet.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithPeriodicImagesSpritesheet.js,samples/README.md) | | Create Job With Set Number Images Spritesheet | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobWithSetNumberImagesSpritesheet.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithSetNumberImagesSpritesheet.js,samples/README.md) | | Create Job With Static Overlay | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobWithStaticOverlay.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithStaticOverlay.js,samples/README.md) | diff --git a/packages/google-cloud-video-transcoder/samples/README.md b/packages/google-cloud-video-transcoder/samples/README.md index 11c357fe8a8..3c736e065b8 100644 --- a/packages/google-cloud-video-transcoder/samples/README.md +++ b/packages/google-cloud-video-transcoder/samples/README.md @@ -17,6 +17,7 @@ * [Create Job From Template](#create-job-from-template) * [Create Job Template](#create-job-template) * [Create Job With Animated Overlay](#create-job-with-animated-overlay) + * [Create Job With Concatenated Inputs](#create-job-with-concatenated-inputs) * [Create Job With Periodic Images Spritesheet](#create-job-with-periodic-images-spritesheet) * [Create Job With Set Number Images Spritesheet](#create-job-with-set-number-images-spritesheet) * [Create Job With Static Overlay](#create-job-with-static-overlay) @@ -129,6 +130,23 @@ __Usage:__ +### Create Job With Concatenated Inputs + +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobWithConcatenatedInputs.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithConcatenatedInputs.js,samples/README.md) + +__Usage:__ + + +`node samples/createJobWithConcatenatedInputs.js` + + +----- + + + + ### Create Job With Periodic Images Spritesheet View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobWithPeriodicImagesSpritesheet.js). From 7b0cd4d71dfa2649b16058e4fb4e239735656915 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 29 Dec 2021 19:54:23 +0000 Subject: [PATCH 074/116] docs(node): support "stable"/"preview" release level (#1312) (#138) --- packages/google-cloud-video-transcoder/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/google-cloud-video-transcoder/README.md b/packages/google-cloud-video-transcoder/README.md index a9f6fd92fc9..efbfc255327 100644 --- a/packages/google-cloud-video-transcoder/README.md +++ b/packages/google-cloud-video-transcoder/README.md @@ -146,6 +146,8 @@ are addressed with the highest priority. + + More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages From 9d07b3e37f797afea0627d6693fe4da84526031b Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 30 Dec 2021 12:03:36 -0500 Subject: [PATCH 075/116] chore: add api_shortname and library_type to repo metadata (#137) --- .../google-cloud-video-transcoder/.repo-metadata.json | 6 ++++-- packages/google-cloud-video-transcoder/README.md | 9 ++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-video-transcoder/.repo-metadata.json b/packages/google-cloud-video-transcoder/.repo-metadata.json index 2fa6676d696..fc9fe8d301d 100644 --- a/packages/google-cloud-video-transcoder/.repo-metadata.json +++ b/packages/google-cloud-video-transcoder/.repo-metadata.json @@ -3,12 +3,14 @@ "product_documentation": "https://googleapis.dev/nodejs/transcoder/latest", "name": "transcoder", "requires_billing": true, - "release_level": "ga", + "release_level": "stable", "language": "nodejs", "api_id": "transcoder.googleapis.com", "distribution_name": "@google-cloud/video-transcoder", "repo": "googleapis/nodejs-video-transcoder", "issue_tracker": "https://github.com/googleapis/nodejs-video-transcoder/issues", "name_pretty": "Transcoder API", - "default_version": "v1beta1" + "default_version": "v1beta1", + "api_shortname": "transcoder", + "library_type": "GAPIC_AUTO" } diff --git a/packages/google-cloud-video-transcoder/README.md b/packages/google-cloud-video-transcoder/README.md index efbfc255327..5770dfc7eb3 100644 --- a/packages/google-cloud-video-transcoder/README.md +++ b/packages/google-cloud-video-transcoder/README.md @@ -4,7 +4,7 @@ # [Transcoder API: Node.js Client](https://github.com/googleapis/nodejs-video-transcoder) -[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) + [![npm version](https://img.shields.io/npm/v/@google-cloud/video-transcoder.svg)](https://www.npmjs.org/package/@google-cloud/video-transcoder) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-video-transcoder/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-video-transcoder) @@ -136,10 +136,10 @@ _Legacy Node.js versions are supported as a best effort:_ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be **General Availability (GA)**. This means it -is stable; the code surface will not change in backwards-incompatible ways + +This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways unless absolutely necessary (e.g. because of critical security issues) or with -an extensive deprecation period. Issues and requests against **GA** libraries +an extensive deprecation period. Issues and requests against **stable** libraries are addressed with the highest priority. @@ -147,7 +147,6 @@ are addressed with the highest priority. - More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages From 0f6135a9edd2877ac7b156098fb57cc05026c5fb Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 30 Dec 2021 23:12:12 +0000 Subject: [PATCH 076/116] docs(badges): tweak badge to use new preview/stable language (#1314) (#140) --- packages/google-cloud-video-transcoder/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/google-cloud-video-transcoder/README.md b/packages/google-cloud-video-transcoder/README.md index 5770dfc7eb3..28191581767 100644 --- a/packages/google-cloud-video-transcoder/README.md +++ b/packages/google-cloud-video-transcoder/README.md @@ -4,9 +4,8 @@ # [Transcoder API: Node.js Client](https://github.com/googleapis/nodejs-video-transcoder) - +[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/video-transcoder.svg)](https://www.npmjs.org/package/@google-cloud/video-transcoder) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-video-transcoder/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-video-transcoder) From 39c3b1f7cf7fd9dc13791fb1ae5b78f62083f81b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 11 Jan 2022 17:06:17 +0000 Subject: [PATCH 077/116] test(nodejs): remove 15 add 16 (#1322) (#142) --- packages/google-cloud-video-transcoder/protos/protos.d.ts | 2 +- packages/google-cloud-video-transcoder/protos/protos.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-video-transcoder/protos/protos.d.ts b/packages/google-cloud-video-transcoder/protos/protos.d.ts index 341ab38f66a..3fe5c6124a0 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.d.ts +++ b/packages/google-cloud-video-transcoder/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// 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. diff --git a/packages/google-cloud-video-transcoder/protos/protos.js b/packages/google-cloud-video-transcoder/protos/protos.js index aa665c9b202..4f4701c96e1 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.js +++ b/packages/google-cloud-video-transcoder/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// 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. From 06222d01ed23e033d8636f5345c09974a8c637c6 Mon Sep 17 00:00:00 2001 From: Nicholas Cook Date: Wed, 12 Jan 2022 13:42:24 -0800 Subject: [PATCH 078/116] feat(samples): add samples and tests for adding captions to videos (#143) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(samples): add samples and tests for adding captions to videos * ๐Ÿฆ‰ Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../google-cloud-video-transcoder/README.md | 2 ++ .../package.json | 2 +- .../samples/README.md | 36 +++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-video-transcoder/README.md b/packages/google-cloud-video-transcoder/README.md index 28191581767..b8dfb7a095d 100644 --- a/packages/google-cloud-video-transcoder/README.md +++ b/packages/google-cloud-video-transcoder/README.md @@ -92,8 +92,10 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-video-trans | Create Job Template | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobTemplate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobTemplate.js,samples/README.md) | | Create Job With Animated Overlay | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobWithAnimatedOverlay.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithAnimatedOverlay.js,samples/README.md) | | Create Job With Concatenated Inputs | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobWithConcatenatedInputs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithConcatenatedInputs.js,samples/README.md) | +| Create Job With Embedded Captions | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobWithEmbeddedCaptions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithEmbeddedCaptions.js,samples/README.md) | | Create Job With Periodic Images Spritesheet | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobWithPeriodicImagesSpritesheet.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithPeriodicImagesSpritesheet.js,samples/README.md) | | Create Job With Set Number Images Spritesheet | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobWithSetNumberImagesSpritesheet.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithSetNumberImagesSpritesheet.js,samples/README.md) | +| Create Job With Standalone Captions | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobWithStandaloneCaptions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithStandaloneCaptions.js,samples/README.md) | | Create Job With Static Overlay | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobWithStaticOverlay.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithStaticOverlay.js,samples/README.md) | | Delete Job | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/deleteJob.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/deleteJob.js,samples/README.md) | | Delete Job Template | [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/deleteJobTemplate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/deleteJobTemplate.js,samples/README.md) | diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 595247be2ab..d612c13159e 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -39,7 +39,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "@google-cloud/video-transcoder": "^1.8.0", + "@google-cloud/video-transcoder": "^1.8.1", "google-gax": "^2.24.1" }, "devDependencies": { diff --git a/packages/google-cloud-video-transcoder/samples/README.md b/packages/google-cloud-video-transcoder/samples/README.md index 3c736e065b8..e61d73ffa35 100644 --- a/packages/google-cloud-video-transcoder/samples/README.md +++ b/packages/google-cloud-video-transcoder/samples/README.md @@ -18,8 +18,10 @@ * [Create Job Template](#create-job-template) * [Create Job With Animated Overlay](#create-job-with-animated-overlay) * [Create Job With Concatenated Inputs](#create-job-with-concatenated-inputs) + * [Create Job With Embedded Captions](#create-job-with-embedded-captions) * [Create Job With Periodic Images Spritesheet](#create-job-with-periodic-images-spritesheet) * [Create Job With Set Number Images Spritesheet](#create-job-with-set-number-images-spritesheet) + * [Create Job With Standalone Captions](#create-job-with-standalone-captions) * [Create Job With Static Overlay](#create-job-with-static-overlay) * [Delete Job](#delete-job) * [Delete Job Template](#delete-job-template) @@ -147,6 +149,23 @@ __Usage:__ +### Create Job With Embedded Captions + +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobWithEmbeddedCaptions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithEmbeddedCaptions.js,samples/README.md) + +__Usage:__ + + +`node samples/createJobWithEmbeddedCaptions.js` + + +----- + + + + ### Create Job With Periodic Images Spritesheet View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobWithPeriodicImagesSpritesheet.js). @@ -181,6 +200,23 @@ __Usage:__ +### Create Job With Standalone Captions + +View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobWithStandaloneCaptions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-video-transcoder&page=editor&open_in_editor=samples/createJobWithStandaloneCaptions.js,samples/README.md) + +__Usage:__ + + +`node samples/createJobWithStandaloneCaptions.js` + + +----- + + + + ### Create Job With Static Overlay View the [source code](https://github.com/googleapis/nodejs-video-transcoder/blob/main/samples/createJobWithStaticOverlay.js). From 93fc2005fe624b1ac9ae34fac4871653adbbf73c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 31 Jan 2022 23:38:30 +0100 Subject: [PATCH 079/116] chore(deps): update dependency sinon to v13 (#151) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^12.0.0` -> `^13.0.0`](https://renovatebot.com/diffs/npm/sinon/12.0.1/13.0.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/13.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/13.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/13.0.0/compatibility-slim/12.0.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/13.0.0/confidence-slim/12.0.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v13.0.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1300) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v12.0.1...v13.0.0) - [`cf3d6c0c`](https://togithub.com/sinonjs/sinon/commit/cf3d6c0cd9689c0ee673b3daa8bf9abd70304392) Upgrade packages ([#​2431](https://togithub.com/sinonjs/sinon/issues/2431)) (Carl-Erik Kopseng) > - Update all @​sinonjs/ packages > > - Upgrade to fake-timers 9 > > - chore: ensure always using latest LTS release - [`41710467`](https://togithub.com/sinonjs/sinon/commit/417104670d575e96a1b645ea40ce763afa76fb1b) Adjust deploy scripts to archive old releases in a separate branch, move existing releases out of master ([#​2426](https://togithub.com/sinonjs/sinon/issues/2426)) (Joel Bradshaw) > Co-authored-by: Carl-Erik Kopseng - [`c80a7266`](https://togithub.com/sinonjs/sinon/commit/c80a72660e89d88b08275eff1028ecb9e26fd8e9) Bump node-fetch from 2.6.1 to 2.6.7 ([#​2430](https://togithub.com/sinonjs/sinon/issues/2430)) (dependabot\[bot]) > Co-authored-by: dependabot\[bot] <49699333+dependabot\[bot][@​users](https://togithub.com/users).noreply.github.com> - [`a00f14a9`](https://togithub.com/sinonjs/sinon/commit/a00f14a97dbe8c65afa89674e16ad73fc7d2fdc0) Add explicit export for `./*` ([#​2413](https://togithub.com/sinonjs/sinon/issues/2413)) (ใชใคใ) - [`b82ca7ad`](https://togithub.com/sinonjs/sinon/commit/b82ca7ad9b1add59007771f65a18ee34415de8ca) Bump cached-path-relative from 1.0.2 to 1.1.0 ([#​2428](https://togithub.com/sinonjs/sinon/issues/2428)) (dependabot\[bot]) - [`a9ea1427`](https://togithub.com/sinonjs/sinon/commit/a9ea142716c094ef3c432ecc4089f8207b8dd8b6) Add documentation for assert.calledOnceWithMatch ([#​2424](https://togithub.com/sinonjs/sinon/issues/2424)) (Mathias Schreck) - [`1d5ab86b`](https://togithub.com/sinonjs/sinon/commit/1d5ab86ba60e50dd69593ffed2bffd4b8faa0d38) Be more general in stripping off stack frames to fix Firefox tests ([#​2425](https://togithub.com/sinonjs/sinon/issues/2425)) (Joel Bradshaw) - [`56b06129`](https://togithub.com/sinonjs/sinon/commit/56b06129e223eae690265c37b1113067e2b31bdc) Check call count type ([#​2410](https://togithub.com/sinonjs/sinon/issues/2410)) (Joel Bradshaw) - [`7863e2df`](https://togithub.com/sinonjs/sinon/commit/7863e2dfdbda79e0a32e42af09e6539fc2f2b80f) Fix [#​2414](https://togithub.com/sinonjs/sinon/issues/2414): make Sinon available on homepage (Carl-Erik Kopseng) - [`fabaabdd`](https://togithub.com/sinonjs/sinon/commit/fabaabdda82f39a7f5b75b55bd56cf77b1cd4a8f) Bump nokogiri from 1.11.4 to 1.13.1 ([#​2423](https://togithub.com/sinonjs/sinon/issues/2423)) (dependabot\[bot]) - [`dbc0fbd2`](https://togithub.com/sinonjs/sinon/commit/dbc0fbd263c8419fa47f9c3b20cf47890a242d21) Bump shelljs from 0.8.4 to 0.8.5 ([#​2422](https://togithub.com/sinonjs/sinon/issues/2422)) (dependabot\[bot]) - [`fb8b3d72`](https://togithub.com/sinonjs/sinon/commit/fb8b3d72a85dc8fb0547f859baf3f03a22a039f7) Run Prettier (Carl-Erik Kopseng) - [`12a45939`](https://togithub.com/sinonjs/sinon/commit/12a45939e9b047b6d3663fe55f2eb383ec63c4e1) Fix 2377: Throw error when trying to stub non-configurable or non-writable properties ([#​2417](https://togithub.com/sinonjs/sinon/issues/2417)) (Stuart Dotson) > Fixes issue [#​2377](https://togithub.com/sinonjs/sinon/issues/2377) by throwing an error when trying to stub non-configurable or non-writable properties *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2022-01-28.*
--- ### Configuration ๐Ÿ“… **Schedule**: "after 9am and before 3pm" (UTC). ๐Ÿšฆ **Automerge**: Disabled by config. Please merge this manually once you are satisfied. โ™ป **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. ๐Ÿ”• **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-video-transcoder). --- packages/google-cloud-video-transcoder/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index d612c13159e..70e5bb52d35 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -55,7 +55,7 @@ "mocha": "^8.2.1", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", - "sinon": "^12.0.0", + "sinon": "^13.0.0", "ts-loader": "^9.0.0", "typescript": "^3.9.7" }, From 07cb2a3dfa89f640727d8579bdc1b75746aaec8e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 31 Jan 2022 23:39:24 +0000 Subject: [PATCH 080/116] build: update copyright year to 2022 (#146) PiperOrigin-RevId: 422607515 Source-Link: https://github.com/googleapis/googleapis/commit/ba2ffd6fe6642e28b4fed2ffae217b4c5f084034 Source-Link: https://github.com/googleapis/googleapis-gen/commit/73ba4add239a619da567ffbd4e5730fdd6de04d3 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzNiYTRhZGQyMzlhNjE5ZGE1NjdmZmJkNGU1NzMwZmRkNmRlMDRkMyJ9 Co-authored-by: Owl Bot Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> Co-authored-by: Benjamin E. Coe --- packages/google-cloud-video-transcoder/.jsdoc.js | 4 ++-- .../samples/generated/v1/transcoder_service.create_job.js | 4 ++-- .../generated/v1/transcoder_service.create_job_template.js | 4 ++-- .../samples/generated/v1/transcoder_service.delete_job.js | 4 ++-- .../generated/v1/transcoder_service.delete_job_template.js | 4 ++-- .../samples/generated/v1/transcoder_service.get_job.js | 4 ++-- .../generated/v1/transcoder_service.get_job_template.js | 4 ++-- .../generated/v1/transcoder_service.list_job_templates.js | 6 +++--- .../samples/generated/v1/transcoder_service.list_jobs.js | 6 +++--- .../generated/v1beta1/transcoder_service.create_job.js | 4 ++-- .../v1beta1/transcoder_service.create_job_template.js | 4 ++-- .../generated/v1beta1/transcoder_service.delete_job.js | 4 ++-- .../v1beta1/transcoder_service.delete_job_template.js | 4 ++-- .../samples/generated/v1beta1/transcoder_service.get_job.js | 4 ++-- .../v1beta1/transcoder_service.get_job_template.js | 4 ++-- .../v1beta1/transcoder_service.list_job_templates.js | 6 +++--- .../generated/v1beta1/transcoder_service.list_jobs.js | 6 +++--- packages/google-cloud-video-transcoder/src/v1/index.ts | 2 +- .../src/v1/transcoder_service_client.ts | 2 +- packages/google-cloud-video-transcoder/src/v1beta1/index.ts | 2 +- .../src/v1beta1/transcoder_service_client.ts | 2 +- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- .../google-cloud-video-transcoder/system-test/install.ts | 2 +- .../test/gapic_transcoder_service_v1.ts | 2 +- .../test/gapic_transcoder_service_v1beta1.ts | 2 +- 26 files changed, 47 insertions(+), 47 deletions(-) diff --git a/packages/google-cloud-video-transcoder/.jsdoc.js b/packages/google-cloud-video-transcoder/.jsdoc.js index f1ef2c70909..1c49b86a300 100644 --- a/packages/google-cloud-video-transcoder/.jsdoc.js +++ b/packages/google-cloud-video-transcoder/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// 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. @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2021 Google LLC', + copyright: 'Copyright 2022 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/video-transcoder', diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job.js index 311d348d1af..e13996a2792 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent, job) { @@ -30,8 +31,7 @@ function main(parent, job) { // const job = {} // Imports the Transcoder library - const {TranscoderServiceClient} = - require('@google-cloud/video-transcoder').v1; + const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1; // Instantiates a client const transcoderClient = new TranscoderServiceClient(); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job_template.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job_template.js index f86b9f90fab..a8e2b58f97b 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job_template.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job_template.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent, jobTemplate, jobTemplateId) { @@ -37,8 +38,7 @@ function main(parent, jobTemplate, jobTemplateId) { // const jobTemplateId = 'abc123' // Imports the Transcoder library - const {TranscoderServiceClient} = - require('@google-cloud/video-transcoder').v1; + const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1; // Instantiates a client const transcoderClient = new TranscoderServiceClient(); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job.js index c0d9b6aa76a..e1bec935282 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -31,8 +32,7 @@ function main(name) { // const allowMissing = true // Imports the Transcoder library - const {TranscoderServiceClient} = - require('@google-cloud/video-transcoder').v1; + const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1; // Instantiates a client const transcoderClient = new TranscoderServiceClient(); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job_template.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job_template.js index 112941cacfb..9cf597d871e 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job_template.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job_template.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -31,8 +32,7 @@ function main(name) { // const allowMissing = true // Imports the Transcoder library - const {TranscoderServiceClient} = - require('@google-cloud/video-transcoder').v1; + const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1; // Instantiates a client const transcoderClient = new TranscoderServiceClient(); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job.js index 91e6e65fc0c..e758db708f0 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -26,8 +27,7 @@ function main(name) { // const name = 'abc123' // Imports the Transcoder library - const {TranscoderServiceClient} = - require('@google-cloud/video-transcoder').v1; + const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1; // Instantiates a client const transcoderClient = new TranscoderServiceClient(); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job_template.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job_template.js index adc3dda75aa..dfdee8d83c5 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job_template.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job_template.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -27,8 +28,7 @@ function main(name) { // const name = 'abc123' // Imports the Transcoder library - const {TranscoderServiceClient} = - require('@google-cloud/video-transcoder').v1; + const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1; // Instantiates a client const transcoderClient = new TranscoderServiceClient(); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_job_templates.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_job_templates.js index ec112c040e5..21125538f61 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_job_templates.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_job_templates.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -45,8 +46,7 @@ function main(parent) { // const orderBy = 'abc123' // Imports the Transcoder library - const {TranscoderServiceClient} = - require('@google-cloud/video-transcoder').v1; + const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1; // Instantiates a client const transcoderClient = new TranscoderServiceClient(); @@ -60,7 +60,7 @@ function main(parent) { // Run request const iterable = await transcoderClient.listJobTemplatesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_jobs.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_jobs.js index fd673c0dc39..da830d2f9e1 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_jobs.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_jobs.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -44,8 +45,7 @@ function main(parent) { // const orderBy = 'abc123' // Imports the Transcoder library - const {TranscoderServiceClient} = - require('@google-cloud/video-transcoder').v1; + const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1; // Instantiates a client const transcoderClient = new TranscoderServiceClient(); @@ -59,7 +59,7 @@ function main(parent) { // Run request const iterable = await transcoderClient.listJobsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job.js index 709befa8f6b..c32e7e275f5 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent, job) { @@ -30,8 +31,7 @@ function main(parent, job) { // const job = {} // Imports the Transcoder library - const {TranscoderServiceClient} = - require('@google-cloud/video-transcoder').v1beta1; + const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1beta1; // Instantiates a client const transcoderClient = new TranscoderServiceClient(); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job_template.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job_template.js index a24738ea074..e1905219cb6 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job_template.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job_template.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent, jobTemplate, jobTemplateId) { @@ -37,8 +38,7 @@ function main(parent, jobTemplate, jobTemplateId) { // const jobTemplateId = 'abc123' // Imports the Transcoder library - const {TranscoderServiceClient} = - require('@google-cloud/video-transcoder').v1beta1; + const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1beta1; // Instantiates a client const transcoderClient = new TranscoderServiceClient(); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job.js index d475d209361..ff09bb075db 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -26,8 +27,7 @@ function main(name) { // const name = 'abc123' // Imports the Transcoder library - const {TranscoderServiceClient} = - require('@google-cloud/video-transcoder').v1beta1; + const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1beta1; // Instantiates a client const transcoderClient = new TranscoderServiceClient(); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job_template.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job_template.js index bde347df45c..2313a8ca8dd 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job_template.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job_template.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -26,8 +27,7 @@ function main(name) { // const name = 'abc123' // Imports the Transcoder library - const {TranscoderServiceClient} = - require('@google-cloud/video-transcoder').v1beta1; + const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1beta1; // Instantiates a client const transcoderClient = new TranscoderServiceClient(); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job.js index 9300f396a6b..66ec46e9e65 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -26,8 +27,7 @@ function main(name) { // const name = 'abc123' // Imports the Transcoder library - const {TranscoderServiceClient} = - require('@google-cloud/video-transcoder').v1beta1; + const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1beta1; // Instantiates a client const transcoderClient = new TranscoderServiceClient(); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job_template.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job_template.js index 638c6376b49..0a59ee20ae1 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job_template.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job_template.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -27,8 +28,7 @@ function main(name) { // const name = 'abc123' // Imports the Transcoder library - const {TranscoderServiceClient} = - require('@google-cloud/video-transcoder').v1beta1; + const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1beta1; // Instantiates a client const transcoderClient = new TranscoderServiceClient(); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_job_templates.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_job_templates.js index 990b6a05c44..14250deb9d9 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_job_templates.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_job_templates.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -35,8 +36,7 @@ function main(parent) { // const pageToken = 'abc123' // Imports the Transcoder library - const {TranscoderServiceClient} = - require('@google-cloud/video-transcoder').v1beta1; + const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1beta1; // Instantiates a client const transcoderClient = new TranscoderServiceClient(); @@ -50,7 +50,7 @@ function main(parent) { // Run request const iterable = await transcoderClient.listJobTemplatesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_jobs.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_jobs.js index d0b8976b56e..44560552378 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_jobs.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_jobs.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -34,8 +35,7 @@ function main(parent) { // const pageToken = 'abc123' // Imports the Transcoder library - const {TranscoderServiceClient} = - require('@google-cloud/video-transcoder').v1beta1; + const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1beta1; // Instantiates a client const transcoderClient = new TranscoderServiceClient(); @@ -49,7 +49,7 @@ function main(parent) { // Run request const iterable = await transcoderClient.listJobsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-video-transcoder/src/v1/index.ts b/packages/google-cloud-video-transcoder/src/v1/index.ts index 337677124be..2f52b1a6d4d 100644 --- a/packages/google-cloud-video-transcoder/src/v1/index.ts +++ b/packages/google-cloud-video-transcoder/src/v1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// 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. diff --git a/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts b/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts index e257217cbdd..6b857059e26 100644 --- a/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts +++ b/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// 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. diff --git a/packages/google-cloud-video-transcoder/src/v1beta1/index.ts b/packages/google-cloud-video-transcoder/src/v1beta1/index.ts index 337677124be..2f52b1a6d4d 100644 --- a/packages/google-cloud-video-transcoder/src/v1beta1/index.ts +++ b/packages/google-cloud-video-transcoder/src/v1beta1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// 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. diff --git a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts index 3e5b3e75ccd..5060305ae86 100644 --- a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts +++ b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// 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. diff --git a/packages/google-cloud-video-transcoder/system-test/fixtures/sample/src/index.js b/packages/google-cloud-video-transcoder/system-test/fixtures/sample/src/index.js index a190b727ce9..280d21b0966 100644 --- a/packages/google-cloud-video-transcoder/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-video-transcoder/system-test/fixtures/sample/src/index.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// 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. diff --git a/packages/google-cloud-video-transcoder/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-video-transcoder/system-test/fixtures/sample/src/index.ts index 4f97d1ade59..bb267c52602 100644 --- a/packages/google-cloud-video-transcoder/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-video-transcoder/system-test/fixtures/sample/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// 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. diff --git a/packages/google-cloud-video-transcoder/system-test/install.ts b/packages/google-cloud-video-transcoder/system-test/install.ts index d2d61c0396f..6dd1eaadafa 100644 --- a/packages/google-cloud-video-transcoder/system-test/install.ts +++ b/packages/google-cloud-video-transcoder/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// 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. diff --git a/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts b/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts index 95ce1ac83c3..c4d77053469 100644 --- a/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts +++ b/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// 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. diff --git a/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1beta1.ts b/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1beta1.ts index 0fb78fe3a3b..b74b3662c8e 100644 --- a/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1beta1.ts +++ b/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// 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. From 11162d299595017b79311b4b1994a2c5faec3e7e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 4 Feb 2022 16:09:02 +0000 Subject: [PATCH 081/116] docs(nodejs): version support policy edits (#1346) (#153) --- .../google-cloud-video-transcoder/README.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-video-transcoder/README.md b/packages/google-cloud-video-transcoder/README.md index b8dfb7a095d..944b5f1790e 100644 --- a/packages/google-cloud-video-transcoder/README.md +++ b/packages/google-cloud-video-transcoder/README.md @@ -116,21 +116,21 @@ also contains samples. 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. -Client libraries targeting some end-of-life versions of Node.js are available, and -can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). -The dist-tags follow the naming convention `legacy-(version)`. - -_Legacy Node.js versions are supported as a best effort:_ +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: -* Legacy versions will not be tested in continuous integration. -* Some security patches may not be able to be backported. -* Dependencies will not be kept up-to-date, and features will not be backported. +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. -#### Legacy tags available - -* `legacy-8`: install client libraries from this dist-tag for versions - compatible with Node.js 8. +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-transcoder@legacy-8` installs client libraries +for versions compatible with Node.js 8. ## Versioning From debe5226ec888b4db932b7dbf808b8a0c88ef1f1 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 7 Feb 2022 16:53:48 -0800 Subject: [PATCH 082/116] chore(main): release 1.9.0 (#144) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-video-transcoder/CHANGELOG.md | 7 +++++++ packages/google-cloud-video-transcoder/package.json | 2 +- .../google-cloud-video-transcoder/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-video-transcoder/CHANGELOG.md b/packages/google-cloud-video-transcoder/CHANGELOG.md index db2fbd24d38..6db3f107a1c 100644 --- a/packages/google-cloud-video-transcoder/CHANGELOG.md +++ b/packages/google-cloud-video-transcoder/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.9.0](https://github.com/googleapis/nodejs-video-transcoder/compare/v1.8.1...v1.9.0) (2022-02-04) + + +### Features + +* **samples:** add samples and tests for adding captions to videos ([#143](https://github.com/googleapis/nodejs-video-transcoder/issues/143)) ([52ca4ff](https://github.com/googleapis/nodejs-video-transcoder/commit/52ca4ff401a21af3c825c1bbe6dc03947bd4c0e0)) + ### [1.8.1](https://www.github.com/googleapis/nodejs-video-transcoder/compare/v1.8.0...v1.8.1) (2021-12-02) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 70e5bb52d35..d76ae933b40 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/video-transcoder", - "version": "1.8.1", + "version": "1.9.0", "description": "Transcoder client for Node.js", "repository": "googleapis/nodejs-video-transcoder", "license": "Apache-2.0", diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index 0d9841517af..25ea16cca42 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/video-transcoder": "^1.8.1" + "@google-cloud/video-transcoder": "^1.9.0" }, "devDependencies": { "@google-cloud/storage": "^5.4.0", From b345549810fb792a64605314a4a2f8e35e7a5c9a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 8 Feb 2022 14:35:02 -0800 Subject: [PATCH 083/116] fix: Remove deprecated v1beta1 API that is no longer available (#154) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ๐Ÿฆ‰ Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md fix!: Remove deprecated v1beta1 API that is no longer available BREAKING CHANGE: PiperOrigin-RevId: 426957789 Source-Link: https://github.com/googleapis/googleapis/commit/42d9ed35aa5377065ef9bdb0df15df1a5f992e41 Source-Link: https://github.com/googleapis/googleapis-gen/commit/2e0f3f1e3837f82d4bb1bf1269b307dc68802bdc Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmUwZjNmMWUzODM3ZjgyZDRiYjFiZjEyNjliMzA3ZGM2ODgwMmJkYyJ9 * ๐Ÿฆ‰ Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: actually remove deprecated v1beta1 api * fix: change the default version Co-authored-by: Owl Bot Co-authored-by: Takashi Matsuo --- .../.repo-metadata.json | 2 +- .../linkinator.config.json | 10 +- .../video/transcoder/v1beta1/resources.proto | 944 -- .../video/transcoder/v1beta1/services.proto | 249 - .../protos/protos.d.ts | 5715 ------- .../protos/protos.js | 13839 ---------------- .../protos/protos.json | 1367 -- .../v1beta1/transcoder_service.create_job.js | 59 - .../transcoder_service.create_job_template.js | 67 - .../v1beta1/transcoder_service.delete_job.js | 54 - .../transcoder_service.delete_job_template.js | 54 - .../v1beta1/transcoder_service.get_job.js | 54 - .../transcoder_service.get_job_template.js | 55 - .../transcoder_service.list_job_templates.js | 65 - .../v1beta1/transcoder_service.list_jobs.js | 64 - .../src/index.ts | 9 +- .../src/v1beta1/gapic_metadata.json | 111 - .../src/v1beta1/index.ts | 19 - .../src/v1beta1/transcoder_service_client.ts | 1489 -- .../transcoder_service_client_config.json | 66 - .../transcoder_service_proto_list.json | 4 - .../test/gapic_transcoder_service_v1beta1.ts | 1687 -- 22 files changed, 13 insertions(+), 25970 deletions(-) delete mode 100644 packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1beta1/resources.proto delete mode 100644 packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1beta1/services.proto delete mode 100644 packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job.js delete mode 100644 packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job_template.js delete mode 100644 packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job.js delete mode 100644 packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job_template.js delete mode 100644 packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job.js delete mode 100644 packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job_template.js delete mode 100644 packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_job_templates.js delete mode 100644 packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_jobs.js delete mode 100644 packages/google-cloud-video-transcoder/src/v1beta1/gapic_metadata.json delete mode 100644 packages/google-cloud-video-transcoder/src/v1beta1/index.ts delete mode 100644 packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts delete mode 100644 packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client_config.json delete mode 100644 packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_proto_list.json delete mode 100644 packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1beta1.ts diff --git a/packages/google-cloud-video-transcoder/.repo-metadata.json b/packages/google-cloud-video-transcoder/.repo-metadata.json index fc9fe8d301d..fdb83f66a62 100644 --- a/packages/google-cloud-video-transcoder/.repo-metadata.json +++ b/packages/google-cloud-video-transcoder/.repo-metadata.json @@ -10,7 +10,7 @@ "repo": "googleapis/nodejs-video-transcoder", "issue_tracker": "https://github.com/googleapis/nodejs-video-transcoder/issues", "name_pretty": "Transcoder API", - "default_version": "v1beta1", + "default_version": "v1", "api_shortname": "transcoder", "library_type": "GAPIC_AUTO" } diff --git a/packages/google-cloud-video-transcoder/linkinator.config.json b/packages/google-cloud-video-transcoder/linkinator.config.json index 0121dfa684f..befd23c8633 100644 --- a/packages/google-cloud-video-transcoder/linkinator.config.json +++ b/packages/google-cloud-video-transcoder/linkinator.config.json @@ -3,8 +3,14 @@ "skip": [ "https://codecov.io/gh/googleapis/", "www.googleapis.com", - "img.shields.io" + "img.shields.io", + "https://console.cloud.google.com/cloudshell", + "https://support.google.com" ], "silent": true, - "concurrency": 5 + "concurrency": 5, + "retry": true, + "retryErrors": true, + "retryErrorsCount": 5, + "retryErrorsJitter": 3000 } diff --git a/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1beta1/resources.proto b/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1beta1/resources.proto deleted file mode 100644 index 650b79885c6..00000000000 --- a/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1beta1/resources.proto +++ /dev/null @@ -1,944 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// 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.transcoder.v1beta1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/video/transcoder/v1beta1;transcoder"; -option java_multiple_files = true; -option java_outer_classname = "ResourcesProto"; -option java_package = "com.google.cloud.video.transcoder.v1beta1"; - -// Transcoding job resource. -message Job { - option (google.api.resource) = { - type: "transcoder.googleapis.com/Job" - pattern: "projects/{project}/locations/{location}/jobs/{job}" - }; - - // The origin URI. - message OriginUri { - // HLS manifest URI per https://tools.ietf.org/html/rfc8216#section-4.3.4. - // If multiple HLS manifests are created, only the first one is listed. - string hls = 1; - - // Dash manifest URI. If multiple Dash manifests are created, only the first - // one is listed. - string dash = 2; - } - - // The current state of the job. - enum ProcessingState { - // The processing state is not specified. - PROCESSING_STATE_UNSPECIFIED = 0; - - // The job is enqueued and will be picked up for processing soon. - PENDING = 1; - - // The job is being processed. - RUNNING = 2; - - // The job has been completed successfully. - SUCCEEDED = 3; - - // The job has failed. For additional information, see `failure_reason` and - // `failure_details` - FAILED = 4; - } - - // The resource name of the job. - // Format: `projects/{project}/locations/{location}/jobs/{job}` - string name = 1; - - // Input only. Specify the `input_uri` to populate empty `uri` fields in each element of - // `Job.config.inputs` or `JobTemplate.config.inputs` when using template. - // URI of the media. Input files must be at least 5 seconds in duration and - // stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). - string input_uri = 2 [(google.api.field_behavior) = INPUT_ONLY]; - - // Input only. Specify the `output_uri` to populate an empty `Job.config.output.uri` or - // `JobTemplate.config.output.uri` when using template. - // URI for the output file(s). For example, `gs://my-bucket/outputs/`. - string output_uri = 3 [(google.api.field_behavior) = INPUT_ONLY]; - - // Specify the `job_config` for the transcoding job. If you don't specify the - // `job_config`, the API selects `templateId`; this template ID is set to - // `preset/web-hd` by default. When you use a `template_id` to create a job, - // the `Job.config` is populated by the `JobTemplate.config`.
- oneof job_config { - // Input only. Specify the `template_id` to use for populating `Job.config`. The default - // is `preset/web-hd`. - // - // Preset Transcoder templates: - // - `preset/{preset_id}` - // - // - User defined JobTemplate: - // `{job_template_id}` - string template_id = 4 [(google.api.field_behavior) = INPUT_ONLY]; - - // The configuration for this job. - JobConfig config = 5; - } - - // Specify the priority of the job. Enter a value between 0 and 100, where 0 - // is the lowest priority and 100 is the highest priority. The default is 0. - int32 priority = 6; - - // Output only. The origin URI. - // - OriginUri origin_uri = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The current state of the job. - ProcessingState state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Estimated fractional progress, from `0` to `1` for each - // step. - // - Progress progress = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A description of the reason for the failure. This property is - // always present when `state` is `FAILED`. - string failure_reason = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. List of failure details. This property may contain additional - // information about the failure when `failure_reason` is present. - // - repeated FailureDetail failure_details = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time the job was created. - google.protobuf.Timestamp create_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time the transcoding started. - google.protobuf.Timestamp start_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time the transcoding finished. - google.protobuf.Timestamp end_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Job time to live value in days, which will be effective after job - // completion. Job should be deleted automatically after the given TTL. Enter - // a value between 1 and 90. The default is 30. - int32 ttl_after_completion_days = 15; -} - -// Transcoding job template resource. -message JobTemplate { - option (google.api.resource) = { - type: "transcoder.googleapis.com/JobTemplate" - pattern: "projects/{project}/locations/{location}/jobTemplates/{job_template}" - }; - - // The resource name of the job template. - // Format: - // `projects/{project}/locations/{location}/jobTemplates/{job_template}` - string name = 1; - - // The configuration for this template. - JobConfig config = 2; -} - -// Job configuration -message JobConfig { - // List of input assets stored in Cloud Storage. - repeated Input inputs = 1; - - // List of `Edit atom`s. Defines the ultimate timeline of the resulting - // file or manifest. - repeated EditAtom edit_list = 2; - - // List of elementary streams. - repeated ElementaryStream elementary_streams = 3; - - // List of multiplexing settings for output streams. - repeated MuxStream mux_streams = 4; - - // List of output manifests. - repeated Manifest manifests = 5; - - // Output configuration. - Output output = 6; - - // List of ad breaks. Specifies where to insert ad break tags in the output - // manifests. - repeated AdBreak ad_breaks = 7; - - // Destination on Pub/Sub. - PubsubDestination pubsub_destination = 8; - - // List of output sprite sheets. - repeated SpriteSheet sprite_sheets = 9; - - // List of overlays on the output video, in descending Z-order. - repeated Overlay overlays = 10; -} - -// Input asset. -message Input { - // A unique key for this input. Must be specified when using advanced - // mapping and edit lists. - string key = 1; - - // URI of the media. Input files must be at least 5 seconds in duration and - // stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). - // If empty, the value will be populated from `Job.input_uri`. - string uri = 2; - - // Preprocessing configurations. - PreprocessingConfig preprocessing_config = 3; -} - -// Location of output file(s) in a Cloud Storage bucket. -message Output { - // URI for the output file(s). For example, `gs://my-bucket/outputs/`. - // If empty the value is populated from `Job.output_uri`. - string uri = 1; -} - -// Edit atom. -message EditAtom { - // A unique key for this atom. Must be specified when using advanced - // mapping. - string key = 1; - - // List of `Input.key`s identifying files that should be used in this atom. - // The listed `inputs` must have the same timeline. - repeated string inputs = 2; - - // End time in seconds for the atom, relative to the input file timeline. - // When `end_time_offset` is not specified, the `inputs` are used until - // the end of the atom. - google.protobuf.Duration end_time_offset = 3; - - // Start time in seconds for the atom, relative to the input file timeline. - // The default is `0s`. - google.protobuf.Duration start_time_offset = 4; -} - -// Ad break. -message AdBreak { - // Start time in seconds for the ad break, relative to the output file - // timeline. The default is `0s`. - google.protobuf.Duration start_time_offset = 1; -} - -// Encoding of an input file such as an audio, video, or text track. -// Elementary streams must be packaged before -// mapping and sharing between different output formats. -message ElementaryStream { - // A unique key for this elementary stream. - string key = 4; - - // Encoding of an audio, video, or text track. - oneof elementary_stream { - // Encoding of a video stream. - VideoStream video_stream = 1; - - // Encoding of an audio stream. - AudioStream audio_stream = 2; - - // Encoding of a text stream. For example, closed captions or subtitles. - TextStream text_stream = 3; - } -} - -// Multiplexing settings for output stream. -message MuxStream { - // A unique key for this multiplexed stream. HLS media manifests will be - // named `MuxStream.key` with the `".m3u8"` extension suffix. - string key = 1; - - // The name of the generated file. The default is `MuxStream.key` with the - // extension suffix corresponding to the `MuxStream.container`. - // - // Individual segments also have an incremental 10-digit zero-padded suffix - // starting from 0 before the extension, such as `"mux_stream0000000123.ts"`. - string file_name = 2; - - // The container format. The default is `"mp4"` - // - // Supported container formats: - // - 'ts' - // - 'fmp4'- the corresponding file extension is `".m4s"` - // - 'mp4' - // - 'vtt' - string container = 3; - - // List of `ElementaryStream.key`s multiplexed in this stream. - repeated string elementary_streams = 4; - - // Segment settings for `"ts"`, `"fmp4"` and `"vtt"`. - SegmentSettings segment_settings = 5; - - // Encryption settings. - Encryption encryption = 6; -} - -// Manifest configuration. -message Manifest { - // The manifest type can be either `"HLS"` or `"DASH"`. - enum ManifestType { - // The manifest type is not specified. - MANIFEST_TYPE_UNSPECIFIED = 0; - - // Create `"HLS"` manifest. The corresponding file extension is `".m3u8"`. - HLS = 1; - - // Create `"DASH"` manifest. The corresponding file extension is `".mpd"`. - DASH = 2; - } - - // The name of the generated file. The default is `"manifest"` with the - // extension suffix corresponding to the `Manifest.type`. - string file_name = 1; - - // Required. Type of the manifest, can be "HLS" or "DASH". - ManifestType type = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. List of user given `MuxStream.key`s that should appear in this manifest. - // - // When `Manifest.type` is `HLS`, a media manifest with name `MuxStream.key` - // and `.m3u8` extension is generated for each element of the - // `Manifest.mux_streams`. - repeated string mux_streams = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// A Pub/Sub destination. -message PubsubDestination { - // The name of the Pub/Sub topic to publish job completion notification - // to. For example: `projects/{project}/topics/{topic}`. - string topic = 1; -} - -// Sprite sheet configuration. -message SpriteSheet { - // Format type. The default is `"jpeg"`. - // - // Supported formats: - // - 'jpeg' - string format = 1; - - // Required. File name prefix for the generated sprite sheets. - // - // Each sprite sheet has an incremental 10-digit zero-padded suffix starting - // from 0 before the extension, such as `"sprite_sheet0000000123.jpeg"`. - string file_prefix = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The width of sprite in pixels. Must be an even integer. To preserve the - // source aspect ratio, set the [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1beta1.SpriteSheet.sprite_width_pixels] field or - // the [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1beta1.SpriteSheet.sprite_height_pixels] field, but not both (the API will - // automatically calculate the missing field). - int32 sprite_width_pixels = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The height of sprite in pixels. Must be an even integer. To preserve the - // source aspect ratio, set the [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1beta1.SpriteSheet.sprite_height_pixels] field or - // the [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1beta1.SpriteSheet.sprite_width_pixels] field, but not both (the API will - // automatically calculate the missing field). - int32 sprite_height_pixels = 4 [(google.api.field_behavior) = REQUIRED]; - - // The maximum number of sprites per row in a sprite sheet. The default is 0, - // which indicates no maximum limit. - int32 column_count = 5; - - // The maximum number of rows per sprite sheet. When the sprite sheet is full, - // a new sprite sheet is created. The default is 0, which indicates no maximum - // limit. - int32 row_count = 6; - - // Start time in seconds, relative to the output file timeline. Determines the - // first sprite to pick. The default is `0s`. - google.protobuf.Duration start_time_offset = 7; - - // End time in seconds, relative to the output file timeline. When - // `end_time_offset` is not specified, the sprites are generated until the end - // of the output file. - google.protobuf.Duration end_time_offset = 8; - - // Specify either total number of sprites or interval to create sprites. - oneof extraction_strategy { - // Total number of sprites. Create the specified number of sprites - // distributed evenly across the timeline of the output media. The default - // is 100. - int32 total_count = 9; - - // Starting from `0s`, create sprites at regular intervals. Specify the - // interval value in seconds. - google.protobuf.Duration interval = 10; - } - - // The quality of the generated sprite sheet. Enter a value between 1 - // and 100, where 1 is the lowest quality and 100 is the highest quality. - // The default is 100. A high quality value corresponds to a low image data - // compression ratio. - int32 quality = 11; -} - -// Overlay configuration. -message Overlay { - // 2D normalized coordinates. Default: `{0.0, 0.0}` - message NormalizedCoordinate { - // Normalized x coordinate. - double x = 1; - - // Normalized y coordinate. - double y = 2; - } - - // Overlaid jpeg image. - message Image { - // Required. URI of the JPEG image in Cloud Storage. For example, - // `gs://bucket/inputs/image.jpeg`. JPEG is the only supported image type. - string uri = 1 [(google.api.field_behavior) = REQUIRED]; - - // Normalized image resolution, based on output video resolution. Valid - // values: `0.0`โ€“`1.0`. To respect the original image aspect ratio, set - // either `x` or `y` to `0.0`. To use the original image resolution, set - // both `x` and `y` to `0.0`. - NormalizedCoordinate resolution = 2; - - // Target image opacity. Valid values are from `1.0` (solid, default) to - // `0.0` (transparent), exclusive. Set this to a value greater than `0.0`. - double alpha = 3; - } - - // Display static overlay object. - message AnimationStatic { - // Normalized coordinates based on output video resolution. Valid - // values: `0.0`โ€“`1.0`. `xy` is the upper-left coordinate of the overlay - // object. For example, use the x and y coordinates {0,0} to position the - // top-left corner of the overlay animation in the top-left corner of the - // output video. - NormalizedCoordinate xy = 1; - - // The time to start displaying the overlay object, in seconds. Default: 0 - google.protobuf.Duration start_time_offset = 2; - } - - // Display overlay object with fade animation. - message AnimationFade { - // Required. Type of fade animation: `FADE_IN` or `FADE_OUT`. - FadeType fade_type = 1 [(google.api.field_behavior) = REQUIRED]; - - // Normalized coordinates based on output video resolution. Valid - // values: `0.0`โ€“`1.0`. `xy` is the upper-left coordinate of the overlay - // object. For example, use the x and y coordinates {0,0} to position the - // top-left corner of the overlay animation in the top-left corner of the - // output video. - NormalizedCoordinate xy = 2; - - // The time to start the fade animation, in seconds. Default: 0 - google.protobuf.Duration start_time_offset = 3; - - // The time to end the fade animation, in seconds. Default: - // `start_time_offset` + 1s - google.protobuf.Duration end_time_offset = 4; - } - - // End previous overlay animation from the video. Without AnimationEnd, the - // overlay object will keep the state of previous animation until the end of - // the video. - message AnimationEnd { - // The time to end overlay object, in seconds. Default: 0 - google.protobuf.Duration start_time_offset = 1; - } - - // Animation types. - message Animation { - // Animations can be static or fade, or they can end the previous animation. - oneof animation_type { - // Display static overlay object. - AnimationStatic animation_static = 1; - - // Display overlay object with fade animation. - AnimationFade animation_fade = 2; - - // End previous animation. - AnimationEnd animation_end = 3; - } - } - - // Fade type for the overlay: `FADE_IN` or `FADE_OUT`. - enum FadeType { - // The fade type is not specified. - FADE_TYPE_UNSPECIFIED = 0; - - // Fade the overlay object into view. - FADE_IN = 1; - - // Fade the overlay object out of view. - FADE_OUT = 2; - } - - // Image overlay. - Image image = 1; - - // List of Animations. The list should be chronological, without any time - // overlap. - repeated Animation animations = 2; -} - -// Preprocessing configurations. -message PreprocessingConfig { - // Color preprocessing configuration. - message Color { - // Control color saturation of the video. Enter a value between -1 and 1, - // where -1 is fully desaturated and 1 is maximum saturation. 0 is no - // change. The default is 0. - double saturation = 1; - - // Control black and white contrast of the video. Enter a value between -1 - // and 1, where -1 is minimum contrast and 1 is maximum contrast. 0 is no - // change. The default is 0. - double contrast = 2; - - // Control brightness of the video. Enter a value between -1 and 1, where -1 - // is minimum brightness and 1 is maximum brightness. 0 is no change. The - // default is 0. - double brightness = 3; - } - - // Denoise preprocessing configuration. - message Denoise { - // Set strength of the denoise. Enter a value between 0 and 1. The higher - // the value, the smoother the image. 0 is no denoising. The default is 0. - double strength = 1; - - // Set the denoiser mode. The default is `"standard"`. - // - // Supported denoiser modes: - // - 'standard' - // - 'grain' - string tune = 2; - } - - // Deblock preprocessing configuration. - message Deblock { - // Set strength of the deblocker. Enter a value between 0 and 1. The higher - // the value, the stronger the block removal. 0 is no deblocking. The - // default is 0. - double strength = 1; - - // Enable deblocker. The default is `false`. - bool enabled = 2; - } - - // Audio preprocessing configuration. - message Audio { - // Specify audio loudness normalization in loudness units relative to full - // scale (LUFS). Enter a value between -24 and 0 (the default), where: - // - // * -24 is the Advanced Television Systems Committee (ATSC A/85) standard - // * -23 is the EU R128 broadcast standard - // * -19 is the prior standard for online mono audio - // * -18 is the ReplayGain standard - // * -16 is the prior standard for stereo audio - // * -14 is the new online audio standard recommended by Spotify, as well - // as Amazon Echo - // * 0 disables normalization - double lufs = 1; - - // Enable boosting high frequency components. The default is `false`. - bool high_boost = 2; - - // Enable boosting low frequency components. The default is `false`. - bool low_boost = 3; - } - - // Video cropping configuration for the input video. The cropped input video - // is scaled to match the output resolution. - message Crop { - // The number of pixels to crop from the top. The default is 0. - int32 top_pixels = 1; - - // The number of pixels to crop from the bottom. The default is 0. - int32 bottom_pixels = 2; - - // The number of pixels to crop from the left. The default is 0. - int32 left_pixels = 3; - - // The number of pixels to crop from the right. The default is 0. - int32 right_pixels = 4; - } - - // Pad filter configuration for the input video. The padded input video - // is scaled after padding with black to match the output resolution. - message Pad { - // The number of pixels to add to the top. The default is 0. - int32 top_pixels = 1; - - // The number of pixels to add to the bottom. The default is 0. - int32 bottom_pixels = 2; - - // The number of pixels to add to the left. The default is 0. - int32 left_pixels = 3; - - // The number of pixels to add to the right. The default is 0. - int32 right_pixels = 4; - } - - // Color preprocessing configuration. - Color color = 1; - - // Denoise preprocessing configuration. - Denoise denoise = 2; - - // Deblock preprocessing configuration. - Deblock deblock = 3; - - // Audio preprocessing configuration. - Audio audio = 4; - - // Specify the video cropping configuration. - Crop crop = 5; - - // Specify the video pad filter configuration. - Pad pad = 6; -} - -// Video stream resource. -message VideoStream { - // Codec type. The following codecs are supported: - // - // * `h264` (default) - // * `h265` - // * `vp9` - string codec = 1; - - // Enforces the specified codec profile. The following profiles are supported: - // - // * `baseline` - // * `main` - // * `high` (default) - // - // The available options are - // FFmpeg-compatible. Note that certain values for this - // field may cause the transcoder to override other fields you set in the - // `VideoStream` message. - string profile = 2; - - // Enforces the specified codec tune. The available options are - // FFmpeg-compatible. Note that certain values for this - // field may cause the transcoder to override other fields you set in the - // `VideoStream` message. - string tune = 3; - - // Enforces the specified codec preset. The default is `veryfast`. The - // available options are - // FFmpeg-compatible. Note that certain values for this - // field may cause the transcoder to override other fields you set in the - // `VideoStream` message. - string preset = 4; - - // The height of the video in pixels. Must be an even integer. - // When not specified, the height is adjusted to match the specified width and - // input aspect ratio. If both are omitted, the input height is used. - int32 height_pixels = 5; - - // The width of the video in pixels. Must be an even integer. - // When not specified, the width is adjusted to match the specified height and - // input aspect ratio. If both are omitted, the input width is used. - int32 width_pixels = 6; - - // Pixel format to use. The default is `"yuv420p"`. - // - // Supported pixel formats: - // - 'yuv420p' pixel format. - // - 'yuv422p' pixel format. - // - 'yuv444p' pixel format. - // - 'yuv420p10' 10-bit HDR pixel format. - // - 'yuv422p10' 10-bit HDR pixel format. - // - 'yuv444p10' 10-bit HDR pixel format. - // - 'yuv420p12' 12-bit HDR pixel format. - // - 'yuv422p12' 12-bit HDR pixel format. - // - 'yuv444p12' 12-bit HDR pixel format. - string pixel_format = 7; - - // Required. The video bitrate in bits per second. The minimum value is 1,000. - // The maximum value for H264/H265 is 800,000,000. The maximum value for VP9 - // is 480,000,000. - int32 bitrate_bps = 8 [(google.api.field_behavior) = REQUIRED]; - - // Specify the `rate_control_mode`. The default is `"vbr"`. - // - // Supported rate control modes: - // - 'vbr' - variable bitrate - // - 'crf' - constant rate factor - string rate_control_mode = 9; - - // Use two-pass encoding strategy to achieve better video quality. - // `VideoStream.rate_control_mode` must be `"vbr"`. The default is `false`. - bool enable_two_pass = 10; - - // Target CRF level. Must be between 10 and 36, where 10 is the highest - // quality and 36 is the most efficient compression. The default is 21. - int32 crf_level = 11; - - // Size of the Video Buffering Verifier (VBV) buffer in bits. Must be greater - // than zero. The default is equal to `VideoStream.bitrate_bps`. - int32 vbv_size_bits = 12; - - // Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. Must - // be greater than zero. The default is equal to 90% of - // `VideoStream.vbv_size_bits`. - int32 vbv_fullness_bits = 13; - - // Specifies whether an open Group of Pictures (GOP) structure should be - // allowed or not. The default is `false`. - bool allow_open_gop = 14; - - // GOP mode can be either by frame count or duration. - oneof gop_mode { - // Select the GOP size based on the specified frame count. Must be greater - // than zero. - int32 gop_frame_count = 15; - - // Select the GOP size based on the specified duration. The default is - // `"3s"`. Note that `gopDuration` must be less than or equal to - // [`segmentDuration`](#SegmentSettings), and - // [`segmentDuration`](#SegmentSettings) must be divisible by `gopDuration`. - google.protobuf.Duration gop_duration = 16; - } - - // The entropy coder to use. The default is `"cabac"`. - // - // Supported entropy coders: - // - 'cavlc' - // - 'cabac' - string entropy_coder = 17; - - // Allow B-pyramid for reference frame selection. This may not be supported - // on all decoders. The default is `false`. - bool b_pyramid = 18; - - // The number of consecutive B-frames. Must be greater than or equal to zero. - // Must be less than `VideoStream.gop_frame_count` if set. The default is 0. - int32 b_frame_count = 19; - - // Required. The target video frame rate in frames per second (FPS). Must be less than - // or equal to 120. Will default to the input frame rate if larger than the - // input frame rate. The API will generate an output FPS that is divisible by - // the input FPS, and smaller or equal to the target FPS. See - // [Calculate frame - // rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - // more information. - double frame_rate = 20 [(google.api.field_behavior) = REQUIRED]; - - // Specify the intensity of the adaptive quantizer (AQ). Must be between 0 and - // 1, where 0 disables the quantizer and 1 maximizes the quantizer. A - // higher value equals a lower bitrate but smoother image. The default is 0. - double aq_strength = 21; -} - -// Audio stream resource. -message AudioStream { - // The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`. - message AudioAtom { - // The audio channel. - message AudioChannel { - // Identifies which input file, track, and channel should be used. - message AudioChannelInput { - // Required. The `Input.key` that identifies the input file. - string key = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The zero-based index of the track in the input file. - int32 track = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The zero-based index of the channel in the input file. - int32 channel = 3 [(google.api.field_behavior) = REQUIRED]; - - // Audio volume control in dB. Negative values decrease volume, - // positive values increase. The default is 0. - double gain_db = 4; - } - - // List of `Job.inputs` for this audio channel. - repeated AudioChannelInput inputs = 2; - } - - // Required. The `EditAtom.key` that references the atom with audio inputs in the - // `Job.edit_list`. - string key = 1 [(google.api.field_behavior) = REQUIRED]; - - // List of `Channel`s for this audio stream. - // for in-depth explanation. - repeated AudioChannel channels = 2; - } - - // The codec for this audio stream. The default is `"aac"`. - // - // Supported audio codecs: - // - 'aac' - // - 'aac-he' - // - 'aac-he-v2' - // - 'mp3' - // - 'ac3' - // - 'eac3' - string codec = 1; - - // Required. Audio bitrate in bits per second. Must be between 1 and 10,000,000. - int32 bitrate_bps = 2 [(google.api.field_behavior) = REQUIRED]; - - // Number of audio channels. Must be between 1 and 6. The default is 2. - int32 channel_count = 3; - - // A list of channel names specifying layout of the audio channels. - // This only affects the metadata embedded in the container headers, if - // supported by the specified format. The default is `["fl", "fr"]`. - // - // Supported channel names: - // - 'fl' - Front left channel - // - 'fr' - Front right channel - // - 'sl' - Side left channel - // - 'sr' - Side right channel - // - 'fc' - Front center channel - // - 'lfe' - Low frequency - repeated string channel_layout = 4; - - // The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`. - repeated AudioAtom mapping = 5; - - // The audio sample rate in Hertz. The default is 48000 Hertz. - int32 sample_rate_hertz = 6; -} - -// Encoding of a text stream. For example, closed captions or subtitles. -message TextStream { - // The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`. - message TextAtom { - // Identifies which input file and track should be used. - message TextInput { - // Required. The `Input.key` that identifies the input file. - string key = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The zero-based index of the track in the input file. - int32 track = 2 [(google.api.field_behavior) = REQUIRED]; - } - - // Required. The `EditAtom.key` that references atom with text inputs in the - // `Job.edit_list`. - string key = 1 [(google.api.field_behavior) = REQUIRED]; - - // List of `Job.inputs` that should be embedded in this atom. Only one - // input is supported. - repeated TextInput inputs = 2; - } - - // The codec for this text stream. The default is `"webvtt"`. - // - // Supported text codecs: - // - 'srt' - // - 'ttml' - // - 'cea608' - // - 'cea708' - // - 'webvtt' - string codec = 1; - - // Required. The BCP-47 language code, such as `"en-US"` or `"sr-Latn"`. For more - // information, see - // https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - string language_code = 2 [(google.api.field_behavior) = REQUIRED]; - - // The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`. - repeated TextAtom mapping = 3; -} - -// Segment settings for `"ts"`, `"fmp4"` and `"vtt"`. -message SegmentSettings { - // Duration of the segments in seconds. The default is `"6.0s"`. Note that - // `segmentDuration` must be greater than or equal to - // [`gopDuration`](#videostream), and `segmentDuration` must be divisible by - // [`gopDuration`](#videostream). - google.protobuf.Duration segment_duration = 1; - - // Required. Create an individual segment file. The default is `false`. - bool individual_segments = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Encryption settings. -message Encryption { - // Configuration for AES-128 encryption. - message Aes128Encryption { - // Required. URI of the key delivery service. This URI is inserted into the M3U8 - // header. - string key_uri = 1 [(google.api.field_behavior) = REQUIRED]; - } - - // Configuration for SAMPLE-AES encryption. - message SampleAesEncryption { - // Required. URI of the key delivery service. This URI is inserted into the M3U8 - // header. - string key_uri = 1 [(google.api.field_behavior) = REQUIRED]; - } - - // Configuration for MPEG Common Encryption (MPEG-CENC). - message MpegCommonEncryption { - // Required. 128 bit Key ID represented as lowercase hexadecimal digits for use with - // common encryption. - string key_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Specify the encryption scheme. - // - // Supported encryption schemes: - // - 'cenc' - // - 'cbcs' - string scheme = 2 [(google.api.field_behavior) = REQUIRED]; - } - - // Required. 128 bit encryption key represented as lowercase hexadecimal digits. - string key = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. 128 bit Initialization Vector (IV) represented as lowercase hexadecimal - // digits. - string iv = 2 [(google.api.field_behavior) = REQUIRED]; - - // Encryption mode can be either `aes` or `cenc`. - oneof encryption_mode { - // Configuration for AES-128 encryption. - Aes128Encryption aes_128 = 3; - - // Configuration for SAMPLE-AES encryption. - SampleAesEncryption sample_aes = 4; - - // Configuration for MPEG Common Encryption (MPEG-CENC). - MpegCommonEncryption mpeg_cenc = 5; - } -} - -// Estimated fractional progress for each step, from `0` to `1`. -message Progress { - // Estimated fractional progress for `analyzing` step. - double analyzed = 1; - - // Estimated fractional progress for `encoding` step. - double encoded = 2; - - // Estimated fractional progress for `uploading` step. - double uploaded = 3; - - // Estimated fractional progress for `notifying` step. - double notified = 4; -} - -// Additional information about the reasons for the failure. -message FailureDetail { - // A description of the failure. - string description = 1; -} diff --git a/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1beta1/services.proto b/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1beta1/services.proto deleted file mode 100644 index 1cfa185e600..00000000000 --- a/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1beta1/services.proto +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// 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.transcoder.v1beta1; - -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/transcoder/v1beta1/resources.proto"; -import "google/protobuf/empty.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/video/transcoder/v1beta1;transcoder"; -option java_multiple_files = true; -option java_outer_classname = "ServicesProto"; -option java_package = "com.google.cloud.video.transcoder.v1beta1"; - -// Using the Transcoder API, you can queue asynchronous jobs for transcoding -// media into various output formats. Output formats may include different -// streaming standards such as HTTP Live Streaming (HLS) and Dynamic Adaptive -// Streaming over HTTP (DASH). You can also customize jobs using advanced -// features such as Digital Rights Management (DRM), audio equalization, content -// concatenation, and digital ad-stitch ready content generation. -service TranscoderService { - option deprecated = true; - option (google.api.default_host) = "transcoder.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Creates a job in the specified region. - rpc CreateJob(CreateJobRequest) returns (Job) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*}/jobs" - body: "job" - }; - option (google.api.method_signature) = "parent,job"; - } - - // Lists jobs in the specified region. - rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*}/jobs" - }; - option (google.api.method_signature) = "parent"; - } - - // Returns the job data. - rpc GetJob(GetJobRequest) returns (Job) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/*/jobs/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Deletes a job. - rpc DeleteJob(DeleteJobRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/locations/*/jobs/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a job template in the specified region. - rpc CreateJobTemplate(CreateJobTemplateRequest) returns (JobTemplate) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*}/jobTemplates" - body: "job_template" - }; - option (google.api.method_signature) = "parent,job_template,job_template_id"; - } - - // Lists job templates in the specified region. - rpc ListJobTemplates(ListJobTemplatesRequest) returns (ListJobTemplatesResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*}/jobTemplates" - }; - option (google.api.method_signature) = "parent"; - } - - // Returns the job template data. - rpc GetJobTemplate(GetJobTemplateRequest) returns (JobTemplate) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/*/jobTemplates/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Deletes a job template. - rpc DeleteJobTemplate(DeleteJobTemplateRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/locations/*/jobTemplates/*}" - }; - option (google.api.method_signature) = "name"; - } -} - -// Request message for `TranscoderService.CreateJob`. -message CreateJobRequest { - // Required. The parent location to create and process this job. - // Format: `projects/{project}/locations/{location}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. Parameters for creating transcoding job. - Job job = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for `TranscoderService.ListJobs`. -// The parent location from which to retrieve the collection of jobs. -message ListJobsRequest { - // Required. Format: `projects/{project}/locations/{location}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // 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; -} - -// Request message for `TranscoderService.GetJob`. -message GetJobRequest { - // Required. The name of the job to retrieve. - // Format: `projects/{project}/locations/{location}/jobs/{job}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "transcoder.googleapis.com/Job" - } - ]; -} - -// Request message for `TranscoderService.DeleteJob`. -message DeleteJobRequest { - // Required. The name of the job to delete. - // Format: `projects/{project}/locations/{location}/jobs/{job}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "transcoder.googleapis.com/Job" - } - ]; -} - -// Response message for `TranscoderService.ListJobs`. -message ListJobsResponse { - // List of jobs in the specified region. - repeated Job jobs = 1; - - // The pagination token. - string next_page_token = 2; -} - -// Request message for `TranscoderService.CreateJobTemplate`. -message CreateJobTemplateRequest { - // Required. The parent location to create this job template. - // Format: `projects/{project}/locations/{location}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. Parameters for creating job template. - JobTemplate job_template = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The ID to use for the job template, which will become the final component - // of the job template's resource name. - // - // This value should be 4-63 characters, and valid characters must match the - // regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. - string job_template_id = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for `TranscoderService.ListJobTemplates`. -message ListJobTemplatesRequest { - // Required. The parent location from which to retrieve the collection of job templates. - // Format: `projects/{project}/locations/{location}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // 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; -} - -// Request message for `TranscoderService.GetJobTemplate`. -message GetJobTemplateRequest { - // Required. The name of the job template to retrieve. - // Format: - // `projects/{project}/locations/{location}/jobTemplates/{job_template}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "transcoder.googleapis.com/JobTemplate" - } - ]; -} - -// Request message for `TranscoderService.DeleteJobTemplate`. -message DeleteJobTemplateRequest { - // Required. The name of the job template to delete. - // `projects/{project}/locations/{location}/jobTemplates/{job_template}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "transcoder.googleapis.com/JobTemplate" - } - ]; -} - -// Response message for `TranscoderService.ListJobTemplates`. -message ListJobTemplatesResponse { - // List of job templates in the specified region. - repeated JobTemplate job_templates = 1; - - // The pagination token. - string next_page_token = 2; -} diff --git a/packages/google-cloud-video-transcoder/protos/protos.d.ts b/packages/google-cloud-video-transcoder/protos/protos.d.ts index 3fe5c6124a0..040d0ba0b99 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.d.ts +++ b/packages/google-cloud-video-transcoder/protos/protos.d.ts @@ -5239,5721 +5239,6 @@ export namespace google { public toJSON(): { [k: string]: any }; } } - - /** Namespace v1beta1. */ - namespace v1beta1 { - - /** Properties of a Job. */ - interface IJob { - - /** Job name */ - name?: (string|null); - - /** Job inputUri */ - inputUri?: (string|null); - - /** Job outputUri */ - outputUri?: (string|null); - - /** Job templateId */ - templateId?: (string|null); - - /** Job config */ - config?: (google.cloud.video.transcoder.v1beta1.IJobConfig|null); - - /** Job priority */ - priority?: (number|null); - - /** Job originUri */ - originUri?: (google.cloud.video.transcoder.v1beta1.Job.IOriginUri|null); - - /** Job state */ - state?: (google.cloud.video.transcoder.v1beta1.Job.ProcessingState|keyof typeof google.cloud.video.transcoder.v1beta1.Job.ProcessingState|null); - - /** Job progress */ - progress?: (google.cloud.video.transcoder.v1beta1.IProgress|null); - - /** Job failureReason */ - failureReason?: (string|null); - - /** Job failureDetails */ - failureDetails?: (google.cloud.video.transcoder.v1beta1.IFailureDetail[]|null); - - /** Job createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Job startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** Job endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** Job ttlAfterCompletionDays */ - ttlAfterCompletionDays?: (number|null); - } - - /** Represents a Job. */ - class Job implements IJob { - - /** - * Constructs a new Job. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.IJob); - - /** Job name. */ - public name: string; - - /** Job inputUri. */ - public inputUri: string; - - /** Job outputUri. */ - public outputUri: string; - - /** Job templateId. */ - public templateId?: (string|null); - - /** Job config. */ - public config?: (google.cloud.video.transcoder.v1beta1.IJobConfig|null); - - /** Job priority. */ - public priority: number; - - /** Job originUri. */ - public originUri?: (google.cloud.video.transcoder.v1beta1.Job.IOriginUri|null); - - /** Job state. */ - public state: (google.cloud.video.transcoder.v1beta1.Job.ProcessingState|keyof typeof google.cloud.video.transcoder.v1beta1.Job.ProcessingState); - - /** Job progress. */ - public progress?: (google.cloud.video.transcoder.v1beta1.IProgress|null); - - /** Job failureReason. */ - public failureReason: string; - - /** Job failureDetails. */ - public failureDetails: google.cloud.video.transcoder.v1beta1.IFailureDetail[]; - - /** Job createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Job startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** Job endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** Job ttlAfterCompletionDays. */ - public ttlAfterCompletionDays: number; - - /** Job jobConfig. */ - public jobConfig?: ("templateId"|"config"); - - /** - * Creates a new Job instance using the specified properties. - * @param [properties] Properties to set - * @returns Job instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.IJob): google.cloud.video.transcoder.v1beta1.Job; - - /** - * Encodes the specified Job message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Job.verify|verify} messages. - * @param message Job message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.IJob, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Job message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Job.verify|verify} messages. - * @param message Job message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IJob, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Job message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Job - * @throws {Error} If the payload is not 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.transcoder.v1beta1.Job; - - /** - * Decodes a Job message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Job - * @throws {Error} If the payload 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.transcoder.v1beta1.Job; - - /** - * Verifies a Job message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Job message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Job - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Job; - - /** - * Creates a plain object from a Job message. Also converts values to other types if specified. - * @param message Job - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.Job, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Job to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace Job { - - /** Properties of an OriginUri. */ - interface IOriginUri { - - /** OriginUri hls */ - hls?: (string|null); - - /** OriginUri dash */ - dash?: (string|null); - } - - /** Represents an OriginUri. */ - class OriginUri implements IOriginUri { - - /** - * Constructs a new OriginUri. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.Job.IOriginUri); - - /** OriginUri hls. */ - public hls: string; - - /** OriginUri dash. */ - public dash: string; - - /** - * Creates a new OriginUri instance using the specified properties. - * @param [properties] Properties to set - * @returns OriginUri instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.Job.IOriginUri): google.cloud.video.transcoder.v1beta1.Job.OriginUri; - - /** - * Encodes the specified OriginUri message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Job.OriginUri.verify|verify} messages. - * @param message OriginUri message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.Job.IOriginUri, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OriginUri message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Job.OriginUri.verify|verify} messages. - * @param message OriginUri message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.Job.IOriginUri, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OriginUri message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OriginUri - * @throws {Error} If the payload is not 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.transcoder.v1beta1.Job.OriginUri; - - /** - * Decodes an OriginUri message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OriginUri - * @throws {Error} If the payload 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.transcoder.v1beta1.Job.OriginUri; - - /** - * Verifies an OriginUri message. - * @param message Plain 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 OriginUri message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OriginUri - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Job.OriginUri; - - /** - * Creates a plain object from an OriginUri message. Also converts values to other types if specified. - * @param message OriginUri - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.Job.OriginUri, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OriginUri to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** ProcessingState enum. */ - enum ProcessingState { - PROCESSING_STATE_UNSPECIFIED = 0, - PENDING = 1, - RUNNING = 2, - SUCCEEDED = 3, - FAILED = 4 - } - } - - /** Properties of a JobTemplate. */ - interface IJobTemplate { - - /** JobTemplate name */ - name?: (string|null); - - /** JobTemplate config */ - config?: (google.cloud.video.transcoder.v1beta1.IJobConfig|null); - } - - /** Represents a JobTemplate. */ - class JobTemplate implements IJobTemplate { - - /** - * Constructs a new JobTemplate. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.IJobTemplate); - - /** JobTemplate name. */ - public name: string; - - /** JobTemplate config. */ - public config?: (google.cloud.video.transcoder.v1beta1.IJobConfig|null); - - /** - * Creates a new JobTemplate instance using the specified properties. - * @param [properties] Properties to set - * @returns JobTemplate instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.IJobTemplate): google.cloud.video.transcoder.v1beta1.JobTemplate; - - /** - * Encodes the specified JobTemplate message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.JobTemplate.verify|verify} messages. - * @param message JobTemplate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.IJobTemplate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified JobTemplate message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.JobTemplate.verify|verify} messages. - * @param message JobTemplate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IJobTemplate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a JobTemplate message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns JobTemplate - * @throws {Error} If the payload is not 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.transcoder.v1beta1.JobTemplate; - - /** - * Decodes a JobTemplate message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns JobTemplate - * @throws {Error} If the payload 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.transcoder.v1beta1.JobTemplate; - - /** - * Verifies a JobTemplate message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a JobTemplate message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns JobTemplate - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.JobTemplate; - - /** - * Creates a plain object from a JobTemplate message. Also converts values to other types if specified. - * @param message JobTemplate - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.JobTemplate, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this JobTemplate to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a JobConfig. */ - interface IJobConfig { - - /** JobConfig inputs */ - inputs?: (google.cloud.video.transcoder.v1beta1.IInput[]|null); - - /** JobConfig editList */ - editList?: (google.cloud.video.transcoder.v1beta1.IEditAtom[]|null); - - /** JobConfig elementaryStreams */ - elementaryStreams?: (google.cloud.video.transcoder.v1beta1.IElementaryStream[]|null); - - /** JobConfig muxStreams */ - muxStreams?: (google.cloud.video.transcoder.v1beta1.IMuxStream[]|null); - - /** JobConfig manifests */ - manifests?: (google.cloud.video.transcoder.v1beta1.IManifest[]|null); - - /** JobConfig output */ - output?: (google.cloud.video.transcoder.v1beta1.IOutput|null); - - /** JobConfig adBreaks */ - adBreaks?: (google.cloud.video.transcoder.v1beta1.IAdBreak[]|null); - - /** JobConfig pubsubDestination */ - pubsubDestination?: (google.cloud.video.transcoder.v1beta1.IPubsubDestination|null); - - /** JobConfig spriteSheets */ - spriteSheets?: (google.cloud.video.transcoder.v1beta1.ISpriteSheet[]|null); - - /** JobConfig overlays */ - overlays?: (google.cloud.video.transcoder.v1beta1.IOverlay[]|null); - } - - /** Represents a JobConfig. */ - class JobConfig implements IJobConfig { - - /** - * Constructs a new JobConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.IJobConfig); - - /** JobConfig inputs. */ - public inputs: google.cloud.video.transcoder.v1beta1.IInput[]; - - /** JobConfig editList. */ - public editList: google.cloud.video.transcoder.v1beta1.IEditAtom[]; - - /** JobConfig elementaryStreams. */ - public elementaryStreams: google.cloud.video.transcoder.v1beta1.IElementaryStream[]; - - /** JobConfig muxStreams. */ - public muxStreams: google.cloud.video.transcoder.v1beta1.IMuxStream[]; - - /** JobConfig manifests. */ - public manifests: google.cloud.video.transcoder.v1beta1.IManifest[]; - - /** JobConfig output. */ - public output?: (google.cloud.video.transcoder.v1beta1.IOutput|null); - - /** JobConfig adBreaks. */ - public adBreaks: google.cloud.video.transcoder.v1beta1.IAdBreak[]; - - /** JobConfig pubsubDestination. */ - public pubsubDestination?: (google.cloud.video.transcoder.v1beta1.IPubsubDestination|null); - - /** JobConfig spriteSheets. */ - public spriteSheets: google.cloud.video.transcoder.v1beta1.ISpriteSheet[]; - - /** JobConfig overlays. */ - public overlays: google.cloud.video.transcoder.v1beta1.IOverlay[]; - - /** - * Creates a new JobConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns JobConfig instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.IJobConfig): google.cloud.video.transcoder.v1beta1.JobConfig; - - /** - * Encodes the specified JobConfig message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.JobConfig.verify|verify} messages. - * @param message JobConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.IJobConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified JobConfig message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.JobConfig.verify|verify} messages. - * @param message JobConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IJobConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a JobConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns JobConfig - * @throws {Error} If the payload is not 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.transcoder.v1beta1.JobConfig; - - /** - * Decodes a JobConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns JobConfig - * @throws {Error} If the payload 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.transcoder.v1beta1.JobConfig; - - /** - * Verifies a JobConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a JobConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns JobConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.JobConfig; - - /** - * Creates a plain object from a JobConfig message. Also converts values to other types if specified. - * @param message JobConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.JobConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this JobConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an Input. */ - interface IInput { - - /** Input key */ - key?: (string|null); - - /** Input uri */ - uri?: (string|null); - - /** Input preprocessingConfig */ - preprocessingConfig?: (google.cloud.video.transcoder.v1beta1.IPreprocessingConfig|null); - } - - /** Represents an Input. */ - class Input implements IInput { - - /** - * Constructs a new Input. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.IInput); - - /** Input key. */ - public key: string; - - /** Input uri. */ - public uri: string; - - /** Input preprocessingConfig. */ - public preprocessingConfig?: (google.cloud.video.transcoder.v1beta1.IPreprocessingConfig|null); - - /** - * Creates a new Input instance using the specified properties. - * @param [properties] Properties to set - * @returns Input instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.IInput): google.cloud.video.transcoder.v1beta1.Input; - - /** - * Encodes the specified Input message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Input.verify|verify} messages. - * @param message Input message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.IInput, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Input message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Input.verify|verify} messages. - * @param message Input message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IInput, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Input message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Input - * @throws {Error} If the payload is not 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.transcoder.v1beta1.Input; - - /** - * Decodes an Input message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Input - * @throws {Error} If the payload 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.transcoder.v1beta1.Input; - - /** - * Verifies an Input message. - * @param message Plain 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 Input message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Input - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Input; - - /** - * Creates a plain object from an Input message. Also converts values to other types if specified. - * @param message Input - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.Input, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Input to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an Output. */ - interface IOutput { - - /** Output uri */ - uri?: (string|null); - } - - /** Represents an Output. */ - class Output implements IOutput { - - /** - * Constructs a new Output. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.IOutput); - - /** Output uri. */ - public uri: string; - - /** - * Creates a new Output instance using the specified properties. - * @param [properties] Properties to set - * @returns Output instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.IOutput): google.cloud.video.transcoder.v1beta1.Output; - - /** - * Encodes the specified Output message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Output.verify|verify} messages. - * @param message Output message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.IOutput, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Output message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Output.verify|verify} messages. - * @param message Output message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IOutput, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Output message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Output - * @throws {Error} If the payload is not 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.transcoder.v1beta1.Output; - - /** - * Decodes an Output message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Output - * @throws {Error} If the payload 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.transcoder.v1beta1.Output; - - /** - * Verifies an Output message. - * @param message Plain 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 Output message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Output - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Output; - - /** - * Creates a plain object from an Output message. Also converts values to other types if specified. - * @param message Output - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.Output, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Output to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an EditAtom. */ - interface IEditAtom { - - /** EditAtom key */ - key?: (string|null); - - /** EditAtom inputs */ - inputs?: (string[]|null); - - /** EditAtom endTimeOffset */ - endTimeOffset?: (google.protobuf.IDuration|null); - - /** EditAtom startTimeOffset */ - startTimeOffset?: (google.protobuf.IDuration|null); - } - - /** Represents an EditAtom. */ - class EditAtom implements IEditAtom { - - /** - * Constructs a new EditAtom. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.IEditAtom); - - /** EditAtom key. */ - public key: string; - - /** EditAtom inputs. */ - public inputs: string[]; - - /** EditAtom endTimeOffset. */ - public endTimeOffset?: (google.protobuf.IDuration|null); - - /** EditAtom startTimeOffset. */ - public startTimeOffset?: (google.protobuf.IDuration|null); - - /** - * Creates a new EditAtom instance using the specified properties. - * @param [properties] Properties to set - * @returns EditAtom instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.IEditAtom): google.cloud.video.transcoder.v1beta1.EditAtom; - - /** - * Encodes the specified EditAtom message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.EditAtom.verify|verify} messages. - * @param message EditAtom message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.IEditAtom, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EditAtom message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.EditAtom.verify|verify} messages. - * @param message EditAtom message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IEditAtom, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EditAtom message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EditAtom - * @throws {Error} If the payload is not 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.transcoder.v1beta1.EditAtom; - - /** - * Decodes an EditAtom message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EditAtom - * @throws {Error} If the payload 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.transcoder.v1beta1.EditAtom; - - /** - * Verifies an EditAtom message. - * @param message Plain 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 EditAtom message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EditAtom - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.EditAtom; - - /** - * Creates a plain object from an EditAtom message. Also converts values to other types if specified. - * @param message EditAtom - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.EditAtom, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EditAtom to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an AdBreak. */ - interface IAdBreak { - - /** AdBreak startTimeOffset */ - startTimeOffset?: (google.protobuf.IDuration|null); - } - - /** Represents an AdBreak. */ - class AdBreak implements IAdBreak { - - /** - * Constructs a new AdBreak. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.IAdBreak); - - /** AdBreak startTimeOffset. */ - public startTimeOffset?: (google.protobuf.IDuration|null); - - /** - * Creates a new AdBreak instance using the specified properties. - * @param [properties] Properties to set - * @returns AdBreak instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.IAdBreak): google.cloud.video.transcoder.v1beta1.AdBreak; - - /** - * Encodes the specified AdBreak message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AdBreak.verify|verify} messages. - * @param message AdBreak message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.IAdBreak, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AdBreak message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AdBreak.verify|verify} messages. - * @param message AdBreak message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IAdBreak, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AdBreak message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AdBreak - * @throws {Error} If the payload is not 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.transcoder.v1beta1.AdBreak; - - /** - * Decodes an AdBreak message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AdBreak - * @throws {Error} If the payload 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.transcoder.v1beta1.AdBreak; - - /** - * Verifies an AdBreak message. - * @param message Plain 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 AdBreak message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AdBreak - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.AdBreak; - - /** - * Creates a plain object from an AdBreak message. Also converts values to other types if specified. - * @param message AdBreak - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.AdBreak, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AdBreak to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an ElementaryStream. */ - interface IElementaryStream { - - /** ElementaryStream key */ - key?: (string|null); - - /** ElementaryStream videoStream */ - videoStream?: (google.cloud.video.transcoder.v1beta1.IVideoStream|null); - - /** ElementaryStream audioStream */ - audioStream?: (google.cloud.video.transcoder.v1beta1.IAudioStream|null); - - /** ElementaryStream textStream */ - textStream?: (google.cloud.video.transcoder.v1beta1.ITextStream|null); - } - - /** Represents an ElementaryStream. */ - class ElementaryStream implements IElementaryStream { - - /** - * Constructs a new ElementaryStream. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.IElementaryStream); - - /** ElementaryStream key. */ - public key: string; - - /** ElementaryStream videoStream. */ - public videoStream?: (google.cloud.video.transcoder.v1beta1.IVideoStream|null); - - /** ElementaryStream audioStream. */ - public audioStream?: (google.cloud.video.transcoder.v1beta1.IAudioStream|null); - - /** ElementaryStream textStream. */ - public textStream?: (google.cloud.video.transcoder.v1beta1.ITextStream|null); - - /** ElementaryStream elementaryStream. */ - public elementaryStream?: ("videoStream"|"audioStream"|"textStream"); - - /** - * Creates a new ElementaryStream instance using the specified properties. - * @param [properties] Properties to set - * @returns ElementaryStream instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.IElementaryStream): google.cloud.video.transcoder.v1beta1.ElementaryStream; - - /** - * Encodes the specified ElementaryStream message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ElementaryStream.verify|verify} messages. - * @param message ElementaryStream message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.IElementaryStream, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ElementaryStream message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ElementaryStream.verify|verify} messages. - * @param message ElementaryStream message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IElementaryStream, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ElementaryStream message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ElementaryStream - * @throws {Error} If the payload is not 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.transcoder.v1beta1.ElementaryStream; - - /** - * Decodes an ElementaryStream message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ElementaryStream - * @throws {Error} If the payload 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.transcoder.v1beta1.ElementaryStream; - - /** - * Verifies an ElementaryStream message. - * @param message Plain 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 ElementaryStream message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ElementaryStream - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.ElementaryStream; - - /** - * Creates a plain object from an ElementaryStream message. Also converts values to other types if specified. - * @param message ElementaryStream - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.ElementaryStream, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ElementaryStream to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MuxStream. */ - interface IMuxStream { - - /** MuxStream key */ - key?: (string|null); - - /** MuxStream fileName */ - fileName?: (string|null); - - /** MuxStream container */ - container?: (string|null); - - /** MuxStream elementaryStreams */ - elementaryStreams?: (string[]|null); - - /** MuxStream segmentSettings */ - segmentSettings?: (google.cloud.video.transcoder.v1beta1.ISegmentSettings|null); - - /** MuxStream encryption */ - encryption?: (google.cloud.video.transcoder.v1beta1.IEncryption|null); - } - - /** Represents a MuxStream. */ - class MuxStream implements IMuxStream { - - /** - * Constructs a new MuxStream. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.IMuxStream); - - /** MuxStream key. */ - public key: string; - - /** MuxStream fileName. */ - public fileName: string; - - /** MuxStream container. */ - public container: string; - - /** MuxStream elementaryStreams. */ - public elementaryStreams: string[]; - - /** MuxStream segmentSettings. */ - public segmentSettings?: (google.cloud.video.transcoder.v1beta1.ISegmentSettings|null); - - /** MuxStream encryption. */ - public encryption?: (google.cloud.video.transcoder.v1beta1.IEncryption|null); - - /** - * Creates a new MuxStream instance using the specified properties. - * @param [properties] Properties to set - * @returns MuxStream instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.IMuxStream): google.cloud.video.transcoder.v1beta1.MuxStream; - - /** - * Encodes the specified MuxStream message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.MuxStream.verify|verify} messages. - * @param message MuxStream message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.IMuxStream, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MuxStream message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.MuxStream.verify|verify} messages. - * @param message MuxStream message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IMuxStream, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MuxStream message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MuxStream - * @throws {Error} If the payload is not 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.transcoder.v1beta1.MuxStream; - - /** - * Decodes a MuxStream message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MuxStream - * @throws {Error} If the payload 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.transcoder.v1beta1.MuxStream; - - /** - * Verifies a MuxStream message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MuxStream message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MuxStream - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.MuxStream; - - /** - * Creates a plain object from a MuxStream message. Also converts values to other types if specified. - * @param message MuxStream - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.MuxStream, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MuxStream to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Manifest. */ - interface IManifest { - - /** Manifest fileName */ - fileName?: (string|null); - - /** Manifest type */ - type?: (google.cloud.video.transcoder.v1beta1.Manifest.ManifestType|keyof typeof google.cloud.video.transcoder.v1beta1.Manifest.ManifestType|null); - - /** Manifest muxStreams */ - muxStreams?: (string[]|null); - } - - /** Represents a Manifest. */ - class Manifest implements IManifest { - - /** - * Constructs a new Manifest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.IManifest); - - /** Manifest fileName. */ - public fileName: string; - - /** Manifest type. */ - public type: (google.cloud.video.transcoder.v1beta1.Manifest.ManifestType|keyof typeof google.cloud.video.transcoder.v1beta1.Manifest.ManifestType); - - /** Manifest muxStreams. */ - public muxStreams: string[]; - - /** - * Creates a new Manifest instance using the specified properties. - * @param [properties] Properties to set - * @returns Manifest instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.IManifest): google.cloud.video.transcoder.v1beta1.Manifest; - - /** - * Encodes the specified Manifest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Manifest.verify|verify} messages. - * @param message Manifest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.IManifest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Manifest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Manifest.verify|verify} messages. - * @param message Manifest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IManifest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Manifest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Manifest - * @throws {Error} If the payload is not 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.transcoder.v1beta1.Manifest; - - /** - * Decodes a Manifest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Manifest - * @throws {Error} If the payload 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.transcoder.v1beta1.Manifest; - - /** - * Verifies a Manifest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Manifest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Manifest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Manifest; - - /** - * Creates a plain object from a Manifest message. Also converts values to other types if specified. - * @param message Manifest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.Manifest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Manifest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace Manifest { - - /** ManifestType enum. */ - enum ManifestType { - MANIFEST_TYPE_UNSPECIFIED = 0, - HLS = 1, - DASH = 2 - } - } - - /** Properties of a PubsubDestination. */ - interface IPubsubDestination { - - /** PubsubDestination topic */ - topic?: (string|null); - } - - /** Represents a PubsubDestination. */ - class PubsubDestination implements IPubsubDestination { - - /** - * Constructs a new PubsubDestination. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.IPubsubDestination); - - /** PubsubDestination topic. */ - public topic: string; - - /** - * Creates a new PubsubDestination instance using the specified properties. - * @param [properties] Properties to set - * @returns PubsubDestination instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.IPubsubDestination): google.cloud.video.transcoder.v1beta1.PubsubDestination; - - /** - * Encodes the specified PubsubDestination message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PubsubDestination.verify|verify} messages. - * @param message PubsubDestination message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.IPubsubDestination, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PubsubDestination message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PubsubDestination.verify|verify} messages. - * @param message PubsubDestination message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IPubsubDestination, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PubsubDestination message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PubsubDestination - * @throws {Error} If the payload is not 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.transcoder.v1beta1.PubsubDestination; - - /** - * Decodes a PubsubDestination message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PubsubDestination - * @throws {Error} If the payload 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.transcoder.v1beta1.PubsubDestination; - - /** - * Verifies a PubsubDestination message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PubsubDestination message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PubsubDestination - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.PubsubDestination; - - /** - * Creates a plain object from a PubsubDestination message. Also converts values to other types if specified. - * @param message PubsubDestination - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.PubsubDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PubsubDestination to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SpriteSheet. */ - interface ISpriteSheet { - - /** SpriteSheet format */ - format?: (string|null); - - /** SpriteSheet filePrefix */ - filePrefix?: (string|null); - - /** SpriteSheet spriteWidthPixels */ - spriteWidthPixels?: (number|null); - - /** SpriteSheet spriteHeightPixels */ - spriteHeightPixels?: (number|null); - - /** SpriteSheet columnCount */ - columnCount?: (number|null); - - /** SpriteSheet rowCount */ - rowCount?: (number|null); - - /** SpriteSheet startTimeOffset */ - startTimeOffset?: (google.protobuf.IDuration|null); - - /** SpriteSheet endTimeOffset */ - endTimeOffset?: (google.protobuf.IDuration|null); - - /** SpriteSheet totalCount */ - totalCount?: (number|null); - - /** SpriteSheet interval */ - interval?: (google.protobuf.IDuration|null); - - /** SpriteSheet quality */ - quality?: (number|null); - } - - /** Represents a SpriteSheet. */ - class SpriteSheet implements ISpriteSheet { - - /** - * Constructs a new SpriteSheet. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.ISpriteSheet); - - /** SpriteSheet format. */ - public format: string; - - /** SpriteSheet filePrefix. */ - public filePrefix: string; - - /** SpriteSheet spriteWidthPixels. */ - public spriteWidthPixels: number; - - /** SpriteSheet spriteHeightPixels. */ - public spriteHeightPixels: number; - - /** SpriteSheet columnCount. */ - public columnCount: number; - - /** SpriteSheet rowCount. */ - public rowCount: number; - - /** SpriteSheet startTimeOffset. */ - public startTimeOffset?: (google.protobuf.IDuration|null); - - /** SpriteSheet endTimeOffset. */ - public endTimeOffset?: (google.protobuf.IDuration|null); - - /** SpriteSheet totalCount. */ - public totalCount?: (number|null); - - /** SpriteSheet interval. */ - public interval?: (google.protobuf.IDuration|null); - - /** SpriteSheet quality. */ - public quality: number; - - /** SpriteSheet extractionStrategy. */ - public extractionStrategy?: ("totalCount"|"interval"); - - /** - * Creates a new SpriteSheet instance using the specified properties. - * @param [properties] Properties to set - * @returns SpriteSheet instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.ISpriteSheet): google.cloud.video.transcoder.v1beta1.SpriteSheet; - - /** - * Encodes the specified SpriteSheet message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.SpriteSheet.verify|verify} messages. - * @param message SpriteSheet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.ISpriteSheet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SpriteSheet message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.SpriteSheet.verify|verify} messages. - * @param message SpriteSheet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.ISpriteSheet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SpriteSheet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SpriteSheet - * @throws {Error} If the payload is not 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.transcoder.v1beta1.SpriteSheet; - - /** - * Decodes a SpriteSheet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SpriteSheet - * @throws {Error} If the payload 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.transcoder.v1beta1.SpriteSheet; - - /** - * Verifies a SpriteSheet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SpriteSheet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SpriteSheet - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.SpriteSheet; - - /** - * Creates a plain object from a SpriteSheet message. Also converts values to other types if specified. - * @param message SpriteSheet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.SpriteSheet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SpriteSheet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an Overlay. */ - interface IOverlay { - - /** Overlay image */ - image?: (google.cloud.video.transcoder.v1beta1.Overlay.IImage|null); - - /** Overlay animations */ - animations?: (google.cloud.video.transcoder.v1beta1.Overlay.IAnimation[]|null); - } - - /** Represents an Overlay. */ - class Overlay implements IOverlay { - - /** - * Constructs a new Overlay. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.IOverlay); - - /** Overlay image. */ - public image?: (google.cloud.video.transcoder.v1beta1.Overlay.IImage|null); - - /** Overlay animations. */ - public animations: google.cloud.video.transcoder.v1beta1.Overlay.IAnimation[]; - - /** - * Creates a new Overlay instance using the specified properties. - * @param [properties] Properties to set - * @returns Overlay instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.IOverlay): google.cloud.video.transcoder.v1beta1.Overlay; - - /** - * Encodes the specified Overlay message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.verify|verify} messages. - * @param message Overlay message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.IOverlay, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Overlay message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.verify|verify} messages. - * @param message Overlay message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IOverlay, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Overlay message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Overlay - * @throws {Error} If the payload is not 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.transcoder.v1beta1.Overlay; - - /** - * Decodes an Overlay message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Overlay - * @throws {Error} If the payload 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.transcoder.v1beta1.Overlay; - - /** - * Verifies an Overlay message. - * @param message Plain 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 Overlay message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Overlay - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Overlay; - - /** - * Creates a plain object from an Overlay message. Also converts values to other types if specified. - * @param message Overlay - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.Overlay, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Overlay to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace Overlay { - - /** Properties of a NormalizedCoordinate. */ - interface INormalizedCoordinate { - - /** NormalizedCoordinate x */ - x?: (number|null); - - /** NormalizedCoordinate y */ - y?: (number|null); - } - - /** Represents a NormalizedCoordinate. */ - class NormalizedCoordinate implements INormalizedCoordinate { - - /** - * Constructs a new NormalizedCoordinate. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate); - - /** NormalizedCoordinate x. */ - public x: number; - - /** NormalizedCoordinate y. */ - public y: number; - - /** - * Creates a new NormalizedCoordinate instance using the specified properties. - * @param [properties] Properties to set - * @returns NormalizedCoordinate instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate): google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate; - - /** - * Encodes the specified NormalizedCoordinate message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.verify|verify} messages. - * @param message NormalizedCoordinate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NormalizedCoordinate message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.verify|verify} messages. - * @param message NormalizedCoordinate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NormalizedCoordinate message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NormalizedCoordinate - * @throws {Error} If the payload is not 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.transcoder.v1beta1.Overlay.NormalizedCoordinate; - - /** - * Decodes a NormalizedCoordinate message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NormalizedCoordinate - * @throws {Error} If the payload 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.transcoder.v1beta1.Overlay.NormalizedCoordinate; - - /** - * Verifies a NormalizedCoordinate message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NormalizedCoordinate message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NormalizedCoordinate - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate; - - /** - * Creates a plain object from a NormalizedCoordinate message. Also converts values to other types if specified. - * @param message NormalizedCoordinate - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NormalizedCoordinate to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an Image. */ - interface IImage { - - /** Image uri */ - uri?: (string|null); - - /** Image resolution */ - resolution?: (google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate|null); - - /** Image alpha */ - alpha?: (number|null); - } - - /** Represents an Image. */ - class Image implements IImage { - - /** - * Constructs a new Image. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.Overlay.IImage); - - /** Image uri. */ - public uri: string; - - /** Image resolution. */ - public resolution?: (google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate|null); - - /** Image alpha. */ - public alpha: number; - - /** - * Creates a new Image instance using the specified properties. - * @param [properties] Properties to set - * @returns Image instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.Overlay.IImage): google.cloud.video.transcoder.v1beta1.Overlay.Image; - - /** - * Encodes the specified Image message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.Image.verify|verify} messages. - * @param message Image message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.Overlay.IImage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Image message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.Image.verify|verify} messages. - * @param message Image message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.Overlay.IImage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Image message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Image - * @throws {Error} If the payload is not 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.transcoder.v1beta1.Overlay.Image; - - /** - * Decodes an Image message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Image - * @throws {Error} If the payload 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.transcoder.v1beta1.Overlay.Image; - - /** - * Verifies an Image message. - * @param message Plain 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 Image message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Image - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Overlay.Image; - - /** - * Creates a plain object from an Image message. Also converts values to other types if specified. - * @param message Image - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.Overlay.Image, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Image to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an AnimationStatic. */ - interface IAnimationStatic { - - /** AnimationStatic xy */ - xy?: (google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate|null); - - /** AnimationStatic startTimeOffset */ - startTimeOffset?: (google.protobuf.IDuration|null); - } - - /** Represents an AnimationStatic. */ - class AnimationStatic implements IAnimationStatic { - - /** - * Constructs a new AnimationStatic. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.Overlay.IAnimationStatic); - - /** AnimationStatic xy. */ - public xy?: (google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate|null); - - /** AnimationStatic startTimeOffset. */ - public startTimeOffset?: (google.protobuf.IDuration|null); - - /** - * Creates a new AnimationStatic instance using the specified properties. - * @param [properties] Properties to set - * @returns AnimationStatic instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.Overlay.IAnimationStatic): google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic; - - /** - * Encodes the specified AnimationStatic message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic.verify|verify} messages. - * @param message AnimationStatic message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.Overlay.IAnimationStatic, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AnimationStatic message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic.verify|verify} messages. - * @param message AnimationStatic message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.Overlay.IAnimationStatic, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AnimationStatic message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AnimationStatic - * @throws {Error} If the payload is not 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.transcoder.v1beta1.Overlay.AnimationStatic; - - /** - * Decodes an AnimationStatic message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AnimationStatic - * @throws {Error} If the payload 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.transcoder.v1beta1.Overlay.AnimationStatic; - - /** - * Verifies an AnimationStatic message. - * @param message Plain 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 AnimationStatic message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AnimationStatic - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic; - - /** - * Creates a plain object from an AnimationStatic message. Also converts values to other types if specified. - * @param message AnimationStatic - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AnimationStatic to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an AnimationFade. */ - interface IAnimationFade { - - /** AnimationFade fadeType */ - fadeType?: (google.cloud.video.transcoder.v1beta1.Overlay.FadeType|keyof typeof google.cloud.video.transcoder.v1beta1.Overlay.FadeType|null); - - /** AnimationFade xy */ - xy?: (google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate|null); - - /** AnimationFade startTimeOffset */ - startTimeOffset?: (google.protobuf.IDuration|null); - - /** AnimationFade endTimeOffset */ - endTimeOffset?: (google.protobuf.IDuration|null); - } - - /** Represents an AnimationFade. */ - class AnimationFade implements IAnimationFade { - - /** - * Constructs a new AnimationFade. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.Overlay.IAnimationFade); - - /** AnimationFade fadeType. */ - public fadeType: (google.cloud.video.transcoder.v1beta1.Overlay.FadeType|keyof typeof google.cloud.video.transcoder.v1beta1.Overlay.FadeType); - - /** AnimationFade xy. */ - public xy?: (google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate|null); - - /** AnimationFade startTimeOffset. */ - public startTimeOffset?: (google.protobuf.IDuration|null); - - /** AnimationFade endTimeOffset. */ - public endTimeOffset?: (google.protobuf.IDuration|null); - - /** - * Creates a new AnimationFade instance using the specified properties. - * @param [properties] Properties to set - * @returns AnimationFade instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.Overlay.IAnimationFade): google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade; - - /** - * Encodes the specified AnimationFade message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade.verify|verify} messages. - * @param message AnimationFade message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.Overlay.IAnimationFade, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AnimationFade message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade.verify|verify} messages. - * @param message AnimationFade message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.Overlay.IAnimationFade, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AnimationFade message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AnimationFade - * @throws {Error} If the payload is not 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.transcoder.v1beta1.Overlay.AnimationFade; - - /** - * Decodes an AnimationFade message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AnimationFade - * @throws {Error} If the payload 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.transcoder.v1beta1.Overlay.AnimationFade; - - /** - * Verifies an AnimationFade message. - * @param message Plain 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 AnimationFade message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AnimationFade - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade; - - /** - * Creates a plain object from an AnimationFade message. Also converts values to other types if specified. - * @param message AnimationFade - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AnimationFade to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an AnimationEnd. */ - interface IAnimationEnd { - - /** AnimationEnd startTimeOffset */ - startTimeOffset?: (google.protobuf.IDuration|null); - } - - /** Represents an AnimationEnd. */ - class AnimationEnd implements IAnimationEnd { - - /** - * Constructs a new AnimationEnd. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.Overlay.IAnimationEnd); - - /** AnimationEnd startTimeOffset. */ - public startTimeOffset?: (google.protobuf.IDuration|null); - - /** - * Creates a new AnimationEnd instance using the specified properties. - * @param [properties] Properties to set - * @returns AnimationEnd instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.Overlay.IAnimationEnd): google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd; - - /** - * Encodes the specified AnimationEnd message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd.verify|verify} messages. - * @param message AnimationEnd message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.Overlay.IAnimationEnd, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AnimationEnd message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd.verify|verify} messages. - * @param message AnimationEnd message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.Overlay.IAnimationEnd, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AnimationEnd message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AnimationEnd - * @throws {Error} If the payload is not 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.transcoder.v1beta1.Overlay.AnimationEnd; - - /** - * Decodes an AnimationEnd message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AnimationEnd - * @throws {Error} If the payload 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.transcoder.v1beta1.Overlay.AnimationEnd; - - /** - * Verifies an AnimationEnd message. - * @param message Plain 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 AnimationEnd message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AnimationEnd - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd; - - /** - * Creates a plain object from an AnimationEnd message. Also converts values to other types if specified. - * @param message AnimationEnd - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AnimationEnd to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an Animation. */ - interface IAnimation { - - /** Animation animationStatic */ - animationStatic?: (google.cloud.video.transcoder.v1beta1.Overlay.IAnimationStatic|null); - - /** Animation animationFade */ - animationFade?: (google.cloud.video.transcoder.v1beta1.Overlay.IAnimationFade|null); - - /** Animation animationEnd */ - animationEnd?: (google.cloud.video.transcoder.v1beta1.Overlay.IAnimationEnd|null); - } - - /** Represents an Animation. */ - class Animation implements IAnimation { - - /** - * Constructs a new Animation. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.Overlay.IAnimation); - - /** Animation animationStatic. */ - public animationStatic?: (google.cloud.video.transcoder.v1beta1.Overlay.IAnimationStatic|null); - - /** Animation animationFade. */ - public animationFade?: (google.cloud.video.transcoder.v1beta1.Overlay.IAnimationFade|null); - - /** Animation animationEnd. */ - public animationEnd?: (google.cloud.video.transcoder.v1beta1.Overlay.IAnimationEnd|null); - - /** Animation animationType. */ - public animationType?: ("animationStatic"|"animationFade"|"animationEnd"); - - /** - * Creates a new Animation instance using the specified properties. - * @param [properties] Properties to set - * @returns Animation instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.Overlay.IAnimation): google.cloud.video.transcoder.v1beta1.Overlay.Animation; - - /** - * Encodes the specified Animation message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.Animation.verify|verify} messages. - * @param message Animation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.Overlay.IAnimation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Animation message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.Animation.verify|verify} messages. - * @param message Animation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.Overlay.IAnimation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Animation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Animation - * @throws {Error} If the payload is not 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.transcoder.v1beta1.Overlay.Animation; - - /** - * Decodes an Animation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Animation - * @throws {Error} If the payload 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.transcoder.v1beta1.Overlay.Animation; - - /** - * Verifies an Animation message. - * @param message Plain 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 Animation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Animation - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Overlay.Animation; - - /** - * Creates a plain object from an Animation message. Also converts values to other types if specified. - * @param message Animation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.Overlay.Animation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Animation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** FadeType enum. */ - enum FadeType { - FADE_TYPE_UNSPECIFIED = 0, - FADE_IN = 1, - FADE_OUT = 2 - } - } - - /** Properties of a PreprocessingConfig. */ - interface IPreprocessingConfig { - - /** PreprocessingConfig color */ - color?: (google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IColor|null); - - /** PreprocessingConfig denoise */ - denoise?: (google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDenoise|null); - - /** PreprocessingConfig deblock */ - deblock?: (google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDeblock|null); - - /** PreprocessingConfig audio */ - audio?: (google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IAudio|null); - - /** PreprocessingConfig crop */ - crop?: (google.cloud.video.transcoder.v1beta1.PreprocessingConfig.ICrop|null); - - /** PreprocessingConfig pad */ - pad?: (google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IPad|null); - } - - /** Represents a PreprocessingConfig. */ - class PreprocessingConfig implements IPreprocessingConfig { - - /** - * Constructs a new PreprocessingConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.IPreprocessingConfig); - - /** PreprocessingConfig color. */ - public color?: (google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IColor|null); - - /** PreprocessingConfig denoise. */ - public denoise?: (google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDenoise|null); - - /** PreprocessingConfig deblock. */ - public deblock?: (google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDeblock|null); - - /** PreprocessingConfig audio. */ - public audio?: (google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IAudio|null); - - /** PreprocessingConfig crop. */ - public crop?: (google.cloud.video.transcoder.v1beta1.PreprocessingConfig.ICrop|null); - - /** PreprocessingConfig pad. */ - public pad?: (google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IPad|null); - - /** - * Creates a new PreprocessingConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns PreprocessingConfig instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.IPreprocessingConfig): google.cloud.video.transcoder.v1beta1.PreprocessingConfig; - - /** - * Encodes the specified PreprocessingConfig message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.verify|verify} messages. - * @param message PreprocessingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.IPreprocessingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PreprocessingConfig message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.verify|verify} messages. - * @param message PreprocessingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IPreprocessingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PreprocessingConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PreprocessingConfig - * @throws {Error} If the payload is not 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.transcoder.v1beta1.PreprocessingConfig; - - /** - * Decodes a PreprocessingConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PreprocessingConfig - * @throws {Error} If the payload 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.transcoder.v1beta1.PreprocessingConfig; - - /** - * Verifies a PreprocessingConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PreprocessingConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PreprocessingConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.PreprocessingConfig; - - /** - * Creates a plain object from a PreprocessingConfig message. Also converts values to other types if specified. - * @param message PreprocessingConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PreprocessingConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace PreprocessingConfig { - - /** Properties of a Color. */ - interface IColor { - - /** Color saturation */ - saturation?: (number|null); - - /** Color contrast */ - contrast?: (number|null); - - /** Color brightness */ - brightness?: (number|null); - } - - /** Represents a Color. */ - class Color implements IColor { - - /** - * Constructs a new Color. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IColor); - - /** Color saturation. */ - public saturation: number; - - /** Color contrast. */ - public contrast: number; - - /** Color brightness. */ - public brightness: number; - - /** - * Creates a new Color instance using the specified properties. - * @param [properties] Properties to set - * @returns Color instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IColor): google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color; - - /** - * Encodes the specified Color message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color.verify|verify} messages. - * @param message Color message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IColor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Color message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color.verify|verify} messages. - * @param message Color message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IColor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Color message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Color - * @throws {Error} If the payload is not 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.transcoder.v1beta1.PreprocessingConfig.Color; - - /** - * Decodes a Color message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Color - * @throws {Error} If the payload 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.transcoder.v1beta1.PreprocessingConfig.Color; - - /** - * Verifies a Color message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Color message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Color - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color; - - /** - * Creates a plain object from a Color message. Also converts values to other types if specified. - * @param message Color - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Color to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Denoise. */ - interface IDenoise { - - /** Denoise strength */ - strength?: (number|null); - - /** Denoise tune */ - tune?: (string|null); - } - - /** Represents a Denoise. */ - class Denoise implements IDenoise { - - /** - * Constructs a new Denoise. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDenoise); - - /** Denoise strength. */ - public strength: number; - - /** Denoise tune. */ - public tune: string; - - /** - * Creates a new Denoise instance using the specified properties. - * @param [properties] Properties to set - * @returns Denoise instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDenoise): google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise; - - /** - * Encodes the specified Denoise message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise.verify|verify} messages. - * @param message Denoise message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDenoise, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Denoise message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise.verify|verify} messages. - * @param message Denoise message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDenoise, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Denoise message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Denoise - * @throws {Error} If the payload is not 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.transcoder.v1beta1.PreprocessingConfig.Denoise; - - /** - * Decodes a Denoise message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Denoise - * @throws {Error} If the payload 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.transcoder.v1beta1.PreprocessingConfig.Denoise; - - /** - * Verifies a Denoise message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Denoise message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Denoise - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise; - - /** - * Creates a plain object from a Denoise message. Also converts values to other types if specified. - * @param message Denoise - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Denoise to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Deblock. */ - interface IDeblock { - - /** Deblock strength */ - strength?: (number|null); - - /** Deblock enabled */ - enabled?: (boolean|null); - } - - /** Represents a Deblock. */ - class Deblock implements IDeblock { - - /** - * Constructs a new Deblock. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDeblock); - - /** Deblock strength. */ - public strength: number; - - /** Deblock enabled. */ - public enabled: boolean; - - /** - * Creates a new Deblock instance using the specified properties. - * @param [properties] Properties to set - * @returns Deblock instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDeblock): google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock; - - /** - * Encodes the specified Deblock message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock.verify|verify} messages. - * @param message Deblock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDeblock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Deblock message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock.verify|verify} messages. - * @param message Deblock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDeblock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Deblock message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Deblock - * @throws {Error} If the payload is not 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.transcoder.v1beta1.PreprocessingConfig.Deblock; - - /** - * Decodes a Deblock message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Deblock - * @throws {Error} If the payload 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.transcoder.v1beta1.PreprocessingConfig.Deblock; - - /** - * Verifies a Deblock message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Deblock message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Deblock - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock; - - /** - * Creates a plain object from a Deblock message. Also converts values to other types if specified. - * @param message Deblock - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Deblock to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an Audio. */ - interface IAudio { - - /** Audio lufs */ - lufs?: (number|null); - - /** Audio highBoost */ - highBoost?: (boolean|null); - - /** Audio lowBoost */ - lowBoost?: (boolean|null); - } - - /** Represents an Audio. */ - class Audio implements IAudio { - - /** - * Constructs a new Audio. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IAudio); - - /** Audio lufs. */ - public lufs: number; - - /** Audio highBoost. */ - public highBoost: boolean; - - /** Audio lowBoost. */ - public lowBoost: boolean; - - /** - * Creates a new Audio instance using the specified properties. - * @param [properties] Properties to set - * @returns Audio instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IAudio): google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio; - - /** - * Encodes the specified Audio message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio.verify|verify} messages. - * @param message Audio message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IAudio, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Audio message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio.verify|verify} messages. - * @param message Audio message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IAudio, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Audio message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Audio - * @throws {Error} If the payload is not 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.transcoder.v1beta1.PreprocessingConfig.Audio; - - /** - * Decodes an Audio message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Audio - * @throws {Error} If the payload 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.transcoder.v1beta1.PreprocessingConfig.Audio; - - /** - * Verifies an Audio message. - * @param message Plain 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 Audio message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Audio - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio; - - /** - * Creates a plain object from an Audio message. Also converts values to other types if specified. - * @param message Audio - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Audio to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Crop. */ - interface ICrop { - - /** Crop topPixels */ - topPixels?: (number|null); - - /** Crop bottomPixels */ - bottomPixels?: (number|null); - - /** Crop leftPixels */ - leftPixels?: (number|null); - - /** Crop rightPixels */ - rightPixels?: (number|null); - } - - /** Represents a Crop. */ - class Crop implements ICrop { - - /** - * Constructs a new Crop. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.ICrop); - - /** Crop topPixels. */ - public topPixels: number; - - /** Crop bottomPixels. */ - public bottomPixels: number; - - /** Crop leftPixels. */ - public leftPixels: number; - - /** Crop rightPixels. */ - public rightPixels: number; - - /** - * Creates a new Crop instance using the specified properties. - * @param [properties] Properties to set - * @returns Crop instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.ICrop): google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop; - - /** - * Encodes the specified Crop message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop.verify|verify} messages. - * @param message Crop message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.ICrop, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Crop message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop.verify|verify} messages. - * @param message Crop message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.ICrop, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Crop message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Crop - * @throws {Error} If the payload is not 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.transcoder.v1beta1.PreprocessingConfig.Crop; - - /** - * Decodes a Crop message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Crop - * @throws {Error} If the payload 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.transcoder.v1beta1.PreprocessingConfig.Crop; - - /** - * Verifies a Crop message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Crop message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Crop - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop; - - /** - * Creates a plain object from a Crop message. Also converts values to other types if specified. - * @param message Crop - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Crop to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Pad. */ - interface IPad { - - /** Pad topPixels */ - topPixels?: (number|null); - - /** Pad bottomPixels */ - bottomPixels?: (number|null); - - /** Pad leftPixels */ - leftPixels?: (number|null); - - /** Pad rightPixels */ - rightPixels?: (number|null); - } - - /** Represents a Pad. */ - class Pad implements IPad { - - /** - * Constructs a new Pad. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IPad); - - /** Pad topPixels. */ - public topPixels: number; - - /** Pad bottomPixels. */ - public bottomPixels: number; - - /** Pad leftPixels. */ - public leftPixels: number; - - /** Pad rightPixels. */ - public rightPixels: number; - - /** - * Creates a new Pad instance using the specified properties. - * @param [properties] Properties to set - * @returns Pad instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IPad): google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad; - - /** - * Encodes the specified Pad message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad.verify|verify} messages. - * @param message Pad message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IPad, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Pad message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad.verify|verify} messages. - * @param message Pad message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IPad, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Pad message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Pad - * @throws {Error} If the payload is not 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.transcoder.v1beta1.PreprocessingConfig.Pad; - - /** - * Decodes a Pad message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Pad - * @throws {Error} If the payload 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.transcoder.v1beta1.PreprocessingConfig.Pad; - - /** - * Verifies a Pad message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Pad message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Pad - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad; - - /** - * Creates a plain object from a Pad message. Also converts values to other types if specified. - * @param message Pad - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Pad to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a VideoStream. */ - interface IVideoStream { - - /** VideoStream codec */ - codec?: (string|null); - - /** VideoStream profile */ - profile?: (string|null); - - /** VideoStream tune */ - tune?: (string|null); - - /** VideoStream preset */ - preset?: (string|null); - - /** VideoStream heightPixels */ - heightPixels?: (number|null); - - /** VideoStream widthPixels */ - widthPixels?: (number|null); - - /** VideoStream pixelFormat */ - pixelFormat?: (string|null); - - /** VideoStream bitrateBps */ - bitrateBps?: (number|null); - - /** VideoStream rateControlMode */ - rateControlMode?: (string|null); - - /** VideoStream enableTwoPass */ - enableTwoPass?: (boolean|null); - - /** VideoStream crfLevel */ - crfLevel?: (number|null); - - /** VideoStream vbvSizeBits */ - vbvSizeBits?: (number|null); - - /** VideoStream vbvFullnessBits */ - vbvFullnessBits?: (number|null); - - /** VideoStream allowOpenGop */ - allowOpenGop?: (boolean|null); - - /** VideoStream gopFrameCount */ - gopFrameCount?: (number|null); - - /** VideoStream gopDuration */ - gopDuration?: (google.protobuf.IDuration|null); - - /** VideoStream entropyCoder */ - entropyCoder?: (string|null); - - /** VideoStream bPyramid */ - bPyramid?: (boolean|null); - - /** VideoStream bFrameCount */ - bFrameCount?: (number|null); - - /** VideoStream frameRate */ - frameRate?: (number|null); - - /** VideoStream aqStrength */ - aqStrength?: (number|null); - } - - /** Represents a VideoStream. */ - class VideoStream implements IVideoStream { - - /** - * Constructs a new VideoStream. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.IVideoStream); - - /** VideoStream codec. */ - public codec: string; - - /** VideoStream profile. */ - public profile: string; - - /** VideoStream tune. */ - public tune: string; - - /** VideoStream preset. */ - public preset: string; - - /** VideoStream heightPixels. */ - public heightPixels: number; - - /** VideoStream widthPixels. */ - public widthPixels: number; - - /** VideoStream pixelFormat. */ - public pixelFormat: string; - - /** VideoStream bitrateBps. */ - public bitrateBps: number; - - /** VideoStream rateControlMode. */ - public rateControlMode: string; - - /** VideoStream enableTwoPass. */ - public enableTwoPass: boolean; - - /** VideoStream crfLevel. */ - public crfLevel: number; - - /** VideoStream vbvSizeBits. */ - public vbvSizeBits: number; - - /** VideoStream vbvFullnessBits. */ - public vbvFullnessBits: number; - - /** VideoStream allowOpenGop. */ - public allowOpenGop: boolean; - - /** VideoStream gopFrameCount. */ - public gopFrameCount?: (number|null); - - /** VideoStream gopDuration. */ - public gopDuration?: (google.protobuf.IDuration|null); - - /** VideoStream entropyCoder. */ - public entropyCoder: string; - - /** VideoStream bPyramid. */ - public bPyramid: boolean; - - /** VideoStream bFrameCount. */ - public bFrameCount: number; - - /** VideoStream frameRate. */ - public frameRate: number; - - /** VideoStream aqStrength. */ - public aqStrength: number; - - /** VideoStream gopMode. */ - public gopMode?: ("gopFrameCount"|"gopDuration"); - - /** - * Creates a new VideoStream instance using the specified properties. - * @param [properties] Properties to set - * @returns VideoStream instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.IVideoStream): google.cloud.video.transcoder.v1beta1.VideoStream; - - /** - * Encodes the specified VideoStream message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.VideoStream.verify|verify} messages. - * @param message VideoStream message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.IVideoStream, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VideoStream message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.VideoStream.verify|verify} messages. - * @param message VideoStream message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IVideoStream, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VideoStream message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VideoStream - * @throws {Error} If the payload is not 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.transcoder.v1beta1.VideoStream; - - /** - * Decodes a VideoStream message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VideoStream - * @throws {Error} If the payload 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.transcoder.v1beta1.VideoStream; - - /** - * Verifies a VideoStream message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VideoStream message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VideoStream - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.VideoStream; - - /** - * Creates a plain object from a VideoStream message. Also converts values to other types if specified. - * @param message VideoStream - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.VideoStream, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VideoStream to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an AudioStream. */ - interface IAudioStream { - - /** AudioStream codec */ - codec?: (string|null); - - /** AudioStream bitrateBps */ - bitrateBps?: (number|null); - - /** AudioStream channelCount */ - channelCount?: (number|null); - - /** AudioStream channelLayout */ - channelLayout?: (string[]|null); - - /** AudioStream mapping */ - mapping?: (google.cloud.video.transcoder.v1beta1.AudioStream.IAudioAtom[]|null); - - /** AudioStream sampleRateHertz */ - sampleRateHertz?: (number|null); - } - - /** Represents an AudioStream. */ - class AudioStream implements IAudioStream { - - /** - * Constructs a new AudioStream. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.IAudioStream); - - /** AudioStream codec. */ - public codec: string; - - /** AudioStream bitrateBps. */ - public bitrateBps: number; - - /** AudioStream channelCount. */ - public channelCount: number; - - /** AudioStream channelLayout. */ - public channelLayout: string[]; - - /** AudioStream mapping. */ - public mapping: google.cloud.video.transcoder.v1beta1.AudioStream.IAudioAtom[]; - - /** AudioStream sampleRateHertz. */ - public sampleRateHertz: number; - - /** - * Creates a new AudioStream instance using the specified properties. - * @param [properties] Properties to set - * @returns AudioStream instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.IAudioStream): google.cloud.video.transcoder.v1beta1.AudioStream; - - /** - * Encodes the specified AudioStream message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.verify|verify} messages. - * @param message AudioStream message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.IAudioStream, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AudioStream message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.verify|verify} messages. - * @param message AudioStream message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IAudioStream, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AudioStream message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AudioStream - * @throws {Error} If the payload is not 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.transcoder.v1beta1.AudioStream; - - /** - * Decodes an AudioStream message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AudioStream - * @throws {Error} If the payload 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.transcoder.v1beta1.AudioStream; - - /** - * Verifies an AudioStream message. - * @param message Plain 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 AudioStream message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AudioStream - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.AudioStream; - - /** - * Creates a plain object from an AudioStream message. Also converts values to other types if specified. - * @param message AudioStream - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.AudioStream, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AudioStream to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace AudioStream { - - /** Properties of an AudioAtom. */ - interface IAudioAtom { - - /** AudioAtom key */ - key?: (string|null); - - /** AudioAtom channels */ - channels?: (google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.IAudioChannel[]|null); - } - - /** Represents an AudioAtom. */ - class AudioAtom implements IAudioAtom { - - /** - * Constructs a new AudioAtom. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.AudioStream.IAudioAtom); - - /** AudioAtom key. */ - public key: string; - - /** AudioAtom channels. */ - public channels: google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.IAudioChannel[]; - - /** - * Creates a new AudioAtom instance using the specified properties. - * @param [properties] Properties to set - * @returns AudioAtom instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.AudioStream.IAudioAtom): google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom; - - /** - * Encodes the specified AudioAtom message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.verify|verify} messages. - * @param message AudioAtom message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.AudioStream.IAudioAtom, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AudioAtom message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.verify|verify} messages. - * @param message AudioAtom message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.AudioStream.IAudioAtom, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AudioAtom message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AudioAtom - * @throws {Error} If the payload is not 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.transcoder.v1beta1.AudioStream.AudioAtom; - - /** - * Decodes an AudioAtom message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AudioAtom - * @throws {Error} If the payload 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.transcoder.v1beta1.AudioStream.AudioAtom; - - /** - * Verifies an AudioAtom message. - * @param message Plain 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 AudioAtom message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AudioAtom - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom; - - /** - * Creates a plain object from an AudioAtom message. Also converts values to other types if specified. - * @param message AudioAtom - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AudioAtom to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace AudioAtom { - - /** Properties of an AudioChannel. */ - interface IAudioChannel { - - /** AudioChannel inputs */ - inputs?: (google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.IAudioChannelInput[]|null); - } - - /** Represents an AudioChannel. */ - class AudioChannel implements IAudioChannel { - - /** - * Constructs a new AudioChannel. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.IAudioChannel); - - /** AudioChannel inputs. */ - public inputs: google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.IAudioChannelInput[]; - - /** - * Creates a new AudioChannel instance using the specified properties. - * @param [properties] Properties to set - * @returns AudioChannel instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.IAudioChannel): google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel; - - /** - * Encodes the specified AudioChannel message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.verify|verify} messages. - * @param message AudioChannel message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.IAudioChannel, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AudioChannel message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.verify|verify} messages. - * @param message AudioChannel message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.IAudioChannel, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AudioChannel message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AudioChannel - * @throws {Error} If the payload is not 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.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel; - - /** - * Decodes an AudioChannel message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AudioChannel - * @throws {Error} If the payload 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.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel; - - /** - * Verifies an AudioChannel message. - * @param message Plain 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 AudioChannel message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AudioChannel - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel; - - /** - * Creates a plain object from an AudioChannel message. Also converts values to other types if specified. - * @param message AudioChannel - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AudioChannel to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace AudioChannel { - - /** Properties of an AudioChannelInput. */ - interface IAudioChannelInput { - - /** AudioChannelInput key */ - key?: (string|null); - - /** AudioChannelInput track */ - track?: (number|null); - - /** AudioChannelInput channel */ - channel?: (number|null); - - /** AudioChannelInput gainDb */ - gainDb?: (number|null); - } - - /** Represents an AudioChannelInput. */ - class AudioChannelInput implements IAudioChannelInput { - - /** - * Constructs a new AudioChannelInput. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.IAudioChannelInput); - - /** AudioChannelInput key. */ - public key: string; - - /** AudioChannelInput track. */ - public track: number; - - /** AudioChannelInput channel. */ - public channel: number; - - /** AudioChannelInput gainDb. */ - public gainDb: number; - - /** - * Creates a new AudioChannelInput instance using the specified properties. - * @param [properties] Properties to set - * @returns AudioChannelInput instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.IAudioChannelInput): google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput; - - /** - * Encodes the specified AudioChannelInput message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput.verify|verify} messages. - * @param message AudioChannelInput message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.IAudioChannelInput, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AudioChannelInput message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput.verify|verify} messages. - * @param message AudioChannelInput message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.IAudioChannelInput, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AudioChannelInput message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AudioChannelInput - * @throws {Error} If the payload is not 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.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput; - - /** - * Decodes an AudioChannelInput message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AudioChannelInput - * @throws {Error} If the payload 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.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput; - - /** - * Verifies an AudioChannelInput message. - * @param message Plain 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 AudioChannelInput message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AudioChannelInput - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput; - - /** - * Creates a plain object from an AudioChannelInput message. Also converts values to other types if specified. - * @param message AudioChannelInput - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AudioChannelInput to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - } - - /** Properties of a TextStream. */ - interface ITextStream { - - /** TextStream codec */ - codec?: (string|null); - - /** TextStream languageCode */ - languageCode?: (string|null); - - /** TextStream mapping */ - mapping?: (google.cloud.video.transcoder.v1beta1.TextStream.ITextAtom[]|null); - } - - /** Represents a TextStream. */ - class TextStream implements ITextStream { - - /** - * Constructs a new TextStream. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.ITextStream); - - /** TextStream codec. */ - public codec: string; - - /** TextStream languageCode. */ - public languageCode: string; - - /** TextStream mapping. */ - public mapping: google.cloud.video.transcoder.v1beta1.TextStream.ITextAtom[]; - - /** - * Creates a new TextStream instance using the specified properties. - * @param [properties] Properties to set - * @returns TextStream instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.ITextStream): google.cloud.video.transcoder.v1beta1.TextStream; - - /** - * Encodes the specified TextStream message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.TextStream.verify|verify} messages. - * @param message TextStream message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.ITextStream, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TextStream message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.TextStream.verify|verify} messages. - * @param message TextStream message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.ITextStream, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TextStream message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TextStream - * @throws {Error} If the payload is not 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.transcoder.v1beta1.TextStream; - - /** - * Decodes a TextStream message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TextStream - * @throws {Error} If the payload 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.transcoder.v1beta1.TextStream; - - /** - * Verifies a TextStream message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TextStream message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TextStream - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.TextStream; - - /** - * Creates a plain object from a TextStream message. Also converts values to other types if specified. - * @param message TextStream - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.TextStream, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TextStream to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace TextStream { - - /** Properties of a TextAtom. */ - interface ITextAtom { - - /** TextAtom key */ - key?: (string|null); - - /** TextAtom inputs */ - inputs?: (google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.ITextInput[]|null); - } - - /** Represents a TextAtom. */ - class TextAtom implements ITextAtom { - - /** - * Constructs a new TextAtom. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.TextStream.ITextAtom); - - /** TextAtom key. */ - public key: string; - - /** TextAtom inputs. */ - public inputs: google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.ITextInput[]; - - /** - * Creates a new TextAtom instance using the specified properties. - * @param [properties] Properties to set - * @returns TextAtom instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.TextStream.ITextAtom): google.cloud.video.transcoder.v1beta1.TextStream.TextAtom; - - /** - * Encodes the specified TextAtom message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.verify|verify} messages. - * @param message TextAtom message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.TextStream.ITextAtom, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TextAtom message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.verify|verify} messages. - * @param message TextAtom message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.TextStream.ITextAtom, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TextAtom message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TextAtom - * @throws {Error} If the payload is not 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.transcoder.v1beta1.TextStream.TextAtom; - - /** - * Decodes a TextAtom message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TextAtom - * @throws {Error} If the payload 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.transcoder.v1beta1.TextStream.TextAtom; - - /** - * Verifies a TextAtom message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TextAtom message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TextAtom - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.TextStream.TextAtom; - - /** - * Creates a plain object from a TextAtom message. Also converts values to other types if specified. - * @param message TextAtom - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.TextStream.TextAtom, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TextAtom to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace TextAtom { - - /** Properties of a TextInput. */ - interface ITextInput { - - /** TextInput key */ - key?: (string|null); - - /** TextInput track */ - track?: (number|null); - } - - /** Represents a TextInput. */ - class TextInput implements ITextInput { - - /** - * Constructs a new TextInput. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.ITextInput); - - /** TextInput key. */ - public key: string; - - /** TextInput track. */ - public track: number; - - /** - * Creates a new TextInput instance using the specified properties. - * @param [properties] Properties to set - * @returns TextInput instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.ITextInput): google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput; - - /** - * Encodes the specified TextInput message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput.verify|verify} messages. - * @param message TextInput message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.ITextInput, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TextInput message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput.verify|verify} messages. - * @param message TextInput message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.ITextInput, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TextInput message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TextInput - * @throws {Error} If the payload is not 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.transcoder.v1beta1.TextStream.TextAtom.TextInput; - - /** - * Decodes a TextInput message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TextInput - * @throws {Error} If the payload 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.transcoder.v1beta1.TextStream.TextAtom.TextInput; - - /** - * Verifies a TextInput message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TextInput message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TextInput - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput; - - /** - * Creates a plain object from a TextInput message. Also converts values to other types if specified. - * @param message TextInput - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TextInput to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Properties of a SegmentSettings. */ - interface ISegmentSettings { - - /** SegmentSettings segmentDuration */ - segmentDuration?: (google.protobuf.IDuration|null); - - /** SegmentSettings individualSegments */ - individualSegments?: (boolean|null); - } - - /** Represents a SegmentSettings. */ - class SegmentSettings implements ISegmentSettings { - - /** - * Constructs a new SegmentSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.ISegmentSettings); - - /** SegmentSettings segmentDuration. */ - public segmentDuration?: (google.protobuf.IDuration|null); - - /** SegmentSettings individualSegments. */ - public individualSegments: boolean; - - /** - * Creates a new SegmentSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns SegmentSettings instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.ISegmentSettings): google.cloud.video.transcoder.v1beta1.SegmentSettings; - - /** - * Encodes the specified SegmentSettings message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.SegmentSettings.verify|verify} messages. - * @param message SegmentSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.ISegmentSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SegmentSettings message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.SegmentSettings.verify|verify} messages. - * @param message SegmentSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.ISegmentSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SegmentSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SegmentSettings - * @throws {Error} If the payload is not 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.transcoder.v1beta1.SegmentSettings; - - /** - * Decodes a SegmentSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SegmentSettings - * @throws {Error} If the payload 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.transcoder.v1beta1.SegmentSettings; - - /** - * Verifies a SegmentSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SegmentSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SegmentSettings - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.SegmentSettings; - - /** - * Creates a plain object from a SegmentSettings message. Also converts values to other types if specified. - * @param message SegmentSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.SegmentSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SegmentSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an Encryption. */ - interface IEncryption { - - /** Encryption key */ - key?: (string|null); - - /** Encryption iv */ - iv?: (string|null); - - /** Encryption aes_128 */ - aes_128?: (google.cloud.video.transcoder.v1beta1.Encryption.IAes128Encryption|null); - - /** Encryption sampleAes */ - sampleAes?: (google.cloud.video.transcoder.v1beta1.Encryption.ISampleAesEncryption|null); - - /** Encryption mpegCenc */ - mpegCenc?: (google.cloud.video.transcoder.v1beta1.Encryption.IMpegCommonEncryption|null); - } - - /** Represents an Encryption. */ - class Encryption implements IEncryption { - - /** - * Constructs a new Encryption. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.IEncryption); - - /** Encryption key. */ - public key: string; - - /** Encryption iv. */ - public iv: string; - - /** Encryption aes_128. */ - public aes_128?: (google.cloud.video.transcoder.v1beta1.Encryption.IAes128Encryption|null); - - /** Encryption sampleAes. */ - public sampleAes?: (google.cloud.video.transcoder.v1beta1.Encryption.ISampleAesEncryption|null); - - /** Encryption mpegCenc. */ - public mpegCenc?: (google.cloud.video.transcoder.v1beta1.Encryption.IMpegCommonEncryption|null); - - /** Encryption encryptionMode. */ - public encryptionMode?: ("aes_128"|"sampleAes"|"mpegCenc"); - - /** - * Creates a new Encryption instance using the specified properties. - * @param [properties] Properties to set - * @returns Encryption instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.IEncryption): google.cloud.video.transcoder.v1beta1.Encryption; - - /** - * Encodes the specified Encryption message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.verify|verify} messages. - * @param message Encryption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.IEncryption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Encryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.verify|verify} messages. - * @param message Encryption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IEncryption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Encryption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Encryption - * @throws {Error} If the payload is not 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.transcoder.v1beta1.Encryption; - - /** - * Decodes an Encryption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Encryption - * @throws {Error} If the payload 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.transcoder.v1beta1.Encryption; - - /** - * Verifies an Encryption message. - * @param message Plain 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 Encryption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Encryption - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Encryption; - - /** - * Creates a plain object from an Encryption message. Also converts values to other types if specified. - * @param message Encryption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.Encryption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Encryption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace Encryption { - - /** Properties of an Aes128Encryption. */ - interface IAes128Encryption { - - /** Aes128Encryption keyUri */ - keyUri?: (string|null); - } - - /** Represents an Aes128Encryption. */ - class Aes128Encryption implements IAes128Encryption { - - /** - * Constructs a new Aes128Encryption. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.Encryption.IAes128Encryption); - - /** Aes128Encryption keyUri. */ - public keyUri: string; - - /** - * Creates a new Aes128Encryption instance using the specified properties. - * @param [properties] Properties to set - * @returns Aes128Encryption instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.Encryption.IAes128Encryption): google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption; - - /** - * Encodes the specified Aes128Encryption message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption.verify|verify} messages. - * @param message Aes128Encryption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.Encryption.IAes128Encryption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Aes128Encryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption.verify|verify} messages. - * @param message Aes128Encryption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.Encryption.IAes128Encryption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Aes128Encryption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Aes128Encryption - * @throws {Error} If the payload is not 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.transcoder.v1beta1.Encryption.Aes128Encryption; - - /** - * Decodes an Aes128Encryption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Aes128Encryption - * @throws {Error} If the payload 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.transcoder.v1beta1.Encryption.Aes128Encryption; - - /** - * Verifies an Aes128Encryption message. - * @param message Plain 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 Aes128Encryption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Aes128Encryption - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption; - - /** - * Creates a plain object from an Aes128Encryption message. Also converts values to other types if specified. - * @param message Aes128Encryption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Aes128Encryption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SampleAesEncryption. */ - interface ISampleAesEncryption { - - /** SampleAesEncryption keyUri */ - keyUri?: (string|null); - } - - /** Represents a SampleAesEncryption. */ - class SampleAesEncryption implements ISampleAesEncryption { - - /** - * Constructs a new SampleAesEncryption. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.Encryption.ISampleAesEncryption); - - /** SampleAesEncryption keyUri. */ - public keyUri: string; - - /** - * Creates a new SampleAesEncryption instance using the specified properties. - * @param [properties] Properties to set - * @returns SampleAesEncryption instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.Encryption.ISampleAesEncryption): google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption; - - /** - * Encodes the specified SampleAesEncryption message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption.verify|verify} messages. - * @param message SampleAesEncryption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.Encryption.ISampleAesEncryption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SampleAesEncryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption.verify|verify} messages. - * @param message SampleAesEncryption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.Encryption.ISampleAesEncryption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SampleAesEncryption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SampleAesEncryption - * @throws {Error} If the payload is not 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.transcoder.v1beta1.Encryption.SampleAesEncryption; - - /** - * Decodes a SampleAesEncryption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SampleAesEncryption - * @throws {Error} If the payload 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.transcoder.v1beta1.Encryption.SampleAesEncryption; - - /** - * Verifies a SampleAesEncryption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SampleAesEncryption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SampleAesEncryption - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption; - - /** - * Creates a plain object from a SampleAesEncryption message. Also converts values to other types if specified. - * @param message SampleAesEncryption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SampleAesEncryption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MpegCommonEncryption. */ - interface IMpegCommonEncryption { - - /** MpegCommonEncryption keyId */ - keyId?: (string|null); - - /** MpegCommonEncryption scheme */ - scheme?: (string|null); - } - - /** Represents a MpegCommonEncryption. */ - class MpegCommonEncryption implements IMpegCommonEncryption { - - /** - * Constructs a new MpegCommonEncryption. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.Encryption.IMpegCommonEncryption); - - /** MpegCommonEncryption keyId. */ - public keyId: string; - - /** MpegCommonEncryption scheme. */ - public scheme: string; - - /** - * Creates a new MpegCommonEncryption instance using the specified properties. - * @param [properties] Properties to set - * @returns MpegCommonEncryption instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.Encryption.IMpegCommonEncryption): google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption; - - /** - * Encodes the specified MpegCommonEncryption message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption.verify|verify} messages. - * @param message MpegCommonEncryption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.Encryption.IMpegCommonEncryption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MpegCommonEncryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption.verify|verify} messages. - * @param message MpegCommonEncryption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.Encryption.IMpegCommonEncryption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MpegCommonEncryption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MpegCommonEncryption - * @throws {Error} If the payload is not 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.transcoder.v1beta1.Encryption.MpegCommonEncryption; - - /** - * Decodes a MpegCommonEncryption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MpegCommonEncryption - * @throws {Error} If the payload 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.transcoder.v1beta1.Encryption.MpegCommonEncryption; - - /** - * Verifies a MpegCommonEncryption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MpegCommonEncryption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MpegCommonEncryption - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption; - - /** - * Creates a plain object from a MpegCommonEncryption message. Also converts values to other types if specified. - * @param message MpegCommonEncryption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MpegCommonEncryption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a Progress. */ - interface IProgress { - - /** Progress analyzed */ - analyzed?: (number|null); - - /** Progress encoded */ - encoded?: (number|null); - - /** Progress uploaded */ - uploaded?: (number|null); - - /** Progress notified */ - notified?: (number|null); - } - - /** Represents a Progress. */ - class Progress implements IProgress { - - /** - * Constructs a new Progress. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.IProgress); - - /** Progress analyzed. */ - public analyzed: number; - - /** Progress encoded. */ - public encoded: number; - - /** Progress uploaded. */ - public uploaded: number; - - /** Progress notified. */ - public notified: number; - - /** - * Creates a new Progress instance using the specified properties. - * @param [properties] Properties to set - * @returns Progress instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.IProgress): google.cloud.video.transcoder.v1beta1.Progress; - - /** - * Encodes the specified Progress message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Progress.verify|verify} messages. - * @param message Progress message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.IProgress, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Progress message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Progress.verify|verify} messages. - * @param message Progress message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IProgress, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Progress message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Progress - * @throws {Error} If the payload is not 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.transcoder.v1beta1.Progress; - - /** - * Decodes a Progress message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Progress - * @throws {Error} If the payload 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.transcoder.v1beta1.Progress; - - /** - * Verifies a Progress message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Progress message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Progress - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.Progress; - - /** - * Creates a plain object from a Progress message. Also converts values to other types if specified. - * @param message Progress - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.Progress, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Progress to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FailureDetail. */ - interface IFailureDetail { - - /** FailureDetail description */ - description?: (string|null); - } - - /** Represents a FailureDetail. */ - class FailureDetail implements IFailureDetail { - - /** - * Constructs a new FailureDetail. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.IFailureDetail); - - /** FailureDetail description. */ - public description: string; - - /** - * Creates a new FailureDetail instance using the specified properties. - * @param [properties] Properties to set - * @returns FailureDetail instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.IFailureDetail): google.cloud.video.transcoder.v1beta1.FailureDetail; - - /** - * Encodes the specified FailureDetail message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.FailureDetail.verify|verify} messages. - * @param message FailureDetail message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.IFailureDetail, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FailureDetail message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.FailureDetail.verify|verify} messages. - * @param message FailureDetail message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IFailureDetail, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FailureDetail message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FailureDetail - * @throws {Error} If the payload is not 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.transcoder.v1beta1.FailureDetail; - - /** - * Decodes a FailureDetail message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FailureDetail - * @throws {Error} If the payload 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.transcoder.v1beta1.FailureDetail; - - /** - * Verifies a FailureDetail message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FailureDetail message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FailureDetail - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.FailureDetail; - - /** - * Creates a plain object from a FailureDetail message. Also converts values to other types if specified. - * @param message FailureDetail - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.FailureDetail, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FailureDetail to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Represents a TranscoderService */ - class TranscoderService extends $protobuf.rpc.Service { - - /** - * Constructs a new TranscoderService 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 TranscoderService 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): TranscoderService; - - /** - * Calls CreateJob. - * @param request CreateJobRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Job - */ - public createJob(request: google.cloud.video.transcoder.v1beta1.ICreateJobRequest, callback: google.cloud.video.transcoder.v1beta1.TranscoderService.CreateJobCallback): void; - - /** - * Calls CreateJob. - * @param request CreateJobRequest message or plain object - * @returns Promise - */ - public createJob(request: google.cloud.video.transcoder.v1beta1.ICreateJobRequest): Promise; - - /** - * Calls ListJobs. - * @param request ListJobsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListJobsResponse - */ - public listJobs(request: google.cloud.video.transcoder.v1beta1.IListJobsRequest, callback: google.cloud.video.transcoder.v1beta1.TranscoderService.ListJobsCallback): void; - - /** - * Calls ListJobs. - * @param request ListJobsRequest message or plain object - * @returns Promise - */ - public listJobs(request: google.cloud.video.transcoder.v1beta1.IListJobsRequest): Promise; - - /** - * Calls GetJob. - * @param request GetJobRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Job - */ - public getJob(request: google.cloud.video.transcoder.v1beta1.IGetJobRequest, callback: google.cloud.video.transcoder.v1beta1.TranscoderService.GetJobCallback): void; - - /** - * Calls GetJob. - * @param request GetJobRequest message or plain object - * @returns Promise - */ - public getJob(request: google.cloud.video.transcoder.v1beta1.IGetJobRequest): Promise; - - /** - * Calls DeleteJob. - * @param request DeleteJobRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteJob(request: google.cloud.video.transcoder.v1beta1.IDeleteJobRequest, callback: google.cloud.video.transcoder.v1beta1.TranscoderService.DeleteJobCallback): void; - - /** - * Calls DeleteJob. - * @param request DeleteJobRequest message or plain object - * @returns Promise - */ - public deleteJob(request: google.cloud.video.transcoder.v1beta1.IDeleteJobRequest): Promise; - - /** - * Calls CreateJobTemplate. - * @param request CreateJobTemplateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and JobTemplate - */ - public createJobTemplate(request: google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest, callback: google.cloud.video.transcoder.v1beta1.TranscoderService.CreateJobTemplateCallback): void; - - /** - * Calls CreateJobTemplate. - * @param request CreateJobTemplateRequest message or plain object - * @returns Promise - */ - public createJobTemplate(request: google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest): Promise; - - /** - * Calls ListJobTemplates. - * @param request ListJobTemplatesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListJobTemplatesResponse - */ - public listJobTemplates(request: google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, callback: google.cloud.video.transcoder.v1beta1.TranscoderService.ListJobTemplatesCallback): void; - - /** - * Calls ListJobTemplates. - * @param request ListJobTemplatesRequest message or plain object - * @returns Promise - */ - public listJobTemplates(request: google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest): Promise; - - /** - * Calls GetJobTemplate. - * @param request GetJobTemplateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and JobTemplate - */ - public getJobTemplate(request: google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest, callback: google.cloud.video.transcoder.v1beta1.TranscoderService.GetJobTemplateCallback): void; - - /** - * Calls GetJobTemplate. - * @param request GetJobTemplateRequest message or plain object - * @returns Promise - */ - public getJobTemplate(request: google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest): Promise; - - /** - * Calls DeleteJobTemplate. - * @param request DeleteJobTemplateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteJobTemplate(request: google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest, callback: google.cloud.video.transcoder.v1beta1.TranscoderService.DeleteJobTemplateCallback): void; - - /** - * Calls DeleteJobTemplate. - * @param request DeleteJobTemplateRequest message or plain object - * @returns Promise - */ - public deleteJobTemplate(request: google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest): Promise; - } - - namespace TranscoderService { - - /** - * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#createJob}. - * @param error Error, if any - * @param [response] Job - */ - type CreateJobCallback = (error: (Error|null), response?: google.cloud.video.transcoder.v1beta1.Job) => void; - - /** - * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#listJobs}. - * @param error Error, if any - * @param [response] ListJobsResponse - */ - type ListJobsCallback = (error: (Error|null), response?: google.cloud.video.transcoder.v1beta1.ListJobsResponse) => void; - - /** - * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#getJob}. - * @param error Error, if any - * @param [response] Job - */ - type GetJobCallback = (error: (Error|null), response?: google.cloud.video.transcoder.v1beta1.Job) => void; - - /** - * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#deleteJob}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteJobCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#createJobTemplate}. - * @param error Error, if any - * @param [response] JobTemplate - */ - type CreateJobTemplateCallback = (error: (Error|null), response?: google.cloud.video.transcoder.v1beta1.JobTemplate) => void; - - /** - * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#listJobTemplates}. - * @param error Error, if any - * @param [response] ListJobTemplatesResponse - */ - type ListJobTemplatesCallback = (error: (Error|null), response?: google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse) => void; - - /** - * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#getJobTemplate}. - * @param error Error, if any - * @param [response] JobTemplate - */ - type GetJobTemplateCallback = (error: (Error|null), response?: google.cloud.video.transcoder.v1beta1.JobTemplate) => void; - - /** - * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#deleteJobTemplate}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteJobTemplateCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - } - - /** Properties of a CreateJobRequest. */ - interface ICreateJobRequest { - - /** CreateJobRequest parent */ - parent?: (string|null); - - /** CreateJobRequest job */ - job?: (google.cloud.video.transcoder.v1beta1.IJob|null); - } - - /** Represents a CreateJobRequest. */ - class CreateJobRequest implements ICreateJobRequest { - - /** - * Constructs a new CreateJobRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.ICreateJobRequest); - - /** CreateJobRequest parent. */ - public parent: string; - - /** CreateJobRequest job. */ - public job?: (google.cloud.video.transcoder.v1beta1.IJob|null); - - /** - * Creates a new CreateJobRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateJobRequest instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.ICreateJobRequest): google.cloud.video.transcoder.v1beta1.CreateJobRequest; - - /** - * Encodes the specified CreateJobRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.CreateJobRequest.verify|verify} messages. - * @param message CreateJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.ICreateJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateJobRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.CreateJobRequest.verify|verify} messages. - * @param message CreateJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.ICreateJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateJobRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateJobRequest - * @throws {Error} If the payload is not 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.transcoder.v1beta1.CreateJobRequest; - - /** - * Decodes a CreateJobRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateJobRequest - * @throws {Error} If the payload 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.transcoder.v1beta1.CreateJobRequest; - - /** - * Verifies a CreateJobRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateJobRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateJobRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.CreateJobRequest; - - /** - * Creates a plain object from a CreateJobRequest message. Also converts values to other types if specified. - * @param message CreateJobRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.CreateJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateJobRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ListJobsRequest. */ - interface IListJobsRequest { - - /** ListJobsRequest parent */ - parent?: (string|null); - - /** ListJobsRequest pageSize */ - pageSize?: (number|null); - - /** ListJobsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListJobsRequest. */ - class ListJobsRequest implements IListJobsRequest { - - /** - * Constructs a new ListJobsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.IListJobsRequest); - - /** ListJobsRequest parent. */ - public parent: string; - - /** ListJobsRequest pageSize. */ - public pageSize: number; - - /** ListJobsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListJobsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListJobsRequest instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.IListJobsRequest): google.cloud.video.transcoder.v1beta1.ListJobsRequest; - - /** - * Encodes the specified ListJobsRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobsRequest.verify|verify} messages. - * @param message ListJobsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.IListJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListJobsRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobsRequest.verify|verify} messages. - * @param message ListJobsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IListJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListJobsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListJobsRequest - * @throws {Error} If the payload is not 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.transcoder.v1beta1.ListJobsRequest; - - /** - * Decodes a ListJobsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListJobsRequest - * @throws {Error} If the payload 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.transcoder.v1beta1.ListJobsRequest; - - /** - * Verifies a ListJobsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListJobsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListJobsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.ListJobsRequest; - - /** - * Creates a plain object from a ListJobsRequest message. Also converts values to other types if specified. - * @param message ListJobsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.ListJobsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListJobsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetJobRequest. */ - interface IGetJobRequest { - - /** GetJobRequest name */ - name?: (string|null); - } - - /** Represents a GetJobRequest. */ - class GetJobRequest implements IGetJobRequest { - - /** - * Constructs a new GetJobRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.IGetJobRequest); - - /** GetJobRequest name. */ - public name: string; - - /** - * Creates a new GetJobRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetJobRequest instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.IGetJobRequest): google.cloud.video.transcoder.v1beta1.GetJobRequest; - - /** - * Encodes the specified GetJobRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.GetJobRequest.verify|verify} messages. - * @param message GetJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.IGetJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetJobRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.GetJobRequest.verify|verify} messages. - * @param message GetJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IGetJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetJobRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetJobRequest - * @throws {Error} If the payload is not 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.transcoder.v1beta1.GetJobRequest; - - /** - * Decodes a GetJobRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetJobRequest - * @throws {Error} If the payload 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.transcoder.v1beta1.GetJobRequest; - - /** - * Verifies a GetJobRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetJobRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetJobRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.GetJobRequest; - - /** - * Creates a plain object from a GetJobRequest message. Also converts values to other types if specified. - * @param message GetJobRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.GetJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetJobRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DeleteJobRequest. */ - interface IDeleteJobRequest { - - /** DeleteJobRequest name */ - name?: (string|null); - } - - /** Represents a DeleteJobRequest. */ - class DeleteJobRequest implements IDeleteJobRequest { - - /** - * Constructs a new DeleteJobRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.IDeleteJobRequest); - - /** DeleteJobRequest name. */ - public name: string; - - /** - * Creates a new DeleteJobRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteJobRequest instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.IDeleteJobRequest): google.cloud.video.transcoder.v1beta1.DeleteJobRequest; - - /** - * Encodes the specified DeleteJobRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.DeleteJobRequest.verify|verify} messages. - * @param message DeleteJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.IDeleteJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteJobRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.DeleteJobRequest.verify|verify} messages. - * @param message DeleteJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IDeleteJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteJobRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteJobRequest - * @throws {Error} If the payload is not 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.transcoder.v1beta1.DeleteJobRequest; - - /** - * Decodes a DeleteJobRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteJobRequest - * @throws {Error} If the payload 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.transcoder.v1beta1.DeleteJobRequest; - - /** - * Verifies a DeleteJobRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteJobRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteJobRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.DeleteJobRequest; - - /** - * Creates a plain object from a DeleteJobRequest message. Also converts values to other types if specified. - * @param message DeleteJobRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.DeleteJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteJobRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ListJobsResponse. */ - interface IListJobsResponse { - - /** ListJobsResponse jobs */ - jobs?: (google.cloud.video.transcoder.v1beta1.IJob[]|null); - - /** ListJobsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListJobsResponse. */ - class ListJobsResponse implements IListJobsResponse { - - /** - * Constructs a new ListJobsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.IListJobsResponse); - - /** ListJobsResponse jobs. */ - public jobs: google.cloud.video.transcoder.v1beta1.IJob[]; - - /** ListJobsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListJobsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListJobsResponse instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.IListJobsResponse): google.cloud.video.transcoder.v1beta1.ListJobsResponse; - - /** - * Encodes the specified ListJobsResponse message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobsResponse.verify|verify} messages. - * @param message ListJobsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.IListJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListJobsResponse message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobsResponse.verify|verify} messages. - * @param message ListJobsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IListJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListJobsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListJobsResponse - * @throws {Error} If the payload is not 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.transcoder.v1beta1.ListJobsResponse; - - /** - * Decodes a ListJobsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListJobsResponse - * @throws {Error} If the payload 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.transcoder.v1beta1.ListJobsResponse; - - /** - * Verifies a ListJobsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListJobsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListJobsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.ListJobsResponse; - - /** - * Creates a plain object from a ListJobsResponse message. Also converts values to other types if specified. - * @param message ListJobsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.ListJobsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListJobsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CreateJobTemplateRequest. */ - interface ICreateJobTemplateRequest { - - /** CreateJobTemplateRequest parent */ - parent?: (string|null); - - /** CreateJobTemplateRequest jobTemplate */ - jobTemplate?: (google.cloud.video.transcoder.v1beta1.IJobTemplate|null); - - /** CreateJobTemplateRequest jobTemplateId */ - jobTemplateId?: (string|null); - } - - /** Represents a CreateJobTemplateRequest. */ - class CreateJobTemplateRequest implements ICreateJobTemplateRequest { - - /** - * Constructs a new CreateJobTemplateRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest); - - /** CreateJobTemplateRequest parent. */ - public parent: string; - - /** CreateJobTemplateRequest jobTemplate. */ - public jobTemplate?: (google.cloud.video.transcoder.v1beta1.IJobTemplate|null); - - /** CreateJobTemplateRequest jobTemplateId. */ - public jobTemplateId: string; - - /** - * Creates a new CreateJobTemplateRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateJobTemplateRequest instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest): google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest; - - /** - * Encodes the specified CreateJobTemplateRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest.verify|verify} messages. - * @param message CreateJobTemplateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateJobTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest.verify|verify} messages. - * @param message CreateJobTemplateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateJobTemplateRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateJobTemplateRequest - * @throws {Error} If the payload is not 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.transcoder.v1beta1.CreateJobTemplateRequest; - - /** - * Decodes a CreateJobTemplateRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateJobTemplateRequest - * @throws {Error} If the payload 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.transcoder.v1beta1.CreateJobTemplateRequest; - - /** - * Verifies a CreateJobTemplateRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateJobTemplateRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateJobTemplateRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest; - - /** - * Creates a plain object from a CreateJobTemplateRequest message. Also converts values to other types if specified. - * @param message CreateJobTemplateRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateJobTemplateRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ListJobTemplatesRequest. */ - interface IListJobTemplatesRequest { - - /** ListJobTemplatesRequest parent */ - parent?: (string|null); - - /** ListJobTemplatesRequest pageSize */ - pageSize?: (number|null); - - /** ListJobTemplatesRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListJobTemplatesRequest. */ - class ListJobTemplatesRequest implements IListJobTemplatesRequest { - - /** - * Constructs a new ListJobTemplatesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest); - - /** ListJobTemplatesRequest parent. */ - public parent: string; - - /** ListJobTemplatesRequest pageSize. */ - public pageSize: number; - - /** ListJobTemplatesRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListJobTemplatesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListJobTemplatesRequest instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest): google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest; - - /** - * Encodes the specified ListJobTemplatesRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest.verify|verify} messages. - * @param message ListJobTemplatesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListJobTemplatesRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest.verify|verify} messages. - * @param message ListJobTemplatesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListJobTemplatesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListJobTemplatesRequest - * @throws {Error} If the payload is not 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.transcoder.v1beta1.ListJobTemplatesRequest; - - /** - * Decodes a ListJobTemplatesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListJobTemplatesRequest - * @throws {Error} If the payload 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.transcoder.v1beta1.ListJobTemplatesRequest; - - /** - * Verifies a ListJobTemplatesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListJobTemplatesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListJobTemplatesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest; - - /** - * Creates a plain object from a ListJobTemplatesRequest message. Also converts values to other types if specified. - * @param message ListJobTemplatesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListJobTemplatesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetJobTemplateRequest. */ - interface IGetJobTemplateRequest { - - /** GetJobTemplateRequest name */ - name?: (string|null); - } - - /** Represents a GetJobTemplateRequest. */ - class GetJobTemplateRequest implements IGetJobTemplateRequest { - - /** - * Constructs a new GetJobTemplateRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest); - - /** GetJobTemplateRequest name. */ - public name: string; - - /** - * Creates a new GetJobTemplateRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetJobTemplateRequest instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest): google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest; - - /** - * Encodes the specified GetJobTemplateRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest.verify|verify} messages. - * @param message GetJobTemplateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetJobTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest.verify|verify} messages. - * @param message GetJobTemplateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetJobTemplateRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetJobTemplateRequest - * @throws {Error} If the payload is not 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.transcoder.v1beta1.GetJobTemplateRequest; - - /** - * Decodes a GetJobTemplateRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetJobTemplateRequest - * @throws {Error} If the payload 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.transcoder.v1beta1.GetJobTemplateRequest; - - /** - * Verifies a GetJobTemplateRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetJobTemplateRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetJobTemplateRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest; - - /** - * Creates a plain object from a GetJobTemplateRequest message. Also converts values to other types if specified. - * @param message GetJobTemplateRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetJobTemplateRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DeleteJobTemplateRequest. */ - interface IDeleteJobTemplateRequest { - - /** DeleteJobTemplateRequest name */ - name?: (string|null); - } - - /** Represents a DeleteJobTemplateRequest. */ - class DeleteJobTemplateRequest implements IDeleteJobTemplateRequest { - - /** - * Constructs a new DeleteJobTemplateRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest); - - /** DeleteJobTemplateRequest name. */ - public name: string; - - /** - * Creates a new DeleteJobTemplateRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteJobTemplateRequest instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest): google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest; - - /** - * Encodes the specified DeleteJobTemplateRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest.verify|verify} messages. - * @param message DeleteJobTemplateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteJobTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest.verify|verify} messages. - * @param message DeleteJobTemplateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteJobTemplateRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteJobTemplateRequest - * @throws {Error} If the payload is not 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.transcoder.v1beta1.DeleteJobTemplateRequest; - - /** - * Decodes a DeleteJobTemplateRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteJobTemplateRequest - * @throws {Error} If the payload 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.transcoder.v1beta1.DeleteJobTemplateRequest; - - /** - * Verifies a DeleteJobTemplateRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteJobTemplateRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteJobTemplateRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest; - - /** - * Creates a plain object from a DeleteJobTemplateRequest message. Also converts values to other types if specified. - * @param message DeleteJobTemplateRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteJobTemplateRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ListJobTemplatesResponse. */ - interface IListJobTemplatesResponse { - - /** ListJobTemplatesResponse jobTemplates */ - jobTemplates?: (google.cloud.video.transcoder.v1beta1.IJobTemplate[]|null); - - /** ListJobTemplatesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListJobTemplatesResponse. */ - class ListJobTemplatesResponse implements IListJobTemplatesResponse { - - /** - * Constructs a new ListJobTemplatesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.video.transcoder.v1beta1.IListJobTemplatesResponse); - - /** ListJobTemplatesResponse jobTemplates. */ - public jobTemplates: google.cloud.video.transcoder.v1beta1.IJobTemplate[]; - - /** ListJobTemplatesResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListJobTemplatesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListJobTemplatesResponse instance - */ - public static create(properties?: google.cloud.video.transcoder.v1beta1.IListJobTemplatesResponse): google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse; - - /** - * Encodes the specified ListJobTemplatesResponse message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse.verify|verify} messages. - * @param message ListJobTemplatesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.video.transcoder.v1beta1.IListJobTemplatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListJobTemplatesResponse message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse.verify|verify} messages. - * @param message ListJobTemplatesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.video.transcoder.v1beta1.IListJobTemplatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListJobTemplatesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListJobTemplatesResponse - * @throws {Error} If the payload is not 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.transcoder.v1beta1.ListJobTemplatesResponse; - - /** - * Decodes a ListJobTemplatesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListJobTemplatesResponse - * @throws {Error} If the payload 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.transcoder.v1beta1.ListJobTemplatesResponse; - - /** - * Verifies a ListJobTemplatesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListJobTemplatesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListJobTemplatesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse; - - /** - * Creates a plain object from a ListJobTemplatesResponse message. Also converts values to other types if specified. - * @param message ListJobTemplatesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListJobTemplatesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } } } } diff --git a/packages/google-cloud-video-transcoder/protos/protos.js b/packages/google-cloud-video-transcoder/protos/protos.js index 4f4701c96e1..9eb2a6e83a4 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.js +++ b/packages/google-cloud-video-transcoder/protos/protos.js @@ -13077,13845 +13077,6 @@ return v1; })(); - transcoder.v1beta1 = (function() { - - /** - * Namespace v1beta1. - * @memberof google.cloud.video.transcoder - * @namespace - */ - var v1beta1 = {}; - - v1beta1.Job = (function() { - - /** - * Properties of a Job. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface IJob - * @property {string|null} [name] Job name - * @property {string|null} [inputUri] Job inputUri - * @property {string|null} [outputUri] Job outputUri - * @property {string|null} [templateId] Job templateId - * @property {google.cloud.video.transcoder.v1beta1.IJobConfig|null} [config] Job config - * @property {number|null} [priority] Job priority - * @property {google.cloud.video.transcoder.v1beta1.Job.IOriginUri|null} [originUri] Job originUri - * @property {google.cloud.video.transcoder.v1beta1.Job.ProcessingState|null} [state] Job state - * @property {google.cloud.video.transcoder.v1beta1.IProgress|null} [progress] Job progress - * @property {string|null} [failureReason] Job failureReason - * @property {Array.|null} [failureDetails] Job failureDetails - * @property {google.protobuf.ITimestamp|null} [createTime] Job createTime - * @property {google.protobuf.ITimestamp|null} [startTime] Job startTime - * @property {google.protobuf.ITimestamp|null} [endTime] Job endTime - * @property {number|null} [ttlAfterCompletionDays] Job ttlAfterCompletionDays - */ - - /** - * Constructs a new Job. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents a Job. - * @implements IJob - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.IJob=} [properties] Properties to set - */ - function Job(properties) { - this.failureDetails = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Job name. - * @member {string} name - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @instance - */ - Job.prototype.name = ""; - - /** - * Job inputUri. - * @member {string} inputUri - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @instance - */ - Job.prototype.inputUri = ""; - - /** - * Job outputUri. - * @member {string} outputUri - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @instance - */ - Job.prototype.outputUri = ""; - - /** - * Job templateId. - * @member {string|null|undefined} templateId - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @instance - */ - Job.prototype.templateId = null; - - /** - * Job config. - * @member {google.cloud.video.transcoder.v1beta1.IJobConfig|null|undefined} config - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @instance - */ - Job.prototype.config = null; - - /** - * Job priority. - * @member {number} priority - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @instance - */ - Job.prototype.priority = 0; - - /** - * Job originUri. - * @member {google.cloud.video.transcoder.v1beta1.Job.IOriginUri|null|undefined} originUri - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @instance - */ - Job.prototype.originUri = null; - - /** - * Job state. - * @member {google.cloud.video.transcoder.v1beta1.Job.ProcessingState} state - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @instance - */ - Job.prototype.state = 0; - - /** - * Job progress. - * @member {google.cloud.video.transcoder.v1beta1.IProgress|null|undefined} progress - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @instance - */ - Job.prototype.progress = null; - - /** - * Job failureReason. - * @member {string} failureReason - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @instance - */ - Job.prototype.failureReason = ""; - - /** - * Job failureDetails. - * @member {Array.} failureDetails - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @instance - */ - Job.prototype.failureDetails = $util.emptyArray; - - /** - * Job createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @instance - */ - Job.prototype.createTime = null; - - /** - * Job startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @instance - */ - Job.prototype.startTime = null; - - /** - * Job endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @instance - */ - Job.prototype.endTime = null; - - /** - * Job ttlAfterCompletionDays. - * @member {number} ttlAfterCompletionDays - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @instance - */ - Job.prototype.ttlAfterCompletionDays = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Job jobConfig. - * @member {"templateId"|"config"|undefined} jobConfig - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @instance - */ - Object.defineProperty(Job.prototype, "jobConfig", { - get: $util.oneOfGetter($oneOfFields = ["templateId", "config"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Job instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @static - * @param {google.cloud.video.transcoder.v1beta1.IJob=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.Job} Job instance - */ - Job.create = function create(properties) { - return new Job(properties); - }; - - /** - * Encodes the specified Job message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Job.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @static - * @param {google.cloud.video.transcoder.v1beta1.IJob} message Job message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Job.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.inputUri != null && Object.hasOwnProperty.call(message, "inputUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputUri); - if (message.outputUri != null && Object.hasOwnProperty.call(message, "outputUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputUri); - if (message.templateId != null && Object.hasOwnProperty.call(message, "templateId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.templateId); - if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.video.transcoder.v1beta1.JobConfig.encode(message.config, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.priority); - if (message.originUri != null && Object.hasOwnProperty.call(message, "originUri")) - $root.google.cloud.video.transcoder.v1beta1.Job.OriginUri.encode(message.originUri, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); - if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) - $root.google.cloud.video.transcoder.v1beta1.Progress.encode(message.progress, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.failureReason != null && Object.hasOwnProperty.call(message, "failureReason")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.failureReason); - if (message.failureDetails != null && message.failureDetails.length) - for (var i = 0; i < message.failureDetails.length; ++i) - $root.google.cloud.video.transcoder.v1beta1.FailureDetail.encode(message.failureDetails[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.ttlAfterCompletionDays != null && Object.hasOwnProperty.call(message, "ttlAfterCompletionDays")) - writer.uint32(/* id 15, wireType 0 =*/120).int32(message.ttlAfterCompletionDays); - return writer; - }; - - /** - * Encodes the specified Job message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Job.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @static - * @param {google.cloud.video.transcoder.v1beta1.IJob} message Job message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Job.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Job message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.Job} Job - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Job.decode = function 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.transcoder.v1beta1.Job(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputUri = reader.string(); - break; - case 3: - message.outputUri = reader.string(); - break; - case 4: - message.templateId = reader.string(); - break; - case 5: - message.config = $root.google.cloud.video.transcoder.v1beta1.JobConfig.decode(reader, reader.uint32()); - break; - case 6: - message.priority = reader.int32(); - break; - case 7: - message.originUri = $root.google.cloud.video.transcoder.v1beta1.Job.OriginUri.decode(reader, reader.uint32()); - break; - case 8: - message.state = reader.int32(); - break; - case 9: - message.progress = $root.google.cloud.video.transcoder.v1beta1.Progress.decode(reader, reader.uint32()); - break; - case 10: - message.failureReason = reader.string(); - break; - case 11: - if (!(message.failureDetails && message.failureDetails.length)) - message.failureDetails = []; - message.failureDetails.push($root.google.cloud.video.transcoder.v1beta1.FailureDetail.decode(reader, reader.uint32())); - break; - case 12: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 13: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 14: - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 15: - message.ttlAfterCompletionDays = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Job message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.Job} Job - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Job.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Job message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Job.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.inputUri != null && message.hasOwnProperty("inputUri")) - if (!$util.isString(message.inputUri)) - return "inputUri: string expected"; - if (message.outputUri != null && message.hasOwnProperty("outputUri")) - if (!$util.isString(message.outputUri)) - return "outputUri: string expected"; - if (message.templateId != null && message.hasOwnProperty("templateId")) { - properties.jobConfig = 1; - if (!$util.isString(message.templateId)) - return "templateId: string expected"; - } - if (message.config != null && message.hasOwnProperty("config")) { - if (properties.jobConfig === 1) - return "jobConfig: multiple values"; - properties.jobConfig = 1; - { - var error = $root.google.cloud.video.transcoder.v1beta1.JobConfig.verify(message.config); - if (error) - return "config." + error; - } - } - if (message.priority != null && message.hasOwnProperty("priority")) - if (!$util.isInteger(message.priority)) - return "priority: integer expected"; - if (message.originUri != null && message.hasOwnProperty("originUri")) { - var error = $root.google.cloud.video.transcoder.v1beta1.Job.OriginUri.verify(message.originUri); - if (error) - return "originUri." + error; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.progress != null && message.hasOwnProperty("progress")) { - var error = $root.google.cloud.video.transcoder.v1beta1.Progress.verify(message.progress); - if (error) - return "progress." + error; - } - if (message.failureReason != null && message.hasOwnProperty("failureReason")) - if (!$util.isString(message.failureReason)) - return "failureReason: string expected"; - if (message.failureDetails != null && message.hasOwnProperty("failureDetails")) { - if (!Array.isArray(message.failureDetails)) - return "failureDetails: array expected"; - for (var i = 0; i < message.failureDetails.length; ++i) { - var error = $root.google.cloud.video.transcoder.v1beta1.FailureDetail.verify(message.failureDetails[i]); - if (error) - return "failureDetails." + error; - } - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.ttlAfterCompletionDays != null && message.hasOwnProperty("ttlAfterCompletionDays")) - if (!$util.isInteger(message.ttlAfterCompletionDays)) - return "ttlAfterCompletionDays: integer expected"; - return null; - }; - - /** - * Creates a Job message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.Job} Job - */ - Job.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Job) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.Job(); - if (object.name != null) - message.name = String(object.name); - if (object.inputUri != null) - message.inputUri = String(object.inputUri); - if (object.outputUri != null) - message.outputUri = String(object.outputUri); - if (object.templateId != null) - message.templateId = String(object.templateId); - if (object.config != null) { - if (typeof object.config !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.config: object expected"); - message.config = $root.google.cloud.video.transcoder.v1beta1.JobConfig.fromObject(object.config); - } - if (object.priority != null) - message.priority = object.priority | 0; - if (object.originUri != null) { - if (typeof object.originUri !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.originUri: object expected"); - message.originUri = $root.google.cloud.video.transcoder.v1beta1.Job.OriginUri.fromObject(object.originUri); - } - switch (object.state) { - case "PROCESSING_STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "PENDING": - case 1: - message.state = 1; - break; - case "RUNNING": - case 2: - message.state = 2; - break; - case "SUCCEEDED": - case 3: - message.state = 3; - break; - case "FAILED": - case 4: - message.state = 4; - break; - } - if (object.progress != null) { - if (typeof object.progress !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.progress: object expected"); - message.progress = $root.google.cloud.video.transcoder.v1beta1.Progress.fromObject(object.progress); - } - if (object.failureReason != null) - message.failureReason = String(object.failureReason); - if (object.failureDetails) { - if (!Array.isArray(object.failureDetails)) - throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.failureDetails: array expected"); - message.failureDetails = []; - for (var i = 0; i < object.failureDetails.length; ++i) { - if (typeof object.failureDetails[i] !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.failureDetails: object expected"); - message.failureDetails[i] = $root.google.cloud.video.transcoder.v1beta1.FailureDetail.fromObject(object.failureDetails[i]); - } - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.Job.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.ttlAfterCompletionDays != null) - message.ttlAfterCompletionDays = object.ttlAfterCompletionDays | 0; - return message; - }; - - /** - * Creates a plain object from a Job message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @static - * @param {google.cloud.video.transcoder.v1beta1.Job} message Job - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Job.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.failureDetails = []; - if (options.defaults) { - object.name = ""; - object.inputUri = ""; - object.outputUri = ""; - object.priority = 0; - object.originUri = null; - object.state = options.enums === String ? "PROCESSING_STATE_UNSPECIFIED" : 0; - object.progress = null; - object.failureReason = ""; - object.createTime = null; - object.startTime = null; - object.endTime = null; - object.ttlAfterCompletionDays = 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.inputUri != null && message.hasOwnProperty("inputUri")) - object.inputUri = message.inputUri; - if (message.outputUri != null && message.hasOwnProperty("outputUri")) - object.outputUri = message.outputUri; - if (message.templateId != null && message.hasOwnProperty("templateId")) { - object.templateId = message.templateId; - if (options.oneofs) - object.jobConfig = "templateId"; - } - if (message.config != null && message.hasOwnProperty("config")) { - object.config = $root.google.cloud.video.transcoder.v1beta1.JobConfig.toObject(message.config, options); - if (options.oneofs) - object.jobConfig = "config"; - } - if (message.priority != null && message.hasOwnProperty("priority")) - object.priority = message.priority; - if (message.originUri != null && message.hasOwnProperty("originUri")) - object.originUri = $root.google.cloud.video.transcoder.v1beta1.Job.OriginUri.toObject(message.originUri, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.video.transcoder.v1beta1.Job.ProcessingState[message.state] : message.state; - if (message.progress != null && message.hasOwnProperty("progress")) - object.progress = $root.google.cloud.video.transcoder.v1beta1.Progress.toObject(message.progress, options); - if (message.failureReason != null && message.hasOwnProperty("failureReason")) - object.failureReason = message.failureReason; - if (message.failureDetails && message.failureDetails.length) { - object.failureDetails = []; - for (var j = 0; j < message.failureDetails.length; ++j) - object.failureDetails[j] = $root.google.cloud.video.transcoder.v1beta1.FailureDetail.toObject(message.failureDetails[j], options); - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.ttlAfterCompletionDays != null && message.hasOwnProperty("ttlAfterCompletionDays")) - object.ttlAfterCompletionDays = message.ttlAfterCompletionDays; - return object; - }; - - /** - * Converts this Job to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @instance - * @returns {Object.} JSON object - */ - Job.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - Job.OriginUri = (function() { - - /** - * Properties of an OriginUri. - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @interface IOriginUri - * @property {string|null} [hls] OriginUri hls - * @property {string|null} [dash] OriginUri dash - */ - - /** - * Constructs a new OriginUri. - * @memberof google.cloud.video.transcoder.v1beta1.Job - * @classdesc Represents an OriginUri. - * @implements IOriginUri - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.Job.IOriginUri=} [properties] Properties to set - */ - function OriginUri(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OriginUri hls. - * @member {string} hls - * @memberof google.cloud.video.transcoder.v1beta1.Job.OriginUri - * @instance - */ - OriginUri.prototype.hls = ""; - - /** - * OriginUri dash. - * @member {string} dash - * @memberof google.cloud.video.transcoder.v1beta1.Job.OriginUri - * @instance - */ - OriginUri.prototype.dash = ""; - - /** - * Creates a new OriginUri instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.Job.OriginUri - * @static - * @param {google.cloud.video.transcoder.v1beta1.Job.IOriginUri=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.Job.OriginUri} OriginUri instance - */ - OriginUri.create = function create(properties) { - return new OriginUri(properties); - }; - - /** - * Encodes the specified OriginUri message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Job.OriginUri.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.Job.OriginUri - * @static - * @param {google.cloud.video.transcoder.v1beta1.Job.IOriginUri} message OriginUri message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OriginUri.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hls != null && Object.hasOwnProperty.call(message, "hls")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.hls); - if (message.dash != null && Object.hasOwnProperty.call(message, "dash")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.dash); - return writer; - }; - - /** - * Encodes the specified OriginUri message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Job.OriginUri.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Job.OriginUri - * @static - * @param {google.cloud.video.transcoder.v1beta1.Job.IOriginUri} message OriginUri message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OriginUri.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OriginUri message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.Job.OriginUri - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.Job.OriginUri} OriginUri - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OriginUri.decode = function 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.transcoder.v1beta1.Job.OriginUri(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hls = reader.string(); - break; - case 2: - message.dash = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OriginUri message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Job.OriginUri - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.Job.OriginUri} OriginUri - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OriginUri.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OriginUri message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.Job.OriginUri - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OriginUri.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hls != null && message.hasOwnProperty("hls")) - if (!$util.isString(message.hls)) - return "hls: string expected"; - if (message.dash != null && message.hasOwnProperty("dash")) - if (!$util.isString(message.dash)) - return "dash: string expected"; - return null; - }; - - /** - * Creates an OriginUri message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.Job.OriginUri - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.Job.OriginUri} OriginUri - */ - OriginUri.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Job.OriginUri) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.Job.OriginUri(); - if (object.hls != null) - message.hls = String(object.hls); - if (object.dash != null) - message.dash = String(object.dash); - return message; - }; - - /** - * Creates a plain object from an OriginUri message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.Job.OriginUri - * @static - * @param {google.cloud.video.transcoder.v1beta1.Job.OriginUri} message OriginUri - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OriginUri.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.hls = ""; - object.dash = ""; - } - if (message.hls != null && message.hasOwnProperty("hls")) - object.hls = message.hls; - if (message.dash != null && message.hasOwnProperty("dash")) - object.dash = message.dash; - return object; - }; - - /** - * Converts this OriginUri to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.Job.OriginUri - * @instance - * @returns {Object.} JSON object - */ - OriginUri.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return OriginUri; - })(); - - /** - * ProcessingState enum. - * @name google.cloud.video.transcoder.v1beta1.Job.ProcessingState - * @enum {number} - * @property {number} PROCESSING_STATE_UNSPECIFIED=0 PROCESSING_STATE_UNSPECIFIED value - * @property {number} PENDING=1 PENDING value - * @property {number} RUNNING=2 RUNNING value - * @property {number} SUCCEEDED=3 SUCCEEDED value - * @property {number} FAILED=4 FAILED value - */ - Job.ProcessingState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PROCESSING_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PENDING"] = 1; - values[valuesById[2] = "RUNNING"] = 2; - values[valuesById[3] = "SUCCEEDED"] = 3; - values[valuesById[4] = "FAILED"] = 4; - return values; - })(); - - return Job; - })(); - - v1beta1.JobTemplate = (function() { - - /** - * Properties of a JobTemplate. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface IJobTemplate - * @property {string|null} [name] JobTemplate name - * @property {google.cloud.video.transcoder.v1beta1.IJobConfig|null} [config] JobTemplate config - */ - - /** - * Constructs a new JobTemplate. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents a JobTemplate. - * @implements IJobTemplate - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.IJobTemplate=} [properties] Properties to set - */ - function JobTemplate(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * JobTemplate name. - * @member {string} name - * @memberof google.cloud.video.transcoder.v1beta1.JobTemplate - * @instance - */ - JobTemplate.prototype.name = ""; - - /** - * JobTemplate config. - * @member {google.cloud.video.transcoder.v1beta1.IJobConfig|null|undefined} config - * @memberof google.cloud.video.transcoder.v1beta1.JobTemplate - * @instance - */ - JobTemplate.prototype.config = null; - - /** - * Creates a new JobTemplate instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.JobTemplate - * @static - * @param {google.cloud.video.transcoder.v1beta1.IJobTemplate=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.JobTemplate} JobTemplate instance - */ - JobTemplate.create = function create(properties) { - return new JobTemplate(properties); - }; - - /** - * Encodes the specified JobTemplate message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.JobTemplate.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.JobTemplate - * @static - * @param {google.cloud.video.transcoder.v1beta1.IJobTemplate} message JobTemplate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JobTemplate.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.video.transcoder.v1beta1.JobConfig.encode(message.config, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified JobTemplate message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.JobTemplate.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.JobTemplate - * @static - * @param {google.cloud.video.transcoder.v1beta1.IJobTemplate} message JobTemplate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JobTemplate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a JobTemplate message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.JobTemplate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.JobTemplate} JobTemplate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JobTemplate.decode = function 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.transcoder.v1beta1.JobTemplate(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.config = $root.google.cloud.video.transcoder.v1beta1.JobConfig.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a JobTemplate message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.JobTemplate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.JobTemplate} JobTemplate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JobTemplate.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a JobTemplate message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.JobTemplate - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JobTemplate.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.config != null && message.hasOwnProperty("config")) { - var error = $root.google.cloud.video.transcoder.v1beta1.JobConfig.verify(message.config); - if (error) - return "config." + error; - } - return null; - }; - - /** - * Creates a JobTemplate message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.JobTemplate - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.JobTemplate} JobTemplate - */ - JobTemplate.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.JobTemplate) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.JobTemplate(); - if (object.name != null) - message.name = String(object.name); - if (object.config != null) { - if (typeof object.config !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.JobTemplate.config: object expected"); - message.config = $root.google.cloud.video.transcoder.v1beta1.JobConfig.fromObject(object.config); - } - return message; - }; - - /** - * Creates a plain object from a JobTemplate message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.JobTemplate - * @static - * @param {google.cloud.video.transcoder.v1beta1.JobTemplate} message JobTemplate - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - JobTemplate.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.config = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.config != null && message.hasOwnProperty("config")) - object.config = $root.google.cloud.video.transcoder.v1beta1.JobConfig.toObject(message.config, options); - return object; - }; - - /** - * Converts this JobTemplate to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.JobTemplate - * @instance - * @returns {Object.} JSON object - */ - JobTemplate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return JobTemplate; - })(); - - v1beta1.JobConfig = (function() { - - /** - * Properties of a JobConfig. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface IJobConfig - * @property {Array.|null} [inputs] JobConfig inputs - * @property {Array.|null} [editList] JobConfig editList - * @property {Array.|null} [elementaryStreams] JobConfig elementaryStreams - * @property {Array.|null} [muxStreams] JobConfig muxStreams - * @property {Array.|null} [manifests] JobConfig manifests - * @property {google.cloud.video.transcoder.v1beta1.IOutput|null} [output] JobConfig output - * @property {Array.|null} [adBreaks] JobConfig adBreaks - * @property {google.cloud.video.transcoder.v1beta1.IPubsubDestination|null} [pubsubDestination] JobConfig pubsubDestination - * @property {Array.|null} [spriteSheets] JobConfig spriteSheets - * @property {Array.|null} [overlays] JobConfig overlays - */ - - /** - * Constructs a new JobConfig. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents a JobConfig. - * @implements IJobConfig - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.IJobConfig=} [properties] Properties to set - */ - function JobConfig(properties) { - this.inputs = []; - this.editList = []; - this.elementaryStreams = []; - this.muxStreams = []; - this.manifests = []; - this.adBreaks = []; - this.spriteSheets = []; - this.overlays = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * JobConfig inputs. - * @member {Array.} inputs - * @memberof google.cloud.video.transcoder.v1beta1.JobConfig - * @instance - */ - JobConfig.prototype.inputs = $util.emptyArray; - - /** - * JobConfig editList. - * @member {Array.} editList - * @memberof google.cloud.video.transcoder.v1beta1.JobConfig - * @instance - */ - JobConfig.prototype.editList = $util.emptyArray; - - /** - * JobConfig elementaryStreams. - * @member {Array.} elementaryStreams - * @memberof google.cloud.video.transcoder.v1beta1.JobConfig - * @instance - */ - JobConfig.prototype.elementaryStreams = $util.emptyArray; - - /** - * JobConfig muxStreams. - * @member {Array.} muxStreams - * @memberof google.cloud.video.transcoder.v1beta1.JobConfig - * @instance - */ - JobConfig.prototype.muxStreams = $util.emptyArray; - - /** - * JobConfig manifests. - * @member {Array.} manifests - * @memberof google.cloud.video.transcoder.v1beta1.JobConfig - * @instance - */ - JobConfig.prototype.manifests = $util.emptyArray; - - /** - * JobConfig output. - * @member {google.cloud.video.transcoder.v1beta1.IOutput|null|undefined} output - * @memberof google.cloud.video.transcoder.v1beta1.JobConfig - * @instance - */ - JobConfig.prototype.output = null; - - /** - * JobConfig adBreaks. - * @member {Array.} adBreaks - * @memberof google.cloud.video.transcoder.v1beta1.JobConfig - * @instance - */ - JobConfig.prototype.adBreaks = $util.emptyArray; - - /** - * JobConfig pubsubDestination. - * @member {google.cloud.video.transcoder.v1beta1.IPubsubDestination|null|undefined} pubsubDestination - * @memberof google.cloud.video.transcoder.v1beta1.JobConfig - * @instance - */ - JobConfig.prototype.pubsubDestination = null; - - /** - * JobConfig spriteSheets. - * @member {Array.} spriteSheets - * @memberof google.cloud.video.transcoder.v1beta1.JobConfig - * @instance - */ - JobConfig.prototype.spriteSheets = $util.emptyArray; - - /** - * JobConfig overlays. - * @member {Array.} overlays - * @memberof google.cloud.video.transcoder.v1beta1.JobConfig - * @instance - */ - JobConfig.prototype.overlays = $util.emptyArray; - - /** - * Creates a new JobConfig instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.JobConfig - * @static - * @param {google.cloud.video.transcoder.v1beta1.IJobConfig=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.JobConfig} JobConfig instance - */ - JobConfig.create = function create(properties) { - return new JobConfig(properties); - }; - - /** - * Encodes the specified JobConfig message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.JobConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.JobConfig - * @static - * @param {google.cloud.video.transcoder.v1beta1.IJobConfig} message JobConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JobConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.inputs != null && message.inputs.length) - for (var i = 0; i < message.inputs.length; ++i) - $root.google.cloud.video.transcoder.v1beta1.Input.encode(message.inputs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.editList != null && message.editList.length) - for (var i = 0; i < message.editList.length; ++i) - $root.google.cloud.video.transcoder.v1beta1.EditAtom.encode(message.editList[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.elementaryStreams != null && message.elementaryStreams.length) - for (var i = 0; i < message.elementaryStreams.length; ++i) - $root.google.cloud.video.transcoder.v1beta1.ElementaryStream.encode(message.elementaryStreams[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.muxStreams != null && message.muxStreams.length) - for (var i = 0; i < message.muxStreams.length; ++i) - $root.google.cloud.video.transcoder.v1beta1.MuxStream.encode(message.muxStreams[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.manifests != null && message.manifests.length) - for (var i = 0; i < message.manifests.length; ++i) - $root.google.cloud.video.transcoder.v1beta1.Manifest.encode(message.manifests[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.output != null && Object.hasOwnProperty.call(message, "output")) - $root.google.cloud.video.transcoder.v1beta1.Output.encode(message.output, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.adBreaks != null && message.adBreaks.length) - for (var i = 0; i < message.adBreaks.length; ++i) - $root.google.cloud.video.transcoder.v1beta1.AdBreak.encode(message.adBreaks[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.pubsubDestination != null && Object.hasOwnProperty.call(message, "pubsubDestination")) - $root.google.cloud.video.transcoder.v1beta1.PubsubDestination.encode(message.pubsubDestination, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.spriteSheets != null && message.spriteSheets.length) - for (var i = 0; i < message.spriteSheets.length; ++i) - $root.google.cloud.video.transcoder.v1beta1.SpriteSheet.encode(message.spriteSheets[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.overlays != null && message.overlays.length) - for (var i = 0; i < message.overlays.length; ++i) - $root.google.cloud.video.transcoder.v1beta1.Overlay.encode(message.overlays[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified JobConfig message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.JobConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.JobConfig - * @static - * @param {google.cloud.video.transcoder.v1beta1.IJobConfig} message JobConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JobConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a JobConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.JobConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.JobConfig} JobConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JobConfig.decode = function 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.transcoder.v1beta1.JobConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.inputs && message.inputs.length)) - message.inputs = []; - message.inputs.push($root.google.cloud.video.transcoder.v1beta1.Input.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.editList && message.editList.length)) - message.editList = []; - message.editList.push($root.google.cloud.video.transcoder.v1beta1.EditAtom.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.elementaryStreams && message.elementaryStreams.length)) - message.elementaryStreams = []; - message.elementaryStreams.push($root.google.cloud.video.transcoder.v1beta1.ElementaryStream.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.muxStreams && message.muxStreams.length)) - message.muxStreams = []; - message.muxStreams.push($root.google.cloud.video.transcoder.v1beta1.MuxStream.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.manifests && message.manifests.length)) - message.manifests = []; - message.manifests.push($root.google.cloud.video.transcoder.v1beta1.Manifest.decode(reader, reader.uint32())); - break; - case 6: - message.output = $root.google.cloud.video.transcoder.v1beta1.Output.decode(reader, reader.uint32()); - break; - case 7: - if (!(message.adBreaks && message.adBreaks.length)) - message.adBreaks = []; - message.adBreaks.push($root.google.cloud.video.transcoder.v1beta1.AdBreak.decode(reader, reader.uint32())); - break; - case 8: - message.pubsubDestination = $root.google.cloud.video.transcoder.v1beta1.PubsubDestination.decode(reader, reader.uint32()); - break; - case 9: - if (!(message.spriteSheets && message.spriteSheets.length)) - message.spriteSheets = []; - message.spriteSheets.push($root.google.cloud.video.transcoder.v1beta1.SpriteSheet.decode(reader, reader.uint32())); - break; - case 10: - if (!(message.overlays && message.overlays.length)) - message.overlays = []; - message.overlays.push($root.google.cloud.video.transcoder.v1beta1.Overlay.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a JobConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.JobConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.JobConfig} JobConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JobConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a JobConfig message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.JobConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JobConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.inputs != null && message.hasOwnProperty("inputs")) { - if (!Array.isArray(message.inputs)) - return "inputs: array expected"; - for (var i = 0; i < message.inputs.length; ++i) { - var error = $root.google.cloud.video.transcoder.v1beta1.Input.verify(message.inputs[i]); - if (error) - return "inputs." + error; - } - } - if (message.editList != null && message.hasOwnProperty("editList")) { - if (!Array.isArray(message.editList)) - return "editList: array expected"; - for (var i = 0; i < message.editList.length; ++i) { - var error = $root.google.cloud.video.transcoder.v1beta1.EditAtom.verify(message.editList[i]); - if (error) - return "editList." + error; - } - } - if (message.elementaryStreams != null && message.hasOwnProperty("elementaryStreams")) { - if (!Array.isArray(message.elementaryStreams)) - return "elementaryStreams: array expected"; - for (var i = 0; i < message.elementaryStreams.length; ++i) { - var error = $root.google.cloud.video.transcoder.v1beta1.ElementaryStream.verify(message.elementaryStreams[i]); - if (error) - return "elementaryStreams." + error; - } - } - if (message.muxStreams != null && message.hasOwnProperty("muxStreams")) { - if (!Array.isArray(message.muxStreams)) - return "muxStreams: array expected"; - for (var i = 0; i < message.muxStreams.length; ++i) { - var error = $root.google.cloud.video.transcoder.v1beta1.MuxStream.verify(message.muxStreams[i]); - if (error) - return "muxStreams." + error; - } - } - if (message.manifests != null && message.hasOwnProperty("manifests")) { - if (!Array.isArray(message.manifests)) - return "manifests: array expected"; - for (var i = 0; i < message.manifests.length; ++i) { - var error = $root.google.cloud.video.transcoder.v1beta1.Manifest.verify(message.manifests[i]); - if (error) - return "manifests." + error; - } - } - if (message.output != null && message.hasOwnProperty("output")) { - var error = $root.google.cloud.video.transcoder.v1beta1.Output.verify(message.output); - if (error) - return "output." + error; - } - 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.transcoder.v1beta1.AdBreak.verify(message.adBreaks[i]); - if (error) - return "adBreaks." + error; - } - } - if (message.pubsubDestination != null && message.hasOwnProperty("pubsubDestination")) { - var error = $root.google.cloud.video.transcoder.v1beta1.PubsubDestination.verify(message.pubsubDestination); - if (error) - return "pubsubDestination." + error; - } - if (message.spriteSheets != null && message.hasOwnProperty("spriteSheets")) { - if (!Array.isArray(message.spriteSheets)) - return "spriteSheets: array expected"; - for (var i = 0; i < message.spriteSheets.length; ++i) { - var error = $root.google.cloud.video.transcoder.v1beta1.SpriteSheet.verify(message.spriteSheets[i]); - if (error) - return "spriteSheets." + error; - } - } - if (message.overlays != null && message.hasOwnProperty("overlays")) { - if (!Array.isArray(message.overlays)) - return "overlays: array expected"; - for (var i = 0; i < message.overlays.length; ++i) { - var error = $root.google.cloud.video.transcoder.v1beta1.Overlay.verify(message.overlays[i]); - if (error) - return "overlays." + error; - } - } - return null; - }; - - /** - * Creates a JobConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.JobConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.JobConfig} JobConfig - */ - JobConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.JobConfig) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.JobConfig(); - if (object.inputs) { - if (!Array.isArray(object.inputs)) - throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.inputs: array expected"); - message.inputs = []; - for (var i = 0; i < object.inputs.length; ++i) { - if (typeof object.inputs[i] !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.inputs: object expected"); - message.inputs[i] = $root.google.cloud.video.transcoder.v1beta1.Input.fromObject(object.inputs[i]); - } - } - if (object.editList) { - if (!Array.isArray(object.editList)) - throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.editList: array expected"); - message.editList = []; - for (var i = 0; i < object.editList.length; ++i) { - if (typeof object.editList[i] !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.editList: object expected"); - message.editList[i] = $root.google.cloud.video.transcoder.v1beta1.EditAtom.fromObject(object.editList[i]); - } - } - if (object.elementaryStreams) { - if (!Array.isArray(object.elementaryStreams)) - throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.elementaryStreams: array expected"); - message.elementaryStreams = []; - for (var i = 0; i < object.elementaryStreams.length; ++i) { - if (typeof object.elementaryStreams[i] !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.elementaryStreams: object expected"); - message.elementaryStreams[i] = $root.google.cloud.video.transcoder.v1beta1.ElementaryStream.fromObject(object.elementaryStreams[i]); - } - } - if (object.muxStreams) { - if (!Array.isArray(object.muxStreams)) - throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.muxStreams: array expected"); - message.muxStreams = []; - for (var i = 0; i < object.muxStreams.length; ++i) { - if (typeof object.muxStreams[i] !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.muxStreams: object expected"); - message.muxStreams[i] = $root.google.cloud.video.transcoder.v1beta1.MuxStream.fromObject(object.muxStreams[i]); - } - } - if (object.manifests) { - if (!Array.isArray(object.manifests)) - throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.manifests: array expected"); - message.manifests = []; - for (var i = 0; i < object.manifests.length; ++i) { - if (typeof object.manifests[i] !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.manifests: object expected"); - message.manifests[i] = $root.google.cloud.video.transcoder.v1beta1.Manifest.fromObject(object.manifests[i]); - } - } - if (object.output != null) { - if (typeof object.output !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.output: object expected"); - message.output = $root.google.cloud.video.transcoder.v1beta1.Output.fromObject(object.output); - } - if (object.adBreaks) { - if (!Array.isArray(object.adBreaks)) - throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.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.transcoder.v1beta1.JobConfig.adBreaks: object expected"); - message.adBreaks[i] = $root.google.cloud.video.transcoder.v1beta1.AdBreak.fromObject(object.adBreaks[i]); - } - } - if (object.pubsubDestination != null) { - if (typeof object.pubsubDestination !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.pubsubDestination: object expected"); - message.pubsubDestination = $root.google.cloud.video.transcoder.v1beta1.PubsubDestination.fromObject(object.pubsubDestination); - } - if (object.spriteSheets) { - if (!Array.isArray(object.spriteSheets)) - throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.spriteSheets: array expected"); - message.spriteSheets = []; - for (var i = 0; i < object.spriteSheets.length; ++i) { - if (typeof object.spriteSheets[i] !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.spriteSheets: object expected"); - message.spriteSheets[i] = $root.google.cloud.video.transcoder.v1beta1.SpriteSheet.fromObject(object.spriteSheets[i]); - } - } - if (object.overlays) { - if (!Array.isArray(object.overlays)) - throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.overlays: array expected"); - message.overlays = []; - for (var i = 0; i < object.overlays.length; ++i) { - if (typeof object.overlays[i] !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.JobConfig.overlays: object expected"); - message.overlays[i] = $root.google.cloud.video.transcoder.v1beta1.Overlay.fromObject(object.overlays[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a JobConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.JobConfig - * @static - * @param {google.cloud.video.transcoder.v1beta1.JobConfig} message JobConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - JobConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.inputs = []; - object.editList = []; - object.elementaryStreams = []; - object.muxStreams = []; - object.manifests = []; - object.adBreaks = []; - object.spriteSheets = []; - object.overlays = []; - } - if (options.defaults) { - object.output = null; - object.pubsubDestination = null; - } - if (message.inputs && message.inputs.length) { - object.inputs = []; - for (var j = 0; j < message.inputs.length; ++j) - object.inputs[j] = $root.google.cloud.video.transcoder.v1beta1.Input.toObject(message.inputs[j], options); - } - if (message.editList && message.editList.length) { - object.editList = []; - for (var j = 0; j < message.editList.length; ++j) - object.editList[j] = $root.google.cloud.video.transcoder.v1beta1.EditAtom.toObject(message.editList[j], options); - } - if (message.elementaryStreams && message.elementaryStreams.length) { - object.elementaryStreams = []; - for (var j = 0; j < message.elementaryStreams.length; ++j) - object.elementaryStreams[j] = $root.google.cloud.video.transcoder.v1beta1.ElementaryStream.toObject(message.elementaryStreams[j], options); - } - if (message.muxStreams && message.muxStreams.length) { - object.muxStreams = []; - for (var j = 0; j < message.muxStreams.length; ++j) - object.muxStreams[j] = $root.google.cloud.video.transcoder.v1beta1.MuxStream.toObject(message.muxStreams[j], options); - } - if (message.manifests && message.manifests.length) { - object.manifests = []; - for (var j = 0; j < message.manifests.length; ++j) - object.manifests[j] = $root.google.cloud.video.transcoder.v1beta1.Manifest.toObject(message.manifests[j], options); - } - if (message.output != null && message.hasOwnProperty("output")) - object.output = $root.google.cloud.video.transcoder.v1beta1.Output.toObject(message.output, options); - if (message.adBreaks && message.adBreaks.length) { - object.adBreaks = []; - for (var j = 0; j < message.adBreaks.length; ++j) - object.adBreaks[j] = $root.google.cloud.video.transcoder.v1beta1.AdBreak.toObject(message.adBreaks[j], options); - } - if (message.pubsubDestination != null && message.hasOwnProperty("pubsubDestination")) - object.pubsubDestination = $root.google.cloud.video.transcoder.v1beta1.PubsubDestination.toObject(message.pubsubDestination, options); - if (message.spriteSheets && message.spriteSheets.length) { - object.spriteSheets = []; - for (var j = 0; j < message.spriteSheets.length; ++j) - object.spriteSheets[j] = $root.google.cloud.video.transcoder.v1beta1.SpriteSheet.toObject(message.spriteSheets[j], options); - } - if (message.overlays && message.overlays.length) { - object.overlays = []; - for (var j = 0; j < message.overlays.length; ++j) - object.overlays[j] = $root.google.cloud.video.transcoder.v1beta1.Overlay.toObject(message.overlays[j], options); - } - return object; - }; - - /** - * Converts this JobConfig to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.JobConfig - * @instance - * @returns {Object.} JSON object - */ - JobConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return JobConfig; - })(); - - v1beta1.Input = (function() { - - /** - * Properties of an Input. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface IInput - * @property {string|null} [key] Input key - * @property {string|null} [uri] Input uri - * @property {google.cloud.video.transcoder.v1beta1.IPreprocessingConfig|null} [preprocessingConfig] Input preprocessingConfig - */ - - /** - * Constructs a new Input. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents an Input. - * @implements IInput - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.IInput=} [properties] Properties to set - */ - function Input(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Input key. - * @member {string} key - * @memberof google.cloud.video.transcoder.v1beta1.Input - * @instance - */ - Input.prototype.key = ""; - - /** - * Input uri. - * @member {string} uri - * @memberof google.cloud.video.transcoder.v1beta1.Input - * @instance - */ - Input.prototype.uri = ""; - - /** - * Input preprocessingConfig. - * @member {google.cloud.video.transcoder.v1beta1.IPreprocessingConfig|null|undefined} preprocessingConfig - * @memberof google.cloud.video.transcoder.v1beta1.Input - * @instance - */ - Input.prototype.preprocessingConfig = null; - - /** - * Creates a new Input instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.Input - * @static - * @param {google.cloud.video.transcoder.v1beta1.IInput=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.Input} Input instance - */ - Input.create = function create(properties) { - return new Input(properties); - }; - - /** - * Encodes the specified Input message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Input.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.Input - * @static - * @param {google.cloud.video.transcoder.v1beta1.IInput} message Input message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Input.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.preprocessingConfig != null && Object.hasOwnProperty.call(message, "preprocessingConfig")) - $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.encode(message.preprocessingConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Input message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Input.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Input - * @static - * @param {google.cloud.video.transcoder.v1beta1.IInput} message Input message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Input.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Input message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.Input - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.Input} Input - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Input.decode = function 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.transcoder.v1beta1.Input(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.uri = reader.string(); - break; - case 3: - message.preprocessingConfig = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Input message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Input - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.Input} Input - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Input.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Input message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.Input - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Input.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.preprocessingConfig != null && message.hasOwnProperty("preprocessingConfig")) { - var error = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.verify(message.preprocessingConfig); - if (error) - return "preprocessingConfig." + error; - } - return null; - }; - - /** - * Creates an Input message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.Input - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.Input} Input - */ - Input.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Input) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.Input(); - if (object.key != null) - message.key = String(object.key); - if (object.uri != null) - message.uri = String(object.uri); - if (object.preprocessingConfig != null) { - if (typeof object.preprocessingConfig !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.Input.preprocessingConfig: object expected"); - message.preprocessingConfig = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.fromObject(object.preprocessingConfig); - } - return message; - }; - - /** - * Creates a plain object from an Input message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.Input - * @static - * @param {google.cloud.video.transcoder.v1beta1.Input} message Input - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Input.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.key = ""; - object.uri = ""; - object.preprocessingConfig = null; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.preprocessingConfig != null && message.hasOwnProperty("preprocessingConfig")) - object.preprocessingConfig = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.toObject(message.preprocessingConfig, options); - return object; - }; - - /** - * Converts this Input to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.Input - * @instance - * @returns {Object.} JSON object - */ - Input.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Input; - })(); - - v1beta1.Output = (function() { - - /** - * Properties of an Output. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface IOutput - * @property {string|null} [uri] Output uri - */ - - /** - * Constructs a new Output. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents an Output. - * @implements IOutput - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.IOutput=} [properties] Properties to set - */ - function Output(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Output uri. - * @member {string} uri - * @memberof google.cloud.video.transcoder.v1beta1.Output - * @instance - */ - Output.prototype.uri = ""; - - /** - * Creates a new Output instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.Output - * @static - * @param {google.cloud.video.transcoder.v1beta1.IOutput=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.Output} Output instance - */ - Output.create = function create(properties) { - return new Output(properties); - }; - - /** - * Encodes the specified Output message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Output.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.Output - * @static - * @param {google.cloud.video.transcoder.v1beta1.IOutput} message Output message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Output.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 Output message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Output.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Output - * @static - * @param {google.cloud.video.transcoder.v1beta1.IOutput} message Output message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Output.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Output message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.Output - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.Output} Output - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Output.decode = function 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.transcoder.v1beta1.Output(); - 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 Output message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Output - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.Output} Output - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Output.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Output message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.Output - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Output.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 Output message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.Output - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.Output} Output - */ - Output.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Output) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.Output(); - if (object.uri != null) - message.uri = String(object.uri); - return message; - }; - - /** - * Creates a plain object from an Output message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.Output - * @static - * @param {google.cloud.video.transcoder.v1beta1.Output} message Output - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Output.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 Output to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.Output - * @instance - * @returns {Object.} JSON object - */ - Output.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Output; - })(); - - v1beta1.EditAtom = (function() { - - /** - * Properties of an EditAtom. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface IEditAtom - * @property {string|null} [key] EditAtom key - * @property {Array.|null} [inputs] EditAtom inputs - * @property {google.protobuf.IDuration|null} [endTimeOffset] EditAtom endTimeOffset - * @property {google.protobuf.IDuration|null} [startTimeOffset] EditAtom startTimeOffset - */ - - /** - * Constructs a new EditAtom. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents an EditAtom. - * @implements IEditAtom - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.IEditAtom=} [properties] Properties to set - */ - function EditAtom(properties) { - this.inputs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EditAtom key. - * @member {string} key - * @memberof google.cloud.video.transcoder.v1beta1.EditAtom - * @instance - */ - EditAtom.prototype.key = ""; - - /** - * EditAtom inputs. - * @member {Array.} inputs - * @memberof google.cloud.video.transcoder.v1beta1.EditAtom - * @instance - */ - EditAtom.prototype.inputs = $util.emptyArray; - - /** - * EditAtom endTimeOffset. - * @member {google.protobuf.IDuration|null|undefined} endTimeOffset - * @memberof google.cloud.video.transcoder.v1beta1.EditAtom - * @instance - */ - EditAtom.prototype.endTimeOffset = null; - - /** - * EditAtom startTimeOffset. - * @member {google.protobuf.IDuration|null|undefined} startTimeOffset - * @memberof google.cloud.video.transcoder.v1beta1.EditAtom - * @instance - */ - EditAtom.prototype.startTimeOffset = null; - - /** - * Creates a new EditAtom instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.EditAtom - * @static - * @param {google.cloud.video.transcoder.v1beta1.IEditAtom=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.EditAtom} EditAtom instance - */ - EditAtom.create = function create(properties) { - return new EditAtom(properties); - }; - - /** - * Encodes the specified EditAtom message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.EditAtom.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.EditAtom - * @static - * @param {google.cloud.video.transcoder.v1beta1.IEditAtom} message EditAtom message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditAtom.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.inputs != null && message.inputs.length) - for (var i = 0; i < message.inputs.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputs[i]); - 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 EditAtom message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.EditAtom.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.EditAtom - * @static - * @param {google.cloud.video.transcoder.v1beta1.IEditAtom} message EditAtom message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditAtom.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EditAtom message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.EditAtom - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.EditAtom} EditAtom - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditAtom.decode = function 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.transcoder.v1beta1.EditAtom(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - if (!(message.inputs && message.inputs.length)) - message.inputs = []; - message.inputs.push(reader.string()); - 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 an EditAtom message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.EditAtom - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.EditAtom} EditAtom - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditAtom.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EditAtom message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.EditAtom - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EditAtom.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; - if (message.inputs != null && message.hasOwnProperty("inputs")) { - if (!Array.isArray(message.inputs)) - return "inputs: array expected"; - for (var i = 0; i < message.inputs.length; ++i) - if (!$util.isString(message.inputs[i])) - return "inputs: string[] expected"; - } - 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 an EditAtom message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.EditAtom - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.EditAtom} EditAtom - */ - EditAtom.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.EditAtom) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.EditAtom(); - if (object.key != null) - message.key = String(object.key); - if (object.inputs) { - if (!Array.isArray(object.inputs)) - throw TypeError(".google.cloud.video.transcoder.v1beta1.EditAtom.inputs: array expected"); - message.inputs = []; - for (var i = 0; i < object.inputs.length; ++i) - message.inputs[i] = String(object.inputs[i]); - } - if (object.endTimeOffset != null) { - if (typeof object.endTimeOffset !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.EditAtom.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.transcoder.v1beta1.EditAtom.startTimeOffset: object expected"); - message.startTimeOffset = $root.google.protobuf.Duration.fromObject(object.startTimeOffset); - } - return message; - }; - - /** - * Creates a plain object from an EditAtom message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.EditAtom - * @static - * @param {google.cloud.video.transcoder.v1beta1.EditAtom} message EditAtom - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EditAtom.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.inputs = []; - if (options.defaults) { - object.key = ""; - object.endTimeOffset = null; - object.startTimeOffset = null; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.inputs && message.inputs.length) { - object.inputs = []; - for (var j = 0; j < message.inputs.length; ++j) - object.inputs[j] = message.inputs[j]; - } - 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 EditAtom to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.EditAtom - * @instance - * @returns {Object.} JSON object - */ - EditAtom.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return EditAtom; - })(); - - v1beta1.AdBreak = (function() { - - /** - * Properties of an AdBreak. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface IAdBreak - * @property {google.protobuf.IDuration|null} [startTimeOffset] AdBreak startTimeOffset - */ - - /** - * Constructs a new AdBreak. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents an AdBreak. - * @implements IAdBreak - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.IAdBreak=} [properties] Properties to set - */ - function AdBreak(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AdBreak startTimeOffset. - * @member {google.protobuf.IDuration|null|undefined} startTimeOffset - * @memberof google.cloud.video.transcoder.v1beta1.AdBreak - * @instance - */ - AdBreak.prototype.startTimeOffset = null; - - /** - * Creates a new AdBreak instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.AdBreak - * @static - * @param {google.cloud.video.transcoder.v1beta1.IAdBreak=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.AdBreak} AdBreak instance - */ - AdBreak.create = function create(properties) { - return new AdBreak(properties); - }; - - /** - * Encodes the specified AdBreak message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AdBreak.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.AdBreak - * @static - * @param {google.cloud.video.transcoder.v1beta1.IAdBreak} message AdBreak message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdBreak.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.startTimeOffset != null && Object.hasOwnProperty.call(message, "startTimeOffset")) - $root.google.protobuf.Duration.encode(message.startTimeOffset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AdBreak message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AdBreak.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.AdBreak - * @static - * @param {google.cloud.video.transcoder.v1beta1.IAdBreak} message AdBreak message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdBreak.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AdBreak message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.AdBreak - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.AdBreak} AdBreak - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdBreak.decode = function 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.transcoder.v1beta1.AdBreak(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AdBreak message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.AdBreak - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.AdBreak} AdBreak - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdBreak.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AdBreak message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.AdBreak - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AdBreak.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) { - var error = $root.google.protobuf.Duration.verify(message.startTimeOffset); - if (error) - return "startTimeOffset." + error; - } - return null; - }; - - /** - * Creates an AdBreak message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.AdBreak - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.AdBreak} AdBreak - */ - AdBreak.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.AdBreak) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.AdBreak(); - if (object.startTimeOffset != null) { - if (typeof object.startTimeOffset !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.AdBreak.startTimeOffset: object expected"); - message.startTimeOffset = $root.google.protobuf.Duration.fromObject(object.startTimeOffset); - } - return message; - }; - - /** - * Creates a plain object from an AdBreak message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.AdBreak - * @static - * @param {google.cloud.video.transcoder.v1beta1.AdBreak} message AdBreak - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AdBreak.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.startTimeOffset = null; - if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) - object.startTimeOffset = $root.google.protobuf.Duration.toObject(message.startTimeOffset, options); - return object; - }; - - /** - * Converts this AdBreak to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.AdBreak - * @instance - * @returns {Object.} JSON object - */ - AdBreak.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return AdBreak; - })(); - - v1beta1.ElementaryStream = (function() { - - /** - * Properties of an ElementaryStream. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface IElementaryStream - * @property {string|null} [key] ElementaryStream key - * @property {google.cloud.video.transcoder.v1beta1.IVideoStream|null} [videoStream] ElementaryStream videoStream - * @property {google.cloud.video.transcoder.v1beta1.IAudioStream|null} [audioStream] ElementaryStream audioStream - * @property {google.cloud.video.transcoder.v1beta1.ITextStream|null} [textStream] ElementaryStream textStream - */ - - /** - * Constructs a new ElementaryStream. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents an ElementaryStream. - * @implements IElementaryStream - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.IElementaryStream=} [properties] Properties to set - */ - function ElementaryStream(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ElementaryStream key. - * @member {string} key - * @memberof google.cloud.video.transcoder.v1beta1.ElementaryStream - * @instance - */ - ElementaryStream.prototype.key = ""; - - /** - * ElementaryStream videoStream. - * @member {google.cloud.video.transcoder.v1beta1.IVideoStream|null|undefined} videoStream - * @memberof google.cloud.video.transcoder.v1beta1.ElementaryStream - * @instance - */ - ElementaryStream.prototype.videoStream = null; - - /** - * ElementaryStream audioStream. - * @member {google.cloud.video.transcoder.v1beta1.IAudioStream|null|undefined} audioStream - * @memberof google.cloud.video.transcoder.v1beta1.ElementaryStream - * @instance - */ - ElementaryStream.prototype.audioStream = null; - - /** - * ElementaryStream textStream. - * @member {google.cloud.video.transcoder.v1beta1.ITextStream|null|undefined} textStream - * @memberof google.cloud.video.transcoder.v1beta1.ElementaryStream - * @instance - */ - ElementaryStream.prototype.textStream = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ElementaryStream elementaryStream. - * @member {"videoStream"|"audioStream"|"textStream"|undefined} elementaryStream - * @memberof google.cloud.video.transcoder.v1beta1.ElementaryStream - * @instance - */ - Object.defineProperty(ElementaryStream.prototype, "elementaryStream", { - get: $util.oneOfGetter($oneOfFields = ["videoStream", "audioStream", "textStream"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ElementaryStream instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.ElementaryStream - * @static - * @param {google.cloud.video.transcoder.v1beta1.IElementaryStream=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.ElementaryStream} ElementaryStream instance - */ - ElementaryStream.create = function create(properties) { - return new ElementaryStream(properties); - }; - - /** - * Encodes the specified ElementaryStream message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ElementaryStream.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.ElementaryStream - * @static - * @param {google.cloud.video.transcoder.v1beta1.IElementaryStream} message ElementaryStream message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ElementaryStream.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.videoStream != null && Object.hasOwnProperty.call(message, "videoStream")) - $root.google.cloud.video.transcoder.v1beta1.VideoStream.encode(message.videoStream, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.audioStream != null && Object.hasOwnProperty.call(message, "audioStream")) - $root.google.cloud.video.transcoder.v1beta1.AudioStream.encode(message.audioStream, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.textStream != null && Object.hasOwnProperty.call(message, "textStream")) - $root.google.cloud.video.transcoder.v1beta1.TextStream.encode(message.textStream, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.key); - return writer; - }; - - /** - * Encodes the specified ElementaryStream message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ElementaryStream.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.ElementaryStream - * @static - * @param {google.cloud.video.transcoder.v1beta1.IElementaryStream} message ElementaryStream message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ElementaryStream.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ElementaryStream message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.ElementaryStream - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.ElementaryStream} ElementaryStream - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ElementaryStream.decode = function 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.transcoder.v1beta1.ElementaryStream(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 4: - message.key = reader.string(); - break; - case 1: - message.videoStream = $root.google.cloud.video.transcoder.v1beta1.VideoStream.decode(reader, reader.uint32()); - break; - case 2: - message.audioStream = $root.google.cloud.video.transcoder.v1beta1.AudioStream.decode(reader, reader.uint32()); - break; - case 3: - message.textStream = $root.google.cloud.video.transcoder.v1beta1.TextStream.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ElementaryStream message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.ElementaryStream - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.ElementaryStream} ElementaryStream - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ElementaryStream.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ElementaryStream message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.ElementaryStream - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ElementaryStream.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; - if (message.videoStream != null && message.hasOwnProperty("videoStream")) { - properties.elementaryStream = 1; - { - var error = $root.google.cloud.video.transcoder.v1beta1.VideoStream.verify(message.videoStream); - if (error) - return "videoStream." + error; - } - } - if (message.audioStream != null && message.hasOwnProperty("audioStream")) { - if (properties.elementaryStream === 1) - return "elementaryStream: multiple values"; - properties.elementaryStream = 1; - { - var error = $root.google.cloud.video.transcoder.v1beta1.AudioStream.verify(message.audioStream); - if (error) - return "audioStream." + error; - } - } - if (message.textStream != null && message.hasOwnProperty("textStream")) { - if (properties.elementaryStream === 1) - return "elementaryStream: multiple values"; - properties.elementaryStream = 1; - { - var error = $root.google.cloud.video.transcoder.v1beta1.TextStream.verify(message.textStream); - if (error) - return "textStream." + error; - } - } - return null; - }; - - /** - * Creates an ElementaryStream message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.ElementaryStream - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.ElementaryStream} ElementaryStream - */ - ElementaryStream.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.ElementaryStream) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.ElementaryStream(); - if (object.key != null) - message.key = String(object.key); - if (object.videoStream != null) { - if (typeof object.videoStream !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.ElementaryStream.videoStream: object expected"); - message.videoStream = $root.google.cloud.video.transcoder.v1beta1.VideoStream.fromObject(object.videoStream); - } - if (object.audioStream != null) { - if (typeof object.audioStream !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.ElementaryStream.audioStream: object expected"); - message.audioStream = $root.google.cloud.video.transcoder.v1beta1.AudioStream.fromObject(object.audioStream); - } - if (object.textStream != null) { - if (typeof object.textStream !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.ElementaryStream.textStream: object expected"); - message.textStream = $root.google.cloud.video.transcoder.v1beta1.TextStream.fromObject(object.textStream); - } - return message; - }; - - /** - * Creates a plain object from an ElementaryStream message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.ElementaryStream - * @static - * @param {google.cloud.video.transcoder.v1beta1.ElementaryStream} message ElementaryStream - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ElementaryStream.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.key = ""; - if (message.videoStream != null && message.hasOwnProperty("videoStream")) { - object.videoStream = $root.google.cloud.video.transcoder.v1beta1.VideoStream.toObject(message.videoStream, options); - if (options.oneofs) - object.elementaryStream = "videoStream"; - } - if (message.audioStream != null && message.hasOwnProperty("audioStream")) { - object.audioStream = $root.google.cloud.video.transcoder.v1beta1.AudioStream.toObject(message.audioStream, options); - if (options.oneofs) - object.elementaryStream = "audioStream"; - } - if (message.textStream != null && message.hasOwnProperty("textStream")) { - object.textStream = $root.google.cloud.video.transcoder.v1beta1.TextStream.toObject(message.textStream, options); - if (options.oneofs) - object.elementaryStream = "textStream"; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - return object; - }; - - /** - * Converts this ElementaryStream to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.ElementaryStream - * @instance - * @returns {Object.} JSON object - */ - ElementaryStream.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ElementaryStream; - })(); - - v1beta1.MuxStream = (function() { - - /** - * Properties of a MuxStream. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface IMuxStream - * @property {string|null} [key] MuxStream key - * @property {string|null} [fileName] MuxStream fileName - * @property {string|null} [container] MuxStream container - * @property {Array.|null} [elementaryStreams] MuxStream elementaryStreams - * @property {google.cloud.video.transcoder.v1beta1.ISegmentSettings|null} [segmentSettings] MuxStream segmentSettings - * @property {google.cloud.video.transcoder.v1beta1.IEncryption|null} [encryption] MuxStream encryption - */ - - /** - * Constructs a new MuxStream. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents a MuxStream. - * @implements IMuxStream - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.IMuxStream=} [properties] Properties to set - */ - function MuxStream(properties) { - this.elementaryStreams = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MuxStream key. - * @member {string} key - * @memberof google.cloud.video.transcoder.v1beta1.MuxStream - * @instance - */ - MuxStream.prototype.key = ""; - - /** - * MuxStream fileName. - * @member {string} fileName - * @memberof google.cloud.video.transcoder.v1beta1.MuxStream - * @instance - */ - MuxStream.prototype.fileName = ""; - - /** - * MuxStream container. - * @member {string} container - * @memberof google.cloud.video.transcoder.v1beta1.MuxStream - * @instance - */ - MuxStream.prototype.container = ""; - - /** - * MuxStream elementaryStreams. - * @member {Array.} elementaryStreams - * @memberof google.cloud.video.transcoder.v1beta1.MuxStream - * @instance - */ - MuxStream.prototype.elementaryStreams = $util.emptyArray; - - /** - * MuxStream segmentSettings. - * @member {google.cloud.video.transcoder.v1beta1.ISegmentSettings|null|undefined} segmentSettings - * @memberof google.cloud.video.transcoder.v1beta1.MuxStream - * @instance - */ - MuxStream.prototype.segmentSettings = null; - - /** - * MuxStream encryption. - * @member {google.cloud.video.transcoder.v1beta1.IEncryption|null|undefined} encryption - * @memberof google.cloud.video.transcoder.v1beta1.MuxStream - * @instance - */ - MuxStream.prototype.encryption = null; - - /** - * Creates a new MuxStream instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.MuxStream - * @static - * @param {google.cloud.video.transcoder.v1beta1.IMuxStream=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.MuxStream} MuxStream instance - */ - MuxStream.create = function create(properties) { - return new MuxStream(properties); - }; - - /** - * Encodes the specified MuxStream message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.MuxStream.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.MuxStream - * @static - * @param {google.cloud.video.transcoder.v1beta1.IMuxStream} message MuxStream message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MuxStream.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.fileName); - if (message.container != null && Object.hasOwnProperty.call(message, "container")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.container); - if (message.elementaryStreams != null && message.elementaryStreams.length) - for (var i = 0; i < message.elementaryStreams.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.elementaryStreams[i]); - if (message.segmentSettings != null && Object.hasOwnProperty.call(message, "segmentSettings")) - $root.google.cloud.video.transcoder.v1beta1.SegmentSettings.encode(message.segmentSettings, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.encryption != null && Object.hasOwnProperty.call(message, "encryption")) - $root.google.cloud.video.transcoder.v1beta1.Encryption.encode(message.encryption, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MuxStream message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.MuxStream.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.MuxStream - * @static - * @param {google.cloud.video.transcoder.v1beta1.IMuxStream} message MuxStream message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MuxStream.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MuxStream message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.MuxStream - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.MuxStream} MuxStream - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MuxStream.decode = function 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.transcoder.v1beta1.MuxStream(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.fileName = reader.string(); - break; - case 3: - message.container = reader.string(); - break; - case 4: - if (!(message.elementaryStreams && message.elementaryStreams.length)) - message.elementaryStreams = []; - message.elementaryStreams.push(reader.string()); - break; - case 5: - message.segmentSettings = $root.google.cloud.video.transcoder.v1beta1.SegmentSettings.decode(reader, reader.uint32()); - break; - case 6: - message.encryption = $root.google.cloud.video.transcoder.v1beta1.Encryption.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MuxStream message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.MuxStream - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.MuxStream} MuxStream - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MuxStream.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MuxStream message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.MuxStream - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MuxStream.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; - if (message.fileName != null && message.hasOwnProperty("fileName")) - if (!$util.isString(message.fileName)) - return "fileName: string expected"; - if (message.container != null && message.hasOwnProperty("container")) - if (!$util.isString(message.container)) - return "container: string expected"; - if (message.elementaryStreams != null && message.hasOwnProperty("elementaryStreams")) { - if (!Array.isArray(message.elementaryStreams)) - return "elementaryStreams: array expected"; - for (var i = 0; i < message.elementaryStreams.length; ++i) - if (!$util.isString(message.elementaryStreams[i])) - return "elementaryStreams: string[] expected"; - } - if (message.segmentSettings != null && message.hasOwnProperty("segmentSettings")) { - var error = $root.google.cloud.video.transcoder.v1beta1.SegmentSettings.verify(message.segmentSettings); - if (error) - return "segmentSettings." + error; - } - if (message.encryption != null && message.hasOwnProperty("encryption")) { - var error = $root.google.cloud.video.transcoder.v1beta1.Encryption.verify(message.encryption); - if (error) - return "encryption." + error; - } - return null; - }; - - /** - * Creates a MuxStream message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.MuxStream - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.MuxStream} MuxStream - */ - MuxStream.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.MuxStream) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.MuxStream(); - if (object.key != null) - message.key = String(object.key); - if (object.fileName != null) - message.fileName = String(object.fileName); - if (object.container != null) - message.container = String(object.container); - if (object.elementaryStreams) { - if (!Array.isArray(object.elementaryStreams)) - throw TypeError(".google.cloud.video.transcoder.v1beta1.MuxStream.elementaryStreams: array expected"); - message.elementaryStreams = []; - for (var i = 0; i < object.elementaryStreams.length; ++i) - message.elementaryStreams[i] = String(object.elementaryStreams[i]); - } - if (object.segmentSettings != null) { - if (typeof object.segmentSettings !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.MuxStream.segmentSettings: object expected"); - message.segmentSettings = $root.google.cloud.video.transcoder.v1beta1.SegmentSettings.fromObject(object.segmentSettings); - } - if (object.encryption != null) { - if (typeof object.encryption !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.MuxStream.encryption: object expected"); - message.encryption = $root.google.cloud.video.transcoder.v1beta1.Encryption.fromObject(object.encryption); - } - return message; - }; - - /** - * Creates a plain object from a MuxStream message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.MuxStream - * @static - * @param {google.cloud.video.transcoder.v1beta1.MuxStream} message MuxStream - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MuxStream.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.elementaryStreams = []; - if (options.defaults) { - object.key = ""; - object.fileName = ""; - object.container = ""; - object.segmentSettings = null; - object.encryption = null; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.fileName != null && message.hasOwnProperty("fileName")) - object.fileName = message.fileName; - if (message.container != null && message.hasOwnProperty("container")) - object.container = message.container; - if (message.elementaryStreams && message.elementaryStreams.length) { - object.elementaryStreams = []; - for (var j = 0; j < message.elementaryStreams.length; ++j) - object.elementaryStreams[j] = message.elementaryStreams[j]; - } - if (message.segmentSettings != null && message.hasOwnProperty("segmentSettings")) - object.segmentSettings = $root.google.cloud.video.transcoder.v1beta1.SegmentSettings.toObject(message.segmentSettings, options); - if (message.encryption != null && message.hasOwnProperty("encryption")) - object.encryption = $root.google.cloud.video.transcoder.v1beta1.Encryption.toObject(message.encryption, options); - return object; - }; - - /** - * Converts this MuxStream to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.MuxStream - * @instance - * @returns {Object.} JSON object - */ - MuxStream.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MuxStream; - })(); - - v1beta1.Manifest = (function() { - - /** - * Properties of a Manifest. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface IManifest - * @property {string|null} [fileName] Manifest fileName - * @property {google.cloud.video.transcoder.v1beta1.Manifest.ManifestType|null} [type] Manifest type - * @property {Array.|null} [muxStreams] Manifest muxStreams - */ - - /** - * Constructs a new Manifest. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents a Manifest. - * @implements IManifest - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.IManifest=} [properties] Properties to set - */ - function Manifest(properties) { - this.muxStreams = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Manifest fileName. - * @member {string} fileName - * @memberof google.cloud.video.transcoder.v1beta1.Manifest - * @instance - */ - Manifest.prototype.fileName = ""; - - /** - * Manifest type. - * @member {google.cloud.video.transcoder.v1beta1.Manifest.ManifestType} type - * @memberof google.cloud.video.transcoder.v1beta1.Manifest - * @instance - */ - Manifest.prototype.type = 0; - - /** - * Manifest muxStreams. - * @member {Array.} muxStreams - * @memberof google.cloud.video.transcoder.v1beta1.Manifest - * @instance - */ - Manifest.prototype.muxStreams = $util.emptyArray; - - /** - * Creates a new Manifest instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.Manifest - * @static - * @param {google.cloud.video.transcoder.v1beta1.IManifest=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.Manifest} Manifest instance - */ - Manifest.create = function create(properties) { - return new Manifest(properties); - }; - - /** - * Encodes the specified Manifest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Manifest.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.Manifest - * @static - * @param {google.cloud.video.transcoder.v1beta1.IManifest} message Manifest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Manifest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.fileName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - if (message.muxStreams != null && message.muxStreams.length) - for (var i = 0; i < message.muxStreams.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.muxStreams[i]); - return writer; - }; - - /** - * Encodes the specified Manifest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Manifest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Manifest - * @static - * @param {google.cloud.video.transcoder.v1beta1.IManifest} message Manifest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Manifest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Manifest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.Manifest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.Manifest} Manifest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Manifest.decode = function 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.transcoder.v1beta1.Manifest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fileName = reader.string(); - break; - case 2: - message.type = reader.int32(); - break; - case 3: - if (!(message.muxStreams && message.muxStreams.length)) - message.muxStreams = []; - message.muxStreams.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Manifest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Manifest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.Manifest} Manifest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Manifest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Manifest message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.Manifest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Manifest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fileName != null && message.hasOwnProperty("fileName")) - if (!$util.isString(message.fileName)) - return "fileName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.muxStreams != null && message.hasOwnProperty("muxStreams")) { - if (!Array.isArray(message.muxStreams)) - return "muxStreams: array expected"; - for (var i = 0; i < message.muxStreams.length; ++i) - if (!$util.isString(message.muxStreams[i])) - return "muxStreams: string[] expected"; - } - return null; - }; - - /** - * Creates a Manifest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.Manifest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.Manifest} Manifest - */ - Manifest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Manifest) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.Manifest(); - if (object.fileName != null) - message.fileName = String(object.fileName); - switch (object.type) { - case "MANIFEST_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "HLS": - case 1: - message.type = 1; - break; - case "DASH": - case 2: - message.type = 2; - break; - } - if (object.muxStreams) { - if (!Array.isArray(object.muxStreams)) - throw TypeError(".google.cloud.video.transcoder.v1beta1.Manifest.muxStreams: array expected"); - message.muxStreams = []; - for (var i = 0; i < object.muxStreams.length; ++i) - message.muxStreams[i] = String(object.muxStreams[i]); - } - return message; - }; - - /** - * Creates a plain object from a Manifest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.Manifest - * @static - * @param {google.cloud.video.transcoder.v1beta1.Manifest} message Manifest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Manifest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.muxStreams = []; - if (options.defaults) { - object.fileName = ""; - object.type = options.enums === String ? "MANIFEST_TYPE_UNSPECIFIED" : 0; - } - if (message.fileName != null && message.hasOwnProperty("fileName")) - object.fileName = message.fileName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.video.transcoder.v1beta1.Manifest.ManifestType[message.type] : message.type; - if (message.muxStreams && message.muxStreams.length) { - object.muxStreams = []; - for (var j = 0; j < message.muxStreams.length; ++j) - object.muxStreams[j] = message.muxStreams[j]; - } - return object; - }; - - /** - * Converts this Manifest to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.Manifest - * @instance - * @returns {Object.} JSON object - */ - Manifest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * ManifestType enum. - * @name google.cloud.video.transcoder.v1beta1.Manifest.ManifestType - * @enum {number} - * @property {number} MANIFEST_TYPE_UNSPECIFIED=0 MANIFEST_TYPE_UNSPECIFIED value - * @property {number} HLS=1 HLS value - * @property {number} DASH=2 DASH value - */ - Manifest.ManifestType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MANIFEST_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "HLS"] = 1; - values[valuesById[2] = "DASH"] = 2; - return values; - })(); - - return Manifest; - })(); - - v1beta1.PubsubDestination = (function() { - - /** - * Properties of a PubsubDestination. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface IPubsubDestination - * @property {string|null} [topic] PubsubDestination topic - */ - - /** - * Constructs a new PubsubDestination. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents a PubsubDestination. - * @implements IPubsubDestination - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.IPubsubDestination=} [properties] Properties to set - */ - function PubsubDestination(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PubsubDestination topic. - * @member {string} topic - * @memberof google.cloud.video.transcoder.v1beta1.PubsubDestination - * @instance - */ - PubsubDestination.prototype.topic = ""; - - /** - * Creates a new PubsubDestination instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.PubsubDestination - * @static - * @param {google.cloud.video.transcoder.v1beta1.IPubsubDestination=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.PubsubDestination} PubsubDestination instance - */ - PubsubDestination.create = function create(properties) { - return new PubsubDestination(properties); - }; - - /** - * Encodes the specified PubsubDestination message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PubsubDestination.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.PubsubDestination - * @static - * @param {google.cloud.video.transcoder.v1beta1.IPubsubDestination} message PubsubDestination message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PubsubDestination.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.topic); - return writer; - }; - - /** - * Encodes the specified PubsubDestination message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PubsubDestination.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.PubsubDestination - * @static - * @param {google.cloud.video.transcoder.v1beta1.IPubsubDestination} message PubsubDestination message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PubsubDestination.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PubsubDestination message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.PubsubDestination - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.PubsubDestination} PubsubDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PubsubDestination.decode = function 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.transcoder.v1beta1.PubsubDestination(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.topic = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PubsubDestination message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.PubsubDestination - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.PubsubDestination} PubsubDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PubsubDestination.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PubsubDestination message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.PubsubDestination - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PubsubDestination.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.topic != null && message.hasOwnProperty("topic")) - if (!$util.isString(message.topic)) - return "topic: string expected"; - return null; - }; - - /** - * Creates a PubsubDestination message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.PubsubDestination - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.PubsubDestination} PubsubDestination - */ - PubsubDestination.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.PubsubDestination) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.PubsubDestination(); - if (object.topic != null) - message.topic = String(object.topic); - return message; - }; - - /** - * Creates a plain object from a PubsubDestination message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.PubsubDestination - * @static - * @param {google.cloud.video.transcoder.v1beta1.PubsubDestination} message PubsubDestination - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PubsubDestination.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.topic = ""; - if (message.topic != null && message.hasOwnProperty("topic")) - object.topic = message.topic; - return object; - }; - - /** - * Converts this PubsubDestination to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.PubsubDestination - * @instance - * @returns {Object.} JSON object - */ - PubsubDestination.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PubsubDestination; - })(); - - v1beta1.SpriteSheet = (function() { - - /** - * Properties of a SpriteSheet. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface ISpriteSheet - * @property {string|null} [format] SpriteSheet format - * @property {string|null} [filePrefix] SpriteSheet filePrefix - * @property {number|null} [spriteWidthPixels] SpriteSheet spriteWidthPixels - * @property {number|null} [spriteHeightPixels] SpriteSheet spriteHeightPixels - * @property {number|null} [columnCount] SpriteSheet columnCount - * @property {number|null} [rowCount] SpriteSheet rowCount - * @property {google.protobuf.IDuration|null} [startTimeOffset] SpriteSheet startTimeOffset - * @property {google.protobuf.IDuration|null} [endTimeOffset] SpriteSheet endTimeOffset - * @property {number|null} [totalCount] SpriteSheet totalCount - * @property {google.protobuf.IDuration|null} [interval] SpriteSheet interval - * @property {number|null} [quality] SpriteSheet quality - */ - - /** - * Constructs a new SpriteSheet. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents a SpriteSheet. - * @implements ISpriteSheet - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.ISpriteSheet=} [properties] Properties to set - */ - function SpriteSheet(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SpriteSheet format. - * @member {string} format - * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet - * @instance - */ - SpriteSheet.prototype.format = ""; - - /** - * SpriteSheet filePrefix. - * @member {string} filePrefix - * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet - * @instance - */ - SpriteSheet.prototype.filePrefix = ""; - - /** - * SpriteSheet spriteWidthPixels. - * @member {number} spriteWidthPixels - * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet - * @instance - */ - SpriteSheet.prototype.spriteWidthPixels = 0; - - /** - * SpriteSheet spriteHeightPixels. - * @member {number} spriteHeightPixels - * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet - * @instance - */ - SpriteSheet.prototype.spriteHeightPixels = 0; - - /** - * SpriteSheet columnCount. - * @member {number} columnCount - * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet - * @instance - */ - SpriteSheet.prototype.columnCount = 0; - - /** - * SpriteSheet rowCount. - * @member {number} rowCount - * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet - * @instance - */ - SpriteSheet.prototype.rowCount = 0; - - /** - * SpriteSheet startTimeOffset. - * @member {google.protobuf.IDuration|null|undefined} startTimeOffset - * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet - * @instance - */ - SpriteSheet.prototype.startTimeOffset = null; - - /** - * SpriteSheet endTimeOffset. - * @member {google.protobuf.IDuration|null|undefined} endTimeOffset - * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet - * @instance - */ - SpriteSheet.prototype.endTimeOffset = null; - - /** - * SpriteSheet totalCount. - * @member {number|null|undefined} totalCount - * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet - * @instance - */ - SpriteSheet.prototype.totalCount = null; - - /** - * SpriteSheet interval. - * @member {google.protobuf.IDuration|null|undefined} interval - * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet - * @instance - */ - SpriteSheet.prototype.interval = null; - - /** - * SpriteSheet quality. - * @member {number} quality - * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet - * @instance - */ - SpriteSheet.prototype.quality = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SpriteSheet extractionStrategy. - * @member {"totalCount"|"interval"|undefined} extractionStrategy - * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet - * @instance - */ - Object.defineProperty(SpriteSheet.prototype, "extractionStrategy", { - get: $util.oneOfGetter($oneOfFields = ["totalCount", "interval"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SpriteSheet instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet - * @static - * @param {google.cloud.video.transcoder.v1beta1.ISpriteSheet=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.SpriteSheet} SpriteSheet instance - */ - SpriteSheet.create = function create(properties) { - return new SpriteSheet(properties); - }; - - /** - * Encodes the specified SpriteSheet message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.SpriteSheet.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet - * @static - * @param {google.cloud.video.transcoder.v1beta1.ISpriteSheet} message SpriteSheet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SpriteSheet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.format != null && Object.hasOwnProperty.call(message, "format")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.format); - if (message.filePrefix != null && Object.hasOwnProperty.call(message, "filePrefix")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filePrefix); - if (message.spriteWidthPixels != null && Object.hasOwnProperty.call(message, "spriteWidthPixels")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.spriteWidthPixels); - if (message.spriteHeightPixels != null && Object.hasOwnProperty.call(message, "spriteHeightPixels")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.spriteHeightPixels); - if (message.columnCount != null && Object.hasOwnProperty.call(message, "columnCount")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.columnCount); - if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.rowCount); - if (message.startTimeOffset != null && Object.hasOwnProperty.call(message, "startTimeOffset")) - $root.google.protobuf.Duration.encode(message.startTimeOffset, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.endTimeOffset != null && Object.hasOwnProperty.call(message, "endTimeOffset")) - $root.google.protobuf.Duration.encode(message.endTimeOffset, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.totalCount != null && Object.hasOwnProperty.call(message, "totalCount")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.totalCount); - if (message.interval != null && Object.hasOwnProperty.call(message, "interval")) - $root.google.protobuf.Duration.encode(message.interval, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.quality != null && Object.hasOwnProperty.call(message, "quality")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.quality); - return writer; - }; - - /** - * Encodes the specified SpriteSheet message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.SpriteSheet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet - * @static - * @param {google.cloud.video.transcoder.v1beta1.ISpriteSheet} message SpriteSheet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SpriteSheet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SpriteSheet message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.SpriteSheet} SpriteSheet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SpriteSheet.decode = function 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.transcoder.v1beta1.SpriteSheet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.format = reader.string(); - break; - case 2: - message.filePrefix = reader.string(); - break; - case 3: - message.spriteWidthPixels = reader.int32(); - break; - case 4: - message.spriteHeightPixels = reader.int32(); - break; - case 5: - message.columnCount = reader.int32(); - break; - case 6: - message.rowCount = reader.int32(); - break; - case 7: - message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 8: - message.endTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 9: - message.totalCount = reader.int32(); - break; - case 10: - message.interval = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 11: - message.quality = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SpriteSheet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.SpriteSheet} SpriteSheet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SpriteSheet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SpriteSheet message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SpriteSheet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.format != null && message.hasOwnProperty("format")) - if (!$util.isString(message.format)) - return "format: string expected"; - if (message.filePrefix != null && message.hasOwnProperty("filePrefix")) - if (!$util.isString(message.filePrefix)) - return "filePrefix: string expected"; - if (message.spriteWidthPixels != null && message.hasOwnProperty("spriteWidthPixels")) - if (!$util.isInteger(message.spriteWidthPixels)) - return "spriteWidthPixels: integer expected"; - if (message.spriteHeightPixels != null && message.hasOwnProperty("spriteHeightPixels")) - if (!$util.isInteger(message.spriteHeightPixels)) - return "spriteHeightPixels: integer expected"; - if (message.columnCount != null && message.hasOwnProperty("columnCount")) - if (!$util.isInteger(message.columnCount)) - return "columnCount: integer expected"; - if (message.rowCount != null && message.hasOwnProperty("rowCount")) - if (!$util.isInteger(message.rowCount)) - return "rowCount: integer expected"; - if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) { - var error = $root.google.protobuf.Duration.verify(message.startTimeOffset); - if (error) - return "startTimeOffset." + error; - } - if (message.endTimeOffset != null && message.hasOwnProperty("endTimeOffset")) { - var error = $root.google.protobuf.Duration.verify(message.endTimeOffset); - if (error) - return "endTimeOffset." + error; - } - if (message.totalCount != null && message.hasOwnProperty("totalCount")) { - properties.extractionStrategy = 1; - if (!$util.isInteger(message.totalCount)) - return "totalCount: integer expected"; - } - if (message.interval != null && message.hasOwnProperty("interval")) { - if (properties.extractionStrategy === 1) - return "extractionStrategy: multiple values"; - properties.extractionStrategy = 1; - { - var error = $root.google.protobuf.Duration.verify(message.interval); - if (error) - return "interval." + error; - } - } - if (message.quality != null && message.hasOwnProperty("quality")) - if (!$util.isInteger(message.quality)) - return "quality: integer expected"; - return null; - }; - - /** - * Creates a SpriteSheet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.SpriteSheet} SpriteSheet - */ - SpriteSheet.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.SpriteSheet) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.SpriteSheet(); - if (object.format != null) - message.format = String(object.format); - if (object.filePrefix != null) - message.filePrefix = String(object.filePrefix); - if (object.spriteWidthPixels != null) - message.spriteWidthPixels = object.spriteWidthPixels | 0; - if (object.spriteHeightPixels != null) - message.spriteHeightPixels = object.spriteHeightPixels | 0; - if (object.columnCount != null) - message.columnCount = object.columnCount | 0; - if (object.rowCount != null) - message.rowCount = object.rowCount | 0; - if (object.startTimeOffset != null) { - if (typeof object.startTimeOffset !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.SpriteSheet.startTimeOffset: object expected"); - message.startTimeOffset = $root.google.protobuf.Duration.fromObject(object.startTimeOffset); - } - if (object.endTimeOffset != null) { - if (typeof object.endTimeOffset !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.SpriteSheet.endTimeOffset: object expected"); - message.endTimeOffset = $root.google.protobuf.Duration.fromObject(object.endTimeOffset); - } - if (object.totalCount != null) - message.totalCount = object.totalCount | 0; - if (object.interval != null) { - if (typeof object.interval !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.SpriteSheet.interval: object expected"); - message.interval = $root.google.protobuf.Duration.fromObject(object.interval); - } - if (object.quality != null) - message.quality = object.quality | 0; - return message; - }; - - /** - * Creates a plain object from a SpriteSheet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet - * @static - * @param {google.cloud.video.transcoder.v1beta1.SpriteSheet} message SpriteSheet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SpriteSheet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.format = ""; - object.filePrefix = ""; - object.spriteWidthPixels = 0; - object.spriteHeightPixels = 0; - object.columnCount = 0; - object.rowCount = 0; - object.startTimeOffset = null; - object.endTimeOffset = null; - object.quality = 0; - } - if (message.format != null && message.hasOwnProperty("format")) - object.format = message.format; - if (message.filePrefix != null && message.hasOwnProperty("filePrefix")) - object.filePrefix = message.filePrefix; - if (message.spriteWidthPixels != null && message.hasOwnProperty("spriteWidthPixels")) - object.spriteWidthPixels = message.spriteWidthPixels; - if (message.spriteHeightPixels != null && message.hasOwnProperty("spriteHeightPixels")) - object.spriteHeightPixels = message.spriteHeightPixels; - if (message.columnCount != null && message.hasOwnProperty("columnCount")) - object.columnCount = message.columnCount; - if (message.rowCount != null && message.hasOwnProperty("rowCount")) - object.rowCount = message.rowCount; - if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) - object.startTimeOffset = $root.google.protobuf.Duration.toObject(message.startTimeOffset, options); - if (message.endTimeOffset != null && message.hasOwnProperty("endTimeOffset")) - object.endTimeOffset = $root.google.protobuf.Duration.toObject(message.endTimeOffset, options); - if (message.totalCount != null && message.hasOwnProperty("totalCount")) { - object.totalCount = message.totalCount; - if (options.oneofs) - object.extractionStrategy = "totalCount"; - } - if (message.interval != null && message.hasOwnProperty("interval")) { - object.interval = $root.google.protobuf.Duration.toObject(message.interval, options); - if (options.oneofs) - object.extractionStrategy = "interval"; - } - if (message.quality != null && message.hasOwnProperty("quality")) - object.quality = message.quality; - return object; - }; - - /** - * Converts this SpriteSheet to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.SpriteSheet - * @instance - * @returns {Object.} JSON object - */ - SpriteSheet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SpriteSheet; - })(); - - v1beta1.Overlay = (function() { - - /** - * Properties of an Overlay. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface IOverlay - * @property {google.cloud.video.transcoder.v1beta1.Overlay.IImage|null} [image] Overlay image - * @property {Array.|null} [animations] Overlay animations - */ - - /** - * Constructs a new Overlay. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents an Overlay. - * @implements IOverlay - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.IOverlay=} [properties] Properties to set - */ - function Overlay(properties) { - this.animations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Overlay image. - * @member {google.cloud.video.transcoder.v1beta1.Overlay.IImage|null|undefined} image - * @memberof google.cloud.video.transcoder.v1beta1.Overlay - * @instance - */ - Overlay.prototype.image = null; - - /** - * Overlay animations. - * @member {Array.} animations - * @memberof google.cloud.video.transcoder.v1beta1.Overlay - * @instance - */ - Overlay.prototype.animations = $util.emptyArray; - - /** - * Creates a new Overlay instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.Overlay - * @static - * @param {google.cloud.video.transcoder.v1beta1.IOverlay=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.Overlay} Overlay instance - */ - Overlay.create = function create(properties) { - return new Overlay(properties); - }; - - /** - * Encodes the specified Overlay message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.Overlay - * @static - * @param {google.cloud.video.transcoder.v1beta1.IOverlay} message Overlay message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Overlay.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.image != null && Object.hasOwnProperty.call(message, "image")) - $root.google.cloud.video.transcoder.v1beta1.Overlay.Image.encode(message.image, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.animations != null && message.animations.length) - for (var i = 0; i < message.animations.length; ++i) - $root.google.cloud.video.transcoder.v1beta1.Overlay.Animation.encode(message.animations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Overlay message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Overlay - * @static - * @param {google.cloud.video.transcoder.v1beta1.IOverlay} message Overlay message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Overlay.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Overlay message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.Overlay - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.Overlay} Overlay - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Overlay.decode = function 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.transcoder.v1beta1.Overlay(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.image = $root.google.cloud.video.transcoder.v1beta1.Overlay.Image.decode(reader, reader.uint32()); - break; - case 2: - if (!(message.animations && message.animations.length)) - message.animations = []; - message.animations.push($root.google.cloud.video.transcoder.v1beta1.Overlay.Animation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Overlay message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Overlay - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.Overlay} Overlay - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Overlay.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Overlay message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.Overlay - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Overlay.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.image != null && message.hasOwnProperty("image")) { - var error = $root.google.cloud.video.transcoder.v1beta1.Overlay.Image.verify(message.image); - if (error) - return "image." + error; - } - if (message.animations != null && message.hasOwnProperty("animations")) { - if (!Array.isArray(message.animations)) - return "animations: array expected"; - for (var i = 0; i < message.animations.length; ++i) { - var error = $root.google.cloud.video.transcoder.v1beta1.Overlay.Animation.verify(message.animations[i]); - if (error) - return "animations." + error; - } - } - return null; - }; - - /** - * Creates an Overlay message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.Overlay - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.Overlay} Overlay - */ - Overlay.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Overlay) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.Overlay(); - if (object.image != null) { - if (typeof object.image !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.Overlay.image: object expected"); - message.image = $root.google.cloud.video.transcoder.v1beta1.Overlay.Image.fromObject(object.image); - } - if (object.animations) { - if (!Array.isArray(object.animations)) - throw TypeError(".google.cloud.video.transcoder.v1beta1.Overlay.animations: array expected"); - message.animations = []; - for (var i = 0; i < object.animations.length; ++i) { - if (typeof object.animations[i] !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.Overlay.animations: object expected"); - message.animations[i] = $root.google.cloud.video.transcoder.v1beta1.Overlay.Animation.fromObject(object.animations[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an Overlay message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.Overlay - * @static - * @param {google.cloud.video.transcoder.v1beta1.Overlay} message Overlay - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Overlay.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.animations = []; - if (options.defaults) - object.image = null; - if (message.image != null && message.hasOwnProperty("image")) - object.image = $root.google.cloud.video.transcoder.v1beta1.Overlay.Image.toObject(message.image, options); - if (message.animations && message.animations.length) { - object.animations = []; - for (var j = 0; j < message.animations.length; ++j) - object.animations[j] = $root.google.cloud.video.transcoder.v1beta1.Overlay.Animation.toObject(message.animations[j], options); - } - return object; - }; - - /** - * Converts this Overlay to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.Overlay - * @instance - * @returns {Object.} JSON object - */ - Overlay.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - Overlay.NormalizedCoordinate = (function() { - - /** - * Properties of a NormalizedCoordinate. - * @memberof google.cloud.video.transcoder.v1beta1.Overlay - * @interface INormalizedCoordinate - * @property {number|null} [x] NormalizedCoordinate x - * @property {number|null} [y] NormalizedCoordinate y - */ - - /** - * Constructs a new NormalizedCoordinate. - * @memberof google.cloud.video.transcoder.v1beta1.Overlay - * @classdesc Represents a NormalizedCoordinate. - * @implements INormalizedCoordinate - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate=} [properties] Properties to set - */ - function NormalizedCoordinate(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NormalizedCoordinate x. - * @member {number} x - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate - * @instance - */ - NormalizedCoordinate.prototype.x = 0; - - /** - * NormalizedCoordinate y. - * @member {number} y - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate - * @instance - */ - NormalizedCoordinate.prototype.y = 0; - - /** - * Creates a new NormalizedCoordinate instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate - * @static - * @param {google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate} NormalizedCoordinate instance - */ - NormalizedCoordinate.create = function create(properties) { - return new NormalizedCoordinate(properties); - }; - - /** - * Encodes the specified NormalizedCoordinate message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate - * @static - * @param {google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate} message NormalizedCoordinate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NormalizedCoordinate.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.x != null && Object.hasOwnProperty.call(message, "x")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.x); - if (message.y != null && Object.hasOwnProperty.call(message, "y")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.y); - return writer; - }; - - /** - * Encodes the specified NormalizedCoordinate message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate - * @static - * @param {google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate} message NormalizedCoordinate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NormalizedCoordinate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NormalizedCoordinate message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate} NormalizedCoordinate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NormalizedCoordinate.decode = function 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.transcoder.v1beta1.Overlay.NormalizedCoordinate(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.x = reader.double(); - break; - case 2: - message.y = reader.double(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NormalizedCoordinate message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate} NormalizedCoordinate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NormalizedCoordinate.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NormalizedCoordinate message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NormalizedCoordinate.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.x != null && message.hasOwnProperty("x")) - if (typeof message.x !== "number") - return "x: number expected"; - if (message.y != null && message.hasOwnProperty("y")) - if (typeof message.y !== "number") - return "y: number expected"; - return null; - }; - - /** - * Creates a NormalizedCoordinate message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate} NormalizedCoordinate - */ - NormalizedCoordinate.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate(); - if (object.x != null) - message.x = Number(object.x); - if (object.y != null) - message.y = Number(object.y); - return message; - }; - - /** - * Creates a plain object from a NormalizedCoordinate message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate - * @static - * @param {google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate} message NormalizedCoordinate - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NormalizedCoordinate.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.x = 0; - object.y = 0; - } - if (message.x != null && message.hasOwnProperty("x")) - object.x = options.json && !isFinite(message.x) ? String(message.x) : message.x; - if (message.y != null && message.hasOwnProperty("y")) - object.y = options.json && !isFinite(message.y) ? String(message.y) : message.y; - return object; - }; - - /** - * Converts this NormalizedCoordinate to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate - * @instance - * @returns {Object.} JSON object - */ - NormalizedCoordinate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return NormalizedCoordinate; - })(); - - Overlay.Image = (function() { - - /** - * Properties of an Image. - * @memberof google.cloud.video.transcoder.v1beta1.Overlay - * @interface IImage - * @property {string|null} [uri] Image uri - * @property {google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate|null} [resolution] Image resolution - * @property {number|null} [alpha] Image alpha - */ - - /** - * Constructs a new Image. - * @memberof google.cloud.video.transcoder.v1beta1.Overlay - * @classdesc Represents an Image. - * @implements IImage - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.Overlay.IImage=} [properties] Properties to set - */ - function Image(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Image uri. - * @member {string} uri - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Image - * @instance - */ - Image.prototype.uri = ""; - - /** - * Image resolution. - * @member {google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate|null|undefined} resolution - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Image - * @instance - */ - Image.prototype.resolution = null; - - /** - * Image alpha. - * @member {number} alpha - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Image - * @instance - */ - Image.prototype.alpha = 0; - - /** - * Creates a new Image instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Image - * @static - * @param {google.cloud.video.transcoder.v1beta1.Overlay.IImage=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.Overlay.Image} Image instance - */ - Image.create = function create(properties) { - return new Image(properties); - }; - - /** - * Encodes the specified Image message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.Image.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Image - * @static - * @param {google.cloud.video.transcoder.v1beta1.Overlay.IImage} message Image message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Image.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.resolution != null && Object.hasOwnProperty.call(message, "resolution")) - $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.encode(message.resolution, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.alpha != null && Object.hasOwnProperty.call(message, "alpha")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.alpha); - return writer; - }; - - /** - * Encodes the specified Image message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.Image.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Image - * @static - * @param {google.cloud.video.transcoder.v1beta1.Overlay.IImage} message Image message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Image.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Image message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Image - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.Overlay.Image} Image - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Image.decode = function 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.transcoder.v1beta1.Overlay.Image(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.uri = reader.string(); - break; - case 2: - message.resolution = $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.decode(reader, reader.uint32()); - break; - case 3: - message.alpha = reader.double(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Image message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Image - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.Overlay.Image} Image - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Image.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Image message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Image - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Image.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.resolution != null && message.hasOwnProperty("resolution")) { - var error = $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.verify(message.resolution); - if (error) - return "resolution." + error; - } - if (message.alpha != null && message.hasOwnProperty("alpha")) - if (typeof message.alpha !== "number") - return "alpha: number expected"; - return null; - }; - - /** - * Creates an Image message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Image - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.Overlay.Image} Image - */ - Image.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Overlay.Image) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.Overlay.Image(); - if (object.uri != null) - message.uri = String(object.uri); - if (object.resolution != null) { - if (typeof object.resolution !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.Overlay.Image.resolution: object expected"); - message.resolution = $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.fromObject(object.resolution); - } - if (object.alpha != null) - message.alpha = Number(object.alpha); - return message; - }; - - /** - * Creates a plain object from an Image message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Image - * @static - * @param {google.cloud.video.transcoder.v1beta1.Overlay.Image} message Image - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Image.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.uri = ""; - object.resolution = null; - object.alpha = 0; - } - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.resolution != null && message.hasOwnProperty("resolution")) - object.resolution = $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.toObject(message.resolution, options); - if (message.alpha != null && message.hasOwnProperty("alpha")) - object.alpha = options.json && !isFinite(message.alpha) ? String(message.alpha) : message.alpha; - return object; - }; - - /** - * Converts this Image to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Image - * @instance - * @returns {Object.} JSON object - */ - Image.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Image; - })(); - - Overlay.AnimationStatic = (function() { - - /** - * Properties of an AnimationStatic. - * @memberof google.cloud.video.transcoder.v1beta1.Overlay - * @interface IAnimationStatic - * @property {google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate|null} [xy] AnimationStatic xy - * @property {google.protobuf.IDuration|null} [startTimeOffset] AnimationStatic startTimeOffset - */ - - /** - * Constructs a new AnimationStatic. - * @memberof google.cloud.video.transcoder.v1beta1.Overlay - * @classdesc Represents an AnimationStatic. - * @implements IAnimationStatic - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationStatic=} [properties] Properties to set - */ - function AnimationStatic(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AnimationStatic xy. - * @member {google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate|null|undefined} xy - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic - * @instance - */ - AnimationStatic.prototype.xy = null; - - /** - * AnimationStatic startTimeOffset. - * @member {google.protobuf.IDuration|null|undefined} startTimeOffset - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic - * @instance - */ - AnimationStatic.prototype.startTimeOffset = null; - - /** - * Creates a new AnimationStatic instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic - * @static - * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationStatic=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic} AnimationStatic instance - */ - AnimationStatic.create = function create(properties) { - return new AnimationStatic(properties); - }; - - /** - * Encodes the specified AnimationStatic message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic - * @static - * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationStatic} message AnimationStatic message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AnimationStatic.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.xy != null && Object.hasOwnProperty.call(message, "xy")) - $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.encode(message.xy, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.startTimeOffset != null && Object.hasOwnProperty.call(message, "startTimeOffset")) - $root.google.protobuf.Duration.encode(message.startTimeOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AnimationStatic message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic - * @static - * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationStatic} message AnimationStatic message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AnimationStatic.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AnimationStatic message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic} AnimationStatic - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AnimationStatic.decode = function 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.transcoder.v1beta1.Overlay.AnimationStatic(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.xy = $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.decode(reader, reader.uint32()); - break; - case 2: - message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AnimationStatic message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic} AnimationStatic - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AnimationStatic.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AnimationStatic message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AnimationStatic.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.xy != null && message.hasOwnProperty("xy")) { - var error = $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.verify(message.xy); - if (error) - return "xy." + 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 an AnimationStatic message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic} AnimationStatic - */ - AnimationStatic.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic(); - if (object.xy != null) { - if (typeof object.xy !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic.xy: object expected"); - message.xy = $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.fromObject(object.xy); - } - if (object.startTimeOffset != null) { - if (typeof object.startTimeOffset !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic.startTimeOffset: object expected"); - message.startTimeOffset = $root.google.protobuf.Duration.fromObject(object.startTimeOffset); - } - return message; - }; - - /** - * Creates a plain object from an AnimationStatic message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic - * @static - * @param {google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic} message AnimationStatic - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AnimationStatic.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.xy = null; - object.startTimeOffset = null; - } - if (message.xy != null && message.hasOwnProperty("xy")) - object.xy = $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.toObject(message.xy, options); - if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) - object.startTimeOffset = $root.google.protobuf.Duration.toObject(message.startTimeOffset, options); - return object; - }; - - /** - * Converts this AnimationStatic to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic - * @instance - * @returns {Object.} JSON object - */ - AnimationStatic.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return AnimationStatic; - })(); - - Overlay.AnimationFade = (function() { - - /** - * Properties of an AnimationFade. - * @memberof google.cloud.video.transcoder.v1beta1.Overlay - * @interface IAnimationFade - * @property {google.cloud.video.transcoder.v1beta1.Overlay.FadeType|null} [fadeType] AnimationFade fadeType - * @property {google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate|null} [xy] AnimationFade xy - * @property {google.protobuf.IDuration|null} [startTimeOffset] AnimationFade startTimeOffset - * @property {google.protobuf.IDuration|null} [endTimeOffset] AnimationFade endTimeOffset - */ - - /** - * Constructs a new AnimationFade. - * @memberof google.cloud.video.transcoder.v1beta1.Overlay - * @classdesc Represents an AnimationFade. - * @implements IAnimationFade - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationFade=} [properties] Properties to set - */ - function AnimationFade(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AnimationFade fadeType. - * @member {google.cloud.video.transcoder.v1beta1.Overlay.FadeType} fadeType - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade - * @instance - */ - AnimationFade.prototype.fadeType = 0; - - /** - * AnimationFade xy. - * @member {google.cloud.video.transcoder.v1beta1.Overlay.INormalizedCoordinate|null|undefined} xy - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade - * @instance - */ - AnimationFade.prototype.xy = null; - - /** - * AnimationFade startTimeOffset. - * @member {google.protobuf.IDuration|null|undefined} startTimeOffset - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade - * @instance - */ - AnimationFade.prototype.startTimeOffset = null; - - /** - * AnimationFade endTimeOffset. - * @member {google.protobuf.IDuration|null|undefined} endTimeOffset - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade - * @instance - */ - AnimationFade.prototype.endTimeOffset = null; - - /** - * Creates a new AnimationFade instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade - * @static - * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationFade=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade} AnimationFade instance - */ - AnimationFade.create = function create(properties) { - return new AnimationFade(properties); - }; - - /** - * Encodes the specified AnimationFade message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade - * @static - * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationFade} message AnimationFade message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AnimationFade.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fadeType != null && Object.hasOwnProperty.call(message, "fadeType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fadeType); - if (message.xy != null && Object.hasOwnProperty.call(message, "xy")) - $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.encode(message.xy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.startTimeOffset != null && Object.hasOwnProperty.call(message, "startTimeOffset")) - $root.google.protobuf.Duration.encode(message.startTimeOffset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.endTimeOffset != null && Object.hasOwnProperty.call(message, "endTimeOffset")) - $root.google.protobuf.Duration.encode(message.endTimeOffset, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AnimationFade message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade - * @static - * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationFade} message AnimationFade message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AnimationFade.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AnimationFade message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade} AnimationFade - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AnimationFade.decode = function 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.transcoder.v1beta1.Overlay.AnimationFade(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fadeType = reader.int32(); - break; - case 2: - message.xy = $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.decode(reader, reader.uint32()); - break; - case 3: - message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 4: - message.endTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AnimationFade message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade} AnimationFade - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AnimationFade.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AnimationFade message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AnimationFade.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fadeType != null && message.hasOwnProperty("fadeType")) - switch (message.fadeType) { - default: - return "fadeType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.xy != null && message.hasOwnProperty("xy")) { - var error = $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.verify(message.xy); - if (error) - return "xy." + error; - } - if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) { - var error = $root.google.protobuf.Duration.verify(message.startTimeOffset); - if (error) - return "startTimeOffset." + error; - } - if (message.endTimeOffset != null && message.hasOwnProperty("endTimeOffset")) { - var error = $root.google.protobuf.Duration.verify(message.endTimeOffset); - if (error) - return "endTimeOffset." + error; - } - return null; - }; - - /** - * Creates an AnimationFade message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade} AnimationFade - */ - AnimationFade.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade(); - switch (object.fadeType) { - case "FADE_TYPE_UNSPECIFIED": - case 0: - message.fadeType = 0; - break; - case "FADE_IN": - case 1: - message.fadeType = 1; - break; - case "FADE_OUT": - case 2: - message.fadeType = 2; - break; - } - if (object.xy != null) { - if (typeof object.xy !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade.xy: object expected"); - message.xy = $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.fromObject(object.xy); - } - if (object.startTimeOffset != null) { - if (typeof object.startTimeOffset !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade.startTimeOffset: object expected"); - message.startTimeOffset = $root.google.protobuf.Duration.fromObject(object.startTimeOffset); - } - if (object.endTimeOffset != null) { - if (typeof object.endTimeOffset !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade.endTimeOffset: object expected"); - message.endTimeOffset = $root.google.protobuf.Duration.fromObject(object.endTimeOffset); - } - return message; - }; - - /** - * Creates a plain object from an AnimationFade message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade - * @static - * @param {google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade} message AnimationFade - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AnimationFade.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.fadeType = options.enums === String ? "FADE_TYPE_UNSPECIFIED" : 0; - object.xy = null; - object.startTimeOffset = null; - object.endTimeOffset = null; - } - if (message.fadeType != null && message.hasOwnProperty("fadeType")) - object.fadeType = options.enums === String ? $root.google.cloud.video.transcoder.v1beta1.Overlay.FadeType[message.fadeType] : message.fadeType; - if (message.xy != null && message.hasOwnProperty("xy")) - object.xy = $root.google.cloud.video.transcoder.v1beta1.Overlay.NormalizedCoordinate.toObject(message.xy, options); - if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) - object.startTimeOffset = $root.google.protobuf.Duration.toObject(message.startTimeOffset, options); - if (message.endTimeOffset != null && message.hasOwnProperty("endTimeOffset")) - object.endTimeOffset = $root.google.protobuf.Duration.toObject(message.endTimeOffset, options); - return object; - }; - - /** - * Converts this AnimationFade to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade - * @instance - * @returns {Object.} JSON object - */ - AnimationFade.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return AnimationFade; - })(); - - Overlay.AnimationEnd = (function() { - - /** - * Properties of an AnimationEnd. - * @memberof google.cloud.video.transcoder.v1beta1.Overlay - * @interface IAnimationEnd - * @property {google.protobuf.IDuration|null} [startTimeOffset] AnimationEnd startTimeOffset - */ - - /** - * Constructs a new AnimationEnd. - * @memberof google.cloud.video.transcoder.v1beta1.Overlay - * @classdesc Represents an AnimationEnd. - * @implements IAnimationEnd - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationEnd=} [properties] Properties to set - */ - function AnimationEnd(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AnimationEnd startTimeOffset. - * @member {google.protobuf.IDuration|null|undefined} startTimeOffset - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd - * @instance - */ - AnimationEnd.prototype.startTimeOffset = null; - - /** - * Creates a new AnimationEnd instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd - * @static - * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationEnd=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd} AnimationEnd instance - */ - AnimationEnd.create = function create(properties) { - return new AnimationEnd(properties); - }; - - /** - * Encodes the specified AnimationEnd message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd - * @static - * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationEnd} message AnimationEnd message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AnimationEnd.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.startTimeOffset != null && Object.hasOwnProperty.call(message, "startTimeOffset")) - $root.google.protobuf.Duration.encode(message.startTimeOffset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AnimationEnd message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd - * @static - * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationEnd} message AnimationEnd message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AnimationEnd.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AnimationEnd message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd} AnimationEnd - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AnimationEnd.decode = function 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.transcoder.v1beta1.Overlay.AnimationEnd(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AnimationEnd message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd} AnimationEnd - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AnimationEnd.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AnimationEnd message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AnimationEnd.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) { - var error = $root.google.protobuf.Duration.verify(message.startTimeOffset); - if (error) - return "startTimeOffset." + error; - } - return null; - }; - - /** - * Creates an AnimationEnd message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd} AnimationEnd - */ - AnimationEnd.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd(); - if (object.startTimeOffset != null) { - if (typeof object.startTimeOffset !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd.startTimeOffset: object expected"); - message.startTimeOffset = $root.google.protobuf.Duration.fromObject(object.startTimeOffset); - } - return message; - }; - - /** - * Creates a plain object from an AnimationEnd message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd - * @static - * @param {google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd} message AnimationEnd - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AnimationEnd.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.startTimeOffset = null; - if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) - object.startTimeOffset = $root.google.protobuf.Duration.toObject(message.startTimeOffset, options); - return object; - }; - - /** - * Converts this AnimationEnd to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd - * @instance - * @returns {Object.} JSON object - */ - AnimationEnd.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return AnimationEnd; - })(); - - Overlay.Animation = (function() { - - /** - * Properties of an Animation. - * @memberof google.cloud.video.transcoder.v1beta1.Overlay - * @interface IAnimation - * @property {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationStatic|null} [animationStatic] Animation animationStatic - * @property {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationFade|null} [animationFade] Animation animationFade - * @property {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationEnd|null} [animationEnd] Animation animationEnd - */ - - /** - * Constructs a new Animation. - * @memberof google.cloud.video.transcoder.v1beta1.Overlay - * @classdesc Represents an Animation. - * @implements IAnimation - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimation=} [properties] Properties to set - */ - function Animation(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Animation animationStatic. - * @member {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationStatic|null|undefined} animationStatic - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Animation - * @instance - */ - Animation.prototype.animationStatic = null; - - /** - * Animation animationFade. - * @member {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationFade|null|undefined} animationFade - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Animation - * @instance - */ - Animation.prototype.animationFade = null; - - /** - * Animation animationEnd. - * @member {google.cloud.video.transcoder.v1beta1.Overlay.IAnimationEnd|null|undefined} animationEnd - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Animation - * @instance - */ - Animation.prototype.animationEnd = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Animation animationType. - * @member {"animationStatic"|"animationFade"|"animationEnd"|undefined} animationType - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Animation - * @instance - */ - Object.defineProperty(Animation.prototype, "animationType", { - get: $util.oneOfGetter($oneOfFields = ["animationStatic", "animationFade", "animationEnd"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Animation instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Animation - * @static - * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimation=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.Overlay.Animation} Animation instance - */ - Animation.create = function create(properties) { - return new Animation(properties); - }; - - /** - * Encodes the specified Animation message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.Animation.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Animation - * @static - * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimation} message Animation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Animation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.animationStatic != null && Object.hasOwnProperty.call(message, "animationStatic")) - $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic.encode(message.animationStatic, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.animationFade != null && Object.hasOwnProperty.call(message, "animationFade")) - $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade.encode(message.animationFade, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.animationEnd != null && Object.hasOwnProperty.call(message, "animationEnd")) - $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd.encode(message.animationEnd, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Animation message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Overlay.Animation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Animation - * @static - * @param {google.cloud.video.transcoder.v1beta1.Overlay.IAnimation} message Animation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Animation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Animation message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Animation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.Overlay.Animation} Animation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Animation.decode = function 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.transcoder.v1beta1.Overlay.Animation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.animationStatic = $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic.decode(reader, reader.uint32()); - break; - case 2: - message.animationFade = $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade.decode(reader, reader.uint32()); - break; - case 3: - message.animationEnd = $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Animation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Animation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.Overlay.Animation} Animation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Animation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Animation message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Animation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Animation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.animationStatic != null && message.hasOwnProperty("animationStatic")) { - properties.animationType = 1; - { - var error = $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic.verify(message.animationStatic); - if (error) - return "animationStatic." + error; - } - } - if (message.animationFade != null && message.hasOwnProperty("animationFade")) { - if (properties.animationType === 1) - return "animationType: multiple values"; - properties.animationType = 1; - { - var error = $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade.verify(message.animationFade); - if (error) - return "animationFade." + error; - } - } - if (message.animationEnd != null && message.hasOwnProperty("animationEnd")) { - if (properties.animationType === 1) - return "animationType: multiple values"; - properties.animationType = 1; - { - var error = $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd.verify(message.animationEnd); - if (error) - return "animationEnd." + error; - } - } - return null; - }; - - /** - * Creates an Animation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Animation - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.Overlay.Animation} Animation - */ - Animation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Overlay.Animation) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.Overlay.Animation(); - if (object.animationStatic != null) { - if (typeof object.animationStatic !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.Overlay.Animation.animationStatic: object expected"); - message.animationStatic = $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic.fromObject(object.animationStatic); - } - if (object.animationFade != null) { - if (typeof object.animationFade !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.Overlay.Animation.animationFade: object expected"); - message.animationFade = $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade.fromObject(object.animationFade); - } - if (object.animationEnd != null) { - if (typeof object.animationEnd !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.Overlay.Animation.animationEnd: object expected"); - message.animationEnd = $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd.fromObject(object.animationEnd); - } - return message; - }; - - /** - * Creates a plain object from an Animation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Animation - * @static - * @param {google.cloud.video.transcoder.v1beta1.Overlay.Animation} message Animation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Animation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.animationStatic != null && message.hasOwnProperty("animationStatic")) { - object.animationStatic = $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationStatic.toObject(message.animationStatic, options); - if (options.oneofs) - object.animationType = "animationStatic"; - } - if (message.animationFade != null && message.hasOwnProperty("animationFade")) { - object.animationFade = $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationFade.toObject(message.animationFade, options); - if (options.oneofs) - object.animationType = "animationFade"; - } - if (message.animationEnd != null && message.hasOwnProperty("animationEnd")) { - object.animationEnd = $root.google.cloud.video.transcoder.v1beta1.Overlay.AnimationEnd.toObject(message.animationEnd, options); - if (options.oneofs) - object.animationType = "animationEnd"; - } - return object; - }; - - /** - * Converts this Animation to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.Overlay.Animation - * @instance - * @returns {Object.} JSON object - */ - Animation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Animation; - })(); - - /** - * FadeType enum. - * @name google.cloud.video.transcoder.v1beta1.Overlay.FadeType - * @enum {number} - * @property {number} FADE_TYPE_UNSPECIFIED=0 FADE_TYPE_UNSPECIFIED value - * @property {number} FADE_IN=1 FADE_IN value - * @property {number} FADE_OUT=2 FADE_OUT value - */ - Overlay.FadeType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FADE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "FADE_IN"] = 1; - values[valuesById[2] = "FADE_OUT"] = 2; - return values; - })(); - - return Overlay; - })(); - - v1beta1.PreprocessingConfig = (function() { - - /** - * Properties of a PreprocessingConfig. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface IPreprocessingConfig - * @property {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IColor|null} [color] PreprocessingConfig color - * @property {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDenoise|null} [denoise] PreprocessingConfig denoise - * @property {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDeblock|null} [deblock] PreprocessingConfig deblock - * @property {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IAudio|null} [audio] PreprocessingConfig audio - * @property {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.ICrop|null} [crop] PreprocessingConfig crop - * @property {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IPad|null} [pad] PreprocessingConfig pad - */ - - /** - * Constructs a new PreprocessingConfig. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents a PreprocessingConfig. - * @implements IPreprocessingConfig - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.IPreprocessingConfig=} [properties] Properties to set - */ - function PreprocessingConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PreprocessingConfig color. - * @member {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IColor|null|undefined} color - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig - * @instance - */ - PreprocessingConfig.prototype.color = null; - - /** - * PreprocessingConfig denoise. - * @member {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDenoise|null|undefined} denoise - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig - * @instance - */ - PreprocessingConfig.prototype.denoise = null; - - /** - * PreprocessingConfig deblock. - * @member {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDeblock|null|undefined} deblock - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig - * @instance - */ - PreprocessingConfig.prototype.deblock = null; - - /** - * PreprocessingConfig audio. - * @member {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IAudio|null|undefined} audio - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig - * @instance - */ - PreprocessingConfig.prototype.audio = null; - - /** - * PreprocessingConfig crop. - * @member {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.ICrop|null|undefined} crop - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig - * @instance - */ - PreprocessingConfig.prototype.crop = null; - - /** - * PreprocessingConfig pad. - * @member {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IPad|null|undefined} pad - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig - * @instance - */ - PreprocessingConfig.prototype.pad = null; - - /** - * Creates a new PreprocessingConfig instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig - * @static - * @param {google.cloud.video.transcoder.v1beta1.IPreprocessingConfig=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig} PreprocessingConfig instance - */ - PreprocessingConfig.create = function create(properties) { - return new PreprocessingConfig(properties); - }; - - /** - * Encodes the specified PreprocessingConfig message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig - * @static - * @param {google.cloud.video.transcoder.v1beta1.IPreprocessingConfig} message PreprocessingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PreprocessingConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.color != null && Object.hasOwnProperty.call(message, "color")) - $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color.encode(message.color, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.denoise != null && Object.hasOwnProperty.call(message, "denoise")) - $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise.encode(message.denoise, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.deblock != null && Object.hasOwnProperty.call(message, "deblock")) - $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock.encode(message.deblock, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) - $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio.encode(message.audio, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.crop != null && Object.hasOwnProperty.call(message, "crop")) - $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop.encode(message.crop, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.pad != null && Object.hasOwnProperty.call(message, "pad")) - $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad.encode(message.pad, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PreprocessingConfig message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig - * @static - * @param {google.cloud.video.transcoder.v1beta1.IPreprocessingConfig} message PreprocessingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PreprocessingConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PreprocessingConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig} PreprocessingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PreprocessingConfig.decode = function 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.transcoder.v1beta1.PreprocessingConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.color = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color.decode(reader, reader.uint32()); - break; - case 2: - message.denoise = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise.decode(reader, reader.uint32()); - break; - case 3: - message.deblock = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock.decode(reader, reader.uint32()); - break; - case 4: - message.audio = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio.decode(reader, reader.uint32()); - break; - case 5: - message.crop = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop.decode(reader, reader.uint32()); - break; - case 6: - message.pad = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PreprocessingConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig} PreprocessingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PreprocessingConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PreprocessingConfig message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PreprocessingConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.color != null && message.hasOwnProperty("color")) { - var error = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color.verify(message.color); - if (error) - return "color." + error; - } - if (message.denoise != null && message.hasOwnProperty("denoise")) { - var error = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise.verify(message.denoise); - if (error) - return "denoise." + error; - } - if (message.deblock != null && message.hasOwnProperty("deblock")) { - var error = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock.verify(message.deblock); - if (error) - return "deblock." + error; - } - if (message.audio != null && message.hasOwnProperty("audio")) { - var error = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio.verify(message.audio); - if (error) - return "audio." + error; - } - if (message.crop != null && message.hasOwnProperty("crop")) { - var error = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop.verify(message.crop); - if (error) - return "crop." + error; - } - if (message.pad != null && message.hasOwnProperty("pad")) { - var error = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad.verify(message.pad); - if (error) - return "pad." + error; - } - return null; - }; - - /** - * Creates a PreprocessingConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig} PreprocessingConfig - */ - PreprocessingConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig(); - if (object.color != null) { - if (typeof object.color !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.PreprocessingConfig.color: object expected"); - message.color = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color.fromObject(object.color); - } - if (object.denoise != null) { - if (typeof object.denoise !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.PreprocessingConfig.denoise: object expected"); - message.denoise = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise.fromObject(object.denoise); - } - if (object.deblock != null) { - if (typeof object.deblock !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.PreprocessingConfig.deblock: object expected"); - message.deblock = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock.fromObject(object.deblock); - } - if (object.audio != null) { - if (typeof object.audio !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.PreprocessingConfig.audio: object expected"); - message.audio = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio.fromObject(object.audio); - } - if (object.crop != null) { - if (typeof object.crop !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.PreprocessingConfig.crop: object expected"); - message.crop = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop.fromObject(object.crop); - } - if (object.pad != null) { - if (typeof object.pad !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.PreprocessingConfig.pad: object expected"); - message.pad = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad.fromObject(object.pad); - } - return message; - }; - - /** - * Creates a plain object from a PreprocessingConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig - * @static - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig} message PreprocessingConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PreprocessingConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.color = null; - object.denoise = null; - object.deblock = null; - object.audio = null; - object.crop = null; - object.pad = null; - } - if (message.color != null && message.hasOwnProperty("color")) - object.color = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color.toObject(message.color, options); - if (message.denoise != null && message.hasOwnProperty("denoise")) - object.denoise = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise.toObject(message.denoise, options); - if (message.deblock != null && message.hasOwnProperty("deblock")) - object.deblock = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock.toObject(message.deblock, options); - if (message.audio != null && message.hasOwnProperty("audio")) - object.audio = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio.toObject(message.audio, options); - if (message.crop != null && message.hasOwnProperty("crop")) - object.crop = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop.toObject(message.crop, options); - if (message.pad != null && message.hasOwnProperty("pad")) - object.pad = $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad.toObject(message.pad, options); - return object; - }; - - /** - * Converts this PreprocessingConfig to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig - * @instance - * @returns {Object.} JSON object - */ - PreprocessingConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - PreprocessingConfig.Color = (function() { - - /** - * Properties of a Color. - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig - * @interface IColor - * @property {number|null} [saturation] Color saturation - * @property {number|null} [contrast] Color contrast - * @property {number|null} [brightness] Color brightness - */ - - /** - * Constructs a new Color. - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig - * @classdesc Represents a Color. - * @implements IColor - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IColor=} [properties] Properties to set - */ - function Color(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Color saturation. - * @member {number} saturation - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color - * @instance - */ - Color.prototype.saturation = 0; - - /** - * Color contrast. - * @member {number} contrast - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color - * @instance - */ - Color.prototype.contrast = 0; - - /** - * Color brightness. - * @member {number} brightness - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color - * @instance - */ - Color.prototype.brightness = 0; - - /** - * Creates a new Color instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color - * @static - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IColor=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color} Color instance - */ - Color.create = function create(properties) { - return new Color(properties); - }; - - /** - * Encodes the specified Color message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color - * @static - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IColor} message Color message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Color.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.saturation != null && Object.hasOwnProperty.call(message, "saturation")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.saturation); - if (message.contrast != null && Object.hasOwnProperty.call(message, "contrast")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.contrast); - if (message.brightness != null && Object.hasOwnProperty.call(message, "brightness")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.brightness); - return writer; - }; - - /** - * Encodes the specified Color message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color - * @static - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IColor} message Color message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Color.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Color message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color} Color - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Color.decode = function 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.transcoder.v1beta1.PreprocessingConfig.Color(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.saturation = reader.double(); - break; - case 2: - message.contrast = reader.double(); - break; - case 3: - message.brightness = reader.double(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Color message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color} Color - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Color.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Color message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Color.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.saturation != null && message.hasOwnProperty("saturation")) - if (typeof message.saturation !== "number") - return "saturation: number expected"; - if (message.contrast != null && message.hasOwnProperty("contrast")) - if (typeof message.contrast !== "number") - return "contrast: number expected"; - if (message.brightness != null && message.hasOwnProperty("brightness")) - if (typeof message.brightness !== "number") - return "brightness: number expected"; - return null; - }; - - /** - * Creates a Color message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color} Color - */ - Color.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color(); - if (object.saturation != null) - message.saturation = Number(object.saturation); - if (object.contrast != null) - message.contrast = Number(object.contrast); - if (object.brightness != null) - message.brightness = Number(object.brightness); - return message; - }; - - /** - * Creates a plain object from a Color message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color - * @static - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color} message Color - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Color.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.saturation = 0; - object.contrast = 0; - object.brightness = 0; - } - if (message.saturation != null && message.hasOwnProperty("saturation")) - object.saturation = options.json && !isFinite(message.saturation) ? String(message.saturation) : message.saturation; - if (message.contrast != null && message.hasOwnProperty("contrast")) - object.contrast = options.json && !isFinite(message.contrast) ? String(message.contrast) : message.contrast; - if (message.brightness != null && message.hasOwnProperty("brightness")) - object.brightness = options.json && !isFinite(message.brightness) ? String(message.brightness) : message.brightness; - return object; - }; - - /** - * Converts this Color to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Color - * @instance - * @returns {Object.} JSON object - */ - Color.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Color; - })(); - - PreprocessingConfig.Denoise = (function() { - - /** - * Properties of a Denoise. - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig - * @interface IDenoise - * @property {number|null} [strength] Denoise strength - * @property {string|null} [tune] Denoise tune - */ - - /** - * Constructs a new Denoise. - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig - * @classdesc Represents a Denoise. - * @implements IDenoise - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDenoise=} [properties] Properties to set - */ - function Denoise(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Denoise strength. - * @member {number} strength - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise - * @instance - */ - Denoise.prototype.strength = 0; - - /** - * Denoise tune. - * @member {string} tune - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise - * @instance - */ - Denoise.prototype.tune = ""; - - /** - * Creates a new Denoise instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise - * @static - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDenoise=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise} Denoise instance - */ - Denoise.create = function create(properties) { - return new Denoise(properties); - }; - - /** - * Encodes the specified Denoise message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise - * @static - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDenoise} message Denoise message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Denoise.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.strength != null && Object.hasOwnProperty.call(message, "strength")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.strength); - if (message.tune != null && Object.hasOwnProperty.call(message, "tune")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.tune); - return writer; - }; - - /** - * Encodes the specified Denoise message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise - * @static - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDenoise} message Denoise message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Denoise.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Denoise message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise} Denoise - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Denoise.decode = function 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.transcoder.v1beta1.PreprocessingConfig.Denoise(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.strength = reader.double(); - break; - case 2: - message.tune = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Denoise message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise} Denoise - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Denoise.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Denoise message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Denoise.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.strength != null && message.hasOwnProperty("strength")) - if (typeof message.strength !== "number") - return "strength: number expected"; - if (message.tune != null && message.hasOwnProperty("tune")) - if (!$util.isString(message.tune)) - return "tune: string expected"; - return null; - }; - - /** - * Creates a Denoise message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise} Denoise - */ - Denoise.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise(); - if (object.strength != null) - message.strength = Number(object.strength); - if (object.tune != null) - message.tune = String(object.tune); - return message; - }; - - /** - * Creates a plain object from a Denoise message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise - * @static - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise} message Denoise - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Denoise.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.strength = 0; - object.tune = ""; - } - if (message.strength != null && message.hasOwnProperty("strength")) - object.strength = options.json && !isFinite(message.strength) ? String(message.strength) : message.strength; - if (message.tune != null && message.hasOwnProperty("tune")) - object.tune = message.tune; - return object; - }; - - /** - * Converts this Denoise to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Denoise - * @instance - * @returns {Object.} JSON object - */ - Denoise.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Denoise; - })(); - - PreprocessingConfig.Deblock = (function() { - - /** - * Properties of a Deblock. - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig - * @interface IDeblock - * @property {number|null} [strength] Deblock strength - * @property {boolean|null} [enabled] Deblock enabled - */ - - /** - * Constructs a new Deblock. - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig - * @classdesc Represents a Deblock. - * @implements IDeblock - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDeblock=} [properties] Properties to set - */ - function Deblock(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Deblock strength. - * @member {number} strength - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock - * @instance - */ - Deblock.prototype.strength = 0; - - /** - * Deblock enabled. - * @member {boolean} enabled - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock - * @instance - */ - Deblock.prototype.enabled = false; - - /** - * Creates a new Deblock instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock - * @static - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDeblock=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock} Deblock instance - */ - Deblock.create = function create(properties) { - return new Deblock(properties); - }; - - /** - * Encodes the specified Deblock message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock - * @static - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDeblock} message Deblock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Deblock.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.strength != null && Object.hasOwnProperty.call(message, "strength")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.strength); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified Deblock message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock - * @static - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IDeblock} message Deblock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Deblock.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Deblock message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock} Deblock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Deblock.decode = function 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.transcoder.v1beta1.PreprocessingConfig.Deblock(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.strength = reader.double(); - break; - case 2: - message.enabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Deblock message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock} Deblock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Deblock.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Deblock message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Deblock.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.strength != null && message.hasOwnProperty("strength")) - if (typeof message.strength !== "number") - return "strength: number expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a Deblock message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock} Deblock - */ - Deblock.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock(); - if (object.strength != null) - message.strength = Number(object.strength); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a Deblock message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock - * @static - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock} message Deblock - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Deblock.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.strength = 0; - object.enabled = false; - } - if (message.strength != null && message.hasOwnProperty("strength")) - object.strength = options.json && !isFinite(message.strength) ? String(message.strength) : message.strength; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this Deblock to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Deblock - * @instance - * @returns {Object.} JSON object - */ - Deblock.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Deblock; - })(); - - PreprocessingConfig.Audio = (function() { - - /** - * Properties of an Audio. - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig - * @interface IAudio - * @property {number|null} [lufs] Audio lufs - * @property {boolean|null} [highBoost] Audio highBoost - * @property {boolean|null} [lowBoost] Audio lowBoost - */ - - /** - * Constructs a new Audio. - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig - * @classdesc Represents an Audio. - * @implements IAudio - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IAudio=} [properties] Properties to set - */ - function Audio(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Audio lufs. - * @member {number} lufs - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio - * @instance - */ - Audio.prototype.lufs = 0; - - /** - * Audio highBoost. - * @member {boolean} highBoost - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio - * @instance - */ - Audio.prototype.highBoost = false; - - /** - * Audio lowBoost. - * @member {boolean} lowBoost - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio - * @instance - */ - Audio.prototype.lowBoost = false; - - /** - * Creates a new Audio instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio - * @static - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IAudio=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio} Audio instance - */ - Audio.create = function create(properties) { - return new Audio(properties); - }; - - /** - * Encodes the specified Audio message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio - * @static - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IAudio} message Audio message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Audio.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lufs != null && Object.hasOwnProperty.call(message, "lufs")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.lufs); - if (message.highBoost != null && Object.hasOwnProperty.call(message, "highBoost")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.highBoost); - if (message.lowBoost != null && Object.hasOwnProperty.call(message, "lowBoost")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.lowBoost); - return writer; - }; - - /** - * Encodes the specified Audio message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio - * @static - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IAudio} message Audio message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Audio.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Audio message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio} Audio - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Audio.decode = function 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.transcoder.v1beta1.PreprocessingConfig.Audio(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.lufs = reader.double(); - break; - case 2: - message.highBoost = reader.bool(); - break; - case 3: - message.lowBoost = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Audio message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio} Audio - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Audio.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Audio message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Audio.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.lufs != null && message.hasOwnProperty("lufs")) - if (typeof message.lufs !== "number") - return "lufs: number expected"; - if (message.highBoost != null && message.hasOwnProperty("highBoost")) - if (typeof message.highBoost !== "boolean") - return "highBoost: boolean expected"; - if (message.lowBoost != null && message.hasOwnProperty("lowBoost")) - if (typeof message.lowBoost !== "boolean") - return "lowBoost: boolean expected"; - return null; - }; - - /** - * Creates an Audio message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio} Audio - */ - Audio.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio(); - if (object.lufs != null) - message.lufs = Number(object.lufs); - if (object.highBoost != null) - message.highBoost = Boolean(object.highBoost); - if (object.lowBoost != null) - message.lowBoost = Boolean(object.lowBoost); - return message; - }; - - /** - * Creates a plain object from an Audio message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio - * @static - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio} message Audio - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Audio.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.lufs = 0; - object.highBoost = false; - object.lowBoost = false; - } - if (message.lufs != null && message.hasOwnProperty("lufs")) - object.lufs = options.json && !isFinite(message.lufs) ? String(message.lufs) : message.lufs; - if (message.highBoost != null && message.hasOwnProperty("highBoost")) - object.highBoost = message.highBoost; - if (message.lowBoost != null && message.hasOwnProperty("lowBoost")) - object.lowBoost = message.lowBoost; - return object; - }; - - /** - * Converts this Audio to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Audio - * @instance - * @returns {Object.} JSON object - */ - Audio.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Audio; - })(); - - PreprocessingConfig.Crop = (function() { - - /** - * Properties of a Crop. - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig - * @interface ICrop - * @property {number|null} [topPixels] Crop topPixels - * @property {number|null} [bottomPixels] Crop bottomPixels - * @property {number|null} [leftPixels] Crop leftPixels - * @property {number|null} [rightPixels] Crop rightPixels - */ - - /** - * Constructs a new Crop. - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig - * @classdesc Represents a Crop. - * @implements ICrop - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.ICrop=} [properties] Properties to set - */ - function Crop(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Crop topPixels. - * @member {number} topPixels - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop - * @instance - */ - Crop.prototype.topPixels = 0; - - /** - * Crop bottomPixels. - * @member {number} bottomPixels - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop - * @instance - */ - Crop.prototype.bottomPixels = 0; - - /** - * Crop leftPixels. - * @member {number} leftPixels - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop - * @instance - */ - Crop.prototype.leftPixels = 0; - - /** - * Crop rightPixels. - * @member {number} rightPixels - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop - * @instance - */ - Crop.prototype.rightPixels = 0; - - /** - * Creates a new Crop instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop - * @static - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.ICrop=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop} Crop instance - */ - Crop.create = function create(properties) { - return new Crop(properties); - }; - - /** - * Encodes the specified Crop message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop - * @static - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.ICrop} message Crop message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Crop.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.topPixels != null && Object.hasOwnProperty.call(message, "topPixels")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.topPixels); - if (message.bottomPixels != null && Object.hasOwnProperty.call(message, "bottomPixels")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.bottomPixels); - if (message.leftPixels != null && Object.hasOwnProperty.call(message, "leftPixels")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.leftPixels); - if (message.rightPixels != null && Object.hasOwnProperty.call(message, "rightPixels")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.rightPixels); - return writer; - }; - - /** - * Encodes the specified Crop message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop - * @static - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.ICrop} message Crop message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Crop.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Crop message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop} Crop - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Crop.decode = function 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.transcoder.v1beta1.PreprocessingConfig.Crop(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.topPixels = reader.int32(); - break; - case 2: - message.bottomPixels = reader.int32(); - break; - case 3: - message.leftPixels = reader.int32(); - break; - case 4: - message.rightPixels = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Crop message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop} Crop - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Crop.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Crop message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Crop.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.topPixels != null && message.hasOwnProperty("topPixels")) - if (!$util.isInteger(message.topPixels)) - return "topPixels: integer expected"; - if (message.bottomPixels != null && message.hasOwnProperty("bottomPixels")) - if (!$util.isInteger(message.bottomPixels)) - return "bottomPixels: integer expected"; - if (message.leftPixels != null && message.hasOwnProperty("leftPixels")) - if (!$util.isInteger(message.leftPixels)) - return "leftPixels: integer expected"; - if (message.rightPixels != null && message.hasOwnProperty("rightPixels")) - if (!$util.isInteger(message.rightPixels)) - return "rightPixels: integer expected"; - return null; - }; - - /** - * Creates a Crop message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop} Crop - */ - Crop.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop(); - if (object.topPixels != null) - message.topPixels = object.topPixels | 0; - if (object.bottomPixels != null) - message.bottomPixels = object.bottomPixels | 0; - if (object.leftPixels != null) - message.leftPixels = object.leftPixels | 0; - if (object.rightPixels != null) - message.rightPixels = object.rightPixels | 0; - return message; - }; - - /** - * Creates a plain object from a Crop message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop - * @static - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop} message Crop - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Crop.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.topPixels = 0; - object.bottomPixels = 0; - object.leftPixels = 0; - object.rightPixels = 0; - } - if (message.topPixels != null && message.hasOwnProperty("topPixels")) - object.topPixels = message.topPixels; - if (message.bottomPixels != null && message.hasOwnProperty("bottomPixels")) - object.bottomPixels = message.bottomPixels; - if (message.leftPixels != null && message.hasOwnProperty("leftPixels")) - object.leftPixels = message.leftPixels; - if (message.rightPixels != null && message.hasOwnProperty("rightPixels")) - object.rightPixels = message.rightPixels; - return object; - }; - - /** - * Converts this Crop to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Crop - * @instance - * @returns {Object.} JSON object - */ - Crop.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Crop; - })(); - - PreprocessingConfig.Pad = (function() { - - /** - * Properties of a Pad. - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig - * @interface IPad - * @property {number|null} [topPixels] Pad topPixels - * @property {number|null} [bottomPixels] Pad bottomPixels - * @property {number|null} [leftPixels] Pad leftPixels - * @property {number|null} [rightPixels] Pad rightPixels - */ - - /** - * Constructs a new Pad. - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig - * @classdesc Represents a Pad. - * @implements IPad - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IPad=} [properties] Properties to set - */ - function Pad(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Pad topPixels. - * @member {number} topPixels - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad - * @instance - */ - Pad.prototype.topPixels = 0; - - /** - * Pad bottomPixels. - * @member {number} bottomPixels - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad - * @instance - */ - Pad.prototype.bottomPixels = 0; - - /** - * Pad leftPixels. - * @member {number} leftPixels - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad - * @instance - */ - Pad.prototype.leftPixels = 0; - - /** - * Pad rightPixels. - * @member {number} rightPixels - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad - * @instance - */ - Pad.prototype.rightPixels = 0; - - /** - * Creates a new Pad instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad - * @static - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IPad=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad} Pad instance - */ - Pad.create = function create(properties) { - return new Pad(properties); - }; - - /** - * Encodes the specified Pad message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad - * @static - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IPad} message Pad message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Pad.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.topPixels != null && Object.hasOwnProperty.call(message, "topPixels")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.topPixels); - if (message.bottomPixels != null && Object.hasOwnProperty.call(message, "bottomPixels")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.bottomPixels); - if (message.leftPixels != null && Object.hasOwnProperty.call(message, "leftPixels")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.leftPixels); - if (message.rightPixels != null && Object.hasOwnProperty.call(message, "rightPixels")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.rightPixels); - return writer; - }; - - /** - * Encodes the specified Pad message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad - * @static - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.IPad} message Pad message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Pad.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Pad message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad} Pad - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Pad.decode = function 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.transcoder.v1beta1.PreprocessingConfig.Pad(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.topPixels = reader.int32(); - break; - case 2: - message.bottomPixels = reader.int32(); - break; - case 3: - message.leftPixels = reader.int32(); - break; - case 4: - message.rightPixels = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Pad message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad} Pad - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Pad.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Pad message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Pad.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.topPixels != null && message.hasOwnProperty("topPixels")) - if (!$util.isInteger(message.topPixels)) - return "topPixels: integer expected"; - if (message.bottomPixels != null && message.hasOwnProperty("bottomPixels")) - if (!$util.isInteger(message.bottomPixels)) - return "bottomPixels: integer expected"; - if (message.leftPixels != null && message.hasOwnProperty("leftPixels")) - if (!$util.isInteger(message.leftPixels)) - return "leftPixels: integer expected"; - if (message.rightPixels != null && message.hasOwnProperty("rightPixels")) - if (!$util.isInteger(message.rightPixels)) - return "rightPixels: integer expected"; - return null; - }; - - /** - * Creates a Pad message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad} Pad - */ - Pad.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad(); - if (object.topPixels != null) - message.topPixels = object.topPixels | 0; - if (object.bottomPixels != null) - message.bottomPixels = object.bottomPixels | 0; - if (object.leftPixels != null) - message.leftPixels = object.leftPixels | 0; - if (object.rightPixels != null) - message.rightPixels = object.rightPixels | 0; - return message; - }; - - /** - * Creates a plain object from a Pad message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad - * @static - * @param {google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad} message Pad - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Pad.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.topPixels = 0; - object.bottomPixels = 0; - object.leftPixels = 0; - object.rightPixels = 0; - } - if (message.topPixels != null && message.hasOwnProperty("topPixels")) - object.topPixels = message.topPixels; - if (message.bottomPixels != null && message.hasOwnProperty("bottomPixels")) - object.bottomPixels = message.bottomPixels; - if (message.leftPixels != null && message.hasOwnProperty("leftPixels")) - object.leftPixels = message.leftPixels; - if (message.rightPixels != null && message.hasOwnProperty("rightPixels")) - object.rightPixels = message.rightPixels; - return object; - }; - - /** - * Converts this Pad to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.PreprocessingConfig.Pad - * @instance - * @returns {Object.} JSON object - */ - Pad.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Pad; - })(); - - return PreprocessingConfig; - })(); - - v1beta1.VideoStream = (function() { - - /** - * Properties of a VideoStream. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface IVideoStream - * @property {string|null} [codec] VideoStream codec - * @property {string|null} [profile] VideoStream profile - * @property {string|null} [tune] VideoStream tune - * @property {string|null} [preset] VideoStream preset - * @property {number|null} [heightPixels] VideoStream heightPixels - * @property {number|null} [widthPixels] VideoStream widthPixels - * @property {string|null} [pixelFormat] VideoStream pixelFormat - * @property {number|null} [bitrateBps] VideoStream bitrateBps - * @property {string|null} [rateControlMode] VideoStream rateControlMode - * @property {boolean|null} [enableTwoPass] VideoStream enableTwoPass - * @property {number|null} [crfLevel] VideoStream crfLevel - * @property {number|null} [vbvSizeBits] VideoStream vbvSizeBits - * @property {number|null} [vbvFullnessBits] VideoStream vbvFullnessBits - * @property {boolean|null} [allowOpenGop] VideoStream allowOpenGop - * @property {number|null} [gopFrameCount] VideoStream gopFrameCount - * @property {google.protobuf.IDuration|null} [gopDuration] VideoStream gopDuration - * @property {string|null} [entropyCoder] VideoStream entropyCoder - * @property {boolean|null} [bPyramid] VideoStream bPyramid - * @property {number|null} [bFrameCount] VideoStream bFrameCount - * @property {number|null} [frameRate] VideoStream frameRate - * @property {number|null} [aqStrength] VideoStream aqStrength - */ - - /** - * Constructs a new VideoStream. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents a VideoStream. - * @implements IVideoStream - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.IVideoStream=} [properties] Properties to set - */ - function VideoStream(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VideoStream codec. - * @member {string} codec - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @instance - */ - VideoStream.prototype.codec = ""; - - /** - * VideoStream profile. - * @member {string} profile - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @instance - */ - VideoStream.prototype.profile = ""; - - /** - * VideoStream tune. - * @member {string} tune - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @instance - */ - VideoStream.prototype.tune = ""; - - /** - * VideoStream preset. - * @member {string} preset - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @instance - */ - VideoStream.prototype.preset = ""; - - /** - * VideoStream heightPixels. - * @member {number} heightPixels - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @instance - */ - VideoStream.prototype.heightPixels = 0; - - /** - * VideoStream widthPixels. - * @member {number} widthPixels - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @instance - */ - VideoStream.prototype.widthPixels = 0; - - /** - * VideoStream pixelFormat. - * @member {string} pixelFormat - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @instance - */ - VideoStream.prototype.pixelFormat = ""; - - /** - * VideoStream bitrateBps. - * @member {number} bitrateBps - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @instance - */ - VideoStream.prototype.bitrateBps = 0; - - /** - * VideoStream rateControlMode. - * @member {string} rateControlMode - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @instance - */ - VideoStream.prototype.rateControlMode = ""; - - /** - * VideoStream enableTwoPass. - * @member {boolean} enableTwoPass - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @instance - */ - VideoStream.prototype.enableTwoPass = false; - - /** - * VideoStream crfLevel. - * @member {number} crfLevel - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @instance - */ - VideoStream.prototype.crfLevel = 0; - - /** - * VideoStream vbvSizeBits. - * @member {number} vbvSizeBits - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @instance - */ - VideoStream.prototype.vbvSizeBits = 0; - - /** - * VideoStream vbvFullnessBits. - * @member {number} vbvFullnessBits - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @instance - */ - VideoStream.prototype.vbvFullnessBits = 0; - - /** - * VideoStream allowOpenGop. - * @member {boolean} allowOpenGop - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @instance - */ - VideoStream.prototype.allowOpenGop = false; - - /** - * VideoStream gopFrameCount. - * @member {number|null|undefined} gopFrameCount - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @instance - */ - VideoStream.prototype.gopFrameCount = null; - - /** - * VideoStream gopDuration. - * @member {google.protobuf.IDuration|null|undefined} gopDuration - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @instance - */ - VideoStream.prototype.gopDuration = null; - - /** - * VideoStream entropyCoder. - * @member {string} entropyCoder - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @instance - */ - VideoStream.prototype.entropyCoder = ""; - - /** - * VideoStream bPyramid. - * @member {boolean} bPyramid - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @instance - */ - VideoStream.prototype.bPyramid = false; - - /** - * VideoStream bFrameCount. - * @member {number} bFrameCount - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @instance - */ - VideoStream.prototype.bFrameCount = 0; - - /** - * VideoStream frameRate. - * @member {number} frameRate - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @instance - */ - VideoStream.prototype.frameRate = 0; - - /** - * VideoStream aqStrength. - * @member {number} aqStrength - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @instance - */ - VideoStream.prototype.aqStrength = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * VideoStream gopMode. - * @member {"gopFrameCount"|"gopDuration"|undefined} gopMode - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @instance - */ - Object.defineProperty(VideoStream.prototype, "gopMode", { - get: $util.oneOfGetter($oneOfFields = ["gopFrameCount", "gopDuration"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new VideoStream instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @static - * @param {google.cloud.video.transcoder.v1beta1.IVideoStream=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.VideoStream} VideoStream instance - */ - VideoStream.create = function create(properties) { - return new VideoStream(properties); - }; - - /** - * Encodes the specified VideoStream message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.VideoStream.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @static - * @param {google.cloud.video.transcoder.v1beta1.IVideoStream} message VideoStream message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VideoStream.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.codec != null && Object.hasOwnProperty.call(message, "codec")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.codec); - if (message.profile != null && Object.hasOwnProperty.call(message, "profile")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.profile); - if (message.tune != null && Object.hasOwnProperty.call(message, "tune")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.tune); - if (message.preset != null && Object.hasOwnProperty.call(message, "preset")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.preset); - if (message.heightPixels != null && Object.hasOwnProperty.call(message, "heightPixels")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.heightPixels); - if (message.widthPixels != null && Object.hasOwnProperty.call(message, "widthPixels")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.widthPixels); - if (message.pixelFormat != null && Object.hasOwnProperty.call(message, "pixelFormat")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.pixelFormat); - if (message.bitrateBps != null && Object.hasOwnProperty.call(message, "bitrateBps")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.bitrateBps); - if (message.rateControlMode != null && Object.hasOwnProperty.call(message, "rateControlMode")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.rateControlMode); - if (message.enableTwoPass != null && Object.hasOwnProperty.call(message, "enableTwoPass")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.enableTwoPass); - if (message.crfLevel != null && Object.hasOwnProperty.call(message, "crfLevel")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.crfLevel); - if (message.vbvSizeBits != null && Object.hasOwnProperty.call(message, "vbvSizeBits")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.vbvSizeBits); - if (message.vbvFullnessBits != null && Object.hasOwnProperty.call(message, "vbvFullnessBits")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.vbvFullnessBits); - if (message.allowOpenGop != null && Object.hasOwnProperty.call(message, "allowOpenGop")) - writer.uint32(/* id 14, wireType 0 =*/112).bool(message.allowOpenGop); - if (message.gopFrameCount != null && Object.hasOwnProperty.call(message, "gopFrameCount")) - writer.uint32(/* id 15, wireType 0 =*/120).int32(message.gopFrameCount); - if (message.gopDuration != null && Object.hasOwnProperty.call(message, "gopDuration")) - $root.google.protobuf.Duration.encode(message.gopDuration, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.entropyCoder != null && Object.hasOwnProperty.call(message, "entropyCoder")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.entropyCoder); - if (message.bPyramid != null && Object.hasOwnProperty.call(message, "bPyramid")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.bPyramid); - if (message.bFrameCount != null && Object.hasOwnProperty.call(message, "bFrameCount")) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.bFrameCount); - if (message.frameRate != null && Object.hasOwnProperty.call(message, "frameRate")) - writer.uint32(/* id 20, wireType 1 =*/161).double(message.frameRate); - if (message.aqStrength != null && Object.hasOwnProperty.call(message, "aqStrength")) - writer.uint32(/* id 21, wireType 1 =*/169).double(message.aqStrength); - return writer; - }; - - /** - * Encodes the specified VideoStream message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.VideoStream.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @static - * @param {google.cloud.video.transcoder.v1beta1.IVideoStream} message VideoStream message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VideoStream.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VideoStream message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.VideoStream} VideoStream - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VideoStream.decode = function 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.transcoder.v1beta1.VideoStream(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codec = reader.string(); - break; - case 2: - message.profile = reader.string(); - break; - case 3: - message.tune = reader.string(); - break; - case 4: - message.preset = reader.string(); - break; - case 5: - message.heightPixels = reader.int32(); - break; - case 6: - message.widthPixels = reader.int32(); - break; - case 7: - message.pixelFormat = reader.string(); - break; - case 8: - message.bitrateBps = reader.int32(); - break; - case 9: - message.rateControlMode = reader.string(); - break; - case 10: - message.enableTwoPass = reader.bool(); - break; - case 11: - message.crfLevel = reader.int32(); - break; - case 12: - message.vbvSizeBits = reader.int32(); - break; - case 13: - message.vbvFullnessBits = reader.int32(); - break; - case 14: - message.allowOpenGop = reader.bool(); - break; - case 15: - message.gopFrameCount = reader.int32(); - break; - case 16: - message.gopDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 17: - message.entropyCoder = reader.string(); - break; - case 18: - message.bPyramid = reader.bool(); - break; - case 19: - message.bFrameCount = reader.int32(); - break; - case 20: - message.frameRate = reader.double(); - break; - case 21: - message.aqStrength = reader.double(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VideoStream message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.VideoStream} VideoStream - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VideoStream.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VideoStream message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VideoStream.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.codec != null && message.hasOwnProperty("codec")) - if (!$util.isString(message.codec)) - return "codec: string expected"; - if (message.profile != null && message.hasOwnProperty("profile")) - if (!$util.isString(message.profile)) - return "profile: string expected"; - if (message.tune != null && message.hasOwnProperty("tune")) - if (!$util.isString(message.tune)) - return "tune: string expected"; - if (message.preset != null && message.hasOwnProperty("preset")) - if (!$util.isString(message.preset)) - return "preset: string expected"; - if (message.heightPixels != null && message.hasOwnProperty("heightPixels")) - if (!$util.isInteger(message.heightPixels)) - return "heightPixels: integer expected"; - if (message.widthPixels != null && message.hasOwnProperty("widthPixels")) - if (!$util.isInteger(message.widthPixels)) - return "widthPixels: integer expected"; - if (message.pixelFormat != null && message.hasOwnProperty("pixelFormat")) - if (!$util.isString(message.pixelFormat)) - return "pixelFormat: string expected"; - if (message.bitrateBps != null && message.hasOwnProperty("bitrateBps")) - if (!$util.isInteger(message.bitrateBps)) - return "bitrateBps: integer expected"; - if (message.rateControlMode != null && message.hasOwnProperty("rateControlMode")) - if (!$util.isString(message.rateControlMode)) - return "rateControlMode: string expected"; - if (message.enableTwoPass != null && message.hasOwnProperty("enableTwoPass")) - if (typeof message.enableTwoPass !== "boolean") - return "enableTwoPass: boolean expected"; - if (message.crfLevel != null && message.hasOwnProperty("crfLevel")) - if (!$util.isInteger(message.crfLevel)) - return "crfLevel: integer expected"; - if (message.vbvSizeBits != null && message.hasOwnProperty("vbvSizeBits")) - if (!$util.isInteger(message.vbvSizeBits)) - return "vbvSizeBits: integer expected"; - if (message.vbvFullnessBits != null && message.hasOwnProperty("vbvFullnessBits")) - if (!$util.isInteger(message.vbvFullnessBits)) - return "vbvFullnessBits: integer expected"; - if (message.allowOpenGop != null && message.hasOwnProperty("allowOpenGop")) - if (typeof message.allowOpenGop !== "boolean") - return "allowOpenGop: boolean expected"; - if (message.gopFrameCount != null && message.hasOwnProperty("gopFrameCount")) { - properties.gopMode = 1; - if (!$util.isInteger(message.gopFrameCount)) - return "gopFrameCount: integer expected"; - } - if (message.gopDuration != null && message.hasOwnProperty("gopDuration")) { - if (properties.gopMode === 1) - return "gopMode: multiple values"; - properties.gopMode = 1; - { - var error = $root.google.protobuf.Duration.verify(message.gopDuration); - if (error) - return "gopDuration." + error; - } - } - if (message.entropyCoder != null && message.hasOwnProperty("entropyCoder")) - if (!$util.isString(message.entropyCoder)) - return "entropyCoder: string expected"; - if (message.bPyramid != null && message.hasOwnProperty("bPyramid")) - if (typeof message.bPyramid !== "boolean") - return "bPyramid: boolean expected"; - if (message.bFrameCount != null && message.hasOwnProperty("bFrameCount")) - if (!$util.isInteger(message.bFrameCount)) - return "bFrameCount: integer expected"; - if (message.frameRate != null && message.hasOwnProperty("frameRate")) - if (typeof message.frameRate !== "number") - return "frameRate: number expected"; - if (message.aqStrength != null && message.hasOwnProperty("aqStrength")) - if (typeof message.aqStrength !== "number") - return "aqStrength: number expected"; - return null; - }; - - /** - * Creates a VideoStream message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.VideoStream} VideoStream - */ - VideoStream.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.VideoStream) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.VideoStream(); - if (object.codec != null) - message.codec = String(object.codec); - if (object.profile != null) - message.profile = String(object.profile); - if (object.tune != null) - message.tune = String(object.tune); - if (object.preset != null) - message.preset = String(object.preset); - if (object.heightPixels != null) - message.heightPixels = object.heightPixels | 0; - if (object.widthPixels != null) - message.widthPixels = object.widthPixels | 0; - if (object.pixelFormat != null) - message.pixelFormat = String(object.pixelFormat); - if (object.bitrateBps != null) - message.bitrateBps = object.bitrateBps | 0; - if (object.rateControlMode != null) - message.rateControlMode = String(object.rateControlMode); - if (object.enableTwoPass != null) - message.enableTwoPass = Boolean(object.enableTwoPass); - if (object.crfLevel != null) - message.crfLevel = object.crfLevel | 0; - if (object.vbvSizeBits != null) - message.vbvSizeBits = object.vbvSizeBits | 0; - if (object.vbvFullnessBits != null) - message.vbvFullnessBits = object.vbvFullnessBits | 0; - if (object.allowOpenGop != null) - message.allowOpenGop = Boolean(object.allowOpenGop); - if (object.gopFrameCount != null) - message.gopFrameCount = object.gopFrameCount | 0; - if (object.gopDuration != null) { - if (typeof object.gopDuration !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.VideoStream.gopDuration: object expected"); - message.gopDuration = $root.google.protobuf.Duration.fromObject(object.gopDuration); - } - if (object.entropyCoder != null) - message.entropyCoder = String(object.entropyCoder); - if (object.bPyramid != null) - message.bPyramid = Boolean(object.bPyramid); - if (object.bFrameCount != null) - message.bFrameCount = object.bFrameCount | 0; - if (object.frameRate != null) - message.frameRate = Number(object.frameRate); - if (object.aqStrength != null) - message.aqStrength = Number(object.aqStrength); - return message; - }; - - /** - * Creates a plain object from a VideoStream message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @static - * @param {google.cloud.video.transcoder.v1beta1.VideoStream} message VideoStream - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VideoStream.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.codec = ""; - object.profile = ""; - object.tune = ""; - object.preset = ""; - object.heightPixels = 0; - object.widthPixels = 0; - object.pixelFormat = ""; - object.bitrateBps = 0; - object.rateControlMode = ""; - object.enableTwoPass = false; - object.crfLevel = 0; - object.vbvSizeBits = 0; - object.vbvFullnessBits = 0; - object.allowOpenGop = false; - object.entropyCoder = ""; - object.bPyramid = false; - object.bFrameCount = 0; - object.frameRate = 0; - object.aqStrength = 0; - } - if (message.codec != null && message.hasOwnProperty("codec")) - object.codec = message.codec; - if (message.profile != null && message.hasOwnProperty("profile")) - object.profile = message.profile; - if (message.tune != null && message.hasOwnProperty("tune")) - object.tune = message.tune; - if (message.preset != null && message.hasOwnProperty("preset")) - object.preset = message.preset; - if (message.heightPixels != null && message.hasOwnProperty("heightPixels")) - object.heightPixels = message.heightPixels; - if (message.widthPixels != null && message.hasOwnProperty("widthPixels")) - object.widthPixels = message.widthPixels; - if (message.pixelFormat != null && message.hasOwnProperty("pixelFormat")) - object.pixelFormat = message.pixelFormat; - if (message.bitrateBps != null && message.hasOwnProperty("bitrateBps")) - object.bitrateBps = message.bitrateBps; - if (message.rateControlMode != null && message.hasOwnProperty("rateControlMode")) - object.rateControlMode = message.rateControlMode; - if (message.enableTwoPass != null && message.hasOwnProperty("enableTwoPass")) - object.enableTwoPass = message.enableTwoPass; - if (message.crfLevel != null && message.hasOwnProperty("crfLevel")) - object.crfLevel = message.crfLevel; - if (message.vbvSizeBits != null && message.hasOwnProperty("vbvSizeBits")) - object.vbvSizeBits = message.vbvSizeBits; - if (message.vbvFullnessBits != null && message.hasOwnProperty("vbvFullnessBits")) - object.vbvFullnessBits = message.vbvFullnessBits; - if (message.allowOpenGop != null && message.hasOwnProperty("allowOpenGop")) - object.allowOpenGop = message.allowOpenGop; - if (message.gopFrameCount != null && message.hasOwnProperty("gopFrameCount")) { - object.gopFrameCount = message.gopFrameCount; - if (options.oneofs) - object.gopMode = "gopFrameCount"; - } - if (message.gopDuration != null && message.hasOwnProperty("gopDuration")) { - object.gopDuration = $root.google.protobuf.Duration.toObject(message.gopDuration, options); - if (options.oneofs) - object.gopMode = "gopDuration"; - } - if (message.entropyCoder != null && message.hasOwnProperty("entropyCoder")) - object.entropyCoder = message.entropyCoder; - if (message.bPyramid != null && message.hasOwnProperty("bPyramid")) - object.bPyramid = message.bPyramid; - if (message.bFrameCount != null && message.hasOwnProperty("bFrameCount")) - object.bFrameCount = message.bFrameCount; - if (message.frameRate != null && message.hasOwnProperty("frameRate")) - object.frameRate = options.json && !isFinite(message.frameRate) ? String(message.frameRate) : message.frameRate; - if (message.aqStrength != null && message.hasOwnProperty("aqStrength")) - object.aqStrength = options.json && !isFinite(message.aqStrength) ? String(message.aqStrength) : message.aqStrength; - return object; - }; - - /** - * Converts this VideoStream to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.VideoStream - * @instance - * @returns {Object.} JSON object - */ - VideoStream.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return VideoStream; - })(); - - v1beta1.AudioStream = (function() { - - /** - * Properties of an AudioStream. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface IAudioStream - * @property {string|null} [codec] AudioStream codec - * @property {number|null} [bitrateBps] AudioStream bitrateBps - * @property {number|null} [channelCount] AudioStream channelCount - * @property {Array.|null} [channelLayout] AudioStream channelLayout - * @property {Array.|null} [mapping] AudioStream mapping - * @property {number|null} [sampleRateHertz] AudioStream sampleRateHertz - */ - - /** - * Constructs a new AudioStream. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents an AudioStream. - * @implements IAudioStream - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.IAudioStream=} [properties] Properties to set - */ - function AudioStream(properties) { - this.channelLayout = []; - this.mapping = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AudioStream codec. - * @member {string} codec - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream - * @instance - */ - AudioStream.prototype.codec = ""; - - /** - * AudioStream bitrateBps. - * @member {number} bitrateBps - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream - * @instance - */ - AudioStream.prototype.bitrateBps = 0; - - /** - * AudioStream channelCount. - * @member {number} channelCount - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream - * @instance - */ - AudioStream.prototype.channelCount = 0; - - /** - * AudioStream channelLayout. - * @member {Array.} channelLayout - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream - * @instance - */ - AudioStream.prototype.channelLayout = $util.emptyArray; - - /** - * AudioStream mapping. - * @member {Array.} mapping - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream - * @instance - */ - AudioStream.prototype.mapping = $util.emptyArray; - - /** - * AudioStream sampleRateHertz. - * @member {number} sampleRateHertz - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream - * @instance - */ - AudioStream.prototype.sampleRateHertz = 0; - - /** - * Creates a new AudioStream instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream - * @static - * @param {google.cloud.video.transcoder.v1beta1.IAudioStream=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.AudioStream} AudioStream instance - */ - AudioStream.create = function create(properties) { - return new AudioStream(properties); - }; - - /** - * Encodes the specified AudioStream message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream - * @static - * @param {google.cloud.video.transcoder.v1beta1.IAudioStream} message AudioStream message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudioStream.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.codec != null && Object.hasOwnProperty.call(message, "codec")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.codec); - if (message.bitrateBps != null && Object.hasOwnProperty.call(message, "bitrateBps")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.bitrateBps); - if (message.channelCount != null && Object.hasOwnProperty.call(message, "channelCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.channelCount); - if (message.channelLayout != null && message.channelLayout.length) - for (var i = 0; i < message.channelLayout.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.channelLayout[i]); - if (message.mapping != null && message.mapping.length) - for (var i = 0; i < message.mapping.length; ++i) - $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.encode(message.mapping[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.sampleRateHertz); - return writer; - }; - - /** - * Encodes the specified AudioStream message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream - * @static - * @param {google.cloud.video.transcoder.v1beta1.IAudioStream} message AudioStream message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudioStream.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AudioStream message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.AudioStream} AudioStream - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudioStream.decode = function 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.transcoder.v1beta1.AudioStream(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codec = reader.string(); - break; - case 2: - message.bitrateBps = reader.int32(); - break; - case 3: - message.channelCount = reader.int32(); - break; - case 4: - if (!(message.channelLayout && message.channelLayout.length)) - message.channelLayout = []; - message.channelLayout.push(reader.string()); - break; - case 5: - if (!(message.mapping && message.mapping.length)) - message.mapping = []; - message.mapping.push($root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.decode(reader, reader.uint32())); - break; - case 6: - message.sampleRateHertz = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AudioStream message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.AudioStream} AudioStream - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudioStream.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AudioStream message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AudioStream.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.codec != null && message.hasOwnProperty("codec")) - if (!$util.isString(message.codec)) - return "codec: string expected"; - if (message.bitrateBps != null && message.hasOwnProperty("bitrateBps")) - if (!$util.isInteger(message.bitrateBps)) - return "bitrateBps: integer expected"; - if (message.channelCount != null && message.hasOwnProperty("channelCount")) - if (!$util.isInteger(message.channelCount)) - return "channelCount: integer expected"; - if (message.channelLayout != null && message.hasOwnProperty("channelLayout")) { - if (!Array.isArray(message.channelLayout)) - return "channelLayout: array expected"; - for (var i = 0; i < message.channelLayout.length; ++i) - if (!$util.isString(message.channelLayout[i])) - return "channelLayout: string[] expected"; - } - if (message.mapping != null && message.hasOwnProperty("mapping")) { - if (!Array.isArray(message.mapping)) - return "mapping: array expected"; - for (var i = 0; i < message.mapping.length; ++i) { - var error = $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.verify(message.mapping[i]); - if (error) - return "mapping." + error; - } - } - if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) - if (!$util.isInteger(message.sampleRateHertz)) - return "sampleRateHertz: integer expected"; - return null; - }; - - /** - * Creates an AudioStream message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.AudioStream} AudioStream - */ - AudioStream.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.AudioStream) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.AudioStream(); - if (object.codec != null) - message.codec = String(object.codec); - if (object.bitrateBps != null) - message.bitrateBps = object.bitrateBps | 0; - if (object.channelCount != null) - message.channelCount = object.channelCount | 0; - if (object.channelLayout) { - if (!Array.isArray(object.channelLayout)) - throw TypeError(".google.cloud.video.transcoder.v1beta1.AudioStream.channelLayout: array expected"); - message.channelLayout = []; - for (var i = 0; i < object.channelLayout.length; ++i) - message.channelLayout[i] = String(object.channelLayout[i]); - } - if (object.mapping) { - if (!Array.isArray(object.mapping)) - throw TypeError(".google.cloud.video.transcoder.v1beta1.AudioStream.mapping: array expected"); - message.mapping = []; - for (var i = 0; i < object.mapping.length; ++i) { - if (typeof object.mapping[i] !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.AudioStream.mapping: object expected"); - message.mapping[i] = $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.fromObject(object.mapping[i]); - } - } - if (object.sampleRateHertz != null) - message.sampleRateHertz = object.sampleRateHertz | 0; - return message; - }; - - /** - * Creates a plain object from an AudioStream message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream - * @static - * @param {google.cloud.video.transcoder.v1beta1.AudioStream} message AudioStream - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AudioStream.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.channelLayout = []; - object.mapping = []; - } - if (options.defaults) { - object.codec = ""; - object.bitrateBps = 0; - object.channelCount = 0; - object.sampleRateHertz = 0; - } - if (message.codec != null && message.hasOwnProperty("codec")) - object.codec = message.codec; - if (message.bitrateBps != null && message.hasOwnProperty("bitrateBps")) - object.bitrateBps = message.bitrateBps; - if (message.channelCount != null && message.hasOwnProperty("channelCount")) - object.channelCount = message.channelCount; - if (message.channelLayout && message.channelLayout.length) { - object.channelLayout = []; - for (var j = 0; j < message.channelLayout.length; ++j) - object.channelLayout[j] = message.channelLayout[j]; - } - if (message.mapping && message.mapping.length) { - object.mapping = []; - for (var j = 0; j < message.mapping.length; ++j) - object.mapping[j] = $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.toObject(message.mapping[j], options); - } - if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) - object.sampleRateHertz = message.sampleRateHertz; - return object; - }; - - /** - * Converts this AudioStream to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream - * @instance - * @returns {Object.} JSON object - */ - AudioStream.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - AudioStream.AudioAtom = (function() { - - /** - * Properties of an AudioAtom. - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream - * @interface IAudioAtom - * @property {string|null} [key] AudioAtom key - * @property {Array.|null} [channels] AudioAtom channels - */ - - /** - * Constructs a new AudioAtom. - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream - * @classdesc Represents an AudioAtom. - * @implements IAudioAtom - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.AudioStream.IAudioAtom=} [properties] Properties to set - */ - function AudioAtom(properties) { - this.channels = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AudioAtom key. - * @member {string} key - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom - * @instance - */ - AudioAtom.prototype.key = ""; - - /** - * AudioAtom channels. - * @member {Array.} channels - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom - * @instance - */ - AudioAtom.prototype.channels = $util.emptyArray; - - /** - * Creates a new AudioAtom instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom - * @static - * @param {google.cloud.video.transcoder.v1beta1.AudioStream.IAudioAtom=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom} AudioAtom instance - */ - AudioAtom.create = function create(properties) { - return new AudioAtom(properties); - }; - - /** - * Encodes the specified AudioAtom message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom - * @static - * @param {google.cloud.video.transcoder.v1beta1.AudioStream.IAudioAtom} message AudioAtom message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudioAtom.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.channels != null && message.channels.length) - for (var i = 0; i < message.channels.length; ++i) - $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.encode(message.channels[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AudioAtom message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom - * @static - * @param {google.cloud.video.transcoder.v1beta1.AudioStream.IAudioAtom} message AudioAtom message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudioAtom.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AudioAtom message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom} AudioAtom - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudioAtom.decode = function 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.transcoder.v1beta1.AudioStream.AudioAtom(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - if (!(message.channels && message.channels.length)) - message.channels = []; - message.channels.push($root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AudioAtom message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom} AudioAtom - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudioAtom.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AudioAtom message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AudioAtom.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; - if (message.channels != null && message.hasOwnProperty("channels")) { - if (!Array.isArray(message.channels)) - return "channels: array expected"; - for (var i = 0; i < message.channels.length; ++i) { - var error = $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.verify(message.channels[i]); - if (error) - return "channels." + error; - } - } - return null; - }; - - /** - * Creates an AudioAtom message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom} AudioAtom - */ - AudioAtom.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom(); - if (object.key != null) - message.key = String(object.key); - if (object.channels) { - if (!Array.isArray(object.channels)) - throw TypeError(".google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.channels: array expected"); - message.channels = []; - for (var i = 0; i < object.channels.length; ++i) { - if (typeof object.channels[i] !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.channels: object expected"); - message.channels[i] = $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.fromObject(object.channels[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an AudioAtom message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom - * @static - * @param {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom} message AudioAtom - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AudioAtom.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.channels = []; - if (options.defaults) - object.key = ""; - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.channels && message.channels.length) { - object.channels = []; - for (var j = 0; j < message.channels.length; ++j) - object.channels[j] = $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.toObject(message.channels[j], options); - } - return object; - }; - - /** - * Converts this AudioAtom to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom - * @instance - * @returns {Object.} JSON object - */ - AudioAtom.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - AudioAtom.AudioChannel = (function() { - - /** - * Properties of an AudioChannel. - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom - * @interface IAudioChannel - * @property {Array.|null} [inputs] AudioChannel inputs - */ - - /** - * Constructs a new AudioChannel. - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom - * @classdesc Represents an AudioChannel. - * @implements IAudioChannel - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.IAudioChannel=} [properties] Properties to set - */ - function AudioChannel(properties) { - this.inputs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AudioChannel inputs. - * @member {Array.} inputs - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel - * @instance - */ - AudioChannel.prototype.inputs = $util.emptyArray; - - /** - * Creates a new AudioChannel instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel - * @static - * @param {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.IAudioChannel=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel} AudioChannel instance - */ - AudioChannel.create = function create(properties) { - return new AudioChannel(properties); - }; - - /** - * Encodes the specified AudioChannel message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel - * @static - * @param {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.IAudioChannel} message AudioChannel message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudioChannel.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.inputs != null && message.inputs.length) - for (var i = 0; i < message.inputs.length; ++i) - $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput.encode(message.inputs[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AudioChannel message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel - * @static - * @param {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.IAudioChannel} message AudioChannel message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudioChannel.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AudioChannel message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel} AudioChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudioChannel.decode = function 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.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - if (!(message.inputs && message.inputs.length)) - message.inputs = []; - message.inputs.push($root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AudioChannel message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel} AudioChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudioChannel.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AudioChannel message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AudioChannel.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.inputs != null && message.hasOwnProperty("inputs")) { - if (!Array.isArray(message.inputs)) - return "inputs: array expected"; - for (var i = 0; i < message.inputs.length; ++i) { - var error = $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput.verify(message.inputs[i]); - if (error) - return "inputs." + error; - } - } - return null; - }; - - /** - * Creates an AudioChannel message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel} AudioChannel - */ - AudioChannel.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel(); - if (object.inputs) { - if (!Array.isArray(object.inputs)) - throw TypeError(".google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.inputs: array expected"); - message.inputs = []; - for (var i = 0; i < object.inputs.length; ++i) { - if (typeof object.inputs[i] !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.inputs: object expected"); - message.inputs[i] = $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput.fromObject(object.inputs[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an AudioChannel message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel - * @static - * @param {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel} message AudioChannel - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AudioChannel.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.inputs = []; - if (message.inputs && message.inputs.length) { - object.inputs = []; - for (var j = 0; j < message.inputs.length; ++j) - object.inputs[j] = $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput.toObject(message.inputs[j], options); - } - return object; - }; - - /** - * Converts this AudioChannel to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel - * @instance - * @returns {Object.} JSON object - */ - AudioChannel.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - AudioChannel.AudioChannelInput = (function() { - - /** - * Properties of an AudioChannelInput. - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel - * @interface IAudioChannelInput - * @property {string|null} [key] AudioChannelInput key - * @property {number|null} [track] AudioChannelInput track - * @property {number|null} [channel] AudioChannelInput channel - * @property {number|null} [gainDb] AudioChannelInput gainDb - */ - - /** - * Constructs a new AudioChannelInput. - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel - * @classdesc Represents an AudioChannelInput. - * @implements IAudioChannelInput - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.IAudioChannelInput=} [properties] Properties to set - */ - function AudioChannelInput(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AudioChannelInput key. - * @member {string} key - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput - * @instance - */ - AudioChannelInput.prototype.key = ""; - - /** - * AudioChannelInput track. - * @member {number} track - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput - * @instance - */ - AudioChannelInput.prototype.track = 0; - - /** - * AudioChannelInput channel. - * @member {number} channel - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput - * @instance - */ - AudioChannelInput.prototype.channel = 0; - - /** - * AudioChannelInput gainDb. - * @member {number} gainDb - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput - * @instance - */ - AudioChannelInput.prototype.gainDb = 0; - - /** - * Creates a new AudioChannelInput instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput - * @static - * @param {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.IAudioChannelInput=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput} AudioChannelInput instance - */ - AudioChannelInput.create = function create(properties) { - return new AudioChannelInput(properties); - }; - - /** - * Encodes the specified AudioChannelInput message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput - * @static - * @param {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.IAudioChannelInput} message AudioChannelInput message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudioChannelInput.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.track != null && Object.hasOwnProperty.call(message, "track")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.track); - if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.channel); - if (message.gainDb != null && Object.hasOwnProperty.call(message, "gainDb")) - writer.uint32(/* id 4, wireType 1 =*/33).double(message.gainDb); - return writer; - }; - - /** - * Encodes the specified AudioChannelInput message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput - * @static - * @param {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.IAudioChannelInput} message AudioChannelInput message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudioChannelInput.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AudioChannelInput message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput} AudioChannelInput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudioChannelInput.decode = function 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.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.track = reader.int32(); - break; - case 3: - message.channel = reader.int32(); - break; - case 4: - message.gainDb = reader.double(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AudioChannelInput message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput} AudioChannelInput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudioChannelInput.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AudioChannelInput message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AudioChannelInput.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; - if (message.track != null && message.hasOwnProperty("track")) - if (!$util.isInteger(message.track)) - return "track: integer expected"; - if (message.channel != null && message.hasOwnProperty("channel")) - if (!$util.isInteger(message.channel)) - return "channel: integer expected"; - if (message.gainDb != null && message.hasOwnProperty("gainDb")) - if (typeof message.gainDb !== "number") - return "gainDb: number expected"; - return null; - }; - - /** - * Creates an AudioChannelInput message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput} AudioChannelInput - */ - AudioChannelInput.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput(); - if (object.key != null) - message.key = String(object.key); - if (object.track != null) - message.track = object.track | 0; - if (object.channel != null) - message.channel = object.channel | 0; - if (object.gainDb != null) - message.gainDb = Number(object.gainDb); - return message; - }; - - /** - * Creates a plain object from an AudioChannelInput message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput - * @static - * @param {google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput} message AudioChannelInput - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AudioChannelInput.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.key = ""; - object.track = 0; - object.channel = 0; - object.gainDb = 0; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.track != null && message.hasOwnProperty("track")) - object.track = message.track; - if (message.channel != null && message.hasOwnProperty("channel")) - object.channel = message.channel; - if (message.gainDb != null && message.hasOwnProperty("gainDb")) - object.gainDb = options.json && !isFinite(message.gainDb) ? String(message.gainDb) : message.gainDb; - return object; - }; - - /** - * Converts this AudioChannelInput to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.AudioStream.AudioAtom.AudioChannel.AudioChannelInput - * @instance - * @returns {Object.} JSON object - */ - AudioChannelInput.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return AudioChannelInput; - })(); - - return AudioChannel; - })(); - - return AudioAtom; - })(); - - return AudioStream; - })(); - - v1beta1.TextStream = (function() { - - /** - * Properties of a TextStream. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface ITextStream - * @property {string|null} [codec] TextStream codec - * @property {string|null} [languageCode] TextStream languageCode - * @property {Array.|null} [mapping] TextStream mapping - */ - - /** - * Constructs a new TextStream. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents a TextStream. - * @implements ITextStream - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.ITextStream=} [properties] Properties to set - */ - function TextStream(properties) { - this.mapping = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TextStream codec. - * @member {string} codec - * @memberof google.cloud.video.transcoder.v1beta1.TextStream - * @instance - */ - TextStream.prototype.codec = ""; - - /** - * TextStream languageCode. - * @member {string} languageCode - * @memberof google.cloud.video.transcoder.v1beta1.TextStream - * @instance - */ - TextStream.prototype.languageCode = ""; - - /** - * TextStream mapping. - * @member {Array.} mapping - * @memberof google.cloud.video.transcoder.v1beta1.TextStream - * @instance - */ - TextStream.prototype.mapping = $util.emptyArray; - - /** - * Creates a new TextStream instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.TextStream - * @static - * @param {google.cloud.video.transcoder.v1beta1.ITextStream=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.TextStream} TextStream instance - */ - TextStream.create = function create(properties) { - return new TextStream(properties); - }; - - /** - * Encodes the specified TextStream message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.TextStream.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.TextStream - * @static - * @param {google.cloud.video.transcoder.v1beta1.ITextStream} message TextStream message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TextStream.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.codec != null && Object.hasOwnProperty.call(message, "codec")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.codec); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); - if (message.mapping != null && message.mapping.length) - for (var i = 0; i < message.mapping.length; ++i) - $root.google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.encode(message.mapping[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TextStream message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.TextStream.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.TextStream - * @static - * @param {google.cloud.video.transcoder.v1beta1.ITextStream} message TextStream message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TextStream.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TextStream message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.TextStream - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.TextStream} TextStream - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TextStream.decode = function 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.transcoder.v1beta1.TextStream(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.codec = reader.string(); - break; - case 2: - message.languageCode = reader.string(); - break; - case 3: - if (!(message.mapping && message.mapping.length)) - message.mapping = []; - message.mapping.push($root.google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TextStream message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.TextStream - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.TextStream} TextStream - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TextStream.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TextStream message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.TextStream - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TextStream.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.codec != null && message.hasOwnProperty("codec")) - if (!$util.isString(message.codec)) - return "codec: string expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.mapping != null && message.hasOwnProperty("mapping")) { - if (!Array.isArray(message.mapping)) - return "mapping: array expected"; - for (var i = 0; i < message.mapping.length; ++i) { - var error = $root.google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.verify(message.mapping[i]); - if (error) - return "mapping." + error; - } - } - return null; - }; - - /** - * Creates a TextStream message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.TextStream - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.TextStream} TextStream - */ - TextStream.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.TextStream) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.TextStream(); - if (object.codec != null) - message.codec = String(object.codec); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.mapping) { - if (!Array.isArray(object.mapping)) - throw TypeError(".google.cloud.video.transcoder.v1beta1.TextStream.mapping: array expected"); - message.mapping = []; - for (var i = 0; i < object.mapping.length; ++i) { - if (typeof object.mapping[i] !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.TextStream.mapping: object expected"); - message.mapping[i] = $root.google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.fromObject(object.mapping[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a TextStream message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.TextStream - * @static - * @param {google.cloud.video.transcoder.v1beta1.TextStream} message TextStream - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TextStream.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.mapping = []; - if (options.defaults) { - object.codec = ""; - object.languageCode = ""; - } - if (message.codec != null && message.hasOwnProperty("codec")) - object.codec = message.codec; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.mapping && message.mapping.length) { - object.mapping = []; - for (var j = 0; j < message.mapping.length; ++j) - object.mapping[j] = $root.google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.toObject(message.mapping[j], options); - } - return object; - }; - - /** - * Converts this TextStream to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.TextStream - * @instance - * @returns {Object.} JSON object - */ - TextStream.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - TextStream.TextAtom = (function() { - - /** - * Properties of a TextAtom. - * @memberof google.cloud.video.transcoder.v1beta1.TextStream - * @interface ITextAtom - * @property {string|null} [key] TextAtom key - * @property {Array.|null} [inputs] TextAtom inputs - */ - - /** - * Constructs a new TextAtom. - * @memberof google.cloud.video.transcoder.v1beta1.TextStream - * @classdesc Represents a TextAtom. - * @implements ITextAtom - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.TextStream.ITextAtom=} [properties] Properties to set - */ - function TextAtom(properties) { - this.inputs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TextAtom key. - * @member {string} key - * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom - * @instance - */ - TextAtom.prototype.key = ""; - - /** - * TextAtom inputs. - * @member {Array.} inputs - * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom - * @instance - */ - TextAtom.prototype.inputs = $util.emptyArray; - - /** - * Creates a new TextAtom instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom - * @static - * @param {google.cloud.video.transcoder.v1beta1.TextStream.ITextAtom=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.TextStream.TextAtom} TextAtom instance - */ - TextAtom.create = function create(properties) { - return new TextAtom(properties); - }; - - /** - * Encodes the specified TextAtom message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom - * @static - * @param {google.cloud.video.transcoder.v1beta1.TextStream.ITextAtom} message TextAtom message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TextAtom.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.inputs != null && message.inputs.length) - for (var i = 0; i < message.inputs.length; ++i) - $root.google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput.encode(message.inputs[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TextAtom message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom - * @static - * @param {google.cloud.video.transcoder.v1beta1.TextStream.ITextAtom} message TextAtom message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TextAtom.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TextAtom message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.TextStream.TextAtom} TextAtom - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TextAtom.decode = function 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.transcoder.v1beta1.TextStream.TextAtom(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - if (!(message.inputs && message.inputs.length)) - message.inputs = []; - message.inputs.push($root.google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TextAtom message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.TextStream.TextAtom} TextAtom - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TextAtom.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TextAtom message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TextAtom.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; - if (message.inputs != null && message.hasOwnProperty("inputs")) { - if (!Array.isArray(message.inputs)) - return "inputs: array expected"; - for (var i = 0; i < message.inputs.length; ++i) { - var error = $root.google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput.verify(message.inputs[i]); - if (error) - return "inputs." + error; - } - } - return null; - }; - - /** - * Creates a TextAtom message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.TextStream.TextAtom} TextAtom - */ - TextAtom.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.TextStream.TextAtom) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.TextStream.TextAtom(); - if (object.key != null) - message.key = String(object.key); - if (object.inputs) { - if (!Array.isArray(object.inputs)) - throw TypeError(".google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.inputs: array expected"); - message.inputs = []; - for (var i = 0; i < object.inputs.length; ++i) { - if (typeof object.inputs[i] !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.inputs: object expected"); - message.inputs[i] = $root.google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput.fromObject(object.inputs[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a TextAtom message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom - * @static - * @param {google.cloud.video.transcoder.v1beta1.TextStream.TextAtom} message TextAtom - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TextAtom.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.inputs = []; - if (options.defaults) - object.key = ""; - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.inputs && message.inputs.length) { - object.inputs = []; - for (var j = 0; j < message.inputs.length; ++j) - object.inputs[j] = $root.google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput.toObject(message.inputs[j], options); - } - return object; - }; - - /** - * Converts this TextAtom to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom - * @instance - * @returns {Object.} JSON object - */ - TextAtom.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - TextAtom.TextInput = (function() { - - /** - * Properties of a TextInput. - * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom - * @interface ITextInput - * @property {string|null} [key] TextInput key - * @property {number|null} [track] TextInput track - */ - - /** - * Constructs a new TextInput. - * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom - * @classdesc Represents a TextInput. - * @implements ITextInput - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.ITextInput=} [properties] Properties to set - */ - function TextInput(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TextInput key. - * @member {string} key - * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput - * @instance - */ - TextInput.prototype.key = ""; - - /** - * TextInput track. - * @member {number} track - * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput - * @instance - */ - TextInput.prototype.track = 0; - - /** - * Creates a new TextInput instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput - * @static - * @param {google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.ITextInput=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput} TextInput instance - */ - TextInput.create = function create(properties) { - return new TextInput(properties); - }; - - /** - * Encodes the specified TextInput message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput - * @static - * @param {google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.ITextInput} message TextInput message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TextInput.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.track != null && Object.hasOwnProperty.call(message, "track")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.track); - return writer; - }; - - /** - * Encodes the specified TextInput message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput - * @static - * @param {google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.ITextInput} message TextInput message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TextInput.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TextInput message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput} TextInput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TextInput.decode = function 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.transcoder.v1beta1.TextStream.TextAtom.TextInput(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.track = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TextInput message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput} TextInput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TextInput.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TextInput message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TextInput.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; - if (message.track != null && message.hasOwnProperty("track")) - if (!$util.isInteger(message.track)) - return "track: integer expected"; - return null; - }; - - /** - * Creates a TextInput message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput} TextInput - */ - TextInput.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput(); - if (object.key != null) - message.key = String(object.key); - if (object.track != null) - message.track = object.track | 0; - return message; - }; - - /** - * Creates a plain object from a TextInput message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput - * @static - * @param {google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput} message TextInput - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TextInput.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.key = ""; - object.track = 0; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.track != null && message.hasOwnProperty("track")) - object.track = message.track; - return object; - }; - - /** - * Converts this TextInput to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.TextStream.TextAtom.TextInput - * @instance - * @returns {Object.} JSON object - */ - TextInput.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TextInput; - })(); - - return TextAtom; - })(); - - return TextStream; - })(); - - v1beta1.SegmentSettings = (function() { - - /** - * Properties of a SegmentSettings. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface ISegmentSettings - * @property {google.protobuf.IDuration|null} [segmentDuration] SegmentSettings segmentDuration - * @property {boolean|null} [individualSegments] SegmentSettings individualSegments - */ - - /** - * Constructs a new SegmentSettings. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents a SegmentSettings. - * @implements ISegmentSettings - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.ISegmentSettings=} [properties] Properties to set - */ - function SegmentSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SegmentSettings segmentDuration. - * @member {google.protobuf.IDuration|null|undefined} segmentDuration - * @memberof google.cloud.video.transcoder.v1beta1.SegmentSettings - * @instance - */ - SegmentSettings.prototype.segmentDuration = null; - - /** - * SegmentSettings individualSegments. - * @member {boolean} individualSegments - * @memberof google.cloud.video.transcoder.v1beta1.SegmentSettings - * @instance - */ - SegmentSettings.prototype.individualSegments = false; - - /** - * Creates a new SegmentSettings instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.SegmentSettings - * @static - * @param {google.cloud.video.transcoder.v1beta1.ISegmentSettings=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.SegmentSettings} SegmentSettings instance - */ - SegmentSettings.create = function create(properties) { - return new SegmentSettings(properties); - }; - - /** - * Encodes the specified SegmentSettings message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.SegmentSettings.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.SegmentSettings - * @static - * @param {google.cloud.video.transcoder.v1beta1.ISegmentSettings} message SegmentSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SegmentSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.segmentDuration != null && Object.hasOwnProperty.call(message, "segmentDuration")) - $root.google.protobuf.Duration.encode(message.segmentDuration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.individualSegments != null && Object.hasOwnProperty.call(message, "individualSegments")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.individualSegments); - return writer; - }; - - /** - * Encodes the specified SegmentSettings message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.SegmentSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.SegmentSettings - * @static - * @param {google.cloud.video.transcoder.v1beta1.ISegmentSettings} message SegmentSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SegmentSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SegmentSettings message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.SegmentSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.SegmentSettings} SegmentSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SegmentSettings.decode = function 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.transcoder.v1beta1.SegmentSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.segmentDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 3: - message.individualSegments = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SegmentSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.SegmentSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.SegmentSettings} SegmentSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SegmentSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SegmentSettings message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.SegmentSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SegmentSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.segmentDuration != null && message.hasOwnProperty("segmentDuration")) { - var error = $root.google.protobuf.Duration.verify(message.segmentDuration); - if (error) - return "segmentDuration." + error; - } - if (message.individualSegments != null && message.hasOwnProperty("individualSegments")) - if (typeof message.individualSegments !== "boolean") - return "individualSegments: boolean expected"; - return null; - }; - - /** - * Creates a SegmentSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.SegmentSettings - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.SegmentSettings} SegmentSettings - */ - SegmentSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.SegmentSettings) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.SegmentSettings(); - if (object.segmentDuration != null) { - if (typeof object.segmentDuration !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.SegmentSettings.segmentDuration: object expected"); - message.segmentDuration = $root.google.protobuf.Duration.fromObject(object.segmentDuration); - } - if (object.individualSegments != null) - message.individualSegments = Boolean(object.individualSegments); - return message; - }; - - /** - * Creates a plain object from a SegmentSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.SegmentSettings - * @static - * @param {google.cloud.video.transcoder.v1beta1.SegmentSettings} message SegmentSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SegmentSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.segmentDuration = null; - object.individualSegments = false; - } - if (message.segmentDuration != null && message.hasOwnProperty("segmentDuration")) - object.segmentDuration = $root.google.protobuf.Duration.toObject(message.segmentDuration, options); - if (message.individualSegments != null && message.hasOwnProperty("individualSegments")) - object.individualSegments = message.individualSegments; - return object; - }; - - /** - * Converts this SegmentSettings to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.SegmentSettings - * @instance - * @returns {Object.} JSON object - */ - SegmentSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SegmentSettings; - })(); - - v1beta1.Encryption = (function() { - - /** - * Properties of an Encryption. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface IEncryption - * @property {string|null} [key] Encryption key - * @property {string|null} [iv] Encryption iv - * @property {google.cloud.video.transcoder.v1beta1.Encryption.IAes128Encryption|null} [aes_128] Encryption aes_128 - * @property {google.cloud.video.transcoder.v1beta1.Encryption.ISampleAesEncryption|null} [sampleAes] Encryption sampleAes - * @property {google.cloud.video.transcoder.v1beta1.Encryption.IMpegCommonEncryption|null} [mpegCenc] Encryption mpegCenc - */ - - /** - * Constructs a new Encryption. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents an Encryption. - * @implements IEncryption - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.IEncryption=} [properties] Properties to set - */ - function Encryption(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encryption key. - * @member {string} key - * @memberof google.cloud.video.transcoder.v1beta1.Encryption - * @instance - */ - Encryption.prototype.key = ""; - - /** - * Encryption iv. - * @member {string} iv - * @memberof google.cloud.video.transcoder.v1beta1.Encryption - * @instance - */ - Encryption.prototype.iv = ""; - - /** - * Encryption aes_128. - * @member {google.cloud.video.transcoder.v1beta1.Encryption.IAes128Encryption|null|undefined} aes_128 - * @memberof google.cloud.video.transcoder.v1beta1.Encryption - * @instance - */ - Encryption.prototype.aes_128 = null; - - /** - * Encryption sampleAes. - * @member {google.cloud.video.transcoder.v1beta1.Encryption.ISampleAesEncryption|null|undefined} sampleAes - * @memberof google.cloud.video.transcoder.v1beta1.Encryption - * @instance - */ - Encryption.prototype.sampleAes = null; - - /** - * Encryption mpegCenc. - * @member {google.cloud.video.transcoder.v1beta1.Encryption.IMpegCommonEncryption|null|undefined} mpegCenc - * @memberof google.cloud.video.transcoder.v1beta1.Encryption - * @instance - */ - Encryption.prototype.mpegCenc = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Encryption encryptionMode. - * @member {"aes_128"|"sampleAes"|"mpegCenc"|undefined} encryptionMode - * @memberof google.cloud.video.transcoder.v1beta1.Encryption - * @instance - */ - Object.defineProperty(Encryption.prototype, "encryptionMode", { - get: $util.oneOfGetter($oneOfFields = ["aes_128", "sampleAes", "mpegCenc"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Encryption instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.Encryption - * @static - * @param {google.cloud.video.transcoder.v1beta1.IEncryption=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.Encryption} Encryption instance - */ - Encryption.create = function create(properties) { - return new Encryption(properties); - }; - - /** - * Encodes the specified Encryption message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.Encryption - * @static - * @param {google.cloud.video.transcoder.v1beta1.IEncryption} message Encryption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Encryption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.iv != null && Object.hasOwnProperty.call(message, "iv")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.iv); - if (message.aes_128 != null && Object.hasOwnProperty.call(message, "aes_128")) - $root.google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption.encode(message.aes_128, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.sampleAes != null && Object.hasOwnProperty.call(message, "sampleAes")) - $root.google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption.encode(message.sampleAes, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.mpegCenc != null && Object.hasOwnProperty.call(message, "mpegCenc")) - $root.google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption.encode(message.mpegCenc, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Encryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Encryption - * @static - * @param {google.cloud.video.transcoder.v1beta1.IEncryption} message Encryption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Encryption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Encryption message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.Encryption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.Encryption} Encryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Encryption.decode = function 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.transcoder.v1beta1.Encryption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.iv = reader.string(); - break; - case 3: - message.aes_128 = $root.google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption.decode(reader, reader.uint32()); - break; - case 4: - message.sampleAes = $root.google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption.decode(reader, reader.uint32()); - break; - case 5: - message.mpegCenc = $root.google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Encryption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Encryption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.Encryption} Encryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Encryption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Encryption message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.Encryption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Encryption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; - if (message.iv != null && message.hasOwnProperty("iv")) - if (!$util.isString(message.iv)) - return "iv: string expected"; - if (message.aes_128 != null && message.hasOwnProperty("aes_128")) { - properties.encryptionMode = 1; - { - var error = $root.google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption.verify(message.aes_128); - if (error) - return "aes_128." + error; - } - } - if (message.sampleAes != null && message.hasOwnProperty("sampleAes")) { - if (properties.encryptionMode === 1) - return "encryptionMode: multiple values"; - properties.encryptionMode = 1; - { - var error = $root.google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption.verify(message.sampleAes); - if (error) - return "sampleAes." + error; - } - } - if (message.mpegCenc != null && message.hasOwnProperty("mpegCenc")) { - if (properties.encryptionMode === 1) - return "encryptionMode: multiple values"; - properties.encryptionMode = 1; - { - var error = $root.google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption.verify(message.mpegCenc); - if (error) - return "mpegCenc." + error; - } - } - return null; - }; - - /** - * Creates an Encryption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.Encryption - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.Encryption} Encryption - */ - Encryption.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Encryption) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.Encryption(); - if (object.key != null) - message.key = String(object.key); - if (object.iv != null) - message.iv = String(object.iv); - if (object.aes_128 != null) { - if (typeof object.aes_128 !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.Encryption.aes_128: object expected"); - message.aes_128 = $root.google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption.fromObject(object.aes_128); - } - if (object.sampleAes != null) { - if (typeof object.sampleAes !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.Encryption.sampleAes: object expected"); - message.sampleAes = $root.google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption.fromObject(object.sampleAes); - } - if (object.mpegCenc != null) { - if (typeof object.mpegCenc !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.Encryption.mpegCenc: object expected"); - message.mpegCenc = $root.google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption.fromObject(object.mpegCenc); - } - return message; - }; - - /** - * Creates a plain object from an Encryption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.Encryption - * @static - * @param {google.cloud.video.transcoder.v1beta1.Encryption} message Encryption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Encryption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.key = ""; - object.iv = ""; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.iv != null && message.hasOwnProperty("iv")) - object.iv = message.iv; - if (message.aes_128 != null && message.hasOwnProperty("aes_128")) { - object.aes_128 = $root.google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption.toObject(message.aes_128, options); - if (options.oneofs) - object.encryptionMode = "aes_128"; - } - if (message.sampleAes != null && message.hasOwnProperty("sampleAes")) { - object.sampleAes = $root.google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption.toObject(message.sampleAes, options); - if (options.oneofs) - object.encryptionMode = "sampleAes"; - } - if (message.mpegCenc != null && message.hasOwnProperty("mpegCenc")) { - object.mpegCenc = $root.google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption.toObject(message.mpegCenc, options); - if (options.oneofs) - object.encryptionMode = "mpegCenc"; - } - return object; - }; - - /** - * Converts this Encryption to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.Encryption - * @instance - * @returns {Object.} JSON object - */ - Encryption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - Encryption.Aes128Encryption = (function() { - - /** - * Properties of an Aes128Encryption. - * @memberof google.cloud.video.transcoder.v1beta1.Encryption - * @interface IAes128Encryption - * @property {string|null} [keyUri] Aes128Encryption keyUri - */ - - /** - * Constructs a new Aes128Encryption. - * @memberof google.cloud.video.transcoder.v1beta1.Encryption - * @classdesc Represents an Aes128Encryption. - * @implements IAes128Encryption - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.Encryption.IAes128Encryption=} [properties] Properties to set - */ - function Aes128Encryption(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Aes128Encryption keyUri. - * @member {string} keyUri - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption - * @instance - */ - Aes128Encryption.prototype.keyUri = ""; - - /** - * Creates a new Aes128Encryption instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption - * @static - * @param {google.cloud.video.transcoder.v1beta1.Encryption.IAes128Encryption=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption} Aes128Encryption instance - */ - Aes128Encryption.create = function create(properties) { - return new Aes128Encryption(properties); - }; - - /** - * Encodes the specified Aes128Encryption message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption - * @static - * @param {google.cloud.video.transcoder.v1beta1.Encryption.IAes128Encryption} message Aes128Encryption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Aes128Encryption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyUri != null && Object.hasOwnProperty.call(message, "keyUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyUri); - return writer; - }; - - /** - * Encodes the specified Aes128Encryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption - * @static - * @param {google.cloud.video.transcoder.v1beta1.Encryption.IAes128Encryption} message Aes128Encryption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Aes128Encryption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Aes128Encryption message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption} Aes128Encryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Aes128Encryption.decode = function 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.transcoder.v1beta1.Encryption.Aes128Encryption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyUri = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Aes128Encryption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption} Aes128Encryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Aes128Encryption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Aes128Encryption message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Aes128Encryption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyUri != null && message.hasOwnProperty("keyUri")) - if (!$util.isString(message.keyUri)) - return "keyUri: string expected"; - return null; - }; - - /** - * Creates an Aes128Encryption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption} Aes128Encryption - */ - Aes128Encryption.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption(); - if (object.keyUri != null) - message.keyUri = String(object.keyUri); - return message; - }; - - /** - * Creates a plain object from an Aes128Encryption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption - * @static - * @param {google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption} message Aes128Encryption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Aes128Encryption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.keyUri = ""; - if (message.keyUri != null && message.hasOwnProperty("keyUri")) - object.keyUri = message.keyUri; - return object; - }; - - /** - * Converts this Aes128Encryption to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.Aes128Encryption - * @instance - * @returns {Object.} JSON object - */ - Aes128Encryption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Aes128Encryption; - })(); - - Encryption.SampleAesEncryption = (function() { - - /** - * Properties of a SampleAesEncryption. - * @memberof google.cloud.video.transcoder.v1beta1.Encryption - * @interface ISampleAesEncryption - * @property {string|null} [keyUri] SampleAesEncryption keyUri - */ - - /** - * Constructs a new SampleAesEncryption. - * @memberof google.cloud.video.transcoder.v1beta1.Encryption - * @classdesc Represents a SampleAesEncryption. - * @implements ISampleAesEncryption - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.Encryption.ISampleAesEncryption=} [properties] Properties to set - */ - function SampleAesEncryption(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SampleAesEncryption keyUri. - * @member {string} keyUri - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption - * @instance - */ - SampleAesEncryption.prototype.keyUri = ""; - - /** - * Creates a new SampleAesEncryption instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption - * @static - * @param {google.cloud.video.transcoder.v1beta1.Encryption.ISampleAesEncryption=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption} SampleAesEncryption instance - */ - SampleAesEncryption.create = function create(properties) { - return new SampleAesEncryption(properties); - }; - - /** - * Encodes the specified SampleAesEncryption message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption - * @static - * @param {google.cloud.video.transcoder.v1beta1.Encryption.ISampleAesEncryption} message SampleAesEncryption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SampleAesEncryption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyUri != null && Object.hasOwnProperty.call(message, "keyUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyUri); - return writer; - }; - - /** - * Encodes the specified SampleAesEncryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption - * @static - * @param {google.cloud.video.transcoder.v1beta1.Encryption.ISampleAesEncryption} message SampleAesEncryption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SampleAesEncryption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SampleAesEncryption message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption} SampleAesEncryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SampleAesEncryption.decode = function 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.transcoder.v1beta1.Encryption.SampleAesEncryption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyUri = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SampleAesEncryption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption} SampleAesEncryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SampleAesEncryption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SampleAesEncryption message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SampleAesEncryption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyUri != null && message.hasOwnProperty("keyUri")) - if (!$util.isString(message.keyUri)) - return "keyUri: string expected"; - return null; - }; - - /** - * Creates a SampleAesEncryption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption} SampleAesEncryption - */ - SampleAesEncryption.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption(); - if (object.keyUri != null) - message.keyUri = String(object.keyUri); - return message; - }; - - /** - * Creates a plain object from a SampleAesEncryption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption - * @static - * @param {google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption} message SampleAesEncryption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SampleAesEncryption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.keyUri = ""; - if (message.keyUri != null && message.hasOwnProperty("keyUri")) - object.keyUri = message.keyUri; - return object; - }; - - /** - * Converts this SampleAesEncryption to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.SampleAesEncryption - * @instance - * @returns {Object.} JSON object - */ - SampleAesEncryption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SampleAesEncryption; - })(); - - Encryption.MpegCommonEncryption = (function() { - - /** - * Properties of a MpegCommonEncryption. - * @memberof google.cloud.video.transcoder.v1beta1.Encryption - * @interface IMpegCommonEncryption - * @property {string|null} [keyId] MpegCommonEncryption keyId - * @property {string|null} [scheme] MpegCommonEncryption scheme - */ - - /** - * Constructs a new MpegCommonEncryption. - * @memberof google.cloud.video.transcoder.v1beta1.Encryption - * @classdesc Represents a MpegCommonEncryption. - * @implements IMpegCommonEncryption - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.Encryption.IMpegCommonEncryption=} [properties] Properties to set - */ - function MpegCommonEncryption(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MpegCommonEncryption keyId. - * @member {string} keyId - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption - * @instance - */ - MpegCommonEncryption.prototype.keyId = ""; - - /** - * MpegCommonEncryption scheme. - * @member {string} scheme - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption - * @instance - */ - MpegCommonEncryption.prototype.scheme = ""; - - /** - * Creates a new MpegCommonEncryption instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption - * @static - * @param {google.cloud.video.transcoder.v1beta1.Encryption.IMpegCommonEncryption=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption} MpegCommonEncryption instance - */ - MpegCommonEncryption.create = function create(properties) { - return new MpegCommonEncryption(properties); - }; - - /** - * Encodes the specified MpegCommonEncryption message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption - * @static - * @param {google.cloud.video.transcoder.v1beta1.Encryption.IMpegCommonEncryption} message MpegCommonEncryption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MpegCommonEncryption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyId != null && Object.hasOwnProperty.call(message, "keyId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyId); - if (message.scheme != null && Object.hasOwnProperty.call(message, "scheme")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.scheme); - return writer; - }; - - /** - * Encodes the specified MpegCommonEncryption message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption - * @static - * @param {google.cloud.video.transcoder.v1beta1.Encryption.IMpegCommonEncryption} message MpegCommonEncryption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MpegCommonEncryption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MpegCommonEncryption message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption} MpegCommonEncryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MpegCommonEncryption.decode = function 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.transcoder.v1beta1.Encryption.MpegCommonEncryption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyId = reader.string(); - break; - case 2: - message.scheme = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MpegCommonEncryption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption} MpegCommonEncryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MpegCommonEncryption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MpegCommonEncryption message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MpegCommonEncryption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyId != null && message.hasOwnProperty("keyId")) - if (!$util.isString(message.keyId)) - return "keyId: string expected"; - if (message.scheme != null && message.hasOwnProperty("scheme")) - if (!$util.isString(message.scheme)) - return "scheme: string expected"; - return null; - }; - - /** - * Creates a MpegCommonEncryption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption} MpegCommonEncryption - */ - MpegCommonEncryption.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption(); - if (object.keyId != null) - message.keyId = String(object.keyId); - if (object.scheme != null) - message.scheme = String(object.scheme); - return message; - }; - - /** - * Creates a plain object from a MpegCommonEncryption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption - * @static - * @param {google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption} message MpegCommonEncryption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MpegCommonEncryption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.keyId = ""; - object.scheme = ""; - } - if (message.keyId != null && message.hasOwnProperty("keyId")) - object.keyId = message.keyId; - if (message.scheme != null && message.hasOwnProperty("scheme")) - object.scheme = message.scheme; - return object; - }; - - /** - * Converts this MpegCommonEncryption to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.Encryption.MpegCommonEncryption - * @instance - * @returns {Object.} JSON object - */ - MpegCommonEncryption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MpegCommonEncryption; - })(); - - return Encryption; - })(); - - v1beta1.Progress = (function() { - - /** - * Properties of a Progress. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface IProgress - * @property {number|null} [analyzed] Progress analyzed - * @property {number|null} [encoded] Progress encoded - * @property {number|null} [uploaded] Progress uploaded - * @property {number|null} [notified] Progress notified - */ - - /** - * Constructs a new Progress. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents a Progress. - * @implements IProgress - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.IProgress=} [properties] Properties to set - */ - function Progress(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Progress analyzed. - * @member {number} analyzed - * @memberof google.cloud.video.transcoder.v1beta1.Progress - * @instance - */ - Progress.prototype.analyzed = 0; - - /** - * Progress encoded. - * @member {number} encoded - * @memberof google.cloud.video.transcoder.v1beta1.Progress - * @instance - */ - Progress.prototype.encoded = 0; - - /** - * Progress uploaded. - * @member {number} uploaded - * @memberof google.cloud.video.transcoder.v1beta1.Progress - * @instance - */ - Progress.prototype.uploaded = 0; - - /** - * Progress notified. - * @member {number} notified - * @memberof google.cloud.video.transcoder.v1beta1.Progress - * @instance - */ - Progress.prototype.notified = 0; - - /** - * Creates a new Progress instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.Progress - * @static - * @param {google.cloud.video.transcoder.v1beta1.IProgress=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.Progress} Progress instance - */ - Progress.create = function create(properties) { - return new Progress(properties); - }; - - /** - * Encodes the specified Progress message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Progress.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.Progress - * @static - * @param {google.cloud.video.transcoder.v1beta1.IProgress} message Progress message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Progress.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.analyzed != null && Object.hasOwnProperty.call(message, "analyzed")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.analyzed); - if (message.encoded != null && Object.hasOwnProperty.call(message, "encoded")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.encoded); - if (message.uploaded != null && Object.hasOwnProperty.call(message, "uploaded")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.uploaded); - if (message.notified != null && Object.hasOwnProperty.call(message, "notified")) - writer.uint32(/* id 4, wireType 1 =*/33).double(message.notified); - return writer; - }; - - /** - * Encodes the specified Progress message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.Progress.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Progress - * @static - * @param {google.cloud.video.transcoder.v1beta1.IProgress} message Progress message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Progress.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Progress message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.Progress - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.Progress} Progress - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Progress.decode = function 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.transcoder.v1beta1.Progress(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.analyzed = reader.double(); - break; - case 2: - message.encoded = reader.double(); - break; - case 3: - message.uploaded = reader.double(); - break; - case 4: - message.notified = reader.double(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Progress message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.Progress - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.Progress} Progress - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Progress.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Progress message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.Progress - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Progress.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.analyzed != null && message.hasOwnProperty("analyzed")) - if (typeof message.analyzed !== "number") - return "analyzed: number expected"; - if (message.encoded != null && message.hasOwnProperty("encoded")) - if (typeof message.encoded !== "number") - return "encoded: number expected"; - if (message.uploaded != null && message.hasOwnProperty("uploaded")) - if (typeof message.uploaded !== "number") - return "uploaded: number expected"; - if (message.notified != null && message.hasOwnProperty("notified")) - if (typeof message.notified !== "number") - return "notified: number expected"; - return null; - }; - - /** - * Creates a Progress message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.Progress - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.Progress} Progress - */ - Progress.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.Progress) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.Progress(); - if (object.analyzed != null) - message.analyzed = Number(object.analyzed); - if (object.encoded != null) - message.encoded = Number(object.encoded); - if (object.uploaded != null) - message.uploaded = Number(object.uploaded); - if (object.notified != null) - message.notified = Number(object.notified); - return message; - }; - - /** - * Creates a plain object from a Progress message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.Progress - * @static - * @param {google.cloud.video.transcoder.v1beta1.Progress} message Progress - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Progress.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.analyzed = 0; - object.encoded = 0; - object.uploaded = 0; - object.notified = 0; - } - if (message.analyzed != null && message.hasOwnProperty("analyzed")) - object.analyzed = options.json && !isFinite(message.analyzed) ? String(message.analyzed) : message.analyzed; - if (message.encoded != null && message.hasOwnProperty("encoded")) - object.encoded = options.json && !isFinite(message.encoded) ? String(message.encoded) : message.encoded; - if (message.uploaded != null && message.hasOwnProperty("uploaded")) - object.uploaded = options.json && !isFinite(message.uploaded) ? String(message.uploaded) : message.uploaded; - if (message.notified != null && message.hasOwnProperty("notified")) - object.notified = options.json && !isFinite(message.notified) ? String(message.notified) : message.notified; - return object; - }; - - /** - * Converts this Progress to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.Progress - * @instance - * @returns {Object.} JSON object - */ - Progress.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Progress; - })(); - - v1beta1.FailureDetail = (function() { - - /** - * Properties of a FailureDetail. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface IFailureDetail - * @property {string|null} [description] FailureDetail description - */ - - /** - * Constructs a new FailureDetail. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents a FailureDetail. - * @implements IFailureDetail - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.IFailureDetail=} [properties] Properties to set - */ - function FailureDetail(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FailureDetail description. - * @member {string} description - * @memberof google.cloud.video.transcoder.v1beta1.FailureDetail - * @instance - */ - FailureDetail.prototype.description = ""; - - /** - * Creates a new FailureDetail instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.FailureDetail - * @static - * @param {google.cloud.video.transcoder.v1beta1.IFailureDetail=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.FailureDetail} FailureDetail instance - */ - FailureDetail.create = function create(properties) { - return new FailureDetail(properties); - }; - - /** - * Encodes the specified FailureDetail message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.FailureDetail.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.FailureDetail - * @static - * @param {google.cloud.video.transcoder.v1beta1.IFailureDetail} message FailureDetail message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FailureDetail.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); - return writer; - }; - - /** - * Encodes the specified FailureDetail message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.FailureDetail.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.FailureDetail - * @static - * @param {google.cloud.video.transcoder.v1beta1.IFailureDetail} message FailureDetail message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FailureDetail.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FailureDetail message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.FailureDetail - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.FailureDetail} FailureDetail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FailureDetail.decode = function 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.transcoder.v1beta1.FailureDetail(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.description = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FailureDetail message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.FailureDetail - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.FailureDetail} FailureDetail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FailureDetail.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FailureDetail message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.FailureDetail - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FailureDetail.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - return null; - }; - - /** - * Creates a FailureDetail message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.FailureDetail - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.FailureDetail} FailureDetail - */ - FailureDetail.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.FailureDetail) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.FailureDetail(); - if (object.description != null) - message.description = String(object.description); - return message; - }; - - /** - * Creates a plain object from a FailureDetail message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.FailureDetail - * @static - * @param {google.cloud.video.transcoder.v1beta1.FailureDetail} message FailureDetail - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FailureDetail.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.description = ""; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - return object; - }; - - /** - * Converts this FailureDetail to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.FailureDetail - * @instance - * @returns {Object.} JSON object - */ - FailureDetail.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return FailureDetail; - })(); - - v1beta1.TranscoderService = (function() { - - /** - * Constructs a new TranscoderService service. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents a TranscoderService - * @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 TranscoderService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (TranscoderService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = TranscoderService; - - /** - * Creates new TranscoderService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService - * @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 {TranscoderService} RPC service. Useful where requests and/or responses are streamed. - */ - TranscoderService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#createJob}. - * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService - * @typedef CreateJobCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.video.transcoder.v1beta1.Job} [response] Job - */ - - /** - * Calls CreateJob. - * @function createJob - * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService - * @instance - * @param {google.cloud.video.transcoder.v1beta1.ICreateJobRequest} request CreateJobRequest message or plain object - * @param {google.cloud.video.transcoder.v1beta1.TranscoderService.CreateJobCallback} callback Node-style callback called with the error, if any, and Job - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TranscoderService.prototype.createJob = function createJob(request, callback) { - return this.rpcCall(createJob, $root.google.cloud.video.transcoder.v1beta1.CreateJobRequest, $root.google.cloud.video.transcoder.v1beta1.Job, request, callback); - }, "name", { value: "CreateJob" }); - - /** - * Calls CreateJob. - * @function createJob - * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService - * @instance - * @param {google.cloud.video.transcoder.v1beta1.ICreateJobRequest} request CreateJobRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#listJobs}. - * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService - * @typedef ListJobsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.video.transcoder.v1beta1.ListJobsResponse} [response] ListJobsResponse - */ - - /** - * Calls ListJobs. - * @function listJobs - * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService - * @instance - * @param {google.cloud.video.transcoder.v1beta1.IListJobsRequest} request ListJobsRequest message or plain object - * @param {google.cloud.video.transcoder.v1beta1.TranscoderService.ListJobsCallback} callback Node-style callback called with the error, if any, and ListJobsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TranscoderService.prototype.listJobs = function listJobs(request, callback) { - return this.rpcCall(listJobs, $root.google.cloud.video.transcoder.v1beta1.ListJobsRequest, $root.google.cloud.video.transcoder.v1beta1.ListJobsResponse, request, callback); - }, "name", { value: "ListJobs" }); - - /** - * Calls ListJobs. - * @function listJobs - * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService - * @instance - * @param {google.cloud.video.transcoder.v1beta1.IListJobsRequest} request ListJobsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#getJob}. - * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService - * @typedef GetJobCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.video.transcoder.v1beta1.Job} [response] Job - */ - - /** - * Calls GetJob. - * @function getJob - * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService - * @instance - * @param {google.cloud.video.transcoder.v1beta1.IGetJobRequest} request GetJobRequest message or plain object - * @param {google.cloud.video.transcoder.v1beta1.TranscoderService.GetJobCallback} callback Node-style callback called with the error, if any, and Job - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TranscoderService.prototype.getJob = function getJob(request, callback) { - return this.rpcCall(getJob, $root.google.cloud.video.transcoder.v1beta1.GetJobRequest, $root.google.cloud.video.transcoder.v1beta1.Job, request, callback); - }, "name", { value: "GetJob" }); - - /** - * Calls GetJob. - * @function getJob - * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService - * @instance - * @param {google.cloud.video.transcoder.v1beta1.IGetJobRequest} request GetJobRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#deleteJob}. - * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService - * @typedef DeleteJobCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteJob. - * @function deleteJob - * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService - * @instance - * @param {google.cloud.video.transcoder.v1beta1.IDeleteJobRequest} request DeleteJobRequest message or plain object - * @param {google.cloud.video.transcoder.v1beta1.TranscoderService.DeleteJobCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TranscoderService.prototype.deleteJob = function deleteJob(request, callback) { - return this.rpcCall(deleteJob, $root.google.cloud.video.transcoder.v1beta1.DeleteJobRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteJob" }); - - /** - * Calls DeleteJob. - * @function deleteJob - * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService - * @instance - * @param {google.cloud.video.transcoder.v1beta1.IDeleteJobRequest} request DeleteJobRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#createJobTemplate}. - * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService - * @typedef CreateJobTemplateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.video.transcoder.v1beta1.JobTemplate} [response] JobTemplate - */ - - /** - * Calls CreateJobTemplate. - * @function createJobTemplate - * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService - * @instance - * @param {google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest} request CreateJobTemplateRequest message or plain object - * @param {google.cloud.video.transcoder.v1beta1.TranscoderService.CreateJobTemplateCallback} callback Node-style callback called with the error, if any, and JobTemplate - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TranscoderService.prototype.createJobTemplate = function createJobTemplate(request, callback) { - return this.rpcCall(createJobTemplate, $root.google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest, $root.google.cloud.video.transcoder.v1beta1.JobTemplate, request, callback); - }, "name", { value: "CreateJobTemplate" }); - - /** - * Calls CreateJobTemplate. - * @function createJobTemplate - * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService - * @instance - * @param {google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest} request CreateJobTemplateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#listJobTemplates}. - * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService - * @typedef ListJobTemplatesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse} [response] ListJobTemplatesResponse - */ - - /** - * Calls ListJobTemplates. - * @function listJobTemplates - * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService - * @instance - * @param {google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest} request ListJobTemplatesRequest message or plain object - * @param {google.cloud.video.transcoder.v1beta1.TranscoderService.ListJobTemplatesCallback} callback Node-style callback called with the error, if any, and ListJobTemplatesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TranscoderService.prototype.listJobTemplates = function listJobTemplates(request, callback) { - return this.rpcCall(listJobTemplates, $root.google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest, $root.google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse, request, callback); - }, "name", { value: "ListJobTemplates" }); - - /** - * Calls ListJobTemplates. - * @function listJobTemplates - * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService - * @instance - * @param {google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest} request ListJobTemplatesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#getJobTemplate}. - * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService - * @typedef GetJobTemplateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.video.transcoder.v1beta1.JobTemplate} [response] JobTemplate - */ - - /** - * Calls GetJobTemplate. - * @function getJobTemplate - * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService - * @instance - * @param {google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest} request GetJobTemplateRequest message or plain object - * @param {google.cloud.video.transcoder.v1beta1.TranscoderService.GetJobTemplateCallback} callback Node-style callback called with the error, if any, and JobTemplate - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TranscoderService.prototype.getJobTemplate = function getJobTemplate(request, callback) { - return this.rpcCall(getJobTemplate, $root.google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest, $root.google.cloud.video.transcoder.v1beta1.JobTemplate, request, callback); - }, "name", { value: "GetJobTemplate" }); - - /** - * Calls GetJobTemplate. - * @function getJobTemplate - * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService - * @instance - * @param {google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest} request GetJobTemplateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.video.transcoder.v1beta1.TranscoderService#deleteJobTemplate}. - * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService - * @typedef DeleteJobTemplateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteJobTemplate. - * @function deleteJobTemplate - * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService - * @instance - * @param {google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest} request DeleteJobTemplateRequest message or plain object - * @param {google.cloud.video.transcoder.v1beta1.TranscoderService.DeleteJobTemplateCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TranscoderService.prototype.deleteJobTemplate = function deleteJobTemplate(request, callback) { - return this.rpcCall(deleteJobTemplate, $root.google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteJobTemplate" }); - - /** - * Calls DeleteJobTemplate. - * @function deleteJobTemplate - * @memberof google.cloud.video.transcoder.v1beta1.TranscoderService - * @instance - * @param {google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest} request DeleteJobTemplateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return TranscoderService; - })(); - - v1beta1.CreateJobRequest = (function() { - - /** - * Properties of a CreateJobRequest. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface ICreateJobRequest - * @property {string|null} [parent] CreateJobRequest parent - * @property {google.cloud.video.transcoder.v1beta1.IJob|null} [job] CreateJobRequest job - */ - - /** - * Constructs a new CreateJobRequest. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents a CreateJobRequest. - * @implements ICreateJobRequest - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.ICreateJobRequest=} [properties] Properties to set - */ - function CreateJobRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateJobRequest parent. - * @member {string} parent - * @memberof google.cloud.video.transcoder.v1beta1.CreateJobRequest - * @instance - */ - CreateJobRequest.prototype.parent = ""; - - /** - * CreateJobRequest job. - * @member {google.cloud.video.transcoder.v1beta1.IJob|null|undefined} job - * @memberof google.cloud.video.transcoder.v1beta1.CreateJobRequest - * @instance - */ - CreateJobRequest.prototype.job = null; - - /** - * Creates a new CreateJobRequest instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.CreateJobRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.ICreateJobRequest=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.CreateJobRequest} CreateJobRequest instance - */ - CreateJobRequest.create = function create(properties) { - return new CreateJobRequest(properties); - }; - - /** - * Encodes the specified CreateJobRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.CreateJobRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.CreateJobRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.ICreateJobRequest} message CreateJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateJobRequest.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.job != null && Object.hasOwnProperty.call(message, "job")) - $root.google.cloud.video.transcoder.v1beta1.Job.encode(message.job, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateJobRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.CreateJobRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.CreateJobRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.ICreateJobRequest} message CreateJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateJobRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateJobRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.CreateJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.CreateJobRequest} CreateJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateJobRequest.decode = function 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.transcoder.v1beta1.CreateJobRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.job = $root.google.cloud.video.transcoder.v1beta1.Job.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateJobRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.CreateJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.CreateJobRequest} CreateJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateJobRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateJobRequest message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.CreateJobRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateJobRequest.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.job != null && message.hasOwnProperty("job")) { - var error = $root.google.cloud.video.transcoder.v1beta1.Job.verify(message.job); - if (error) - return "job." + error; - } - return null; - }; - - /** - * Creates a CreateJobRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.CreateJobRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.CreateJobRequest} CreateJobRequest - */ - CreateJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.CreateJobRequest) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.CreateJobRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.job != null) { - if (typeof object.job !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.CreateJobRequest.job: object expected"); - message.job = $root.google.cloud.video.transcoder.v1beta1.Job.fromObject(object.job); - } - return message; - }; - - /** - * Creates a plain object from a CreateJobRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.CreateJobRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.CreateJobRequest} message CreateJobRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateJobRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.job = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.job != null && message.hasOwnProperty("job")) - object.job = $root.google.cloud.video.transcoder.v1beta1.Job.toObject(message.job, options); - return object; - }; - - /** - * Converts this CreateJobRequest to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.CreateJobRequest - * @instance - * @returns {Object.} JSON object - */ - CreateJobRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CreateJobRequest; - })(); - - v1beta1.ListJobsRequest = (function() { - - /** - * Properties of a ListJobsRequest. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface IListJobsRequest - * @property {string|null} [parent] ListJobsRequest parent - * @property {number|null} [pageSize] ListJobsRequest pageSize - * @property {string|null} [pageToken] ListJobsRequest pageToken - */ - - /** - * Constructs a new ListJobsRequest. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents a ListJobsRequest. - * @implements IListJobsRequest - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.IListJobsRequest=} [properties] Properties to set - */ - function ListJobsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListJobsRequest parent. - * @member {string} parent - * @memberof google.cloud.video.transcoder.v1beta1.ListJobsRequest - * @instance - */ - ListJobsRequest.prototype.parent = ""; - - /** - * ListJobsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.video.transcoder.v1beta1.ListJobsRequest - * @instance - */ - ListJobsRequest.prototype.pageSize = 0; - - /** - * ListJobsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.video.transcoder.v1beta1.ListJobsRequest - * @instance - */ - ListJobsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListJobsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.ListJobsRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.IListJobsRequest=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.ListJobsRequest} ListJobsRequest instance - */ - ListJobsRequest.create = function create(properties) { - return new ListJobsRequest(properties); - }; - - /** - * Encodes the specified ListJobsRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.ListJobsRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.IListJobsRequest} message ListJobsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListJobsRequest.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 ListJobsRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.ListJobsRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.IListJobsRequest} message ListJobsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListJobsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListJobsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.ListJobsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.ListJobsRequest} ListJobsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListJobsRequest.decode = function 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.transcoder.v1beta1.ListJobsRequest(); - 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 ListJobsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.ListJobsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.ListJobsRequest} ListJobsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListJobsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListJobsRequest message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.ListJobsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListJobsRequest.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 ListJobsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.ListJobsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.ListJobsRequest} ListJobsRequest - */ - ListJobsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.ListJobsRequest) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.ListJobsRequest(); - 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 ListJobsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.ListJobsRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.ListJobsRequest} message ListJobsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListJobsRequest.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 ListJobsRequest to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.ListJobsRequest - * @instance - * @returns {Object.} JSON object - */ - ListJobsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListJobsRequest; - })(); - - v1beta1.GetJobRequest = (function() { - - /** - * Properties of a GetJobRequest. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface IGetJobRequest - * @property {string|null} [name] GetJobRequest name - */ - - /** - * Constructs a new GetJobRequest. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents a GetJobRequest. - * @implements IGetJobRequest - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.IGetJobRequest=} [properties] Properties to set - */ - function GetJobRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetJobRequest name. - * @member {string} name - * @memberof google.cloud.video.transcoder.v1beta1.GetJobRequest - * @instance - */ - GetJobRequest.prototype.name = ""; - - /** - * Creates a new GetJobRequest instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.GetJobRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.IGetJobRequest=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.GetJobRequest} GetJobRequest instance - */ - GetJobRequest.create = function create(properties) { - return new GetJobRequest(properties); - }; - - /** - * Encodes the specified GetJobRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.GetJobRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.GetJobRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.IGetJobRequest} message GetJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetJobRequest.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 GetJobRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.GetJobRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.GetJobRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.IGetJobRequest} message GetJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetJobRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetJobRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.GetJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.GetJobRequest} GetJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetJobRequest.decode = function 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.transcoder.v1beta1.GetJobRequest(); - 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 GetJobRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.GetJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.GetJobRequest} GetJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetJobRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetJobRequest message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.GetJobRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetJobRequest.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 GetJobRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.GetJobRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.GetJobRequest} GetJobRequest - */ - GetJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.GetJobRequest) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.GetJobRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetJobRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.GetJobRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.GetJobRequest} message GetJobRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetJobRequest.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 GetJobRequest to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.GetJobRequest - * @instance - * @returns {Object.} JSON object - */ - GetJobRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetJobRequest; - })(); - - v1beta1.DeleteJobRequest = (function() { - - /** - * Properties of a DeleteJobRequest. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface IDeleteJobRequest - * @property {string|null} [name] DeleteJobRequest name - */ - - /** - * Constructs a new DeleteJobRequest. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents a DeleteJobRequest. - * @implements IDeleteJobRequest - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.IDeleteJobRequest=} [properties] Properties to set - */ - function DeleteJobRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteJobRequest name. - * @member {string} name - * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobRequest - * @instance - */ - DeleteJobRequest.prototype.name = ""; - - /** - * Creates a new DeleteJobRequest instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.IDeleteJobRequest=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.DeleteJobRequest} DeleteJobRequest instance - */ - DeleteJobRequest.create = function create(properties) { - return new DeleteJobRequest(properties); - }; - - /** - * Encodes the specified DeleteJobRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.DeleteJobRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.IDeleteJobRequest} message DeleteJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteJobRequest.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 DeleteJobRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.DeleteJobRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.IDeleteJobRequest} message DeleteJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteJobRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteJobRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.DeleteJobRequest} DeleteJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteJobRequest.decode = function 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.transcoder.v1beta1.DeleteJobRequest(); - 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 DeleteJobRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.DeleteJobRequest} DeleteJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteJobRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteJobRequest message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteJobRequest.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 DeleteJobRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.DeleteJobRequest} DeleteJobRequest - */ - DeleteJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.DeleteJobRequest) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.DeleteJobRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteJobRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.DeleteJobRequest} message DeleteJobRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteJobRequest.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 DeleteJobRequest to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteJobRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DeleteJobRequest; - })(); - - v1beta1.ListJobsResponse = (function() { - - /** - * Properties of a ListJobsResponse. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface IListJobsResponse - * @property {Array.|null} [jobs] ListJobsResponse jobs - * @property {string|null} [nextPageToken] ListJobsResponse nextPageToken - */ - - /** - * Constructs a new ListJobsResponse. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents a ListJobsResponse. - * @implements IListJobsResponse - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.IListJobsResponse=} [properties] Properties to set - */ - function ListJobsResponse(properties) { - this.jobs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListJobsResponse jobs. - * @member {Array.} jobs - * @memberof google.cloud.video.transcoder.v1beta1.ListJobsResponse - * @instance - */ - ListJobsResponse.prototype.jobs = $util.emptyArray; - - /** - * ListJobsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.video.transcoder.v1beta1.ListJobsResponse - * @instance - */ - ListJobsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListJobsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.ListJobsResponse - * @static - * @param {google.cloud.video.transcoder.v1beta1.IListJobsResponse=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.ListJobsResponse} ListJobsResponse instance - */ - ListJobsResponse.create = function create(properties) { - return new ListJobsResponse(properties); - }; - - /** - * Encodes the specified ListJobsResponse message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.ListJobsResponse - * @static - * @param {google.cloud.video.transcoder.v1beta1.IListJobsResponse} message ListJobsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListJobsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.jobs != null && message.jobs.length) - for (var i = 0; i < message.jobs.length; ++i) - $root.google.cloud.video.transcoder.v1beta1.Job.encode(message.jobs[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 ListJobsResponse message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.ListJobsResponse - * @static - * @param {google.cloud.video.transcoder.v1beta1.IListJobsResponse} message ListJobsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListJobsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListJobsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.ListJobsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.ListJobsResponse} ListJobsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListJobsResponse.decode = function 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.transcoder.v1beta1.ListJobsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.jobs && message.jobs.length)) - message.jobs = []; - message.jobs.push($root.google.cloud.video.transcoder.v1beta1.Job.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListJobsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.ListJobsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.ListJobsResponse} ListJobsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListJobsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListJobsResponse message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.ListJobsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListJobsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.jobs != null && message.hasOwnProperty("jobs")) { - if (!Array.isArray(message.jobs)) - return "jobs: array expected"; - for (var i = 0; i < message.jobs.length; ++i) { - var error = $root.google.cloud.video.transcoder.v1beta1.Job.verify(message.jobs[i]); - if (error) - return "jobs." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListJobsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.ListJobsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.ListJobsResponse} ListJobsResponse - */ - ListJobsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.ListJobsResponse) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.ListJobsResponse(); - if (object.jobs) { - if (!Array.isArray(object.jobs)) - throw TypeError(".google.cloud.video.transcoder.v1beta1.ListJobsResponse.jobs: array expected"); - message.jobs = []; - for (var i = 0; i < object.jobs.length; ++i) { - if (typeof object.jobs[i] !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.ListJobsResponse.jobs: object expected"); - message.jobs[i] = $root.google.cloud.video.transcoder.v1beta1.Job.fromObject(object.jobs[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListJobsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.ListJobsResponse - * @static - * @param {google.cloud.video.transcoder.v1beta1.ListJobsResponse} message ListJobsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListJobsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.jobs = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.jobs && message.jobs.length) { - object.jobs = []; - for (var j = 0; j < message.jobs.length; ++j) - object.jobs[j] = $root.google.cloud.video.transcoder.v1beta1.Job.toObject(message.jobs[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListJobsResponse to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.ListJobsResponse - * @instance - * @returns {Object.} JSON object - */ - ListJobsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListJobsResponse; - })(); - - v1beta1.CreateJobTemplateRequest = (function() { - - /** - * Properties of a CreateJobTemplateRequest. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface ICreateJobTemplateRequest - * @property {string|null} [parent] CreateJobTemplateRequest parent - * @property {google.cloud.video.transcoder.v1beta1.IJobTemplate|null} [jobTemplate] CreateJobTemplateRequest jobTemplate - * @property {string|null} [jobTemplateId] CreateJobTemplateRequest jobTemplateId - */ - - /** - * Constructs a new CreateJobTemplateRequest. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents a CreateJobTemplateRequest. - * @implements ICreateJobTemplateRequest - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest=} [properties] Properties to set - */ - function CreateJobTemplateRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateJobTemplateRequest parent. - * @member {string} parent - * @memberof google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest - * @instance - */ - CreateJobTemplateRequest.prototype.parent = ""; - - /** - * CreateJobTemplateRequest jobTemplate. - * @member {google.cloud.video.transcoder.v1beta1.IJobTemplate|null|undefined} jobTemplate - * @memberof google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest - * @instance - */ - CreateJobTemplateRequest.prototype.jobTemplate = null; - - /** - * CreateJobTemplateRequest jobTemplateId. - * @member {string} jobTemplateId - * @memberof google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest - * @instance - */ - CreateJobTemplateRequest.prototype.jobTemplateId = ""; - - /** - * Creates a new CreateJobTemplateRequest instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest} CreateJobTemplateRequest instance - */ - CreateJobTemplateRequest.create = function create(properties) { - return new CreateJobTemplateRequest(properties); - }; - - /** - * Encodes the specified CreateJobTemplateRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest} message CreateJobTemplateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateJobTemplateRequest.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.jobTemplate != null && Object.hasOwnProperty.call(message, "jobTemplate")) - $root.google.cloud.video.transcoder.v1beta1.JobTemplate.encode(message.jobTemplate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.jobTemplateId != null && Object.hasOwnProperty.call(message, "jobTemplateId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.jobTemplateId); - return writer; - }; - - /** - * Encodes the specified CreateJobTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest} message CreateJobTemplateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateJobTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateJobTemplateRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest} CreateJobTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateJobTemplateRequest.decode = function 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.transcoder.v1beta1.CreateJobTemplateRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.jobTemplate = $root.google.cloud.video.transcoder.v1beta1.JobTemplate.decode(reader, reader.uint32()); - break; - case 3: - message.jobTemplateId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateJobTemplateRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest} CreateJobTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateJobTemplateRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateJobTemplateRequest message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateJobTemplateRequest.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.jobTemplate != null && message.hasOwnProperty("jobTemplate")) { - var error = $root.google.cloud.video.transcoder.v1beta1.JobTemplate.verify(message.jobTemplate); - if (error) - return "jobTemplate." + error; - } - if (message.jobTemplateId != null && message.hasOwnProperty("jobTemplateId")) - if (!$util.isString(message.jobTemplateId)) - return "jobTemplateId: string expected"; - return null; - }; - - /** - * Creates a CreateJobTemplateRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest} CreateJobTemplateRequest - */ - CreateJobTemplateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.jobTemplate != null) { - if (typeof object.jobTemplate !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest.jobTemplate: object expected"); - message.jobTemplate = $root.google.cloud.video.transcoder.v1beta1.JobTemplate.fromObject(object.jobTemplate); - } - if (object.jobTemplateId != null) - message.jobTemplateId = String(object.jobTemplateId); - return message; - }; - - /** - * Creates a plain object from a CreateJobTemplateRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest} message CreateJobTemplateRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateJobTemplateRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.jobTemplate = null; - object.jobTemplateId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.jobTemplate != null && message.hasOwnProperty("jobTemplate")) - object.jobTemplate = $root.google.cloud.video.transcoder.v1beta1.JobTemplate.toObject(message.jobTemplate, options); - if (message.jobTemplateId != null && message.hasOwnProperty("jobTemplateId")) - object.jobTemplateId = message.jobTemplateId; - return object; - }; - - /** - * Converts this CreateJobTemplateRequest to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest - * @instance - * @returns {Object.} JSON object - */ - CreateJobTemplateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CreateJobTemplateRequest; - })(); - - v1beta1.ListJobTemplatesRequest = (function() { - - /** - * Properties of a ListJobTemplatesRequest. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface IListJobTemplatesRequest - * @property {string|null} [parent] ListJobTemplatesRequest parent - * @property {number|null} [pageSize] ListJobTemplatesRequest pageSize - * @property {string|null} [pageToken] ListJobTemplatesRequest pageToken - */ - - /** - * Constructs a new ListJobTemplatesRequest. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents a ListJobTemplatesRequest. - * @implements IListJobTemplatesRequest - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest=} [properties] Properties to set - */ - function ListJobTemplatesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListJobTemplatesRequest parent. - * @member {string} parent - * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest - * @instance - */ - ListJobTemplatesRequest.prototype.parent = ""; - - /** - * ListJobTemplatesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest - * @instance - */ - ListJobTemplatesRequest.prototype.pageSize = 0; - - /** - * ListJobTemplatesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest - * @instance - */ - ListJobTemplatesRequest.prototype.pageToken = ""; - - /** - * Creates a new ListJobTemplatesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest} ListJobTemplatesRequest instance - */ - ListJobTemplatesRequest.create = function create(properties) { - return new ListJobTemplatesRequest(properties); - }; - - /** - * Encodes the specified ListJobTemplatesRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest} message ListJobTemplatesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListJobTemplatesRequest.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 ListJobTemplatesRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest} message ListJobTemplatesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListJobTemplatesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListJobTemplatesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest} ListJobTemplatesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListJobTemplatesRequest.decode = function 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.transcoder.v1beta1.ListJobTemplatesRequest(); - 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 ListJobTemplatesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest} ListJobTemplatesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListJobTemplatesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListJobTemplatesRequest message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListJobTemplatesRequest.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 ListJobTemplatesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest} ListJobTemplatesRequest - */ - ListJobTemplatesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest(); - 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 ListJobTemplatesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest} message ListJobTemplatesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListJobTemplatesRequest.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 ListJobTemplatesRequest to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest - * @instance - * @returns {Object.} JSON object - */ - ListJobTemplatesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListJobTemplatesRequest; - })(); - - v1beta1.GetJobTemplateRequest = (function() { - - /** - * Properties of a GetJobTemplateRequest. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface IGetJobTemplateRequest - * @property {string|null} [name] GetJobTemplateRequest name - */ - - /** - * Constructs a new GetJobTemplateRequest. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents a GetJobTemplateRequest. - * @implements IGetJobTemplateRequest - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest=} [properties] Properties to set - */ - function GetJobTemplateRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetJobTemplateRequest name. - * @member {string} name - * @memberof google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest - * @instance - */ - GetJobTemplateRequest.prototype.name = ""; - - /** - * Creates a new GetJobTemplateRequest instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest} GetJobTemplateRequest instance - */ - GetJobTemplateRequest.create = function create(properties) { - return new GetJobTemplateRequest(properties); - }; - - /** - * Encodes the specified GetJobTemplateRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest} message GetJobTemplateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetJobTemplateRequest.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 GetJobTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest} message GetJobTemplateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetJobTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetJobTemplateRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest} GetJobTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetJobTemplateRequest.decode = function 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.transcoder.v1beta1.GetJobTemplateRequest(); - 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 GetJobTemplateRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest} GetJobTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetJobTemplateRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetJobTemplateRequest message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetJobTemplateRequest.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 GetJobTemplateRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest} GetJobTemplateRequest - */ - GetJobTemplateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetJobTemplateRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest} message GetJobTemplateRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetJobTemplateRequest.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 GetJobTemplateRequest to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest - * @instance - * @returns {Object.} JSON object - */ - GetJobTemplateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetJobTemplateRequest; - })(); - - v1beta1.DeleteJobTemplateRequest = (function() { - - /** - * Properties of a DeleteJobTemplateRequest. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface IDeleteJobTemplateRequest - * @property {string|null} [name] DeleteJobTemplateRequest name - */ - - /** - * Constructs a new DeleteJobTemplateRequest. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents a DeleteJobTemplateRequest. - * @implements IDeleteJobTemplateRequest - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest=} [properties] Properties to set - */ - function DeleteJobTemplateRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteJobTemplateRequest name. - * @member {string} name - * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest - * @instance - */ - DeleteJobTemplateRequest.prototype.name = ""; - - /** - * Creates a new DeleteJobTemplateRequest instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest} DeleteJobTemplateRequest instance - */ - DeleteJobTemplateRequest.create = function create(properties) { - return new DeleteJobTemplateRequest(properties); - }; - - /** - * Encodes the specified DeleteJobTemplateRequest message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest} message DeleteJobTemplateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteJobTemplateRequest.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 DeleteJobTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest} message DeleteJobTemplateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteJobTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteJobTemplateRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest} DeleteJobTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteJobTemplateRequest.decode = function 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.transcoder.v1beta1.DeleteJobTemplateRequest(); - 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 DeleteJobTemplateRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest} DeleteJobTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteJobTemplateRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteJobTemplateRequest message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteJobTemplateRequest.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 DeleteJobTemplateRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest} DeleteJobTemplateRequest - */ - DeleteJobTemplateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteJobTemplateRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest - * @static - * @param {google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest} message DeleteJobTemplateRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteJobTemplateRequest.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 DeleteJobTemplateRequest to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteJobTemplateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DeleteJobTemplateRequest; - })(); - - v1beta1.ListJobTemplatesResponse = (function() { - - /** - * Properties of a ListJobTemplatesResponse. - * @memberof google.cloud.video.transcoder.v1beta1 - * @interface IListJobTemplatesResponse - * @property {Array.|null} [jobTemplates] ListJobTemplatesResponse jobTemplates - * @property {string|null} [nextPageToken] ListJobTemplatesResponse nextPageToken - */ - - /** - * Constructs a new ListJobTemplatesResponse. - * @memberof google.cloud.video.transcoder.v1beta1 - * @classdesc Represents a ListJobTemplatesResponse. - * @implements IListJobTemplatesResponse - * @constructor - * @param {google.cloud.video.transcoder.v1beta1.IListJobTemplatesResponse=} [properties] Properties to set - */ - function ListJobTemplatesResponse(properties) { - this.jobTemplates = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListJobTemplatesResponse jobTemplates. - * @member {Array.} jobTemplates - * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse - * @instance - */ - ListJobTemplatesResponse.prototype.jobTemplates = $util.emptyArray; - - /** - * ListJobTemplatesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse - * @instance - */ - ListJobTemplatesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListJobTemplatesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse - * @static - * @param {google.cloud.video.transcoder.v1beta1.IListJobTemplatesResponse=} [properties] Properties to set - * @returns {google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse} ListJobTemplatesResponse instance - */ - ListJobTemplatesResponse.create = function create(properties) { - return new ListJobTemplatesResponse(properties); - }; - - /** - * Encodes the specified ListJobTemplatesResponse message. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse - * @static - * @param {google.cloud.video.transcoder.v1beta1.IListJobTemplatesResponse} message ListJobTemplatesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListJobTemplatesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.jobTemplates != null && message.jobTemplates.length) - for (var i = 0; i < message.jobTemplates.length; ++i) - $root.google.cloud.video.transcoder.v1beta1.JobTemplate.encode(message.jobTemplates[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 ListJobTemplatesResponse message, length delimited. Does not implicitly {@link google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse - * @static - * @param {google.cloud.video.transcoder.v1beta1.IListJobTemplatesResponse} message ListJobTemplatesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListJobTemplatesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListJobTemplatesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse} ListJobTemplatesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListJobTemplatesResponse.decode = function 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.transcoder.v1beta1.ListJobTemplatesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.jobTemplates && message.jobTemplates.length)) - message.jobTemplates = []; - message.jobTemplates.push($root.google.cloud.video.transcoder.v1beta1.JobTemplate.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListJobTemplatesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse} ListJobTemplatesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListJobTemplatesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListJobTemplatesResponse message. - * @function verify - * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListJobTemplatesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.jobTemplates != null && message.hasOwnProperty("jobTemplates")) { - if (!Array.isArray(message.jobTemplates)) - return "jobTemplates: array expected"; - for (var i = 0; i < message.jobTemplates.length; ++i) { - var error = $root.google.cloud.video.transcoder.v1beta1.JobTemplate.verify(message.jobTemplates[i]); - if (error) - return "jobTemplates." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListJobTemplatesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse} ListJobTemplatesResponse - */ - ListJobTemplatesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse) - return object; - var message = new $root.google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse(); - if (object.jobTemplates) { - if (!Array.isArray(object.jobTemplates)) - throw TypeError(".google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse.jobTemplates: array expected"); - message.jobTemplates = []; - for (var i = 0; i < object.jobTemplates.length; ++i) { - if (typeof object.jobTemplates[i] !== "object") - throw TypeError(".google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse.jobTemplates: object expected"); - message.jobTemplates[i] = $root.google.cloud.video.transcoder.v1beta1.JobTemplate.fromObject(object.jobTemplates[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListJobTemplatesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse - * @static - * @param {google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse} message ListJobTemplatesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListJobTemplatesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.jobTemplates = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.jobTemplates && message.jobTemplates.length) { - object.jobTemplates = []; - for (var j = 0; j < message.jobTemplates.length; ++j) - object.jobTemplates[j] = $root.google.cloud.video.transcoder.v1beta1.JobTemplate.toObject(message.jobTemplates[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListJobTemplatesResponse to JSON. - * @function toJSON - * @memberof google.cloud.video.transcoder.v1beta1.ListJobTemplatesResponse - * @instance - * @returns {Object.} JSON object - */ - ListJobTemplatesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListJobTemplatesResponse; - })(); - - return v1beta1; - })(); - return transcoder; })(); diff --git a/packages/google-cloud-video-transcoder/protos/protos.json b/packages/google-cloud-video-transcoder/protos/protos.json index b1737a7d5f1..c599cee9fc7 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.json +++ b/packages/google-cloud-video-transcoder/protos/protos.json @@ -1401,1373 +1401,6 @@ } } } - }, - "v1beta1": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/cloud/video/transcoder/v1beta1;transcoder", - "java_multiple_files": true, - "java_outer_classname": "ServicesProto", - "java_package": "com.google.cloud.video.transcoder.v1beta1" - }, - "nested": { - "Job": { - "options": { - "(google.api.resource).type": "transcoder.googleapis.com/Job", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/jobs/{job}" - }, - "oneofs": { - "jobConfig": { - "oneof": [ - "templateId", - "config" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "inputUri": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "INPUT_ONLY" - } - }, - "outputUri": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "INPUT_ONLY" - } - }, - "templateId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "INPUT_ONLY" - } - }, - "config": { - "type": "JobConfig", - "id": 5 - }, - "priority": { - "type": "int32", - "id": 6 - }, - "originUri": { - "type": "OriginUri", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "state": { - "type": "ProcessingState", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "progress": { - "type": "Progress", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "failureReason": { - "type": "string", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "failureDetails": { - "rule": "repeated", - "type": "FailureDetail", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 12, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 13, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 14, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "ttlAfterCompletionDays": { - "type": "int32", - "id": 15 - } - }, - "nested": { - "OriginUri": { - "fields": { - "hls": { - "type": "string", - "id": 1 - }, - "dash": { - "type": "string", - "id": 2 - } - } - }, - "ProcessingState": { - "values": { - "PROCESSING_STATE_UNSPECIFIED": 0, - "PENDING": 1, - "RUNNING": 2, - "SUCCEEDED": 3, - "FAILED": 4 - } - } - } - }, - "JobTemplate": { - "options": { - "(google.api.resource).type": "transcoder.googleapis.com/JobTemplate", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/jobTemplates/{job_template}" - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "config": { - "type": "JobConfig", - "id": 2 - } - } - }, - "JobConfig": { - "fields": { - "inputs": { - "rule": "repeated", - "type": "Input", - "id": 1 - }, - "editList": { - "rule": "repeated", - "type": "EditAtom", - "id": 2 - }, - "elementaryStreams": { - "rule": "repeated", - "type": "ElementaryStream", - "id": 3 - }, - "muxStreams": { - "rule": "repeated", - "type": "MuxStream", - "id": 4 - }, - "manifests": { - "rule": "repeated", - "type": "Manifest", - "id": 5 - }, - "output": { - "type": "Output", - "id": 6 - }, - "adBreaks": { - "rule": "repeated", - "type": "AdBreak", - "id": 7 - }, - "pubsubDestination": { - "type": "PubsubDestination", - "id": 8 - }, - "spriteSheets": { - "rule": "repeated", - "type": "SpriteSheet", - "id": 9 - }, - "overlays": { - "rule": "repeated", - "type": "Overlay", - "id": 10 - } - } - }, - "Input": { - "fields": { - "key": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "preprocessingConfig": { - "type": "PreprocessingConfig", - "id": 3 - } - } - }, - "Output": { - "fields": { - "uri": { - "type": "string", - "id": 1 - } - } - }, - "EditAtom": { - "fields": { - "key": { - "type": "string", - "id": 1 - }, - "inputs": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "endTimeOffset": { - "type": "google.protobuf.Duration", - "id": 3 - }, - "startTimeOffset": { - "type": "google.protobuf.Duration", - "id": 4 - } - } - }, - "AdBreak": { - "fields": { - "startTimeOffset": { - "type": "google.protobuf.Duration", - "id": 1 - } - } - }, - "ElementaryStream": { - "oneofs": { - "elementaryStream": { - "oneof": [ - "videoStream", - "audioStream", - "textStream" - ] - } - }, - "fields": { - "key": { - "type": "string", - "id": 4 - }, - "videoStream": { - "type": "VideoStream", - "id": 1 - }, - "audioStream": { - "type": "AudioStream", - "id": 2 - }, - "textStream": { - "type": "TextStream", - "id": 3 - } - } - }, - "MuxStream": { - "fields": { - "key": { - "type": "string", - "id": 1 - }, - "fileName": { - "type": "string", - "id": 2 - }, - "container": { - "type": "string", - "id": 3 - }, - "elementaryStreams": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "segmentSettings": { - "type": "SegmentSettings", - "id": 5 - }, - "encryption": { - "type": "Encryption", - "id": 6 - } - } - }, - "Manifest": { - "fields": { - "fileName": { - "type": "string", - "id": 1 - }, - "type": { - "type": "ManifestType", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "muxStreams": { - "rule": "repeated", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - }, - "nested": { - "ManifestType": { - "values": { - "MANIFEST_TYPE_UNSPECIFIED": 0, - "HLS": 1, - "DASH": 2 - } - } - } - }, - "PubsubDestination": { - "fields": { - "topic": { - "type": "string", - "id": 1 - } - } - }, - "SpriteSheet": { - "oneofs": { - "extractionStrategy": { - "oneof": [ - "totalCount", - "interval" - ] - } - }, - "fields": { - "format": { - "type": "string", - "id": 1 - }, - "filePrefix": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "spriteWidthPixels": { - "type": "int32", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "spriteHeightPixels": { - "type": "int32", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "columnCount": { - "type": "int32", - "id": 5 - }, - "rowCount": { - "type": "int32", - "id": 6 - }, - "startTimeOffset": { - "type": "google.protobuf.Duration", - "id": 7 - }, - "endTimeOffset": { - "type": "google.protobuf.Duration", - "id": 8 - }, - "totalCount": { - "type": "int32", - "id": 9 - }, - "interval": { - "type": "google.protobuf.Duration", - "id": 10 - }, - "quality": { - "type": "int32", - "id": 11 - } - } - }, - "Overlay": { - "fields": { - "image": { - "type": "Image", - "id": 1 - }, - "animations": { - "rule": "repeated", - "type": "Animation", - "id": 2 - } - }, - "nested": { - "NormalizedCoordinate": { - "fields": { - "x": { - "type": "double", - "id": 1 - }, - "y": { - "type": "double", - "id": 2 - } - } - }, - "Image": { - "fields": { - "uri": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "resolution": { - "type": "NormalizedCoordinate", - "id": 2 - }, - "alpha": { - "type": "double", - "id": 3 - } - } - }, - "AnimationStatic": { - "fields": { - "xy": { - "type": "NormalizedCoordinate", - "id": 1 - }, - "startTimeOffset": { - "type": "google.protobuf.Duration", - "id": 2 - } - } - }, - "AnimationFade": { - "fields": { - "fadeType": { - "type": "FadeType", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "xy": { - "type": "NormalizedCoordinate", - "id": 2 - }, - "startTimeOffset": { - "type": "google.protobuf.Duration", - "id": 3 - }, - "endTimeOffset": { - "type": "google.protobuf.Duration", - "id": 4 - } - } - }, - "AnimationEnd": { - "fields": { - "startTimeOffset": { - "type": "google.protobuf.Duration", - "id": 1 - } - } - }, - "Animation": { - "oneofs": { - "animationType": { - "oneof": [ - "animationStatic", - "animationFade", - "animationEnd" - ] - } - }, - "fields": { - "animationStatic": { - "type": "AnimationStatic", - "id": 1 - }, - "animationFade": { - "type": "AnimationFade", - "id": 2 - }, - "animationEnd": { - "type": "AnimationEnd", - "id": 3 - } - } - }, - "FadeType": { - "values": { - "FADE_TYPE_UNSPECIFIED": 0, - "FADE_IN": 1, - "FADE_OUT": 2 - } - } - } - }, - "PreprocessingConfig": { - "fields": { - "color": { - "type": "Color", - "id": 1 - }, - "denoise": { - "type": "Denoise", - "id": 2 - }, - "deblock": { - "type": "Deblock", - "id": 3 - }, - "audio": { - "type": "Audio", - "id": 4 - }, - "crop": { - "type": "Crop", - "id": 5 - }, - "pad": { - "type": "Pad", - "id": 6 - } - }, - "nested": { - "Color": { - "fields": { - "saturation": { - "type": "double", - "id": 1 - }, - "contrast": { - "type": "double", - "id": 2 - }, - "brightness": { - "type": "double", - "id": 3 - } - } - }, - "Denoise": { - "fields": { - "strength": { - "type": "double", - "id": 1 - }, - "tune": { - "type": "string", - "id": 2 - } - } - }, - "Deblock": { - "fields": { - "strength": { - "type": "double", - "id": 1 - }, - "enabled": { - "type": "bool", - "id": 2 - } - } - }, - "Audio": { - "fields": { - "lufs": { - "type": "double", - "id": 1 - }, - "highBoost": { - "type": "bool", - "id": 2 - }, - "lowBoost": { - "type": "bool", - "id": 3 - } - } - }, - "Crop": { - "fields": { - "topPixels": { - "type": "int32", - "id": 1 - }, - "bottomPixels": { - "type": "int32", - "id": 2 - }, - "leftPixels": { - "type": "int32", - "id": 3 - }, - "rightPixels": { - "type": "int32", - "id": 4 - } - } - }, - "Pad": { - "fields": { - "topPixels": { - "type": "int32", - "id": 1 - }, - "bottomPixels": { - "type": "int32", - "id": 2 - }, - "leftPixels": { - "type": "int32", - "id": 3 - }, - "rightPixels": { - "type": "int32", - "id": 4 - } - } - } - } - }, - "VideoStream": { - "oneofs": { - "gopMode": { - "oneof": [ - "gopFrameCount", - "gopDuration" - ] - } - }, - "fields": { - "codec": { - "type": "string", - "id": 1 - }, - "profile": { - "type": "string", - "id": 2 - }, - "tune": { - "type": "string", - "id": 3 - }, - "preset": { - "type": "string", - "id": 4 - }, - "heightPixels": { - "type": "int32", - "id": 5 - }, - "widthPixels": { - "type": "int32", - "id": 6 - }, - "pixelFormat": { - "type": "string", - "id": 7 - }, - "bitrateBps": { - "type": "int32", - "id": 8, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "rateControlMode": { - "type": "string", - "id": 9 - }, - "enableTwoPass": { - "type": "bool", - "id": 10 - }, - "crfLevel": { - "type": "int32", - "id": 11 - }, - "vbvSizeBits": { - "type": "int32", - "id": 12 - }, - "vbvFullnessBits": { - "type": "int32", - "id": 13 - }, - "allowOpenGop": { - "type": "bool", - "id": 14 - }, - "gopFrameCount": { - "type": "int32", - "id": 15 - }, - "gopDuration": { - "type": "google.protobuf.Duration", - "id": 16 - }, - "entropyCoder": { - "type": "string", - "id": 17 - }, - "bPyramid": { - "type": "bool", - "id": 18 - }, - "bFrameCount": { - "type": "int32", - "id": 19 - }, - "frameRate": { - "type": "double", - "id": 20, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "aqStrength": { - "type": "double", - "id": 21 - } - } - }, - "AudioStream": { - "fields": { - "codec": { - "type": "string", - "id": 1 - }, - "bitrateBps": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "channelCount": { - "type": "int32", - "id": 3 - }, - "channelLayout": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "mapping": { - "rule": "repeated", - "type": "AudioAtom", - "id": 5 - }, - "sampleRateHertz": { - "type": "int32", - "id": 6 - } - }, - "nested": { - "AudioAtom": { - "fields": { - "key": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "channels": { - "rule": "repeated", - "type": "AudioChannel", - "id": 2 - } - }, - "nested": { - "AudioChannel": { - "fields": { - "inputs": { - "rule": "repeated", - "type": "AudioChannelInput", - "id": 2 - } - }, - "nested": { - "AudioChannelInput": { - "fields": { - "key": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "track": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "channel": { - "type": "int32", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "gainDb": { - "type": "double", - "id": 4 - } - } - } - } - } - } - } - } - }, - "TextStream": { - "fields": { - "codec": { - "type": "string", - "id": 1 - }, - "languageCode": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "mapping": { - "rule": "repeated", - "type": "TextAtom", - "id": 3 - } - }, - "nested": { - "TextAtom": { - "fields": { - "key": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "inputs": { - "rule": "repeated", - "type": "TextInput", - "id": 2 - } - }, - "nested": { - "TextInput": { - "fields": { - "key": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "track": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - } - } - } - } - }, - "SegmentSettings": { - "fields": { - "segmentDuration": { - "type": "google.protobuf.Duration", - "id": 1 - }, - "individualSegments": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "Encryption": { - "oneofs": { - "encryptionMode": { - "oneof": [ - "aes_128", - "sampleAes", - "mpegCenc" - ] - } - }, - "fields": { - "key": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "iv": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "aes_128": { - "type": "Aes128Encryption", - "id": 3 - }, - "sampleAes": { - "type": "SampleAesEncryption", - "id": 4 - }, - "mpegCenc": { - "type": "MpegCommonEncryption", - "id": 5 - } - }, - "nested": { - "Aes128Encryption": { - "fields": { - "keyUri": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "SampleAesEncryption": { - "fields": { - "keyUri": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "MpegCommonEncryption": { - "fields": { - "keyId": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "scheme": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - } - } - }, - "Progress": { - "fields": { - "analyzed": { - "type": "double", - "id": 1 - }, - "encoded": { - "type": "double", - "id": 2 - }, - "uploaded": { - "type": "double", - "id": 3 - }, - "notified": { - "type": "double", - "id": 4 - } - } - }, - "FailureDetail": { - "fields": { - "description": { - "type": "string", - "id": 1 - } - } - }, - "TranscoderService": { - "options": { - "deprecated": true, - "(google.api.default_host)": "transcoder.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "CreateJob": { - "requestType": "CreateJobRequest", - "responseType": "Job", - "options": { - "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/jobs", - "(google.api.http).body": "job", - "(google.api.method_signature)": "parent,job" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{parent=projects/*/locations/*}/jobs", - "body": "job" - } - }, - { - "(google.api.method_signature)": "parent,job" - } - ] - }, - "ListJobs": { - "requestType": "ListJobsRequest", - "responseType": "ListJobsResponse", - "options": { - "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/jobs", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{parent=projects/*/locations/*}/jobs" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetJob": { - "requestType": "GetJobRequest", - "responseType": "Job", - "options": { - "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/jobs/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{name=projects/*/locations/*/jobs/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "DeleteJob": { - "requestType": "DeleteJobRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/jobs/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1beta1/{name=projects/*/locations/*/jobs/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateJobTemplate": { - "requestType": "CreateJobTemplateRequest", - "responseType": "JobTemplate", - "options": { - "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/jobTemplates", - "(google.api.http).body": "job_template", - "(google.api.method_signature)": "parent,job_template,job_template_id" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{parent=projects/*/locations/*}/jobTemplates", - "body": "job_template" - } - }, - { - "(google.api.method_signature)": "parent,job_template,job_template_id" - } - ] - }, - "ListJobTemplates": { - "requestType": "ListJobTemplatesRequest", - "responseType": "ListJobTemplatesResponse", - "options": { - "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/jobTemplates", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{parent=projects/*/locations/*}/jobTemplates" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetJobTemplate": { - "requestType": "GetJobTemplateRequest", - "responseType": "JobTemplate", - "options": { - "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/jobTemplates/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{name=projects/*/locations/*/jobTemplates/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "DeleteJobTemplate": { - "requestType": "DeleteJobTemplateRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/jobTemplates/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1beta1/{name=projects/*/locations/*/jobTemplates/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - } - } - }, - "CreateJobRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "job": { - "type": "Job", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ListJobsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "GetJobRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "transcoder.googleapis.com/Job" - } - } - } - }, - "DeleteJobRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "transcoder.googleapis.com/Job" - } - } - } - }, - "ListJobsResponse": { - "fields": { - "jobs": { - "rule": "repeated", - "type": "Job", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "CreateJobTemplateRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "jobTemplate": { - "type": "JobTemplate", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "jobTemplateId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ListJobTemplatesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "GetJobTemplateRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "transcoder.googleapis.com/JobTemplate" - } - } - } - }, - "DeleteJobTemplateRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "transcoder.googleapis.com/JobTemplate" - } - } - } - }, - "ListJobTemplatesResponse": { - "fields": { - "jobTemplates": { - "rule": "repeated", - "type": "JobTemplate", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - } - } } } } diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job.js deleted file mode 100644 index c32e7e275f5..00000000000 --- a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job.js +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// 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. - - -'use strict'; - -function main(parent, job) { - // [START transcoder_v1beta1_generated_TranscoderService_CreateJob_async] - /** - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent location to create and process this job. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. Parameters for creating transcoding job. - */ - // const job = {} - - // Imports the Transcoder library - const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1beta1; - - // Instantiates a client - const transcoderClient = new TranscoderServiceClient(); - - async function callCreateJob() { - // Construct request - const request = { - parent, - job, - }; - - // Run request - const response = await transcoderClient.createJob(request); - console.log(response); - } - - callCreateJob(); - // [END transcoder_v1beta1_generated_TranscoderService_CreateJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job_template.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job_template.js deleted file mode 100644 index e1905219cb6..00000000000 --- a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.create_job_template.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// 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. - - -'use strict'; - -function main(parent, jobTemplate, jobTemplateId) { - // [START transcoder_v1beta1_generated_TranscoderService_CreateJobTemplate_async] - /** - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent location to create this job template. - * Format: `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. Parameters for creating job template. - */ - // const jobTemplate = {} - /** - * Required. The ID to use for the job template, which will become the final component - * of the job template's resource name. - * This value should be 4-63 characters, and valid characters must match the - * regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. - */ - // const jobTemplateId = 'abc123' - - // Imports the Transcoder library - const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1beta1; - - // Instantiates a client - const transcoderClient = new TranscoderServiceClient(); - - async function callCreateJobTemplate() { - // Construct request - const request = { - parent, - jobTemplate, - jobTemplateId, - }; - - // Run request - const response = await transcoderClient.createJobTemplate(request); - console.log(response); - } - - callCreateJobTemplate(); - // [END transcoder_v1beta1_generated_TranscoderService_CreateJobTemplate_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job.js deleted file mode 100644 index ff09bb075db..00000000000 --- a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job.js +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// 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. - - -'use strict'; - -function main(name) { - // [START transcoder_v1beta1_generated_TranscoderService_DeleteJob_async] - /** - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the job to delete. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - */ - // const name = 'abc123' - - // Imports the Transcoder library - const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1beta1; - - // Instantiates a client - const transcoderClient = new TranscoderServiceClient(); - - async function callDeleteJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await transcoderClient.deleteJob(request); - console.log(response); - } - - callDeleteJob(); - // [END transcoder_v1beta1_generated_TranscoderService_DeleteJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job_template.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job_template.js deleted file mode 100644 index 2313a8ca8dd..00000000000 --- a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.delete_job_template.js +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// 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. - - -'use strict'; - -function main(name) { - // [START transcoder_v1beta1_generated_TranscoderService_DeleteJobTemplate_async] - /** - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the job template to delete. - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - */ - // const name = 'abc123' - - // Imports the Transcoder library - const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1beta1; - - // Instantiates a client - const transcoderClient = new TranscoderServiceClient(); - - async function callDeleteJobTemplate() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await transcoderClient.deleteJobTemplate(request); - console.log(response); - } - - callDeleteJobTemplate(); - // [END transcoder_v1beta1_generated_TranscoderService_DeleteJobTemplate_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job.js deleted file mode 100644 index 66ec46e9e65..00000000000 --- a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job.js +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// 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. - - -'use strict'; - -function main(name) { - // [START transcoder_v1beta1_generated_TranscoderService_GetJob_async] - /** - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the job to retrieve. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - */ - // const name = 'abc123' - - // Imports the Transcoder library - const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1beta1; - - // Instantiates a client - const transcoderClient = new TranscoderServiceClient(); - - async function callGetJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await transcoderClient.getJob(request); - console.log(response); - } - - callGetJob(); - // [END transcoder_v1beta1_generated_TranscoderService_GetJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job_template.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job_template.js deleted file mode 100644 index 0a59ee20ae1..00000000000 --- a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.get_job_template.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// 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. - - -'use strict'; - -function main(name) { - // [START transcoder_v1beta1_generated_TranscoderService_GetJobTemplate_async] - /** - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the job template to retrieve. - * Format: - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - */ - // const name = 'abc123' - - // Imports the Transcoder library - const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1beta1; - - // Instantiates a client - const transcoderClient = new TranscoderServiceClient(); - - async function callGetJobTemplate() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await transcoderClient.getJobTemplate(request); - console.log(response); - } - - callGetJobTemplate(); - // [END transcoder_v1beta1_generated_TranscoderService_GetJobTemplate_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_job_templates.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_job_templates.js deleted file mode 100644 index 14250deb9d9..00000000000 --- a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_job_templates.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// 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. - - -'use strict'; - -function main(parent) { - // [START transcoder_v1beta1_generated_TranscoderService_ListJobTemplates_async] - /** - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent location from which to retrieve the collection of job templates. - * Format: `projects/{project}/locations/{location}` - */ - // 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 Transcoder library - const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1beta1; - - // Instantiates a client - const transcoderClient = new TranscoderServiceClient(); - - async function callListJobTemplates() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await transcoderClient.listJobTemplatesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListJobTemplates(); - // [END transcoder_v1beta1_generated_TranscoderService_ListJobTemplates_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_jobs.js b/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_jobs.js deleted file mode 100644 index 44560552378..00000000000 --- a/packages/google-cloud-video-transcoder/samples/generated/v1beta1/transcoder_service.list_jobs.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// 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. - - -'use strict'; - -function main(parent) { - // [START transcoder_v1beta1_generated_TranscoderService_ListJobs_async] - /** - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Format: `projects/{project}/locations/{location}` - */ - // 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 Transcoder library - const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1beta1; - - // Instantiates a client - const transcoderClient = new TranscoderServiceClient(); - - async function callListJobs() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await transcoderClient.listJobsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListJobs(); - // [END transcoder_v1beta1_generated_TranscoderService_ListJobs_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/packages/google-cloud-video-transcoder/src/index.ts b/packages/google-cloud-video-transcoder/src/index.ts index a388b892f12..e9e38177176 100644 --- a/packages/google-cloud-video-transcoder/src/index.ts +++ b/packages/google-cloud-video-transcoder/src/index.ts @@ -17,12 +17,11 @@ // ** All changes to this file may be overwritten. ** import * as v1 from './v1'; -import * as v1beta1 from './v1beta1'; -const TranscoderServiceClient = v1beta1.TranscoderServiceClient; -type TranscoderServiceClient = v1beta1.TranscoderServiceClient; +const TranscoderServiceClient = v1.TranscoderServiceClient; +type TranscoderServiceClient = v1.TranscoderServiceClient; -export {v1, v1beta1, TranscoderServiceClient}; -export default {v1, v1beta1, TranscoderServiceClient}; +export {v1, TranscoderServiceClient}; +export default {v1, TranscoderServiceClient}; import * as protos from '../protos/protos'; export {protos}; diff --git a/packages/google-cloud-video-transcoder/src/v1beta1/gapic_metadata.json b/packages/google-cloud-video-transcoder/src/v1beta1/gapic_metadata.json deleted file mode 100644 index 33e2cddaea4..00000000000 --- a/packages/google-cloud-video-transcoder/src/v1beta1/gapic_metadata.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.cloud.video.transcoder.v1beta1", - "libraryPackage": "@google-cloud/video-transcoder", - "services": { - "TranscoderService": { - "clients": { - "grpc": { - "libraryClient": "TranscoderServiceClient", - "rpcs": { - "CreateJob": { - "methods": [ - "createJob" - ] - }, - "GetJob": { - "methods": [ - "getJob" - ] - }, - "DeleteJob": { - "methods": [ - "deleteJob" - ] - }, - "CreateJobTemplate": { - "methods": [ - "createJobTemplate" - ] - }, - "GetJobTemplate": { - "methods": [ - "getJobTemplate" - ] - }, - "DeleteJobTemplate": { - "methods": [ - "deleteJobTemplate" - ] - }, - "ListJobs": { - "methods": [ - "listJobs", - "listJobsStream", - "listJobsAsync" - ] - }, - "ListJobTemplates": { - "methods": [ - "listJobTemplates", - "listJobTemplatesStream", - "listJobTemplatesAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "TranscoderServiceClient", - "rpcs": { - "CreateJob": { - "methods": [ - "createJob" - ] - }, - "GetJob": { - "methods": [ - "getJob" - ] - }, - "DeleteJob": { - "methods": [ - "deleteJob" - ] - }, - "CreateJobTemplate": { - "methods": [ - "createJobTemplate" - ] - }, - "GetJobTemplate": { - "methods": [ - "getJobTemplate" - ] - }, - "DeleteJobTemplate": { - "methods": [ - "deleteJobTemplate" - ] - }, - "ListJobs": { - "methods": [ - "listJobs", - "listJobsStream", - "listJobsAsync" - ] - }, - "ListJobTemplates": { - "methods": [ - "listJobTemplates", - "listJobTemplatesStream", - "listJobTemplatesAsync" - ] - } - } - } - } - } - } -} diff --git a/packages/google-cloud-video-transcoder/src/v1beta1/index.ts b/packages/google-cloud-video-transcoder/src/v1beta1/index.ts deleted file mode 100644 index 2f52b1a6d4d..00000000000 --- a/packages/google-cloud-video-transcoder/src/v1beta1/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -// 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 {TranscoderServiceClient} from './transcoder_service_client'; diff --git a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts deleted file mode 100644 index 5060305ae86..00000000000 --- a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client.ts +++ /dev/null @@ -1,1489 +0,0 @@ -// 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 * as gax from 'google-gax'; -import { - Callback, - CallOptions, - Descriptors, - ClientOptions, - PaginationCallback, - GaxCall, -} from 'google-gax'; - -import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); -/** - * Client JSON configuration object, loaded from - * `src/v1beta1/transcoder_service_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './transcoder_service_client_config.json'; - -const version = require('../../../package.json').version; - -/** - * Using the Transcoder API, you can queue asynchronous jobs for transcoding - * media into various output formats. Output formats may include different - * streaming standards such as HTTP Live Streaming (HLS) and Dynamic Adaptive - * Streaming over HTTP (DASH). You can also customize jobs using advanced - * features such as Digital Rights Management (DRM), audio equalization, content - * concatenation, and digital ad-stitch ready content generation. - * @class - * @memberof v1beta1 - * @deprecated TranscoderService is deprecated and may be removed in a future version. - */ -export class TranscoderServiceClient { - 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}; - transcoderServiceStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of TranscoderServiceClient. - * - * @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/master/client-libraries.md#creating-the-client-instance). - * The common options are: - * @param {object} [options.credentials] - Credentials object. - * @param {string} [options.credentials.client_email] - * @param {string} [options.credentials.private_key] - * @param {string} [options.email] - Account email address. Required when - * using a .pem or .p12 keyFilename. - * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or - * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option below is not necessary. - * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number} [options.port] - The port on which to connect to - * the remote host. - * @param {string} [options.projectId] - The project ID from the Google - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check - * the environment variable GCLOUD_PROJECT for your project ID. If your - * app is running in an environment which supports - * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. - * @param {string} [options.apiEndpoint] - The domain name of the - * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. - * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP fallback mode. - * In fallback mode, a special browser-compatible transport implementation is used - * instead of gRPC transport. In browser context (if the `window` object is defined) - * the fallback mode is enabled automatically; set `options.fallback` to `false` - * if you need to override this behavior. - */ - constructor(opts?: ClientOptions) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof TranscoderServiceClient; - 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); - - // 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; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gax.fallback : gax; - - // 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 = { - jobPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/jobs/{job}' - ), - jobTemplatePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/jobTemplates/{job_template}' - ), - locationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' - ), - }; - - // 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 = { - listJobs: new this._gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'jobs' - ), - listJobTemplates: new this._gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'jobTemplates' - ), - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.video.transcoder.v1beta1.TranscoderService', - 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 = gax.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.transcoderServiceStub) { - this.warn( - 'DEP$TranscoderService', - 'TranscoderService is deprecated and may be removed in a future version.', - 'DeprecationWarning' - ); - return this.transcoderServiceStub; - } - - // Put together the "service stub" for - // google.cloud.video.transcoder.v1beta1.TranscoderService. - this.transcoderServiceStub = this._gaxGrpc.createStub( - this._opts.fallback - ? (this._protos as protobuf.Root).lookupService( - 'google.cloud.video.transcoder.v1beta1.TranscoderService' - ) - : // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.video.transcoder.v1beta1 - .TranscoderService, - 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 transcoderServiceStubMethods = [ - 'createJob', - 'listJobs', - 'getJob', - 'deleteJob', - 'createJobTemplate', - 'listJobTemplates', - 'getJobTemplate', - 'deleteJobTemplate', - ]; - for (const methodName of transcoderServiceStubMethods) { - const callPromise = this.transcoderServiceStub.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.innerApiCalls[methodName] = apiCall; - } - this.warn( - 'DEP$TranscoderService', - 'TranscoderService is deprecated and may be removed in a future version.', - 'DeprecationWarning' - ); - - return this.transcoderServiceStub; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - return 'transcoder.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 'transcoder.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 job in the specified region. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent location to create and process this job. - * Format: `projects/{project}/locations/{location}` - * @param {google.cloud.video.transcoder.v1beta1.Job} request.job - * Required. Parameters for creating transcoding job. - * @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 [Job]{@link google.cloud.video.transcoder.v1beta1.Job}. - * 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/v1beta1/transcoder_service.create_job.js - * region_tag:transcoder_v1beta1_generated_TranscoderService_CreateJob_async - */ - createJob( - request?: protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.video.transcoder.v1beta1.IJob, - ( - | protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest - | undefined - ), - {} | undefined - ] - >; - createJob( - request: protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.video.transcoder.v1beta1.IJob, - | protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createJob( - request: protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest, - callback: Callback< - protos.google.cloud.video.transcoder.v1beta1.IJob, - | protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createJob( - request?: protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.video.transcoder.v1beta1.IJob, - | protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.video.transcoder.v1beta1.IJob, - | protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.video.transcoder.v1beta1.IJob, - ( - | protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest - | 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'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', - }); - this.initialize(); - return this.innerApiCalls.createJob(request, options, callback); - } - /** - * Returns the job data. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the job to retrieve. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * @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 [Job]{@link google.cloud.video.transcoder.v1beta1.Job}. - * 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/v1beta1/transcoder_service.get_job.js - * region_tag:transcoder_v1beta1_generated_TranscoderService_GetJob_async - */ - getJob( - request?: protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.video.transcoder.v1beta1.IJob, - protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest | undefined, - {} | undefined - ] - >; - getJob( - request: protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.video.transcoder.v1beta1.IJob, - | protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest - | null - | undefined, - {} | null | undefined - > - ): void; - getJob( - request: protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest, - callback: Callback< - protos.google.cloud.video.transcoder.v1beta1.IJob, - | protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest - | null - | undefined, - {} | null | undefined - > - ): void; - getJob( - request?: protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.video.transcoder.v1beta1.IJob, - | protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.video.transcoder.v1beta1.IJob, - | protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.video.transcoder.v1beta1.IJob, - protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest | 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'] = - gax.routingHeader.fromParams({ - name: request.name || '', - }); - this.initialize(); - return this.innerApiCalls.getJob(request, options, callback); - } - /** - * Deletes a job. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the job to delete. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * @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/v1beta1/transcoder_service.delete_job.js - * region_tag:transcoder_v1beta1_generated_TranscoderService_DeleteJob_async - */ - deleteJob( - request?: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest, - options?: CallOptions - ): Promise< - [ - protos.google.protobuf.IEmpty, - ( - | protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest - | undefined - ), - {} | undefined - ] - >; - deleteJob( - request: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest - | null - | undefined, - {} | null | undefined - > - ): void; - deleteJob( - request: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest - | null - | undefined, - {} | null | undefined - > - ): void; - deleteJob( - request?: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.protobuf.IEmpty, - ( - | protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest - | 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'] = - gax.routingHeader.fromParams({ - name: request.name || '', - }); - this.initialize(); - return this.innerApiCalls.deleteJob(request, options, callback); - } - /** - * Creates a job template in the specified region. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent location to create this job template. - * Format: `projects/{project}/locations/{location}` - * @param {google.cloud.video.transcoder.v1beta1.JobTemplate} request.jobTemplate - * Required. Parameters for creating job template. - * @param {string} request.jobTemplateId - * Required. The ID to use for the job template, which will become the final component - * of the job template's resource name. - * - * This value should be 4-63 characters, and valid characters must match the - * regular expression `{@link a-zA-Z0-9_-|a-zA-Z}*`. - * @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 [JobTemplate]{@link google.cloud.video.transcoder.v1beta1.JobTemplate}. - * 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/v1beta1/transcoder_service.create_job_template.js - * region_tag:transcoder_v1beta1_generated_TranscoderService_CreateJobTemplate_async - */ - createJobTemplate( - request?: protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.video.transcoder.v1beta1.IJobTemplate, - ( - | protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest - | undefined - ), - {} | undefined - ] - >; - createJobTemplate( - request: protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.video.transcoder.v1beta1.IJobTemplate, - | protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createJobTemplate( - request: protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest, - callback: Callback< - protos.google.cloud.video.transcoder.v1beta1.IJobTemplate, - | protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createJobTemplate( - request?: protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.video.transcoder.v1beta1.IJobTemplate, - | protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.video.transcoder.v1beta1.IJobTemplate, - | protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.video.transcoder.v1beta1.IJobTemplate, - ( - | protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest - | 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'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', - }); - this.initialize(); - return this.innerApiCalls.createJobTemplate(request, options, callback); - } - /** - * Returns the job template data. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the job template to retrieve. - * Format: - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * @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 [JobTemplate]{@link google.cloud.video.transcoder.v1beta1.JobTemplate}. - * 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/v1beta1/transcoder_service.get_job_template.js - * region_tag:transcoder_v1beta1_generated_TranscoderService_GetJobTemplate_async - */ - getJobTemplate( - request?: protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.video.transcoder.v1beta1.IJobTemplate, - ( - | protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest - | undefined - ), - {} | undefined - ] - >; - getJobTemplate( - request: protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.video.transcoder.v1beta1.IJobTemplate, - | protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): void; - getJobTemplate( - request: protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest, - callback: Callback< - protos.google.cloud.video.transcoder.v1beta1.IJobTemplate, - | protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): void; - getJobTemplate( - request?: protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.video.transcoder.v1beta1.IJobTemplate, - | protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.video.transcoder.v1beta1.IJobTemplate, - | protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.video.transcoder.v1beta1.IJobTemplate, - ( - | protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest - | 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'] = - gax.routingHeader.fromParams({ - name: request.name || '', - }); - this.initialize(); - return this.innerApiCalls.getJobTemplate(request, options, callback); - } - /** - * Deletes a job template. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the job template to delete. - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * @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/v1beta1/transcoder_service.delete_job_template.js - * region_tag:transcoder_v1beta1_generated_TranscoderService_DeleteJobTemplate_async - */ - deleteJobTemplate( - request?: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest, - options?: CallOptions - ): Promise< - [ - protos.google.protobuf.IEmpty, - ( - | protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest - | undefined - ), - {} | undefined - ] - >; - deleteJobTemplate( - request: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): void; - deleteJobTemplate( - request: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): void; - deleteJobTemplate( - request?: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.protobuf.IEmpty, - ( - | protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest - | 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'] = - gax.routingHeader.fromParams({ - name: request.name || '', - }); - this.initialize(); - return this.innerApiCalls.deleteJobTemplate(request, options, callback); - } - - /** - * Lists jobs in the specified region. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Format: `projects/{project}/locations/{location}` - * @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 [Job]{@link google.cloud.video.transcoder.v1beta1.Job}. - * 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 `listJobsAsync()` - * 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. - */ - listJobs( - request?: protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.video.transcoder.v1beta1.IJob[], - protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest | null, - protos.google.cloud.video.transcoder.v1beta1.IListJobsResponse - ] - >; - listJobs( - request: protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, - | protos.google.cloud.video.transcoder.v1beta1.IListJobsResponse - | null - | undefined, - protos.google.cloud.video.transcoder.v1beta1.IJob - > - ): void; - listJobs( - request: protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, - callback: PaginationCallback< - protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, - | protos.google.cloud.video.transcoder.v1beta1.IListJobsResponse - | null - | undefined, - protos.google.cloud.video.transcoder.v1beta1.IJob - > - ): void; - listJobs( - request?: protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, - optionsOrCallback?: - | CallOptions - | PaginationCallback< - protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, - | protos.google.cloud.video.transcoder.v1beta1.IListJobsResponse - | null - | undefined, - protos.google.cloud.video.transcoder.v1beta1.IJob - >, - callback?: PaginationCallback< - protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, - | protos.google.cloud.video.transcoder.v1beta1.IListJobsResponse - | null - | undefined, - protos.google.cloud.video.transcoder.v1beta1.IJob - > - ): Promise< - [ - protos.google.cloud.video.transcoder.v1beta1.IJob[], - protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest | null, - protos.google.cloud.video.transcoder.v1beta1.IListJobsResponse - ] - > | 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'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', - }); - this.initialize(); - return this.innerApiCalls.listJobs(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. Format: `projects/{project}/locations/{location}` - * @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 [Job]{@link google.cloud.video.transcoder.v1beta1.Job} 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 `listJobsAsync()` - * 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. - */ - listJobsStream( - request?: protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, - options?: CallOptions - ): Transform { - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', - }); - const defaultCallSettings = this._defaults['listJobs']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listJobs.createStream( - this.innerApiCalls.listJobs as gax.GaxCall, - request, - callSettings - ); - } - - /** - * Equivalent to `listJobs`, 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. Format: `projects/{project}/locations/{location}` - * @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 - * [Job]{@link google.cloud.video.transcoder.v1beta1.Job}. 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/v1beta1/transcoder_service.list_jobs.js - * region_tag:transcoder_v1beta1_generated_TranscoderService_ListJobs_async - */ - listJobsAsync( - request?: protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, - options?: CallOptions - ): AsyncIterable { - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', - }); - const defaultCallSettings = this._defaults['listJobs']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listJobs.asyncIterate( - this.innerApiCalls['listJobs'] as GaxCall, - request as unknown as RequestType, - callSettings - ) as AsyncIterable; - } - /** - * Lists job templates in the specified region. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent location from which to retrieve the collection of job templates. - * Format: `projects/{project}/locations/{location}` - * @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 [JobTemplate]{@link google.cloud.video.transcoder.v1beta1.JobTemplate}. - * 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 `listJobTemplatesAsync()` - * 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. - */ - listJobTemplates( - request?: protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.video.transcoder.v1beta1.IJobTemplate[], - protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest | null, - protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesResponse - ] - >; - listJobTemplates( - request: protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, - | protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesResponse - | null - | undefined, - protos.google.cloud.video.transcoder.v1beta1.IJobTemplate - > - ): void; - listJobTemplates( - request: protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, - callback: PaginationCallback< - protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, - | protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesResponse - | null - | undefined, - protos.google.cloud.video.transcoder.v1beta1.IJobTemplate - > - ): void; - listJobTemplates( - request?: protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, - optionsOrCallback?: - | CallOptions - | PaginationCallback< - protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, - | protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesResponse - | null - | undefined, - protos.google.cloud.video.transcoder.v1beta1.IJobTemplate - >, - callback?: PaginationCallback< - protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, - | protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesResponse - | null - | undefined, - protos.google.cloud.video.transcoder.v1beta1.IJobTemplate - > - ): Promise< - [ - protos.google.cloud.video.transcoder.v1beta1.IJobTemplate[], - protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest | null, - protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesResponse - ] - > | 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'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', - }); - this.initialize(); - return this.innerApiCalls.listJobTemplates(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 parent location from which to retrieve the collection of job templates. - * Format: `projects/{project}/locations/{location}` - * @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 [JobTemplate]{@link google.cloud.video.transcoder.v1beta1.JobTemplate} 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 `listJobTemplatesAsync()` - * 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. - */ - listJobTemplatesStream( - request?: protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, - options?: CallOptions - ): Transform { - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', - }); - const defaultCallSettings = this._defaults['listJobTemplates']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listJobTemplates.createStream( - this.innerApiCalls.listJobTemplates as gax.GaxCall, - request, - callSettings - ); - } - - /** - * Equivalent to `listJobTemplates`, 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 parent location from which to retrieve the collection of job templates. - * Format: `projects/{project}/locations/{location}` - * @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 - * [JobTemplate]{@link google.cloud.video.transcoder.v1beta1.JobTemplate}. 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/v1beta1/transcoder_service.list_job_templates.js - * region_tag:transcoder_v1beta1_generated_TranscoderService_ListJobTemplates_async - */ - listJobTemplatesAsync( - request?: protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, - options?: CallOptions - ): AsyncIterable { - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ - parent: request.parent || '', - }); - const defaultCallSettings = this._defaults['listJobTemplates']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listJobTemplates.asyncIterate( - this.innerApiCalls['listJobTemplates'] as GaxCall, - request as unknown as RequestType, - callSettings - ) as AsyncIterable; - } - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified job resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} job - * @returns {string} Resource name string. - */ - jobPath(project: string, location: string, job: string) { - return this.pathTemplates.jobPathTemplate.render({ - project: project, - location: location, - job: job, - }); - } - - /** - * Parse the project from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the project. - */ - matchProjectFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).project; - } - - /** - * Parse the location from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the location. - */ - matchLocationFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).location; - } - - /** - * Parse the job from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the job. - */ - matchJobFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).job; - } - - /** - * Return a fully-qualified jobTemplate resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} job_template - * @returns {string} Resource name string. - */ - jobTemplatePath(project: string, location: string, jobTemplate: string) { - return this.pathTemplates.jobTemplatePathTemplate.render({ - project: project, - location: location, - job_template: jobTemplate, - }); - } - - /** - * Parse the project from JobTemplate resource. - * - * @param {string} jobTemplateName - * A fully-qualified path representing JobTemplate resource. - * @returns {string} A string representing the project. - */ - matchProjectFromJobTemplateName(jobTemplateName: string) { - return this.pathTemplates.jobTemplatePathTemplate.match(jobTemplateName) - .project; - } - - /** - * Parse the location from JobTemplate resource. - * - * @param {string} jobTemplateName - * A fully-qualified path representing JobTemplate resource. - * @returns {string} A string representing the location. - */ - matchLocationFromJobTemplateName(jobTemplateName: string) { - return this.pathTemplates.jobTemplatePathTemplate.match(jobTemplateName) - .location; - } - - /** - * Parse the job_template from JobTemplate resource. - * - * @param {string} jobTemplateName - * A fully-qualified path representing JobTemplate resource. - * @returns {string} A string representing the job_template. - */ - matchJobTemplateFromJobTemplateName(jobTemplateName: string) { - return this.pathTemplates.jobTemplatePathTemplate.match(jobTemplateName) - .job_template; - } - - /** - * 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; - } - - /** - * 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 { - this.initialize(); - if (!this._terminated) { - return this.transcoderServiceStub!.then(stub => { - this._terminated = true; - stub.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client_config.json b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client_config.json deleted file mode 100644 index 5de820c1ca4..00000000000 --- a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_client_config.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "interfaces": { - "google.cloud.video.transcoder.v1beta1.TranscoderService": { - "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": { - "CreateJob": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListJobs": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetJob": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteJob": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateJobTemplate": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListJobTemplates": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetJobTemplate": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteJobTemplate": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_proto_list.json b/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_proto_list.json deleted file mode 100644 index 19545da7692..00000000000 --- a/packages/google-cloud-video-transcoder/src/v1beta1/transcoder_service_proto_list.json +++ /dev/null @@ -1,4 +0,0 @@ -[ - "../../protos/google/cloud/video/transcoder/v1beta1/resources.proto", - "../../protos/google/cloud/video/transcoder/v1beta1/services.proto" -] diff --git a/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1beta1.ts b/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1beta1.ts deleted file mode 100644 index b74b3662c8e..00000000000 --- a/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1beta1.ts +++ /dev/null @@ -1,1687 +0,0 @@ -// 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 transcoderserviceModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf} from 'google-gax'; - -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('v1beta1.TranscoderServiceClient', () => { - it('has servicePath', () => { - const servicePath = - transcoderserviceModule.v1beta1.TranscoderServiceClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - transcoderserviceModule.v1beta1.TranscoderServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = transcoderserviceModule.v1beta1.TranscoderServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.transcoderServiceStub, undefined); - await client.initialize(); - assert(client.transcoderServiceStub); - }); - - it('has close method', () => { - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.close(); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - 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 transcoderserviceModule.v1beta1.TranscoderServiceClient({ - 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('createJob', () => { - it('invokes createJob without error', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.CreateJobRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.Job() - ); - client.innerApiCalls.createJob = stubSimpleCall(expectedResponse); - const [response] = await client.createJob(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes createJob without error using callback', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.CreateJobRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.Job() - ); - client.innerApiCalls.createJob = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createJob( - request, - ( - err?: Error | null, - result?: protos.google.cloud.video.transcoder.v1beta1.IJob | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); - }); - - it('invokes createJob with error', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.CreateJobRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.createJob = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.createJob(request), expectedError); - assert( - (client.innerApiCalls.createJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('getJob', () => { - it('invokes getJob without error', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.GetJobRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.Job() - ); - client.innerApiCalls.getJob = stubSimpleCall(expectedResponse); - const [response] = await client.getJob(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes getJob without error using callback', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.GetJobRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.Job() - ); - client.innerApiCalls.getJob = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getJob( - request, - ( - err?: Error | null, - result?: protos.google.cloud.video.transcoder.v1beta1.IJob | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); - }); - - it('invokes getJob with error', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.GetJobRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.getJob = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getJob(request), expectedError); - assert( - (client.innerApiCalls.getJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('deleteJob', () => { - it('invokes deleteJob without error', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.DeleteJobRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteJob = stubSimpleCall(expectedResponse); - const [response] = await client.deleteJob(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes deleteJob without error using callback', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.DeleteJobRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteJob = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteJob( - 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); - assert( - (client.innerApiCalls.deleteJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); - }); - - it('invokes deleteJob with error', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.DeleteJobRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteJob = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.deleteJob(request), expectedError); - assert( - (client.innerApiCalls.deleteJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('createJobTemplate', () => { - it('invokes createJobTemplate without error', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() - ); - client.innerApiCalls.createJobTemplate = stubSimpleCall(expectedResponse); - const [response] = await client.createJobTemplate(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createJobTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes createJobTemplate without error using callback', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() - ); - client.innerApiCalls.createJobTemplate = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createJobTemplate( - request, - ( - err?: Error | null, - result?: protos.google.cloud.video.transcoder.v1beta1.IJobTemplate | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createJobTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); - }); - - it('invokes createJobTemplate with error', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.CreateJobTemplateRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.createJobTemplate = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.createJobTemplate(request), expectedError); - assert( - (client.innerApiCalls.createJobTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('getJobTemplate', () => { - it('invokes getJobTemplate without error', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() - ); - client.innerApiCalls.getJobTemplate = stubSimpleCall(expectedResponse); - const [response] = await client.getJobTemplate(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getJobTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes getJobTemplate without error using callback', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() - ); - client.innerApiCalls.getJobTemplate = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getJobTemplate( - request, - ( - err?: Error | null, - result?: protos.google.cloud.video.transcoder.v1beta1.IJobTemplate | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getJobTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); - }); - - it('invokes getJobTemplate with error', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.GetJobTemplateRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.getJobTemplate = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.getJobTemplate(request), expectedError); - assert( - (client.innerApiCalls.getJobTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('deleteJobTemplate', () => { - it('invokes deleteJobTemplate without error', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteJobTemplate = stubSimpleCall(expectedResponse); - const [response] = await client.deleteJobTemplate(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteJobTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes deleteJobTemplate without error using callback', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteJobTemplate = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteJobTemplate( - 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); - assert( - (client.innerApiCalls.deleteJobTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); - }); - - it('invokes deleteJobTemplate with error', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.DeleteJobTemplateRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteJobTemplate = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.deleteJobTemplate(request), expectedError); - assert( - (client.innerApiCalls.deleteJobTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - - describe('listJobs', () => { - it('invokes listJobs without error', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.ListJobsRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.Job() - ), - generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.Job() - ), - generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.Job() - ), - ]; - client.innerApiCalls.listJobs = stubSimpleCall(expectedResponse); - const [response] = await client.listJobs(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listJobs as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes listJobs without error using callback', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.ListJobsRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.Job() - ), - generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.Job() - ), - generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.Job() - ), - ]; - client.innerApiCalls.listJobs = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listJobs( - request, - ( - err?: Error | null, - result?: protos.google.cloud.video.transcoder.v1beta1.IJob[] | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listJobs as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); - }); - - it('invokes listJobs with error', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.ListJobsRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.listJobs = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listJobs(request), expectedError); - assert( - (client.innerApiCalls.listJobs as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes listJobsStream without error', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.ListJobsRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.Job() - ), - generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.Job() - ), - generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.Job() - ), - ]; - client.descriptors.page.listJobs.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.listJobsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.video.transcoder.v1beta1.Job[] = - []; - stream.on( - 'data', - (response: protos.google.cloud.video.transcoder.v1beta1.Job) => { - 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.listJobs.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listJobs, request) - ); - assert.strictEqual( - (client.descriptors.page.listJobs.createStream as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams - ); - }); - - it('invokes listJobsStream with error', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.ListJobsRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedError = new Error('expected'); - client.descriptors.page.listJobs.createStream = stubPageStreamingCall( - undefined, - expectedError - ); - const stream = client.listJobsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.video.transcoder.v1beta1.Job[] = - []; - stream.on( - 'data', - (response: protos.google.cloud.video.transcoder.v1beta1.Job) => { - responses.push(response); - } - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert( - (client.descriptors.page.listJobs.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listJobs, request) - ); - assert.strictEqual( - (client.descriptors.page.listJobs.createStream as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams - ); - }); - - it('uses async iteration with listJobs without error', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.ListJobsRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.Job() - ), - generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.Job() - ), - generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.Job() - ), - ]; - client.descriptors.page.listJobs.asyncIterate = - stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.video.transcoder.v1beta1.IJob[] = []; - const iterable = client.listJobsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) - .args[1], - request - ); - assert.strictEqual( - (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams - ); - }); - - it('uses async iteration with listJobs with error', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.ListJobsRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedError = new Error('expected'); - client.descriptors.page.listJobs.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); - const iterable = client.listJobsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.video.transcoder.v1beta1.IJob[] = - []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) - .args[1], - request - ); - assert.strictEqual( - (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams - ); - }); - }); - - describe('listJobTemplates', () => { - it('invokes listJobTemplates without error', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() - ), - generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() - ), - generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() - ), - ]; - client.innerApiCalls.listJobTemplates = stubSimpleCall(expectedResponse); - const [response] = await client.listJobTemplates(request); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listJobTemplates as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes listJobTemplates without error using callback', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() - ), - generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() - ), - generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() - ), - ]; - client.innerApiCalls.listJobTemplates = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listJobTemplates( - request, - ( - err?: Error | null, - result?: - | protos.google.cloud.video.transcoder.v1beta1.IJobTemplate[] - | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listJobTemplates as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); - }); - - it('invokes listJobTemplates with error', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.listJobTemplates = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.listJobTemplates(request), expectedError); - assert( - (client.innerApiCalls.listJobTemplates as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes listJobTemplatesStream without error', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() - ), - generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() - ), - generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() - ), - ]; - client.descriptors.page.listJobTemplates.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.listJobTemplatesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.video.transcoder.v1beta1.JobTemplate[] = - []; - stream.on( - 'data', - ( - response: protos.google.cloud.video.transcoder.v1beta1.JobTemplate - ) => { - 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.listJobTemplates.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listJobTemplates, request) - ); - assert.strictEqual( - ( - client.descriptors.page.listJobTemplates.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams - ); - }); - - it('invokes listJobTemplatesStream with error', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedError = new Error('expected'); - client.descriptors.page.listJobTemplates.createStream = - stubPageStreamingCall(undefined, expectedError); - const stream = client.listJobTemplatesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.video.transcoder.v1beta1.JobTemplate[] = - []; - stream.on( - 'data', - ( - response: protos.google.cloud.video.transcoder.v1beta1.JobTemplate - ) => { - responses.push(response); - } - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert( - (client.descriptors.page.listJobTemplates.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listJobTemplates, request) - ); - assert.strictEqual( - ( - client.descriptors.page.listJobTemplates.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams - ); - }); - - it('uses async iteration with listJobTemplates without error', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() - ), - generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() - ), - generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.JobTemplate() - ), - ]; - client.descriptors.page.listJobTemplates.asyncIterate = - stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.video.transcoder.v1beta1.IJobTemplate[] = - []; - const iterable = client.listJobTemplatesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - ( - client.descriptors.page.listJobTemplates.asyncIterate as SinonStub - ).getCall(0).args[1], - request - ); - assert.strictEqual( - ( - client.descriptors.page.listJobTemplates.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams - ); - }); - - it('uses async iteration with listJobTemplates with error', async () => { - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.video.transcoder.v1beta1.ListJobTemplatesRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedError = new Error('expected'); - client.descriptors.page.listJobTemplates.asyncIterate = - stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listJobTemplatesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.video.transcoder.v1beta1.IJobTemplate[] = - []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - ( - client.descriptors.page.listJobTemplates.asyncIterate as SinonStub - ).getCall(0).args[1], - request - ); - assert.strictEqual( - ( - client.descriptors.page.listJobTemplates.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams - ); - }); - }); - - describe('Path templates', () => { - describe('job', () => { - const fakePath = '/rendered/path/job'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - job: 'jobValue', - }; - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.jobPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.jobPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('jobPath', () => { - const result = client.jobPath( - 'projectValue', - 'locationValue', - 'jobValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.jobPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromJobName', () => { - const result = client.matchProjectFromJobName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromJobName', () => { - const result = client.matchLocationFromJobName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchJobFromJobName', () => { - const result = client.matchJobFromJobName(fakePath); - assert.strictEqual(result, 'jobValue'); - assert( - (client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('jobTemplate', () => { - const fakePath = '/rendered/path/jobTemplate'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - job_template: 'jobTemplateValue', - }; - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.jobTemplatePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.jobTemplatePathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('jobTemplatePath', () => { - const result = client.jobTemplatePath( - 'projectValue', - 'locationValue', - 'jobTemplateValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.jobTemplatePathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromJobTemplateName', () => { - const result = client.matchProjectFromJobTemplateName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.jobTemplatePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromJobTemplateName', () => { - const result = client.matchLocationFromJobTemplateName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.jobTemplatePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchJobTemplateFromJobTemplateName', () => { - const result = client.matchJobTemplateFromJobTemplateName(fakePath); - assert.strictEqual(result, 'jobTemplateValue'); - assert( - (client.pathTemplates.jobTemplatePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('location', () => { - const fakePath = '/rendered/path/location'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - }; - const client = - new transcoderserviceModule.v1beta1.TranscoderServiceClient({ - 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) - ); - }); - }); - }); -}); From 1795a1f82bdebabbce5eeeec5c388c50107d86fb Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 8 Feb 2022 14:56:49 -0800 Subject: [PATCH 084/116] chore(main): release 1.10.0 (#155) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-video-transcoder/CHANGELOG.md | 12 ++++++++++++ packages/google-cloud-video-transcoder/package.json | 2 +- .../samples/package.json | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-video-transcoder/CHANGELOG.md b/packages/google-cloud-video-transcoder/CHANGELOG.md index 6db3f107a1c..d88c19a9885 100644 --- a/packages/google-cloud-video-transcoder/CHANGELOG.md +++ b/packages/google-cloud-video-transcoder/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [1.10.0](https://github.com/googleapis/nodejs-video-transcoder/compare/v1.9.0...v1.10.0) (2022-02-08) + + +### Features + +* **samples:** delete old test jobs ([#148](https://github.com/googleapis/nodejs-video-transcoder/issues/148)) ([ad94ca0](https://github.com/googleapis/nodejs-video-transcoder/commit/ad94ca047d33e5e99b7c2c626b826e1b8d95ba34)) + + +### Bug Fixes + +* Remove deprecated v1beta1 API that is no longer available ([#154](https://github.com/googleapis/nodejs-video-transcoder/issues/154)) ([76d9aab](https://github.com/googleapis/nodejs-video-transcoder/commit/76d9aabc9d55f636dfcbb6a6dc6d5bf17302d18d)) + ## [1.9.0](https://github.com/googleapis/nodejs-video-transcoder/compare/v1.8.1...v1.9.0) (2022-02-04) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index d76ae933b40..d69e8e3d8fe 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/video-transcoder", - "version": "1.9.0", + "version": "1.10.0", "description": "Transcoder client for Node.js", "repository": "googleapis/nodejs-video-transcoder", "license": "Apache-2.0", diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index 25ea16cca42..c8169f4abac 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/video-transcoder": "^1.9.0" + "@google-cloud/video-transcoder": "^1.10.0" }, "devDependencies": { "@google-cloud/storage": "^5.4.0", From 900232e1c7caf988e196393b1c6927869c3e59f5 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 18 Feb 2022 10:56:14 -0800 Subject: [PATCH 085/116] docs(samples): include metadata file, add exclusions for samples to handwritten libraries (#156) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs(samples): include metadata file, add exclusions for samples to handwritten libraries PiperOrigin-RevId: 429395631 Source-Link: https://github.com/googleapis/googleapis/commit/84594b35af0c38efcd6967e8179d801702ad96ff Source-Link: https://github.com/googleapis/googleapis-gen/commit/ed74f970fd82914874e6b27b04763cfa66bafe9b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWQ3NGY5NzBmZDgyOTE0ODc0ZTZiMjdiMDQ3NjNjZmE2NmJhZmU5YiJ9 * ๐Ÿฆ‰ Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- ...data.google.cloud.video.transcoder.v1.json | 387 ++++++++++++++++++ .../v1/transcoder_service.create_job.js | 9 +- .../transcoder_service.create_job_template.js | 9 +- .../v1/transcoder_service.delete_job.js | 9 +- .../transcoder_service.delete_job_template.js | 9 +- .../v1/transcoder_service.get_job.js | 9 +- .../v1/transcoder_service.get_job_template.js | 9 +- .../transcoder_service.list_job_templates.js | 9 +- .../v1/transcoder_service.list_jobs.js | 9 +- .../src/v1/transcoder_service_client.ts | 5 +- .../test/gapic_transcoder_service_v1.ts | 115 +++++- 11 files changed, 558 insertions(+), 21 deletions(-) create mode 100644 packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json new file mode 100644 index 00000000000..7478ec864c7 --- /dev/null +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json @@ -0,0 +1,387 @@ +{ + "clientLibrary": { + "name": "nodejs-transcoder", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.video.transcoder.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "transcoder_v1_generated_TranscoderService_CreateJob_async", + "title": "TranscoderService createJob Sample", + "origin": "API_DEFINITION", + "description": " Creates a job in the specified region.", + "canonical": true, + "file": "transcoder_service.create_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateJob", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.CreateJob", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "job", + "type": ".google.cloud.video.transcoder.v1.Job" + } + ], + "resultType": ".google.cloud.video.transcoder.v1.Job", + "client": { + "shortName": "TranscoderServiceClient", + "fullName": "google.cloud.video.transcoder.v1.TranscoderServiceClient" + }, + "method": { + "shortName": "CreateJob", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.CreateJob", + "service": { + "shortName": "TranscoderService", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService" + } + } + } + }, + { + "regionTag": "transcoder_v1_generated_TranscoderService_ListJobs_async", + "title": "TranscoderService listJobs Sample", + "origin": "API_DEFINITION", + "description": " Lists jobs in the specified region.", + "canonical": true, + "file": "transcoder_service.list_jobs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListJobs", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.ListJobs", + "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.transcoder.v1.ListJobsResponse", + "client": { + "shortName": "TranscoderServiceClient", + "fullName": "google.cloud.video.transcoder.v1.TranscoderServiceClient" + }, + "method": { + "shortName": "ListJobs", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.ListJobs", + "service": { + "shortName": "TranscoderService", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService" + } + } + } + }, + { + "regionTag": "transcoder_v1_generated_TranscoderService_GetJob_async", + "title": "TranscoderService getJob Sample", + "origin": "API_DEFINITION", + "description": " Returns the job data.", + "canonical": true, + "file": "transcoder_service.get_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetJob", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.GetJob", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.video.transcoder.v1.Job", + "client": { + "shortName": "TranscoderServiceClient", + "fullName": "google.cloud.video.transcoder.v1.TranscoderServiceClient" + }, + "method": { + "shortName": "GetJob", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.GetJob", + "service": { + "shortName": "TranscoderService", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService" + } + } + } + }, + { + "regionTag": "transcoder_v1_generated_TranscoderService_DeleteJob_async", + "title": "TranscoderService deleteJob Sample", + "origin": "API_DEFINITION", + "description": " Deletes a job.", + "canonical": true, + "file": "transcoder_service.delete_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteJob", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.DeleteJob", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "TranscoderServiceClient", + "fullName": "google.cloud.video.transcoder.v1.TranscoderServiceClient" + }, + "method": { + "shortName": "DeleteJob", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.DeleteJob", + "service": { + "shortName": "TranscoderService", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService" + } + } + } + }, + { + "regionTag": "transcoder_v1_generated_TranscoderService_CreateJobTemplate_async", + "title": "TranscoderService createJobTemplate Sample", + "origin": "API_DEFINITION", + "description": " Creates a job template in the specified region.", + "canonical": true, + "file": "transcoder_service.create_job_template.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateJobTemplate", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.CreateJobTemplate", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "job_template", + "type": ".google.cloud.video.transcoder.v1.JobTemplate" + }, + { + "name": "job_template_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.video.transcoder.v1.JobTemplate", + "client": { + "shortName": "TranscoderServiceClient", + "fullName": "google.cloud.video.transcoder.v1.TranscoderServiceClient" + }, + "method": { + "shortName": "CreateJobTemplate", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.CreateJobTemplate", + "service": { + "shortName": "TranscoderService", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService" + } + } + } + }, + { + "regionTag": "transcoder_v1_generated_TranscoderService_ListJobTemplates_async", + "title": "TranscoderService listJobTemplates Sample", + "origin": "API_DEFINITION", + "description": " Lists job templates in the specified region.", + "canonical": true, + "file": "transcoder_service.list_job_templates.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListJobTemplates", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.ListJobTemplates", + "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.transcoder.v1.ListJobTemplatesResponse", + "client": { + "shortName": "TranscoderServiceClient", + "fullName": "google.cloud.video.transcoder.v1.TranscoderServiceClient" + }, + "method": { + "shortName": "ListJobTemplates", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.ListJobTemplates", + "service": { + "shortName": "TranscoderService", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService" + } + } + } + }, + { + "regionTag": "transcoder_v1_generated_TranscoderService_GetJobTemplate_async", + "title": "TranscoderService getJobTemplate Sample", + "origin": "API_DEFINITION", + "description": " Returns the job template data.", + "canonical": true, + "file": "transcoder_service.get_job_template.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetJobTemplate", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.GetJobTemplate", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.video.transcoder.v1.JobTemplate", + "client": { + "shortName": "TranscoderServiceClient", + "fullName": "google.cloud.video.transcoder.v1.TranscoderServiceClient" + }, + "method": { + "shortName": "GetJobTemplate", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.GetJobTemplate", + "service": { + "shortName": "TranscoderService", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService" + } + } + } + }, + { + "regionTag": "transcoder_v1_generated_TranscoderService_DeleteJobTemplate_async", + "title": "TranscoderService deleteJobTemplate Sample", + "origin": "API_DEFINITION", + "description": " Deletes a job template.", + "canonical": true, + "file": "transcoder_service.delete_job_template.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteJobTemplate", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.DeleteJobTemplate", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "TranscoderServiceClient", + "fullName": "google.cloud.video.transcoder.v1.TranscoderServiceClient" + }, + "method": { + "shortName": "DeleteJobTemplate", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.DeleteJobTemplate", + "service": { + "shortName": "TranscoderService", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService" + } + } + } + } + ] +} diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job.js index e13996a2792..47a3d4dc006 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// 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 +// 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'; diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job_template.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job_template.js index a8e2b58f97b..d1deee0897e 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job_template.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job_template.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// 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 +// 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'; diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job.js index e1bec935282..46fd9e352bc 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// 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 +// 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'; diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job_template.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job_template.js index 9cf597d871e..a1ebefe8f94 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job_template.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job_template.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// 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 +// 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'; diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job.js index e758db708f0..8f8eb07f9f2 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// 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 +// 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'; diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job_template.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job_template.js index dfdee8d83c5..4a3baa4dc5a 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job_template.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job_template.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// 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 +// 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'; diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_job_templates.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_job_templates.js index 21125538f61..d6891c5a6b6 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_job_templates.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_job_templates.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// 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 +// 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'; diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_jobs.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_jobs.js index da830d2f9e1..0c0755b2c95 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_jobs.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_jobs.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// 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 +// 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'; diff --git a/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts b/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts index 6b857059e26..90d3adf5739 100644 --- a/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts +++ b/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts @@ -1490,9 +1490,8 @@ export class TranscoderServiceClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.transcoderServiceStub!.then(stub => { + if (this.transcoderServiceStub && !this._terminated) { + return this.transcoderServiceStub.then(stub => { this._terminated = true; stub.close(); }); diff --git a/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts b/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts index c4d77053469..9f03b33fc39 100644 --- a/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts +++ b/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts @@ -153,12 +153,27 @@ describe('v1.TranscoderServiceClient', () => { assert(client.transcoderServiceStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new transcoderserviceModule.v1.TranscoderServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.transcoderServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.transcoderServiceStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -301,6 +316,22 @@ describe('v1.TranscoderServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createJob with closed client', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.CreateJobRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createJob(request), expectedError); + }); }); describe('getJob', () => { @@ -409,6 +440,22 @@ describe('v1.TranscoderServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getJob with closed client', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.GetJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getJob(request), expectedError); + }); }); describe('deleteJob', () => { @@ -517,6 +564,22 @@ describe('v1.TranscoderServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteJob with closed client', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.DeleteJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteJob(request), expectedError); + }); }); describe('createJobTemplate', () => { @@ -628,6 +691,22 @@ describe('v1.TranscoderServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createJobTemplate with closed client', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.CreateJobTemplateRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createJobTemplate(request), expectedError); + }); }); describe('getJobTemplate', () => { @@ -739,6 +818,22 @@ describe('v1.TranscoderServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getJobTemplate with closed client', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.GetJobTemplateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getJobTemplate(request), expectedError); + }); }); describe('deleteJobTemplate', () => { @@ -850,6 +945,22 @@ describe('v1.TranscoderServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteJobTemplate with closed client', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteJobTemplate(request), expectedError); + }); }); describe('listJobs', () => { From 704d8071a069f92a64a06f21cdfd4f1810546869 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 16 Mar 2022 21:30:22 +0000 Subject: [PATCH 086/116] chore: update v2.14.2 gapic-generator-typescript (#160) - [ ] Regenerate this pull request now. Committer: @summer-ji-eng PiperOrigin-RevId: 434859890 Source-Link: https://github.com/googleapis/googleapis/commit/bc2432d50cba657e95212122e3fa112591b5bec2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/930b673103e92523f8cfed38decd7d3afae8ebe7 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTMwYjY3MzEwM2U5MjUyM2Y4Y2ZlZDM4ZGVjZDdkM2FmYWU4ZWJlNyJ9 --- .../test/gapic_transcoder_service_v1.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts b/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts index 9f03b33fc39..26f95eb9841 100644 --- a/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts +++ b/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts @@ -327,7 +327,6 @@ describe('v1.TranscoderServiceClient', () => { new protos.google.cloud.video.transcoder.v1.CreateJobRequest() ); request.parent = ''; - const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createJob(request), expectedError); @@ -451,7 +450,6 @@ describe('v1.TranscoderServiceClient', () => { new protos.google.cloud.video.transcoder.v1.GetJobRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getJob(request), expectedError); @@ -575,7 +573,6 @@ describe('v1.TranscoderServiceClient', () => { new protos.google.cloud.video.transcoder.v1.DeleteJobRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteJob(request), expectedError); @@ -702,7 +699,6 @@ describe('v1.TranscoderServiceClient', () => { new protos.google.cloud.video.transcoder.v1.CreateJobTemplateRequest() ); request.parent = ''; - const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createJobTemplate(request), expectedError); @@ -829,7 +825,6 @@ describe('v1.TranscoderServiceClient', () => { new protos.google.cloud.video.transcoder.v1.GetJobTemplateRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getJobTemplate(request), expectedError); @@ -956,7 +951,6 @@ describe('v1.TranscoderServiceClient', () => { new protos.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteJobTemplate(request), expectedError); From b68d104b6fbecf40680844e249e5e1088364d344 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 3 May 2022 02:40:17 +0200 Subject: [PATCH 087/116] chore(deps): update dependency @types/mocha to v9 (#170) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/mocha](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^8.0.3` -> `^9.0.0`](https://renovatebot.com/diffs/npm/@types%2fmocha/8.2.3/9.1.1) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/compatibility-slim/8.2.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/confidence-slim/8.2.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration ๐Ÿ“… **Schedule**: "after 9am and before 3pm" (UTC). ๐Ÿšฆ **Automerge**: Disabled by config. Please merge this manually once you are satisfied. โ™ป **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. ๐Ÿ”• **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-video-transcoder). --- packages/google-cloud-video-transcoder/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index d69e8e3d8fe..8766eb541d2 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -43,7 +43,7 @@ "google-gax": "^2.24.1" }, "devDependencies": { - "@types/mocha": "^8.0.3", + "@types/mocha": "^9.0.0", "@types/node": "^16.0.0", "@types/sinon": "^10.0.0", "c8": "^7.3.0", From afe668c190eb01e38eba5537507caf1b4a540ac6 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 3 May 2022 16:55:32 -0700 Subject: [PATCH 088/116] build(node): update client library version in samples metadata (#1356) (#169) * build(node): add feat in node post-processor to add client library version number in snippet metadata Co-authored-by: Benjamin E. Coe Source-Link: https://github.com/googleapis/synthtool/commit/d337b88dd1494365183718a2de0b7b4056b6fdfe Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:d106724ad2a96daa1b8d88de101ba50bdb30b8df62ffa0aa2b451d93b4556641 Co-authored-by: Owl Bot Co-authored-by: Benjamin E. Coe Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- ...data.google.cloud.video.transcoder.v1.json | 740 +++++++++--------- 1 file changed, 370 insertions(+), 370 deletions(-) diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json index 7478ec864c7..d62aeea37ee 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json @@ -1,387 +1,387 @@ { - "clientLibrary": { - "name": "nodejs-transcoder", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.video.transcoder.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "transcoder_v1_generated_TranscoderService_CreateJob_async", - "title": "TranscoderService createJob Sample", - "origin": "API_DEFINITION", - "description": " Creates a job in the specified region.", - "canonical": true, - "file": "transcoder_service.create_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateJob", - "fullName": "google.cloud.video.transcoder.v1.TranscoderService.CreateJob", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "job", - "type": ".google.cloud.video.transcoder.v1.Job" - } - ], - "resultType": ".google.cloud.video.transcoder.v1.Job", - "client": { - "shortName": "TranscoderServiceClient", - "fullName": "google.cloud.video.transcoder.v1.TranscoderServiceClient" - }, - "method": { - "shortName": "CreateJob", - "fullName": "google.cloud.video.transcoder.v1.TranscoderService.CreateJob", - "service": { - "shortName": "TranscoderService", - "fullName": "google.cloud.video.transcoder.v1.TranscoderService" - } - } - } + "clientLibrary": { + "name": "nodejs-transcoder", + "version": "1.10.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.video.transcoder.v1", + "version": "v1" + } + ] }, - { - "regionTag": "transcoder_v1_generated_TranscoderService_ListJobs_async", - "title": "TranscoderService listJobs Sample", - "origin": "API_DEFINITION", - "description": " Lists jobs in the specified region.", - "canonical": true, - "file": "transcoder_service.list_jobs.js", - "language": "JAVASCRIPT", - "segments": [ + "snippets": [ { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListJobs", - "fullName": "google.cloud.video.transcoder.v1.TranscoderService.ListJobs", - "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.transcoder.v1.ListJobsResponse", - "client": { - "shortName": "TranscoderServiceClient", - "fullName": "google.cloud.video.transcoder.v1.TranscoderServiceClient" + "regionTag": "transcoder_v1_generated_TranscoderService_CreateJob_async", + "title": "TranscoderService createJob Sample", + "origin": "API_DEFINITION", + "description": " Creates a job in the specified region.", + "canonical": true, + "file": "transcoder_service.create_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateJob", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.CreateJob", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "job", + "type": ".google.cloud.video.transcoder.v1.Job" + } + ], + "resultType": ".google.cloud.video.transcoder.v1.Job", + "client": { + "shortName": "TranscoderServiceClient", + "fullName": "google.cloud.video.transcoder.v1.TranscoderServiceClient" + }, + "method": { + "shortName": "CreateJob", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.CreateJob", + "service": { + "shortName": "TranscoderService", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService" + } + } + } }, - "method": { - "shortName": "ListJobs", - "fullName": "google.cloud.video.transcoder.v1.TranscoderService.ListJobs", - "service": { - "shortName": "TranscoderService", - "fullName": "google.cloud.video.transcoder.v1.TranscoderService" - } - } - } - }, - { - "regionTag": "transcoder_v1_generated_TranscoderService_GetJob_async", - "title": "TranscoderService getJob Sample", - "origin": "API_DEFINITION", - "description": " Returns the job data.", - "canonical": true, - "file": "transcoder_service.get_job.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetJob", - "fullName": "google.cloud.video.transcoder.v1.TranscoderService.GetJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.video.transcoder.v1.Job", - "client": { - "shortName": "TranscoderServiceClient", - "fullName": "google.cloud.video.transcoder.v1.TranscoderServiceClient" + "regionTag": "transcoder_v1_generated_TranscoderService_ListJobs_async", + "title": "TranscoderService listJobs Sample", + "origin": "API_DEFINITION", + "description": " Lists jobs in the specified region.", + "canonical": true, + "file": "transcoder_service.list_jobs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListJobs", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.ListJobs", + "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.transcoder.v1.ListJobsResponse", + "client": { + "shortName": "TranscoderServiceClient", + "fullName": "google.cloud.video.transcoder.v1.TranscoderServiceClient" + }, + "method": { + "shortName": "ListJobs", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.ListJobs", + "service": { + "shortName": "TranscoderService", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService" + } + } + } }, - "method": { - "shortName": "GetJob", - "fullName": "google.cloud.video.transcoder.v1.TranscoderService.GetJob", - "service": { - "shortName": "TranscoderService", - "fullName": "google.cloud.video.transcoder.v1.TranscoderService" - } - } - } - }, - { - "regionTag": "transcoder_v1_generated_TranscoderService_DeleteJob_async", - "title": "TranscoderService deleteJob Sample", - "origin": "API_DEFINITION", - "description": " Deletes a job.", - "canonical": true, - "file": "transcoder_service.delete_job.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteJob", - "fullName": "google.cloud.video.transcoder.v1.TranscoderService.DeleteJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "TranscoderServiceClient", - "fullName": "google.cloud.video.transcoder.v1.TranscoderServiceClient" + "regionTag": "transcoder_v1_generated_TranscoderService_GetJob_async", + "title": "TranscoderService getJob Sample", + "origin": "API_DEFINITION", + "description": " Returns the job data.", + "canonical": true, + "file": "transcoder_service.get_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetJob", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.GetJob", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.video.transcoder.v1.Job", + "client": { + "shortName": "TranscoderServiceClient", + "fullName": "google.cloud.video.transcoder.v1.TranscoderServiceClient" + }, + "method": { + "shortName": "GetJob", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.GetJob", + "service": { + "shortName": "TranscoderService", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService" + } + } + } }, - "method": { - "shortName": "DeleteJob", - "fullName": "google.cloud.video.transcoder.v1.TranscoderService.DeleteJob", - "service": { - "shortName": "TranscoderService", - "fullName": "google.cloud.video.transcoder.v1.TranscoderService" - } - } - } - }, - { - "regionTag": "transcoder_v1_generated_TranscoderService_CreateJobTemplate_async", - "title": "TranscoderService createJobTemplate Sample", - "origin": "API_DEFINITION", - "description": " Creates a job template in the specified region.", - "canonical": true, - "file": "transcoder_service.create_job_template.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateJobTemplate", - "fullName": "google.cloud.video.transcoder.v1.TranscoderService.CreateJobTemplate", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "job_template", - "type": ".google.cloud.video.transcoder.v1.JobTemplate" - }, - { - "name": "job_template_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.video.transcoder.v1.JobTemplate", - "client": { - "shortName": "TranscoderServiceClient", - "fullName": "google.cloud.video.transcoder.v1.TranscoderServiceClient" + "regionTag": "transcoder_v1_generated_TranscoderService_DeleteJob_async", + "title": "TranscoderService deleteJob Sample", + "origin": "API_DEFINITION", + "description": " Deletes a job.", + "canonical": true, + "file": "transcoder_service.delete_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteJob", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.DeleteJob", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "TranscoderServiceClient", + "fullName": "google.cloud.video.transcoder.v1.TranscoderServiceClient" + }, + "method": { + "shortName": "DeleteJob", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.DeleteJob", + "service": { + "shortName": "TranscoderService", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService" + } + } + } }, - "method": { - "shortName": "CreateJobTemplate", - "fullName": "google.cloud.video.transcoder.v1.TranscoderService.CreateJobTemplate", - "service": { - "shortName": "TranscoderService", - "fullName": "google.cloud.video.transcoder.v1.TranscoderService" - } - } - } - }, - { - "regionTag": "transcoder_v1_generated_TranscoderService_ListJobTemplates_async", - "title": "TranscoderService listJobTemplates Sample", - "origin": "API_DEFINITION", - "description": " Lists job templates in the specified region.", - "canonical": true, - "file": "transcoder_service.list_job_templates.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListJobTemplates", - "fullName": "google.cloud.video.transcoder.v1.TranscoderService.ListJobTemplates", - "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.transcoder.v1.ListJobTemplatesResponse", - "client": { - "shortName": "TranscoderServiceClient", - "fullName": "google.cloud.video.transcoder.v1.TranscoderServiceClient" + "regionTag": "transcoder_v1_generated_TranscoderService_CreateJobTemplate_async", + "title": "TranscoderService createJobTemplate Sample", + "origin": "API_DEFINITION", + "description": " Creates a job template in the specified region.", + "canonical": true, + "file": "transcoder_service.create_job_template.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateJobTemplate", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.CreateJobTemplate", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "job_template", + "type": ".google.cloud.video.transcoder.v1.JobTemplate" + }, + { + "name": "job_template_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.video.transcoder.v1.JobTemplate", + "client": { + "shortName": "TranscoderServiceClient", + "fullName": "google.cloud.video.transcoder.v1.TranscoderServiceClient" + }, + "method": { + "shortName": "CreateJobTemplate", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.CreateJobTemplate", + "service": { + "shortName": "TranscoderService", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService" + } + } + } }, - "method": { - "shortName": "ListJobTemplates", - "fullName": "google.cloud.video.transcoder.v1.TranscoderService.ListJobTemplates", - "service": { - "shortName": "TranscoderService", - "fullName": "google.cloud.video.transcoder.v1.TranscoderService" - } - } - } - }, - { - "regionTag": "transcoder_v1_generated_TranscoderService_GetJobTemplate_async", - "title": "TranscoderService getJobTemplate Sample", - "origin": "API_DEFINITION", - "description": " Returns the job template data.", - "canonical": true, - "file": "transcoder_service.get_job_template.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 52, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetJobTemplate", - "fullName": "google.cloud.video.transcoder.v1.TranscoderService.GetJobTemplate", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.video.transcoder.v1.JobTemplate", - "client": { - "shortName": "TranscoderServiceClient", - "fullName": "google.cloud.video.transcoder.v1.TranscoderServiceClient" + "regionTag": "transcoder_v1_generated_TranscoderService_ListJobTemplates_async", + "title": "TranscoderService listJobTemplates Sample", + "origin": "API_DEFINITION", + "description": " Lists job templates in the specified region.", + "canonical": true, + "file": "transcoder_service.list_job_templates.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListJobTemplates", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.ListJobTemplates", + "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.transcoder.v1.ListJobTemplatesResponse", + "client": { + "shortName": "TranscoderServiceClient", + "fullName": "google.cloud.video.transcoder.v1.TranscoderServiceClient" + }, + "method": { + "shortName": "ListJobTemplates", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.ListJobTemplates", + "service": { + "shortName": "TranscoderService", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService" + } + } + } }, - "method": { - "shortName": "GetJobTemplate", - "fullName": "google.cloud.video.transcoder.v1.TranscoderService.GetJobTemplate", - "service": { - "shortName": "TranscoderService", - "fullName": "google.cloud.video.transcoder.v1.TranscoderService" - } - } - } - }, - { - "regionTag": "transcoder_v1_generated_TranscoderService_DeleteJobTemplate_async", - "title": "TranscoderService deleteJobTemplate Sample", - "origin": "API_DEFINITION", - "description": " Deletes a job template.", - "canonical": true, - "file": "transcoder_service.delete_job_template.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteJobTemplate", - "fullName": "google.cloud.video.transcoder.v1.TranscoderService.DeleteJobTemplate", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "TranscoderServiceClient", - "fullName": "google.cloud.video.transcoder.v1.TranscoderServiceClient" + "regionTag": "transcoder_v1_generated_TranscoderService_GetJobTemplate_async", + "title": "TranscoderService getJobTemplate Sample", + "origin": "API_DEFINITION", + "description": " Returns the job template data.", + "canonical": true, + "file": "transcoder_service.get_job_template.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetJobTemplate", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.GetJobTemplate", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.video.transcoder.v1.JobTemplate", + "client": { + "shortName": "TranscoderServiceClient", + "fullName": "google.cloud.video.transcoder.v1.TranscoderServiceClient" + }, + "method": { + "shortName": "GetJobTemplate", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.GetJobTemplate", + "service": { + "shortName": "TranscoderService", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService" + } + } + } }, - "method": { - "shortName": "DeleteJobTemplate", - "fullName": "google.cloud.video.transcoder.v1.TranscoderService.DeleteJobTemplate", - "service": { - "shortName": "TranscoderService", - "fullName": "google.cloud.video.transcoder.v1.TranscoderService" - } + { + "regionTag": "transcoder_v1_generated_TranscoderService_DeleteJobTemplate_async", + "title": "TranscoderService deleteJobTemplate Sample", + "origin": "API_DEFINITION", + "description": " Deletes a job template.", + "canonical": true, + "file": "transcoder_service.delete_job_template.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteJobTemplate", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.DeleteJobTemplate", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "TranscoderServiceClient", + "fullName": "google.cloud.video.transcoder.v1.TranscoderServiceClient" + }, + "method": { + "shortName": "DeleteJobTemplate", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService.DeleteJobTemplate", + "service": { + "shortName": "TranscoderService", + "fullName": "google.cloud.video.transcoder.v1.TranscoderService" + } + } + } } - } - } - ] -} + ] +} \ No newline at end of file From 1a6bf65a86c37d2847de6f8fed8f051f6b67faae Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 9 May 2022 17:38:23 +0200 Subject: [PATCH 089/116] chore(deps): update dependency sinon to v14 (#173) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^13.0.0` -> `^14.0.0`](https://renovatebot.com/diffs/npm/sinon/13.0.2/14.0.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/compatibility-slim/13.0.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/confidence-slim/13.0.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v14.0.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1400) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v13.0.2...v14.0.0) - [`c2bbd826`](https://togithub.com/sinonjs/sinon/commit/c2bbd82641444eb5b32822489ae40f185afbbf00) Drop node 12 (Morgan Roderick) > And embrace Node 18 > > See https://nodejs.org/en/about/releases/ *Released by Morgan Roderick on 2022-05-07.*
--- ### Configuration ๐Ÿ“… **Schedule**: "after 9am and before 3pm" (UTC). ๐Ÿšฆ **Automerge**: Disabled by config. Please merge this manually once you are satisfied. โ™ป **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. ๐Ÿ”• **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-video-transcoder). --- packages/google-cloud-video-transcoder/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 8766eb541d2..c51a0a199c7 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -55,7 +55,7 @@ "mocha": "^8.2.1", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", - "sinon": "^13.0.0", + "sinon": "^14.0.0", "ts-loader": "^9.0.0", "typescript": "^3.9.7" }, From 0863e3f54ce588f1a7c7b4d36bc3ff6b23218d16 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Mon, 16 May 2022 17:40:57 -0700 Subject: [PATCH 090/116] build!: update library to use Node 12 (#175) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat!: Update library to use Node 12 * ๐Ÿฆ‰ Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- packages/google-cloud-video-transcoder/package.json | 10 +++++----- .../google-cloud-video-transcoder/samples/package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index c51a0a199c7..d32b1fafa91 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -40,26 +40,26 @@ }, "dependencies": { "@google-cloud/video-transcoder": "^1.8.1", - "google-gax": "^2.24.1" + "google-gax": "^3.0.1" }, "devDependencies": { "@types/mocha": "^9.0.0", "@types/node": "^16.0.0", "@types/sinon": "^10.0.0", "c8": "^7.3.0", - "gts": "^3.0.0", + "gts": "^3.1.0", "jsdoc": "^3.6.5", "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.4", "linkinator": "^2.1.2", - "mocha": "^8.2.1", + "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "sinon": "^14.0.0", "ts-loader": "^9.0.0", - "typescript": "^3.9.7" + "typescript": "^4.6.4" }, "engines": { - "node": ">=10.0.0" + "node": ">=12.0.0" } } diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index c8169f4abac..21ad8dc2c37 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -4,7 +4,7 @@ "license": "Apache-2.0", "author": "Google LLC", "engines": { - "node": ">=10" + "node": ">=12.0.0" }, "files": [ "*.js", From 20fcf39f6cf5e992024ad2a9c188e32e6e91ddde Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 18 May 2022 10:16:08 -0700 Subject: [PATCH 091/116] chore(main): release 2.0.0 (#176) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 2.0.0 * ๐Ÿฆ‰ Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-cloud-video-transcoder/CHANGELOG.md | 11 +++++++++++ packages/google-cloud-video-transcoder/package.json | 2 +- ...pet_metadata.google.cloud.video.transcoder.v1.json | 2 +- .../samples/package.json | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-video-transcoder/CHANGELOG.md b/packages/google-cloud-video-transcoder/CHANGELOG.md index d88c19a9885..5595e034876 100644 --- a/packages/google-cloud-video-transcoder/CHANGELOG.md +++ b/packages/google-cloud-video-transcoder/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [2.0.0](https://github.com/googleapis/nodejs-video-transcoder/compare/v1.10.0...v2.0.0) (2022-05-17) + + +### โš  BREAKING CHANGES + +* update library to use Node 12 (#175) + +### Build System + +* update library to use Node 12 ([#175](https://github.com/googleapis/nodejs-video-transcoder/issues/175)) ([555aad4](https://github.com/googleapis/nodejs-video-transcoder/commit/555aad476236704167b667adf79f597baec0b6a1)) + ## [1.10.0](https://github.com/googleapis/nodejs-video-transcoder/compare/v1.9.0...v1.10.0) (2022-02-08) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index d32b1fafa91..90348f3992e 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/video-transcoder", - "version": "1.10.0", + "version": "2.0.0", "description": "Transcoder client for Node.js", "repository": "googleapis/nodejs-video-transcoder", "license": "Apache-2.0", diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json index d62aeea37ee..b9c4dba53df 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-transcoder", - "version": "1.10.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index 21ad8dc2c37..71e3c607147 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/video-transcoder": "^1.10.0" + "@google-cloud/video-transcoder": "^2.0.0" }, "devDependencies": { "@google-cloud/storage": "^5.4.0", From cef3aa3a336cf13b4eee2c3cb7da1e956621e134 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 7 Jun 2022 19:40:08 +0200 Subject: [PATCH 092/116] chore(deps): update dependency @google-cloud/storage to v6 (#178) --- packages/google-cloud-video-transcoder/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index 71e3c607147..02abe67f8f7 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -17,7 +17,7 @@ "@google-cloud/video-transcoder": "^2.0.0" }, "devDependencies": { - "@google-cloud/storage": "^5.4.0", + "@google-cloud/storage": "^6.0.0", "c8": "^7.3.0", "mocha": "^8.1.1", "uuid": "^8.0.0" From 76f064bcb0eecf0bf616d828e88c3f1c167118a2 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 7 Jun 2022 19:40:21 +0200 Subject: [PATCH 093/116] fix(deps): update dependency @google-cloud/video-transcoder to v2 (#177) --- packages/google-cloud-video-transcoder/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 90348f3992e..87aac946957 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -39,7 +39,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "@google-cloud/video-transcoder": "^1.8.1", + "@google-cloud/video-transcoder": "^2.0.0", "google-gax": "^3.0.1" }, "devDependencies": { From 9bc3b42266a087eab6a2b6f01392c1bc44894060 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 7 Jun 2022 14:53:52 -0400 Subject: [PATCH 094/116] chore(main): release 2.0.1 (#179) See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-cloud-video-transcoder/CHANGELOG.md | 7 +++++++ packages/google-cloud-video-transcoder/package.json | 2 +- .../snippet_metadata.google.cloud.video.transcoder.v1.json | 2 +- .../google-cloud-video-transcoder/samples/package.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-video-transcoder/CHANGELOG.md b/packages/google-cloud-video-transcoder/CHANGELOG.md index 5595e034876..d85dfc159f8 100644 --- a/packages/google-cloud-video-transcoder/CHANGELOG.md +++ b/packages/google-cloud-video-transcoder/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/nodejs-video-transcoder/compare/v2.0.0...v2.0.1) (2022-06-07) + + +### Bug Fixes + +* **deps:** update dependency @google-cloud/video-transcoder to v2 ([#177](https://github.com/googleapis/nodejs-video-transcoder/issues/177)) ([ffee92b](https://github.com/googleapis/nodejs-video-transcoder/commit/ffee92b8085a139e279d9f8633f8be51be748f62)) + ## [2.0.0](https://github.com/googleapis/nodejs-video-transcoder/compare/v1.10.0...v2.0.0) (2022-05-17) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 87aac946957..9558f9dc565 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/video-transcoder", - "version": "2.0.0", + "version": "2.0.1", "description": "Transcoder client for Node.js", "repository": "googleapis/nodejs-video-transcoder", "license": "Apache-2.0", diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json index b9c4dba53df..ca84b52cb1d 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-transcoder", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index 02abe67f8f7..77d6746b3a1 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/video-transcoder": "^2.0.0" + "@google-cloud/video-transcoder": "^2.0.1" }, "devDependencies": { "@google-cloud/storage": "^6.0.0", From 28b290d83230ba7bdcc8e8787d8ee002422d5845 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 9 Jun 2022 22:14:10 +0200 Subject: [PATCH 095/116] chore(deps): update dependency jsdoc-region-tag to v2 (#182) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jsdoc-region-tag](https://togithub.com/googleapis/jsdoc-region-tag) | [`^1.0.4` -> `^2.0.0`](https://renovatebot.com/diffs/npm/jsdoc-region-tag/1.3.1/2.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/compatibility-slim/1.3.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc-region-tag/2.0.0/confidence-slim/1.3.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/jsdoc-region-tag ### [`v2.0.0`](https://togithub.com/googleapis/jsdoc-region-tag/blob/HEAD/CHANGELOG.md#​200-httpsgithubcomgoogleapisjsdoc-region-tagcomparev131v200-2022-05-20) [Compare Source](https://togithub.com/googleapis/jsdoc-region-tag/compare/v1.3.1...v2.0.0) ##### โš  BREAKING CHANGES - update library to use Node 12 ([#​107](https://togithub.com/googleapis/jsdoc-region-tag/issues/107)) ##### Build System - update library to use Node 12 ([#​107](https://togithub.com/googleapis/jsdoc-region-tag/issues/107)) ([5b51796](https://togithub.com/googleapis/jsdoc-region-tag/commit/5b51796771984cf8b978990025f14faa03c19923)) ##### [1.3.1](https://www.github.com/googleapis/jsdoc-region-tag/compare/v1.3.0...v1.3.1) (2021-08-11) ##### Bug Fixes - **build:** migrate to using main branch ([#​79](https://www.togithub.com/googleapis/jsdoc-region-tag/issues/79)) ([5050615](https://www.github.com/googleapis/jsdoc-region-tag/commit/50506150b7758592df5e389c6a5c3d82b3b20881))
--- ### Configuration ๐Ÿ“… **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). ๐Ÿšฆ **Automerge**: Disabled by config. Please merge this manually once you are satisfied. โ™ป **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. ๐Ÿ”• **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-video-transcoder). --- packages/google-cloud-video-transcoder/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 9558f9dc565..8ec450d4b49 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -50,7 +50,7 @@ "gts": "^3.1.0", "jsdoc": "^3.6.5", "jsdoc-fresh": "^1.0.2", - "jsdoc-region-tag": "^1.0.4", + "jsdoc-region-tag": "^2.0.0", "linkinator": "^2.1.2", "mocha": "^9.2.2", "null-loader": "^4.0.0", From 864b2a69b5bf399a0d637ce9fcce3520d91b75d4 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 9 Jun 2022 22:44:31 +0200 Subject: [PATCH 096/116] chore(deps): update dependency jsdoc-fresh to v2 (#181) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jsdoc-fresh](https://togithub.com/googleapis/jsdoc-fresh) | [`^1.0.2` -> `^2.0.0`](https://renovatebot.com/diffs/npm/jsdoc-fresh/1.1.1/2.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/compatibility-slim/1.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/confidence-slim/1.1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/jsdoc-fresh ### [`v2.0.0`](https://togithub.com/googleapis/jsdoc-fresh/blob/HEAD/CHANGELOG.md#​200-httpsgithubcomgoogleapisjsdoc-freshcomparev111v200-2022-05-18) [Compare Source](https://togithub.com/googleapis/jsdoc-fresh/compare/v1.1.1...v2.0.0) ##### โš  BREAKING CHANGES - update library to use Node 12 ([#​108](https://togithub.com/googleapis/jsdoc-fresh/issues/108)) ##### Build System - update library to use Node 12 ([#​108](https://togithub.com/googleapis/jsdoc-fresh/issues/108)) ([e61c223](https://togithub.com/googleapis/jsdoc-fresh/commit/e61c2238db8900e339e5fe7fb8aea09642290182)) ##### [1.1.1](https://www.github.com/googleapis/jsdoc-fresh/compare/v1.1.0...v1.1.1) (2021-08-11) ##### Bug Fixes - **build:** migrate to using main branch ([#​83](https://www.togithub.com/googleapis/jsdoc-fresh/issues/83)) ([9474adb](https://www.github.com/googleapis/jsdoc-fresh/commit/9474adbf0d559d319ff207397ba2be6b557999ac))
--- ### Configuration ๐Ÿ“… **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). ๐Ÿšฆ **Automerge**: Disabled by config. Please merge this manually once you are satisfied. โ™ป **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. ๐Ÿ”• **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-video-transcoder). --- packages/google-cloud-video-transcoder/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 8ec450d4b49..2fb3d3e948f 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -49,7 +49,7 @@ "c8": "^7.3.0", "gts": "^3.1.0", "jsdoc": "^3.6.5", - "jsdoc-fresh": "^1.0.2", + "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^2.1.2", "mocha": "^9.2.2", From 7f1b2185c9df542851ded0926c97434a694e00a9 Mon Sep 17 00:00:00 2001 From: Nicholas Cook Date: Mon, 13 Jun 2022 15:33:08 -0700 Subject: [PATCH 097/116] build: update .repo-metadata.json codeowners (#183) --- packages/google-cloud-video-transcoder/.repo-metadata.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-video-transcoder/.repo-metadata.json b/packages/google-cloud-video-transcoder/.repo-metadata.json index fdb83f66a62..4706a93d968 100644 --- a/packages/google-cloud-video-transcoder/.repo-metadata.json +++ b/packages/google-cloud-video-transcoder/.repo-metadata.json @@ -8,6 +8,7 @@ "api_id": "transcoder.googleapis.com", "distribution_name": "@google-cloud/video-transcoder", "repo": "googleapis/nodejs-video-transcoder", + "codeowner_team": "@googleapis/cloud-media-team", "issue_tracker": "https://github.com/googleapis/nodejs-video-transcoder/issues", "name_pretty": "Transcoder API", "default_version": "v1", From 9b59ba83420aa916b46cf817b63abb869c7e6a50 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 16 Jun 2022 10:39:35 -0700 Subject: [PATCH 098/116] feat: add support for user labels for job and job template (#184) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add support for user labels for job and job template PiperOrigin-RevId: 455298767 Source-Link: https://github.com/googleapis/googleapis/commit/a9969d336bc114b5ab1a1c81b91d4495540ea76f Source-Link: https://github.com/googleapis/googleapis-gen/commit/63c22c65700434a9dac45dbb4958954696755d07 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjNjMjJjNjU3MDA0MzRhOWRhYzQ1ZGJiNDk1ODk1NDY5Njc1NWQwNyJ9 * ๐Ÿฆ‰ Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../cloud/video/transcoder/v1/resources.proto | 68 +++++--- .../cloud/video/transcoder/v1/services.proto | 2 +- .../protos/protos.d.ts | 26 ++- .../protos/protos.js | 152 +++++++++++++++--- .../protos/protos.json | 24 ++- 5 files changed, 221 insertions(+), 51 deletions(-) diff --git a/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/resources.proto b/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/resources.proto index 42b9d62fac6..ce3824ba4ff 100644 --- a/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/resources.proto +++ b/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/resources.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// 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. @@ -60,12 +60,16 @@ message Job { // Input only. Specify the `input_uri` to populate empty `uri` fields in each element of // `Job.config.inputs` or `JobTemplate.config.inputs` when using template. // URI of the media. Input files must be at least 5 seconds in duration and - // stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). + // stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). See + // [Supported input and output + // formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). string input_uri = 2 [(google.api.field_behavior) = INPUT_ONLY]; // Input only. Specify the `output_uri` to populate an empty `Job.config.output.uri` or // `JobTemplate.config.output.uri` when using template. - // URI for the output file(s). For example, `gs://my-bucket/outputs/`. + // URI for the output file(s). For example, `gs://my-bucket/outputs/`. See + // [Supported input and output + // formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). string output_uri = 3 [(google.api.field_behavior) = INPUT_ONLY]; // Specify the `job_config` for the transcoding job. If you don't specify the @@ -104,6 +108,10 @@ message Job { // a value between 1 and 90. The default is 30. int32 ttl_after_completion_days = 15; + // The labels associated with this job. You can use these to organize and + // group your jobs. + map labels = 16; + // Output only. An error object that describes the reason for the failure. // This property is always present when `state` is `FAILED`. google.rpc.Status error = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -123,6 +131,10 @@ message JobTemplate { // The configuration for this template. JobConfig config = 2; + + // The labels associated with this job template. You can use these to organize + // and group your job templates. + map labels = 3; } // Job configuration @@ -154,6 +166,7 @@ message JobConfig { PubsubDestination pubsub_destination = 8; // List of output sprite sheets. + // Spritesheets require at least one VideoStream in the Jobconfig. repeated SpriteSheet sprite_sheets = 9; // List of overlays on the output video, in descending Z-order. @@ -168,7 +181,9 @@ message Input { // URI of the media. Input files must be at least 5 seconds in duration and // stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). - // If empty, the value will be populated from `Job.input_uri`. + // If empty, the value is populated from `Job.input_uri`. See + // [Supported input and output + // formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). string uri = 2; // Preprocessing configurations. @@ -178,7 +193,9 @@ message Input { // Location of output file(s) in a Cloud Storage bucket. message Output { // URI for the output file(s). For example, `gs://my-bucket/outputs/`. - // If empty the value is populated from `Job.output_uri`. + // If empty, the value is populated from `Job.output_uri`. See + // [Supported input and output + // formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). string uri = 1; } @@ -250,6 +267,10 @@ message MuxStream { // - `fmp4`- the corresponding file extension is `.m4s` // - `mp4` // - `vtt` + // + // See also: + // [Supported input and output + // formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) string container = 3; // List of `ElementaryStream.key`s multiplexed in this stream. @@ -400,6 +421,18 @@ message Overlay { google.protobuf.Duration start_time_offset = 2; } + // Fade type for the overlay: `FADE_IN` or `FADE_OUT`. + enum FadeType { + // The fade type is not specified. + FADE_TYPE_UNSPECIFIED = 0; + + // Fade the overlay object into view. + FADE_IN = 1; + + // Fade the overlay object out of view. + FADE_OUT = 2; + } + // Display overlay object with fade animation. message AnimationFade { // Required. Type of fade animation: `FADE_IN` or `FADE_OUT`. @@ -443,18 +476,6 @@ message Overlay { } } - // Fade type for the overlay: `FADE_IN` or `FADE_OUT`. - enum FadeType { - // The fade type is not specified. - FADE_TYPE_UNSPECIFIED = 0; - - // Fade the overlay object into view. - FADE_IN = 1; - - // Fade the overlay object out of view. - FADE_OUT = 2; - } - // Image overlay. Image image = 1; @@ -466,6 +487,8 @@ message Overlay { // Preprocessing configurations. message PreprocessingConfig { // Color preprocessing configuration. + // + // **Note:** This configuration is not supported. message Color { // Control color saturation of the video. Enter a value between -1 and 1, // where -1 is fully desaturated and 1 is maximum saturation. 0 is no @@ -484,6 +507,8 @@ message PreprocessingConfig { } // Denoise preprocessing configuration. + // + // **Note:** This configuration is not supported. message Denoise { // Set strength of the denoise. Enter a value between 0 and 1. The higher // the value, the smoother the image. 0 is no denoising. The default is 0. @@ -499,6 +524,8 @@ message PreprocessingConfig { } // Deblock preprocessing configuration. + // + // **Note:** This configuration is not supported. message Deblock { // Set strength of the deblocker. Enter a value between 0 and 1. The higher // the value, the stronger the block removal. 0 is no deblocking. The @@ -525,9 +552,13 @@ message PreprocessingConfig { double lufs = 1; // Enable boosting high frequency components. The default is `false`. + // + // **Note:** This field is not supported. bool high_boost = 2; // Enable boosting low frequency components. The default is `false`. + // + // **Note:** This field is not supported. bool low_boost = 3; } @@ -906,11 +937,12 @@ message VideoStream { // Supported rate control modes: // // - `vbr` - variable bitrate - // - `crf` - constant rate factor string rate_control_mode = 6; // Target CRF level. Must be between 10 and 36, where 10 is the highest // quality and 36 is the most efficient compression. The default is 21. + // + // **Note:** This field is not supported. int32 crf_level = 7; // GOP mode can be either by frame count or duration. diff --git a/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/services.proto b/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/services.proto index 992b3a1eb33..4d400c33b7a 100644 --- a/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/services.proto +++ b/packages/google-cloud-video-transcoder/protos/google/cloud/video/transcoder/v1/services.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// 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. diff --git a/packages/google-cloud-video-transcoder/protos/protos.d.ts b/packages/google-cloud-video-transcoder/protos/protos.d.ts index 040d0ba0b99..e7aa7cf9499 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.d.ts +++ b/packages/google-cloud-video-transcoder/protos/protos.d.ts @@ -62,6 +62,9 @@ export namespace google { /** Job ttlAfterCompletionDays */ ttlAfterCompletionDays?: (number|null); + /** Job labels */ + labels?: ({ [k: string]: string }|null); + /** Job error */ error?: (google.rpc.IStatus|null); } @@ -105,6 +108,9 @@ export namespace google { /** Job ttlAfterCompletionDays. */ public ttlAfterCompletionDays: number; + /** Job labels. */ + public labels: { [k: string]: string }; + /** Job error. */ public error?: (google.rpc.IStatus|null); @@ -202,6 +208,9 @@ export namespace google { /** JobTemplate config */ config?: (google.cloud.video.transcoder.v1.IJobConfig|null); + + /** JobTemplate labels */ + labels?: ({ [k: string]: string }|null); } /** Represents a JobTemplate. */ @@ -219,6 +228,9 @@ export namespace google { /** JobTemplate config. */ public config?: (google.cloud.video.transcoder.v1.IJobConfig|null); + /** JobTemplate labels. */ + public labels: { [k: string]: string }; + /** * Creates a new JobTemplate instance using the specified properties. * @param [properties] Properties to set @@ -1796,6 +1808,13 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** FadeType enum. */ + enum FadeType { + FADE_TYPE_UNSPECIFIED = 0, + FADE_IN = 1, + FADE_OUT = 2 + } + /** Properties of an AnimationFade. */ interface IAnimationFade { @@ -2098,13 +2117,6 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } - - /** FadeType enum. */ - enum FadeType { - FADE_TYPE_UNSPECIFIED = 0, - FADE_IN = 1, - FADE_OUT = 2 - } } /** Properties of a PreprocessingConfig. */ diff --git a/packages/google-cloud-video-transcoder/protos/protos.js b/packages/google-cloud-video-transcoder/protos/protos.js index 9eb2a6e83a4..0911c6b1e6a 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.js +++ b/packages/google-cloud-video-transcoder/protos/protos.js @@ -91,6 +91,7 @@ * @property {google.protobuf.ITimestamp|null} [startTime] Job startTime * @property {google.protobuf.ITimestamp|null} [endTime] Job endTime * @property {number|null} [ttlAfterCompletionDays] Job ttlAfterCompletionDays + * @property {Object.|null} [labels] Job labels * @property {google.rpc.IStatus|null} [error] Job error */ @@ -103,6 +104,7 @@ * @param {google.cloud.video.transcoder.v1.IJob=} [properties] Properties to set */ function Job(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -189,6 +191,14 @@ */ Job.prototype.ttlAfterCompletionDays = 0; + /** + * Job labels. + * @member {Object.} labels + * @memberof google.cloud.video.transcoder.v1.Job + * @instance + */ + Job.prototype.labels = $util.emptyObject; + /** * Job error. * @member {google.rpc.IStatus|null|undefined} error @@ -255,6 +265,9 @@ $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); if (message.ttlAfterCompletionDays != null && Object.hasOwnProperty.call(message, "ttlAfterCompletionDays")) writer.uint32(/* id 15, wireType 0 =*/120).int32(message.ttlAfterCompletionDays); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 16, wireType 2 =*/130).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); if (message.error != null && Object.hasOwnProperty.call(message, "error")) $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); return writer; @@ -287,7 +300,7 @@ Job.decode = function 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.transcoder.v1.Job(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.transcoder.v1.Job(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -321,6 +334,28 @@ case 15: message.ttlAfterCompletionDays = reader.int32(); break; + case 16: + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; case 17: message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); break; @@ -413,6 +448,14 @@ if (message.ttlAfterCompletionDays != null && message.hasOwnProperty("ttlAfterCompletionDays")) if (!$util.isInteger(message.ttlAfterCompletionDays)) return "ttlAfterCompletionDays: integer expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } if (message.error != null && message.hasOwnProperty("error")) { var error = $root.google.rpc.Status.verify(message.error); if (error) @@ -485,6 +528,13 @@ } if (object.ttlAfterCompletionDays != null) message.ttlAfterCompletionDays = object.ttlAfterCompletionDays | 0; + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.Job.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } if (object.error != null) { if (typeof object.error !== "object") throw TypeError(".google.cloud.video.transcoder.v1.Job.error: object expected"); @@ -506,6 +556,8 @@ if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.labels = {}; if (options.defaults) { object.name = ""; object.inputUri = ""; @@ -543,6 +595,12 @@ object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); if (message.ttlAfterCompletionDays != null && message.hasOwnProperty("ttlAfterCompletionDays")) object.ttlAfterCompletionDays = message.ttlAfterCompletionDays; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } if (message.error != null && message.hasOwnProperty("error")) object.error = $root.google.rpc.Status.toObject(message.error, options); return object; @@ -590,6 +648,7 @@ * @interface IJobTemplate * @property {string|null} [name] JobTemplate name * @property {google.cloud.video.transcoder.v1.IJobConfig|null} [config] JobTemplate config + * @property {Object.|null} [labels] JobTemplate labels */ /** @@ -601,6 +660,7 @@ * @param {google.cloud.video.transcoder.v1.IJobTemplate=} [properties] Properties to set */ function JobTemplate(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -623,6 +683,14 @@ */ JobTemplate.prototype.config = null; + /** + * JobTemplate labels. + * @member {Object.} labels + * @memberof google.cloud.video.transcoder.v1.JobTemplate + * @instance + */ + JobTemplate.prototype.labels = $util.emptyObject; + /** * Creates a new JobTemplate instance using the specified properties. * @function create @@ -651,6 +719,9 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.config != null && Object.hasOwnProperty.call(message, "config")) $root.google.cloud.video.transcoder.v1.JobConfig.encode(message.config, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); return writer; }; @@ -681,7 +752,7 @@ JobTemplate.decode = function 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.transcoder.v1.JobTemplate(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.transcoder.v1.JobTemplate(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -691,6 +762,28 @@ case 2: message.config = $root.google.cloud.video.transcoder.v1.JobConfig.decode(reader, reader.uint32()); break; + case 3: + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; default: reader.skipType(tag & 7); break; @@ -734,6 +827,14 @@ if (error) return "config." + error; } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } return null; }; @@ -756,6 +857,13 @@ throw TypeError(".google.cloud.video.transcoder.v1.JobTemplate.config: object expected"); message.config = $root.google.cloud.video.transcoder.v1.JobConfig.fromObject(object.config); } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.video.transcoder.v1.JobTemplate.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } return message; }; @@ -772,6 +880,8 @@ if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.labels = {}; if (options.defaults) { object.name = ""; object.config = null; @@ -780,6 +890,12 @@ object.name = message.name; if (message.config != null && message.hasOwnProperty("config")) object.config = $root.google.cloud.video.transcoder.v1.JobConfig.toObject(message.config, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } return object; }; @@ -4679,6 +4795,22 @@ return AnimationStatic; })(); + /** + * FadeType enum. + * @name google.cloud.video.transcoder.v1.Overlay.FadeType + * @enum {number} + * @property {number} FADE_TYPE_UNSPECIFIED=0 FADE_TYPE_UNSPECIFIED value + * @property {number} FADE_IN=1 FADE_IN value + * @property {number} FADE_OUT=2 FADE_OUT value + */ + Overlay.FadeType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FADE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FADE_IN"] = 1; + values[valuesById[2] = "FADE_OUT"] = 2; + return values; + })(); + Overlay.AnimationFade = (function() { /** @@ -5437,22 +5569,6 @@ return Animation; })(); - /** - * FadeType enum. - * @name google.cloud.video.transcoder.v1.Overlay.FadeType - * @enum {number} - * @property {number} FADE_TYPE_UNSPECIFIED=0 FADE_TYPE_UNSPECIFIED value - * @property {number} FADE_IN=1 FADE_IN value - * @property {number} FADE_OUT=2 FADE_OUT value - */ - Overlay.FadeType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FADE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "FADE_IN"] = 1; - values[valuesById[2] = "FADE_OUT"] = 2; - return values; - })(); - return Overlay; })(); diff --git a/packages/google-cloud-video-transcoder/protos/protos.json b/packages/google-cloud-video-transcoder/protos/protos.json index c599cee9fc7..51c77ebc19f 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.json +++ b/packages/google-cloud-video-transcoder/protos/protos.json @@ -94,6 +94,11 @@ "type": "int32", "id": 15 }, + "labels": { + "keyType": "string", + "type": "string", + "id": 16 + }, "error": { "type": "google.rpc.Status", "id": 17, @@ -127,6 +132,11 @@ "config": { "type": "JobConfig", "id": 2 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 3 } } }, @@ -450,6 +460,13 @@ } } }, + "FadeType": { + "values": { + "FADE_TYPE_UNSPECIFIED": 0, + "FADE_IN": 1, + "FADE_OUT": 2 + } + }, "AnimationFade": { "fields": { "fadeType": { @@ -505,13 +522,6 @@ "id": 3 } } - }, - "FadeType": { - "values": { - "FADE_TYPE_UNSPECIFIED": 0, - "FADE_IN": 1, - "FADE_OUT": 2 - } } } }, From ebae9c8342f91e872e13c11ea54520e9063378e4 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 16 Jun 2022 15:54:34 -0700 Subject: [PATCH 099/116] chore(main): release 2.1.0 (#185) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 2.1.0 * ๐Ÿฆ‰ Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-cloud-video-transcoder/CHANGELOG.md | 7 +++++++ packages/google-cloud-video-transcoder/package.json | 2 +- .../snippet_metadata.google.cloud.video.transcoder.v1.json | 2 +- .../google-cloud-video-transcoder/samples/package.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-video-transcoder/CHANGELOG.md b/packages/google-cloud-video-transcoder/CHANGELOG.md index d85dfc159f8..0e248cce55c 100644 --- a/packages/google-cloud-video-transcoder/CHANGELOG.md +++ b/packages/google-cloud-video-transcoder/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.1.0](https://github.com/googleapis/nodejs-video-transcoder/compare/v2.0.1...v2.1.0) (2022-06-16) + + +### Features + +* add support for user labels for job and job template ([#184](https://github.com/googleapis/nodejs-video-transcoder/issues/184)) ([675fbd6](https://github.com/googleapis/nodejs-video-transcoder/commit/675fbd6c6f8719f1487c2ef9e19057b71b2e0945)) + ## [2.0.1](https://github.com/googleapis/nodejs-video-transcoder/compare/v2.0.0...v2.0.1) (2022-06-07) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 2fb3d3e948f..425edd9a7fc 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/video-transcoder", - "version": "2.0.1", + "version": "2.1.0", "description": "Transcoder client for Node.js", "repository": "googleapis/nodejs-video-transcoder", "license": "Apache-2.0", diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json index ca84b52cb1d..78de22fa41f 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-transcoder", - "version": "2.0.1", + "version": "2.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index 77d6746b3a1..e6ad10d095a 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/video-transcoder": "^2.0.1" + "@google-cloud/video-transcoder": "^2.1.0" }, "devDependencies": { "@google-cloud/storage": "^6.0.0", From 30152abbcbe95b463505c37a90ea95fb688a5f15 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 29 Jun 2022 12:44:28 -0400 Subject: [PATCH 100/116] feat: support regapic LRO (#187) Use gapic-generator-typescript v2.15.1. PiperOrigin-RevId: 456946341 Source-Link: https://github.com/googleapis/googleapis/commit/88fd18d9d3b872b3d06a3d9392879f50b5bf3ce5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/accfa371f667439313335c64042b063c1c53102e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWNjZmEzNzFmNjY3NDM5MzEzMzM1YzY0MDQyYjA2M2MxYzUzMTAyZSJ9 See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../src/v1/transcoder_service_client.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts b/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts index 90d3adf5739..448c06f2626 100644 --- a/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts +++ b/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts @@ -75,7 +75,7 @@ export class TranscoderServiceClient { * * @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/master/client-libraries.md#creating-the-client-instance). + * 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] @@ -98,11 +98,10 @@ export class TranscoderServiceClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP fallback mode. - * In fallback mode, a special browser-compatible transport implementation is used - * instead of gRPC transport. In browser context (if the `window` object is defined) - * the fallback mode is enabled automatically; set `options.fallback` to `false` - * if you need to override this behavior. + * @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}. */ constructor(opts?: ClientOptions) { // Ensure that options include all the required fields. From 2211790aefc9221bb13a961d576fa8d6b4f660bb Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 19:28:18 +0000 Subject: [PATCH 101/116] chore(main): release 2.2.0 (#188) :robot: I have created a release *beep* *boop* --- ## [2.2.0](https://github.com/googleapis/nodejs-video-transcoder/compare/v2.1.0...v2.2.0) (2022-06-29) ### Features * support regapic LRO ([#187](https://github.com/googleapis/nodejs-video-transcoder/issues/187)) ([7924434](https://github.com/googleapis/nodejs-video-transcoder/commit/79244348cb6075c157edf3146c511e2214aa3d90)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-video-transcoder/CHANGELOG.md | 7 +++++++ packages/google-cloud-video-transcoder/package.json | 2 +- .../snippet_metadata.google.cloud.video.transcoder.v1.json | 2 +- .../google-cloud-video-transcoder/samples/package.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-video-transcoder/CHANGELOG.md b/packages/google-cloud-video-transcoder/CHANGELOG.md index 0e248cce55c..1f18b5d6d16 100644 --- a/packages/google-cloud-video-transcoder/CHANGELOG.md +++ b/packages/google-cloud-video-transcoder/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.2.0](https://github.com/googleapis/nodejs-video-transcoder/compare/v2.1.0...v2.2.0) (2022-06-29) + + +### Features + +* support regapic LRO ([#187](https://github.com/googleapis/nodejs-video-transcoder/issues/187)) ([7924434](https://github.com/googleapis/nodejs-video-transcoder/commit/79244348cb6075c157edf3146c511e2214aa3d90)) + ## [2.1.0](https://github.com/googleapis/nodejs-video-transcoder/compare/v2.0.1...v2.1.0) (2022-06-16) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 425edd9a7fc..49a054298f5 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/video-transcoder", - "version": "2.1.0", + "version": "2.2.0", "description": "Transcoder client for Node.js", "repository": "googleapis/nodejs-video-transcoder", "license": "Apache-2.0", diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json index 78de22fa41f..0ca9f45866e 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-transcoder", - "version": "2.1.0", + "version": "2.2.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index e6ad10d095a..124c01de88b 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/video-transcoder": "^2.1.0" + "@google-cloud/video-transcoder": "^2.2.0" }, "devDependencies": { "@google-cloud/storage": "^6.0.0", From bca7a1307eca6dfad836e6b521eeeb73f1be1181 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 8 Jul 2022 23:04:16 +0200 Subject: [PATCH 102/116] chore(deps): update dependency linkinator to v4 (#191) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [linkinator](https://togithub.com/JustinBeckwith/linkinator) | [`^2.1.2` -> `^4.0.0`](https://renovatebot.com/diffs/npm/linkinator/2.16.2/4.0.0) | [![age](https://badges.renovateapi.com/packages/npm/linkinator/4.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/linkinator/4.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/linkinator/4.0.0/compatibility-slim/2.16.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/linkinator/4.0.0/confidence-slim/2.16.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
JustinBeckwith/linkinator ### [`v4.0.0`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v4.0.0) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.1.0...v4.0.0) ##### Features - create new release with notes ([#​508](https://togithub.com/JustinBeckwith/linkinator/issues/508)) ([2cab633](https://togithub.com/JustinBeckwith/linkinator/commit/2cab633c9659eb10794a4bac06f8b0acdc3e2c0c)) ##### BREAKING CHANGES - The commits in [#​507](https://togithub.com/JustinBeckwith/linkinator/issues/507) and [#​506](https://togithub.com/JustinBeckwith/linkinator/issues/506) both had breaking changes. They included dropping support for Node.js 12.x and updating the CSV export to be streaming, and to use a new way of writing the CSV file. This is an empty to commit using the `BREAKING CHANGE` format in the commit message to ensure a release is triggered. ### [`v3.1.0`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.1.0) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.6...v3.1.0) ##### Features - allow --skip to be defined multiple times ([#​399](https://togithub.com/JustinBeckwith/linkinator/issues/399)) ([5ca5a46](https://togithub.com/JustinBeckwith/linkinator/commit/5ca5a461508e688de12e5ae6b4cfb6565f832ebf)) ### [`v3.0.6`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.6) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.5...v3.0.6) ##### Bug Fixes - **deps:** upgrade node-glob to v8 ([#​397](https://togithub.com/JustinBeckwith/linkinator/issues/397)) ([d334dc6](https://togithub.com/JustinBeckwith/linkinator/commit/d334dc6734cd7c2b73d7ed3dea0550a6c3072ad5)) ### [`v3.0.5`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.5) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.4...v3.0.5) ##### Bug Fixes - **deps:** upgrade to htmlparser2 v8.0.1 ([#​396](https://togithub.com/JustinBeckwith/linkinator/issues/396)) ([ba3b9a8](https://togithub.com/JustinBeckwith/linkinator/commit/ba3b9a8a9b19d39af6ed91790135e833b80c1eb6)) ### [`v3.0.4`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.4) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.3...v3.0.4) ##### Bug Fixes - **deps:** update dependency gaxios to v5 ([#​391](https://togithub.com/JustinBeckwith/linkinator/issues/391)) ([48af50e](https://togithub.com/JustinBeckwith/linkinator/commit/48af50e787731204aeb7eff41325c62291311e45)) ### [`v3.0.3`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.3) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.2...v3.0.3) ##### Bug Fixes - export getConfig from index ([#​371](https://togithub.com/JustinBeckwith/linkinator/issues/371)) ([0bc0355](https://togithub.com/JustinBeckwith/linkinator/commit/0bc0355c7e2ea457f247e6b52d1577b8c4ecb3a1)) ### [`v3.0.2`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.2) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.1...v3.0.2) ##### Bug Fixes - allow server root with trailing slash ([#​370](https://togithub.com/JustinBeckwith/linkinator/issues/370)) ([8adf6b0](https://togithub.com/JustinBeckwith/linkinator/commit/8adf6b025fda250e38461f1cdad40fe08c3b3b7c)) ### [`v3.0.1`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.1) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.0...v3.0.1) ##### Bug Fixes - decode path parts in local web server ([#​369](https://togithub.com/JustinBeckwith/linkinator/issues/369)) ([4696a0c](https://togithub.com/JustinBeckwith/linkinator/commit/4696a0c38c341b178ed815f47371fca955979feb)) ### [`v3.0.0`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.0) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v2.16.2...v3.0.0) ##### Bug Fixes - **deps:** update dependency chalk to v5 ([#​362](https://togithub.com/JustinBeckwith/linkinator/issues/362)) ([4b17a8d](https://togithub.com/JustinBeckwith/linkinator/commit/4b17a8d87b649eaf813428f8ee6955e1d21dae4f)) - feat!: convert to es modules, drop node 10 ([#​359](https://togithub.com/JustinBeckwith/linkinator/issues/359)) ([efee299](https://togithub.com/JustinBeckwith/linkinator/commit/efee299ab8a805accef751eecf8538915a4e7783)), closes [#​359](https://togithub.com/JustinBeckwith/linkinator/issues/359) ##### BREAKING CHANGES - this module now requires node.js 12 and above, and has moved to es modules by default.
--- ### Configuration ๐Ÿ“… **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). ๐Ÿšฆ **Automerge**: Disabled by config. Please merge this manually once you are satisfied. โ™ป **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. ๐Ÿ”• **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-video-transcoder). --- packages/google-cloud-video-transcoder/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 49a054298f5..5680939ac61 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -51,7 +51,7 @@ "jsdoc": "^3.6.5", "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", - "linkinator": "^2.1.2", + "linkinator": "^4.0.0", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", From 5084f0280e9456bd944c4820ee7eb0f6a2c6cef6 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 23 Aug 2022 00:04:20 +0000 Subject: [PATCH 103/116] fix: better support for fallback mode (#192) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 468790263 Source-Link: https://github.com/googleapis/googleapis/commit/873ab456273d105245df0fb82a6c17a814553b80 Source-Link: https://github.com/googleapis/googleapis-gen/commit/cb6f37aeff2a3472e40a7bbace8c67d75e24bee5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2I2ZjM3YWVmZjJhMzQ3MmU0MGE3YmJhY2U4YzY3ZDc1ZTI0YmVlNSJ9 --- ...data.google.cloud.video.transcoder.v1.json | 16 +- .../v1/transcoder_service.create_job.js | 3 + .../transcoder_service.create_job_template.js | 3 + .../v1/transcoder_service.delete_job.js | 3 + .../transcoder_service.delete_job_template.js | 3 + .../v1/transcoder_service.get_job.js | 3 + .../v1/transcoder_service.get_job_template.js | 3 + .../transcoder_service.list_job_templates.js | 3 + .../v1/transcoder_service.list_jobs.js | 3 + .../src/v1/transcoder_service_client.ts | 12 +- .../test/gapic_transcoder_service_v1.ts | 160 +++++++++--------- 11 files changed, 119 insertions(+), 93 deletions(-) diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json index 0ca9f45866e..93bd641ab69 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -66,7 +66,7 @@ "segments": [ { "start": 25, - "end": 71, + "end": 74, "type": "FULL" } ], @@ -122,7 +122,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -162,7 +162,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -206,7 +206,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -254,7 +254,7 @@ "segments": [ { "start": 25, - "end": 72, + "end": 75, "type": "FULL" } ], @@ -310,7 +310,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -350,7 +350,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job.js index 47a3d4dc006..d82dfe261ac 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job.js @@ -23,6 +23,9 @@ function main(parent, job) { // [START transcoder_v1_generated_TranscoderService_CreateJob_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. */ /** diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job_template.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job_template.js index d1deee0897e..2e2e80f2111 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job_template.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.create_job_template.js @@ -23,6 +23,9 @@ function main(parent, jobTemplate, jobTemplateId) { // [START transcoder_v1_generated_TranscoderService_CreateJobTemplate_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. */ /** diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job.js index 46fd9e352bc..409f20f16db 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job.js @@ -23,6 +23,9 @@ function main(name) { // [START transcoder_v1_generated_TranscoderService_DeleteJob_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. */ /** diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job_template.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job_template.js index a1ebefe8f94..54659c7134a 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job_template.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.delete_job_template.js @@ -23,6 +23,9 @@ function main(name) { // [START transcoder_v1_generated_TranscoderService_DeleteJobTemplate_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. */ /** diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job.js index 8f8eb07f9f2..f350faa246d 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job.js @@ -23,6 +23,9 @@ function main(name) { // [START transcoder_v1_generated_TranscoderService_GetJob_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. */ /** diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job_template.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job_template.js index 4a3baa4dc5a..5e5f5d344d5 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job_template.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.get_job_template.js @@ -23,6 +23,9 @@ function main(name) { // [START transcoder_v1_generated_TranscoderService_GetJobTemplate_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. */ /** diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_job_templates.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_job_templates.js index d6891c5a6b6..51356b1063a 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_job_templates.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_job_templates.js @@ -23,6 +23,9 @@ function main(parent) { // [START transcoder_v1_generated_TranscoderService_ListJobTemplates_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. */ /** diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_jobs.js b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_jobs.js index 0c0755b2c95..4f7dd7599ca 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_jobs.js +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/transcoder_service.list_jobs.js @@ -23,6 +23,9 @@ function main(parent) { // [START transcoder_v1_generated_TranscoderService_ListJobs_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. */ /** diff --git a/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts b/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts index 448c06f2626..721b0e2f58e 100644 --- a/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts +++ b/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts @@ -28,7 +28,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -274,7 +273,8 @@ export class TranscoderServiceClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1069,7 +1069,7 @@ export class TranscoderServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listJobs.createStream( - this.innerApiCalls.listJobs as gax.GaxCall, + this.innerApiCalls.listJobs as GaxCall, request, callSettings ); @@ -1124,7 +1124,7 @@ export class TranscoderServiceClient { this.initialize(); return this.descriptors.page.listJobs.asyncIterate( this.innerApiCalls['listJobs'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -1281,7 +1281,7 @@ export class TranscoderServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listJobTemplates.createStream( - this.innerApiCalls.listJobTemplates as gax.GaxCall, + this.innerApiCalls.listJobTemplates as GaxCall, request, callSettings ); @@ -1337,7 +1337,7 @@ export class TranscoderServiceClient { this.initialize(); return this.descriptors.page.listJobTemplates.asyncIterate( this.innerApiCalls['listJobTemplates'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts b/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts index 26f95eb9841..0b991f5a12a 100644 --- a/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts +++ b/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts @@ -113,101 +113,103 @@ function stubAsyncIterationCall( } describe('v1.TranscoderServiceClient', () => { - it('has servicePath', () => { - const servicePath = - transcoderserviceModule.v1.TranscoderServiceClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - transcoderserviceModule.v1.TranscoderServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = transcoderserviceModule.v1.TranscoderServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new transcoderserviceModule.v1.TranscoderServiceClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + transcoderserviceModule.v1.TranscoderServiceClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new transcoderserviceModule.v1.TranscoderServiceClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = + transcoderserviceModule.v1.TranscoderServiceClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new transcoderserviceModule.v1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = transcoderserviceModule.v1.TranscoderServiceClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.transcoderServiceStub, undefined); - await client.initialize(); - assert(client.transcoderServiceStub); - }); - it('has close method for the initialized client', done => { - const client = new transcoderserviceModule.v1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient(); + assert(client); }); - client.initialize(); - assert(client.transcoderServiceStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new transcoderserviceModule.v1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.transcoderServiceStub, undefined); + await client.initialize(); + assert(client.transcoderServiceStub); }); - assert.strictEqual(client.transcoderServiceStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.transcoderServiceStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new transcoderserviceModule.v1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.transcoderServiceStub, undefined); + client.close().then(() => { + done(); + }); }); - 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 transcoderserviceModule.v1.TranscoderServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + 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()); }); - 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); - } + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new transcoderserviceModule.v1.TranscoderServiceClient({ + 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); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('createJob', () => { From 53501f470ce43912d91a39ce49a874d5f800271d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 23 Aug 2022 07:46:12 +0000 Subject: [PATCH 104/116] fix: change import long to require (#193) Source-Link: https://github.com/googleapis/synthtool/commit/d229a1258999f599a90a9b674a1c5541e00db588 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:74ab2b3c71ef27e6d8b69b1d0a0c9d31447777b79ac3cd4be82c265b45f37e5e --- .../protos/protos.d.ts | 620 ++- .../protos/protos.js | 4277 ++++++++++++----- .../protos/protos.json | 24 + 3 files changed, 3621 insertions(+), 1300 deletions(-) diff --git a/packages/google-cloud-video-transcoder/protos/protos.d.ts b/packages/google-cloud-video-transcoder/protos/protos.d.ts index e7aa7cf9499..30a2bd46e60 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.d.ts +++ b/packages/google-cloud-video-transcoder/protos/protos.d.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import * as Long from "long"; +import Long = require("long"); import {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { @@ -186,6 +186,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Job + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Job { @@ -300,6 +307,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JobTemplate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a JobConfig. */ @@ -444,6 +458,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JobConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Input. */ @@ -546,6 +567,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Input + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Output. */ @@ -636,6 +664,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Output + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EditAtom. */ @@ -744,6 +779,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EditAtom + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AdBreak. */ @@ -834,6 +876,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AdBreak + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an ElementaryStream. */ @@ -945,6 +994,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ElementaryStream + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MuxStream. */ @@ -1059,6 +1115,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MuxStream + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Manifest. */ @@ -1161,6 +1224,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Manifest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Manifest { @@ -1261,6 +1331,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PubsubDestination + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SpriteSheet. */ @@ -1414,6 +1491,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SpriteSheet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Overlay. */ @@ -1510,6 +1594,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Overlay + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Overlay { @@ -1608,6 +1699,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NormalizedCoordinate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Image. */ @@ -1710,6 +1808,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Image + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AnimationStatic. */ @@ -1806,6 +1911,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnimationStatic + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** FadeType enum. */ @@ -1921,6 +2033,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnimationFade + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AnimationEnd. */ @@ -2011,6 +2130,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnimationEnd + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Animation. */ @@ -2116,6 +2242,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Animation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -2237,6 +2370,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PreprocessingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace PreprocessingConfig { @@ -2341,6 +2481,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Color + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Denoise. */ @@ -2437,6 +2584,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Denoise + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Deblock. */ @@ -2533,6 +2687,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Deblock + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Audio. */ @@ -2635,6 +2796,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Audio + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Crop. */ @@ -2743,6 +2911,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Crop + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Pad. */ @@ -2851,6 +3026,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Pad + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -2957,6 +3139,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VideoStream + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace VideoStream { @@ -3166,6 +3355,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for H264CodecSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a H265CodecSettings. */ @@ -3367,6 +3563,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for H265CodecSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Vp9CodecSettings. */ @@ -3514,6 +3717,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Vp9CodecSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -3635,6 +3845,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudioStream + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace AudioStream { @@ -3757,6 +3974,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudioMapping + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -3854,6 +4078,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TextStream + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace TextStream { @@ -3958,6 +4189,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TextMapping + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -4055,6 +4293,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SegmentSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Represents a TranscoderService */ @@ -4193,56 +4438,56 @@ export namespace google { namespace TranscoderService { /** - * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#createJob}. + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService|createJob}. * @param error Error, if any * @param [response] Job */ type CreateJobCallback = (error: (Error|null), response?: google.cloud.video.transcoder.v1.Job) => void; /** - * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#listJobs}. + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService|listJobs}. * @param error Error, if any * @param [response] ListJobsResponse */ type ListJobsCallback = (error: (Error|null), response?: google.cloud.video.transcoder.v1.ListJobsResponse) => void; /** - * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#getJob}. + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService|getJob}. * @param error Error, if any * @param [response] Job */ type GetJobCallback = (error: (Error|null), response?: google.cloud.video.transcoder.v1.Job) => void; /** - * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#deleteJob}. + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService|deleteJob}. * @param error Error, if any * @param [response] Empty */ type DeleteJobCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#createJobTemplate}. + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService|createJobTemplate}. * @param error Error, if any * @param [response] JobTemplate */ type CreateJobTemplateCallback = (error: (Error|null), response?: google.cloud.video.transcoder.v1.JobTemplate) => void; /** - * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#listJobTemplates}. + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService|listJobTemplates}. * @param error Error, if any * @param [response] ListJobTemplatesResponse */ type ListJobTemplatesCallback = (error: (Error|null), response?: google.cloud.video.transcoder.v1.ListJobTemplatesResponse) => void; /** - * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#getJobTemplate}. + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService|getJobTemplate}. * @param error Error, if any * @param [response] JobTemplate */ type GetJobTemplateCallback = (error: (Error|null), response?: google.cloud.video.transcoder.v1.JobTemplate) => void; /** - * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#deleteJobTemplate}. + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService|deleteJobTemplate}. * @param error Error, if any * @param [response] Empty */ @@ -4343,6 +4588,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateJobRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListJobsRequest. */ @@ -4457,6 +4709,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListJobsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetJobRequest. */ @@ -4547,6 +4806,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetJobRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteJobRequest. */ @@ -4643,6 +4909,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteJobRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListJobsResponse. */ @@ -4745,6 +5018,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListJobsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateJobTemplateRequest. */ @@ -4847,6 +5127,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateJobTemplateRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListJobTemplatesRequest. */ @@ -4961,6 +5248,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListJobTemplatesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetJobTemplateRequest. */ @@ -5051,6 +5345,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetJobTemplateRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteJobTemplateRequest. */ @@ -5147,6 +5448,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteJobTemplateRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListJobTemplatesResponse. */ @@ -5249,6 +5557,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListJobTemplatesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } @@ -5394,6 +5709,13 @@ export namespace google { * @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 { @@ -5506,6 +5828,13 @@ export namespace google { * @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; } /** Properties of a Http. */ @@ -5602,6 +5931,13 @@ export namespace google { * @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. */ @@ -5749,6 +6085,13 @@ export namespace google { * @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. */ @@ -5845,6 +6188,13 @@ export namespace google { * @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; } } @@ -5939,6 +6289,13 @@ export namespace google { * @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. */ @@ -5979,6 +6336,9 @@ export namespace google { /** FileDescriptorProto syntax */ syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (string|null); } /** Represents a FileDescriptorProto. */ @@ -6026,6 +6386,9 @@ export namespace google { /** FileDescriptorProto syntax. */ public syntax: string; + /** FileDescriptorProto edition. */ + public edition: string; + /** * Creates a new FileDescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -6095,6 +6458,13 @@ export namespace google { * @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. */ @@ -6239,6 +6609,13 @@ export namespace google { * @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 { @@ -6343,6 +6720,13 @@ export namespace google { * @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. */ @@ -6439,6 +6823,13 @@ export namespace google { * @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; } } @@ -6530,6 +6921,13 @@ export namespace google { * @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. */ @@ -6680,6 +7078,13 @@ export namespace google { * @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 { @@ -6808,6 +7213,13 @@ export namespace google { * @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. */ @@ -6922,6 +7334,13 @@ export namespace google { * @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 { @@ -7020,6 +7439,13 @@ export namespace google { * @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; } } @@ -7123,6 +7549,13 @@ export namespace google { * @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. */ @@ -7225,6 +7658,13 @@ export namespace google { * @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. */ @@ -7345,6 +7785,13 @@ export namespace google { * @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. */ @@ -7558,6 +8005,13 @@ export namespace google { * @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 { @@ -7685,6 +8139,13 @@ export namespace google { * @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. */ @@ -7702,6 +8163,9 @@ export namespace google { /** FieldOptions lazy */ lazy?: (boolean|null); + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + /** FieldOptions deprecated */ deprecated?: (boolean|null); @@ -7739,6 +8203,9 @@ export namespace google { /** FieldOptions lazy. */ public lazy: boolean; + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + /** FieldOptions deprecated. */ public deprecated: boolean; @@ -7817,6 +8284,13 @@ export namespace google { * @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 { @@ -7924,6 +8398,13 @@ export namespace google { * @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. */ @@ -8026,6 +8507,13 @@ export namespace google { * @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. */ @@ -8122,6 +8610,13 @@ export namespace google { * @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. */ @@ -8224,6 +8719,13 @@ export namespace google { * @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. */ @@ -8332,6 +8834,13 @@ export namespace google { * @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 { @@ -8468,6 +8977,13 @@ export namespace google { * @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 { @@ -8566,6 +9082,13 @@ export namespace google { * @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; } } @@ -8657,6 +9180,13 @@ export namespace google { * @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 { @@ -8773,6 +9303,13 @@ export namespace google { * @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; } } @@ -8864,6 +9401,13 @@ export namespace google { * @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 { @@ -8882,6 +9426,9 @@ export namespace google { /** Annotation end */ end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); } /** Represents an Annotation. */ @@ -8905,6 +9452,9 @@ export namespace google { /** 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 @@ -8974,6 +9524,23 @@ export namespace google { * @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 + } } } @@ -9071,6 +9638,13 @@ export namespace google { * @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 Timestamp. */ @@ -9167,6 +9741,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Any. */ @@ -9263,6 +9844,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Empty. */ @@ -9347,6 +9935,13 @@ export namespace google { * @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; } } @@ -9453,6 +10048,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } diff --git a/packages/google-cloud-video-transcoder/protos/protos.js b/packages/google-cloud-video-transcoder/protos/protos.js index 0911c6b1e6a..ee72d2a3771 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.js +++ b/packages/google-cloud-video-transcoder/protos/protos.js @@ -304,61 +304,73 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputUri = reader.string(); - break; - case 3: - message.outputUri = reader.string(); - break; - case 4: - message.templateId = reader.string(); - break; - case 5: - message.config = $root.google.cloud.video.transcoder.v1.JobConfig.decode(reader, reader.uint32()); - break; - case 8: - message.state = reader.int32(); - break; - case 12: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 13: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 14: - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 15: - message.ttlAfterCompletionDays = reader.int32(); - break; - case 16: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputUri = reader.string(); + break; + } + case 3: { + message.outputUri = reader.string(); + break; + } + case 4: { + message.templateId = reader.string(); + break; + } + case 5: { + message.config = $root.google.cloud.video.transcoder.v1.JobConfig.decode(reader, reader.uint32()); + break; + } + case 8: { + message.state = reader.int32(); + break; + } + case 12: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 13: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 14: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 15: { + message.ttlAfterCompletionDays = reader.int32(); + break; + } + case 16: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.labels[key] = value; + break; + } + case 17: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; } - message.labels[key] = value; - break; - case 17: - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -617,6 +629,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Job + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.Job + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Job.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.Job"; + }; + /** * ProcessingState enum. * @name google.cloud.video.transcoder.v1.Job.ProcessingState @@ -756,34 +783,37 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.config = $root.google.cloud.video.transcoder.v1.JobConfig.decode(reader, reader.uint32()); - break; - case 3: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.config = $root.google.cloud.video.transcoder.v1.JobConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.labels[key] = value; + break; } - message.labels[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -910,6 +940,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for JobTemplate + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.JobTemplate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JobTemplate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.JobTemplate"; + }; + return JobTemplate; })(); @@ -1120,52 +1165,62 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.inputs && message.inputs.length)) - message.inputs = []; - message.inputs.push($root.google.cloud.video.transcoder.v1.Input.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.editList && message.editList.length)) - message.editList = []; - message.editList.push($root.google.cloud.video.transcoder.v1.EditAtom.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.elementaryStreams && message.elementaryStreams.length)) - message.elementaryStreams = []; - message.elementaryStreams.push($root.google.cloud.video.transcoder.v1.ElementaryStream.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.muxStreams && message.muxStreams.length)) - message.muxStreams = []; - message.muxStreams.push($root.google.cloud.video.transcoder.v1.MuxStream.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.manifests && message.manifests.length)) - message.manifests = []; - message.manifests.push($root.google.cloud.video.transcoder.v1.Manifest.decode(reader, reader.uint32())); - break; - case 6: - message.output = $root.google.cloud.video.transcoder.v1.Output.decode(reader, reader.uint32()); - break; - case 7: - if (!(message.adBreaks && message.adBreaks.length)) - message.adBreaks = []; - message.adBreaks.push($root.google.cloud.video.transcoder.v1.AdBreak.decode(reader, reader.uint32())); - break; - case 8: - message.pubsubDestination = $root.google.cloud.video.transcoder.v1.PubsubDestination.decode(reader, reader.uint32()); - break; - case 9: - if (!(message.spriteSheets && message.spriteSheets.length)) - message.spriteSheets = []; - message.spriteSheets.push($root.google.cloud.video.transcoder.v1.SpriteSheet.decode(reader, reader.uint32())); - break; - case 10: - if (!(message.overlays && message.overlays.length)) - message.overlays = []; - message.overlays.push($root.google.cloud.video.transcoder.v1.Overlay.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.inputs && message.inputs.length)) + message.inputs = []; + message.inputs.push($root.google.cloud.video.transcoder.v1.Input.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.editList && message.editList.length)) + message.editList = []; + message.editList.push($root.google.cloud.video.transcoder.v1.EditAtom.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.elementaryStreams && message.elementaryStreams.length)) + message.elementaryStreams = []; + message.elementaryStreams.push($root.google.cloud.video.transcoder.v1.ElementaryStream.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.muxStreams && message.muxStreams.length)) + message.muxStreams = []; + message.muxStreams.push($root.google.cloud.video.transcoder.v1.MuxStream.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.manifests && message.manifests.length)) + message.manifests = []; + message.manifests.push($root.google.cloud.video.transcoder.v1.Manifest.decode(reader, reader.uint32())); + break; + } + case 6: { + message.output = $root.google.cloud.video.transcoder.v1.Output.decode(reader, reader.uint32()); + break; + } + case 7: { + if (!(message.adBreaks && message.adBreaks.length)) + message.adBreaks = []; + message.adBreaks.push($root.google.cloud.video.transcoder.v1.AdBreak.decode(reader, reader.uint32())); + break; + } + case 8: { + message.pubsubDestination = $root.google.cloud.video.transcoder.v1.PubsubDestination.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.spriteSheets && message.spriteSheets.length)) + message.spriteSheets = []; + message.spriteSheets.push($root.google.cloud.video.transcoder.v1.SpriteSheet.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.overlays && message.overlays.length)) + message.overlays = []; + message.overlays.push($root.google.cloud.video.transcoder.v1.Overlay.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -1476,6 +1531,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for JobConfig + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.JobConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JobConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.JobConfig"; + }; + return JobConfig; })(); @@ -1593,15 +1663,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.uri = reader.string(); - break; - case 3: - message.preprocessingConfig = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.decode(reader, reader.uint32()); - break; + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.preprocessingConfig = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -1713,6 +1786,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Input + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.Input + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Input.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.Input"; + }; + return Input; })(); @@ -1808,9 +1896,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.uri = reader.string(); - break; + case 1: { + message.uri = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -1900,6 +1989,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Output + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.Output + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Output.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.Output"; + }; + return Output; })(); @@ -2030,20 +2134,24 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - if (!(message.inputs && message.inputs.length)) - message.inputs = []; - message.inputs.push(reader.string()); - 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; + case 1: { + message.key = reader.string(); + break; + } + case 2: { + if (!(message.inputs && message.inputs.length)) + message.inputs = []; + message.inputs.push(reader.string()); + 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; @@ -2181,6 +2289,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EditAtom + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.EditAtom + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EditAtom.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.EditAtom"; + }; + return EditAtom; })(); @@ -2276,9 +2399,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; + case 1: { + message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -2373,6 +2497,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AdBreak + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.AdBreak + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AdBreak.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.AdBreak"; + }; + return AdBreak; })(); @@ -2515,18 +2654,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.key = reader.string(); - break; - case 1: - message.videoStream = $root.google.cloud.video.transcoder.v1.VideoStream.decode(reader, reader.uint32()); - break; - case 2: - message.audioStream = $root.google.cloud.video.transcoder.v1.AudioStream.decode(reader, reader.uint32()); - break; - case 3: - message.textStream = $root.google.cloud.video.transcoder.v1.TextStream.decode(reader, reader.uint32()); - break; + case 4: { + message.key = reader.string(); + break; + } + case 1: { + message.videoStream = $root.google.cloud.video.transcoder.v1.VideoStream.decode(reader, reader.uint32()); + break; + } + case 2: { + message.audioStream = $root.google.cloud.video.transcoder.v1.AudioStream.decode(reader, reader.uint32()); + break; + } + case 3: { + message.textStream = $root.google.cloud.video.transcoder.v1.TextStream.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -2675,6 +2818,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ElementaryStream + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.ElementaryStream + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ElementaryStream.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.ElementaryStream"; + }; + return ElementaryStream; })(); @@ -2816,23 +2974,28 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.fileName = reader.string(); - break; - case 3: - message.container = reader.string(); - break; - case 4: - if (!(message.elementaryStreams && message.elementaryStreams.length)) - message.elementaryStreams = []; - message.elementaryStreams.push(reader.string()); - break; - case 5: - message.segmentSettings = $root.google.cloud.video.transcoder.v1.SegmentSettings.decode(reader, reader.uint32()); - break; + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.fileName = reader.string(); + break; + } + case 3: { + message.container = reader.string(); + break; + } + case 4: { + if (!(message.elementaryStreams && message.elementaryStreams.length)) + message.elementaryStreams = []; + message.elementaryStreams.push(reader.string()); + break; + } + case 5: { + message.segmentSettings = $root.google.cloud.video.transcoder.v1.SegmentSettings.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -2973,6 +3136,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MuxStream + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.MuxStream + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MuxStream.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.MuxStream"; + }; + return MuxStream; })(); @@ -3092,17 +3270,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.fileName = reader.string(); - break; - case 2: - message.type = reader.int32(); - break; - case 3: - if (!(message.muxStreams && message.muxStreams.length)) - message.muxStreams = []; - message.muxStreams.push(reader.string()); - break; + case 1: { + message.fileName = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + case 3: { + if (!(message.muxStreams && message.muxStreams.length)) + message.muxStreams = []; + message.muxStreams.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -3240,6 +3421,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Manifest + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.Manifest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Manifest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.Manifest"; + }; + /** * ManifestType enum. * @name google.cloud.video.transcoder.v1.Manifest.ManifestType @@ -3351,9 +3547,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.topic = reader.string(); - break; + case 1: { + message.topic = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -3443,8 +3640,23 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PubsubDestination; - })(); + /** + * Gets the default type url for PubsubDestination + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.PubsubDestination + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PubsubDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.PubsubDestination"; + }; + + return PubsubDestination; + })(); v1.SpriteSheet = (function() { @@ -3662,39 +3874,50 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.format = reader.string(); - break; - case 2: - message.filePrefix = reader.string(); - break; - case 3: - message.spriteWidthPixels = reader.int32(); - break; - case 4: - message.spriteHeightPixels = reader.int32(); - break; - case 5: - message.columnCount = reader.int32(); - break; - case 6: - message.rowCount = reader.int32(); - break; - case 7: - message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 8: - message.endTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 9: - message.totalCount = reader.int32(); - break; - case 10: - message.interval = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 11: - message.quality = reader.int32(); - break; + case 1: { + message.format = reader.string(); + break; + } + case 2: { + message.filePrefix = reader.string(); + break; + } + case 3: { + message.spriteWidthPixels = reader.int32(); + break; + } + case 4: { + message.spriteHeightPixels = reader.int32(); + break; + } + case 5: { + message.columnCount = reader.int32(); + break; + } + case 6: { + message.rowCount = reader.int32(); + break; + } + case 7: { + message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 8: { + message.endTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 9: { + message.totalCount = reader.int32(); + break; + } + case 10: { + message.interval = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 11: { + message.quality = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -3892,6 +4115,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SpriteSheet + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.SpriteSheet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SpriteSheet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.SpriteSheet"; + }; + return SpriteSheet; })(); @@ -4000,14 +4238,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.image = $root.google.cloud.video.transcoder.v1.Overlay.Image.decode(reader, reader.uint32()); - break; - case 2: - if (!(message.animations && message.animations.length)) - message.animations = []; - message.animations.push($root.google.cloud.video.transcoder.v1.Overlay.Animation.decode(reader, reader.uint32())); - break; + case 1: { + message.image = $root.google.cloud.video.transcoder.v1.Overlay.Image.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.animations && message.animations.length)) + message.animations = []; + message.animations.push($root.google.cloud.video.transcoder.v1.Overlay.Animation.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -4128,6 +4368,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Overlay + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.Overlay + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Overlay.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.Overlay"; + }; + Overlay.NormalizedCoordinate = (function() { /** @@ -4231,12 +4486,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.x = reader.double(); - break; - case 2: - message.y = reader.double(); - break; + case 1: { + message.x = reader.double(); + break; + } + case 2: { + message.y = reader.double(); + break; + } default: reader.skipType(tag & 7); break; @@ -4335,6 +4592,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for NormalizedCoordinate + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NormalizedCoordinate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate"; + }; + return NormalizedCoordinate; })(); @@ -4452,15 +4724,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.uri = reader.string(); - break; - case 2: - message.resolution = $root.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate.decode(reader, reader.uint32()); - break; - case 3: - message.alpha = reader.double(); - break; + case 1: { + message.uri = reader.string(); + break; + } + case 2: { + message.resolution = $root.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate.decode(reader, reader.uint32()); + break; + } + case 3: { + message.alpha = reader.double(); + break; + } default: reader.skipType(tag & 7); break; @@ -4572,6 +4847,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Image + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.Overlay.Image + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Image.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.Overlay.Image"; + }; + return Image; })(); @@ -4678,12 +4968,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.xy = $root.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate.decode(reader, reader.uint32()); - break; - case 2: - message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; + case 1: { + message.xy = $root.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate.decode(reader, reader.uint32()); + break; + } + case 2: { + message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -4792,6 +5084,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AnimationStatic + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationStatic + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnimationStatic.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.Overlay.AnimationStatic"; + }; + return AnimationStatic; })(); @@ -4936,18 +5243,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.fadeType = reader.int32(); - break; - case 2: - message.xy = $root.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate.decode(reader, reader.uint32()); - break; - case 3: - message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 4: - message.endTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; + case 1: { + message.fadeType = reader.int32(); + break; + } + case 2: { + message.xy = $root.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate.decode(reader, reader.uint32()); + break; + } + case 3: { + message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.endTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -5095,6 +5406,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AnimationFade + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationFade + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnimationFade.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.Overlay.AnimationFade"; + }; + return AnimationFade; })(); @@ -5190,9 +5516,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; + case 1: { + message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -5287,6 +5614,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AnimationEnd + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.Overlay.AnimationEnd + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnimationEnd.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.Overlay.AnimationEnd"; + }; + return AnimationEnd; })(); @@ -5418,15 +5760,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.animationStatic = $root.google.cloud.video.transcoder.v1.Overlay.AnimationStatic.decode(reader, reader.uint32()); - break; - case 2: - message.animationFade = $root.google.cloud.video.transcoder.v1.Overlay.AnimationFade.decode(reader, reader.uint32()); - break; - case 3: - message.animationEnd = $root.google.cloud.video.transcoder.v1.Overlay.AnimationEnd.decode(reader, reader.uint32()); - break; + case 1: { + message.animationStatic = $root.google.cloud.video.transcoder.v1.Overlay.AnimationStatic.decode(reader, reader.uint32()); + break; + } + case 2: { + message.animationFade = $root.google.cloud.video.transcoder.v1.Overlay.AnimationFade.decode(reader, reader.uint32()); + break; + } + case 3: { + message.animationEnd = $root.google.cloud.video.transcoder.v1.Overlay.AnimationEnd.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -5566,6 +5911,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Animation + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.Overlay.Animation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Animation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.Overlay.Animation"; + }; + return Animation; })(); @@ -5719,24 +6079,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.color = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Color.decode(reader, reader.uint32()); - break; - case 2: - message.denoise = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise.decode(reader, reader.uint32()); - break; - case 3: - message.deblock = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock.decode(reader, reader.uint32()); - break; - case 4: - message.audio = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Audio.decode(reader, reader.uint32()); - break; - case 5: - message.crop = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Crop.decode(reader, reader.uint32()); - break; - case 6: - message.pad = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Pad.decode(reader, reader.uint32()); - break; + case 1: { + message.color = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Color.decode(reader, reader.uint32()); + break; + } + case 2: { + message.denoise = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise.decode(reader, reader.uint32()); + break; + } + case 3: { + message.deblock = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock.decode(reader, reader.uint32()); + break; + } + case 4: { + message.audio = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Audio.decode(reader, reader.uint32()); + break; + } + case 5: { + message.crop = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Crop.decode(reader, reader.uint32()); + break; + } + case 6: { + message.pad = $root.google.cloud.video.transcoder.v1.PreprocessingConfig.Pad.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -5897,6 +6263,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PreprocessingConfig + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PreprocessingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.PreprocessingConfig"; + }; + PreprocessingConfig.Color = (function() { /** @@ -6011,15 +6392,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.saturation = reader.double(); - break; - case 2: - message.contrast = reader.double(); - break; - case 3: - message.brightness = reader.double(); - break; + case 1: { + message.saturation = reader.double(); + break; + } + case 2: { + message.contrast = reader.double(); + break; + } + case 3: { + message.brightness = reader.double(); + break; + } default: reader.skipType(tag & 7); break; @@ -6126,6 +6510,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Color + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Color + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Color.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.PreprocessingConfig.Color"; + }; + return Color; })(); @@ -6232,12 +6631,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.strength = reader.double(); - break; - case 2: - message.tune = reader.string(); - break; + case 1: { + message.strength = reader.double(); + break; + } + case 2: { + message.tune = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -6336,6 +6737,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Denoise + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Denoise.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise"; + }; + return Denoise; })(); @@ -6442,12 +6858,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.strength = reader.double(); - break; - case 2: - message.enabled = reader.bool(); - break; + case 1: { + message.strength = reader.double(); + break; + } + case 2: { + message.enabled = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -6546,6 +6964,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Deblock + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Deblock.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock"; + }; + return Deblock; })(); @@ -6663,16 +7096,19 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.lufs = reader.double(); - break; - case 2: - message.highBoost = reader.bool(); - break; - case 3: - message.lowBoost = reader.bool(); - break; - default: + case 1: { + message.lufs = reader.double(); + break; + } + case 2: { + message.highBoost = reader.bool(); + break; + } + case 3: { + message.lowBoost = reader.bool(); + break; + } + default: reader.skipType(tag & 7); break; } @@ -6778,6 +7214,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Audio + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Audio + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Audio.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.PreprocessingConfig.Audio"; + }; + return Audio; })(); @@ -6906,18 +7357,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.topPixels = reader.int32(); - break; - case 2: - message.bottomPixels = reader.int32(); - break; - case 3: - message.leftPixels = reader.int32(); - break; - case 4: - message.rightPixels = reader.int32(); - break; + case 1: { + message.topPixels = reader.int32(); + break; + } + case 2: { + message.bottomPixels = reader.int32(); + break; + } + case 3: { + message.leftPixels = reader.int32(); + break; + } + case 4: { + message.rightPixels = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -7032,6 +7487,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Crop + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Crop + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Crop.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.PreprocessingConfig.Crop"; + }; + return Crop; })(); @@ -7160,18 +7630,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.topPixels = reader.int32(); - break; - case 2: - message.bottomPixels = reader.int32(); - break; - case 3: - message.leftPixels = reader.int32(); - break; - case 4: - message.rightPixels = reader.int32(); - break; + case 1: { + message.topPixels = reader.int32(); + break; + } + case 2: { + message.bottomPixels = reader.int32(); + break; + } + case 3: { + message.leftPixels = reader.int32(); + break; + } + case 4: { + message.rightPixels = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -7286,6 +7760,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Pad + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.PreprocessingConfig.Pad + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Pad.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.PreprocessingConfig.Pad"; + }; + return Pad; })(); @@ -7420,15 +7909,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.h264 = $root.google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings.decode(reader, reader.uint32()); - break; - case 2: - message.h265 = $root.google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings.decode(reader, reader.uint32()); - break; - case 3: - message.vp9 = $root.google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings.decode(reader, reader.uint32()); - break; + case 1: { + message.h264 = $root.google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + message.h265 = $root.google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings.decode(reader, reader.uint32()); + break; + } + case 3: { + message.vp9 = $root.google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -7568,6 +8060,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for VideoStream + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.VideoStream + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VideoStream.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.VideoStream"; + }; + VideoStream.H264CodecSettings = (function() { /** @@ -7883,66 +8390,86 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.widthPixels = reader.int32(); - break; - case 2: - message.heightPixels = reader.int32(); - break; - case 3: - message.frameRate = reader.double(); - break; - case 4: - message.bitrateBps = reader.int32(); - break; - case 5: - message.pixelFormat = reader.string(); - break; - case 6: - message.rateControlMode = reader.string(); - break; - case 7: - message.crfLevel = reader.int32(); - break; - case 8: - message.allowOpenGop = reader.bool(); - break; - case 9: - message.gopFrameCount = reader.int32(); - break; - case 10: - message.gopDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 11: - message.enableTwoPass = reader.bool(); - break; - case 12: - message.vbvSizeBits = reader.int32(); - break; - case 13: - message.vbvFullnessBits = reader.int32(); - break; - case 14: - message.entropyCoder = reader.string(); - break; - case 15: - message.bPyramid = reader.bool(); - break; - case 16: - message.bFrameCount = reader.int32(); - break; - case 17: - message.aqStrength = reader.double(); - break; - case 18: - message.profile = reader.string(); - break; - case 19: - message.tune = reader.string(); - break; - case 20: - message.preset = reader.string(); - break; + case 1: { + message.widthPixels = reader.int32(); + break; + } + case 2: { + message.heightPixels = reader.int32(); + break; + } + case 3: { + message.frameRate = reader.double(); + break; + } + case 4: { + message.bitrateBps = reader.int32(); + break; + } + case 5: { + message.pixelFormat = reader.string(); + break; + } + case 6: { + message.rateControlMode = reader.string(); + break; + } + case 7: { + message.crfLevel = reader.int32(); + break; + } + case 8: { + message.allowOpenGop = reader.bool(); + break; + } + case 9: { + message.gopFrameCount = reader.int32(); + break; + } + case 10: { + message.gopDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 11: { + message.enableTwoPass = reader.bool(); + break; + } + case 12: { + message.vbvSizeBits = reader.int32(); + break; + } + case 13: { + message.vbvFullnessBits = reader.int32(); + break; + } + case 14: { + message.entropyCoder = reader.string(); + break; + } + case 15: { + message.bPyramid = reader.bool(); + break; + } + case 16: { + message.bFrameCount = reader.int32(); + break; + } + case 17: { + message.aqStrength = reader.double(); + break; + } + case 18: { + message.profile = reader.string(); + break; + } + case 19: { + message.tune = reader.string(); + break; + } + case 20: { + message.preset = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -8202,6 +8729,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for H264CodecSettings + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + H264CodecSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings"; + }; + return H264CodecSettings; })(); @@ -8509,63 +9051,82 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.widthPixels = reader.int32(); - break; - case 2: - message.heightPixels = reader.int32(); - break; - case 3: - message.frameRate = reader.double(); - break; - case 4: - message.bitrateBps = reader.int32(); - break; - case 5: - message.pixelFormat = reader.string(); - break; - case 6: - message.rateControlMode = reader.string(); - break; - case 7: - message.crfLevel = reader.int32(); - break; - case 8: - message.allowOpenGop = reader.bool(); - break; - case 9: - message.gopFrameCount = reader.int32(); - break; - case 10: - message.gopDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 11: - message.enableTwoPass = reader.bool(); - break; - case 12: - message.vbvSizeBits = reader.int32(); - break; - case 13: - message.vbvFullnessBits = reader.int32(); - break; - case 14: - message.bPyramid = reader.bool(); - break; - case 15: - message.bFrameCount = reader.int32(); - break; - case 16: - message.aqStrength = reader.double(); - break; - case 17: - message.profile = reader.string(); - break; - case 18: - message.tune = reader.string(); - break; - case 19: - message.preset = reader.string(); - break; + case 1: { + message.widthPixels = reader.int32(); + break; + } + case 2: { + message.heightPixels = reader.int32(); + break; + } + case 3: { + message.frameRate = reader.double(); + break; + } + case 4: { + message.bitrateBps = reader.int32(); + break; + } + case 5: { + message.pixelFormat = reader.string(); + break; + } + case 6: { + message.rateControlMode = reader.string(); + break; + } + case 7: { + message.crfLevel = reader.int32(); + break; + } + case 8: { + message.allowOpenGop = reader.bool(); + break; + } + case 9: { + message.gopFrameCount = reader.int32(); + break; + } + case 10: { + message.gopDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 11: { + message.enableTwoPass = reader.bool(); + break; + } + case 12: { + message.vbvSizeBits = reader.int32(); + break; + } + case 13: { + message.vbvFullnessBits = reader.int32(); + break; + } + case 14: { + message.bPyramid = reader.bool(); + break; + } + case 15: { + message.bFrameCount = reader.int32(); + break; + } + case 16: { + message.aqStrength = reader.double(); + break; + } + case 17: { + message.profile = reader.string(); + break; + } + case 18: { + message.tune = reader.string(); + break; + } + case 19: { + message.preset = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -8817,6 +9378,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for H265CodecSettings + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + H265CodecSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings"; + }; + return H265CodecSettings; })(); @@ -9025,36 +9601,46 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.widthPixels = reader.int32(); - break; - case 2: - message.heightPixels = reader.int32(); - break; - case 3: - message.frameRate = reader.double(); - break; - case 4: - message.bitrateBps = reader.int32(); - break; - case 5: - message.pixelFormat = reader.string(); - break; - case 6: - message.rateControlMode = reader.string(); - break; - case 7: - message.crfLevel = reader.int32(); - break; - case 8: - message.gopFrameCount = reader.int32(); - break; - case 9: - message.gopDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 10: - message.profile = reader.string(); - break; + case 1: { + message.widthPixels = reader.int32(); + break; + } + case 2: { + message.heightPixels = reader.int32(); + break; + } + case 3: { + message.frameRate = reader.double(); + break; + } + case 4: { + message.bitrateBps = reader.int32(); + break; + } + case 5: { + message.pixelFormat = reader.string(); + break; + } + case 6: { + message.rateControlMode = reader.string(); + break; + } + case 7: { + message.crfLevel = reader.int32(); + break; + } + case 8: { + message.gopFrameCount = reader.int32(); + break; + } + case 9: { + message.gopDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 10: { + message.profile = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -9234,6 +9820,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Vp9CodecSettings + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Vp9CodecSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings"; + }; + return Vp9CodecSettings; })(); @@ -9391,28 +9992,34 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.codec = reader.string(); - break; - case 2: - message.bitrateBps = reader.int32(); - break; - case 3: - message.channelCount = reader.int32(); - break; - case 4: - if (!(message.channelLayout && message.channelLayout.length)) - message.channelLayout = []; - message.channelLayout.push(reader.string()); - break; - case 5: - if (!(message.mapping && message.mapping.length)) - message.mapping = []; - message.mapping.push($root.google.cloud.video.transcoder.v1.AudioStream.AudioMapping.decode(reader, reader.uint32())); - break; - case 6: - message.sampleRateHertz = reader.int32(); - break; + case 1: { + message.codec = reader.string(); + break; + } + case 2: { + message.bitrateBps = reader.int32(); + break; + } + case 3: { + message.channelCount = reader.int32(); + break; + } + case 4: { + if (!(message.channelLayout && message.channelLayout.length)) + message.channelLayout = []; + message.channelLayout.push(reader.string()); + break; + } + case 5: { + if (!(message.mapping && message.mapping.length)) + message.mapping = []; + message.mapping.push($root.google.cloud.video.transcoder.v1.AudioStream.AudioMapping.decode(reader, reader.uint32())); + break; + } + case 6: { + message.sampleRateHertz = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -9574,6 +10181,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AudioStream + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.AudioStream + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudioStream.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.AudioStream"; + }; + AudioStream.AudioMapping = (function() { /** @@ -9721,24 +10343,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.atomKey = reader.string(); - break; - case 2: - message.inputKey = reader.string(); - break; - case 3: - message.inputTrack = reader.int32(); - break; - case 4: - message.inputChannel = reader.int32(); - break; - case 5: - message.outputChannel = reader.int32(); - break; - case 6: - message.gainDb = reader.double(); - break; + case 1: { + message.atomKey = reader.string(); + break; + } + case 2: { + message.inputKey = reader.string(); + break; + } + case 3: { + message.inputTrack = reader.int32(); + break; + } + case 4: { + message.inputChannel = reader.int32(); + break; + } + case 5: { + message.outputChannel = reader.int32(); + break; + } + case 6: { + message.gainDb = reader.double(); + break; + } default: reader.skipType(tag & 7); break; @@ -9869,6 +10497,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AudioMapping + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.AudioStream.AudioMapping + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudioMapping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.AudioStream.AudioMapping"; + }; + return AudioMapping; })(); @@ -9980,14 +10623,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.codec = reader.string(); - break; - case 3: - if (!(message.mapping && message.mapping.length)) - message.mapping = []; - message.mapping.push($root.google.cloud.video.transcoder.v1.TextStream.TextMapping.decode(reader, reader.uint32())); - break; + case 1: { + message.codec = reader.string(); + break; + } + case 3: { + if (!(message.mapping && message.mapping.length)) + message.mapping = []; + message.mapping.push($root.google.cloud.video.transcoder.v1.TextStream.TextMapping.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -10103,6 +10748,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TextStream + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.TextStream + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TextStream.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.TextStream"; + }; + TextStream.TextMapping = (function() { /** @@ -10217,15 +10877,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.atomKey = reader.string(); - break; - case 2: - message.inputKey = reader.string(); - break; - case 3: - message.inputTrack = reader.int32(); - break; + case 1: { + message.atomKey = reader.string(); + break; + } + case 2: { + message.inputKey = reader.string(); + break; + } + case 3: { + message.inputTrack = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -10332,6 +10995,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TextMapping + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.TextStream.TextMapping + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TextMapping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.TextStream.TextMapping"; + }; + return TextMapping; })(); @@ -10441,12 +11119,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.segmentDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 3: - message.individualSegments = reader.bool(); - break; + case 1: { + message.segmentDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 3: { + message.individualSegments = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -10550,6 +11230,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SegmentSettings + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.SegmentSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SegmentSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.SegmentSettings"; + }; + return SegmentSettings; })(); @@ -10586,7 +11281,7 @@ }; /** - * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#createJob}. + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService|createJob}. * @memberof google.cloud.video.transcoder.v1.TranscoderService * @typedef CreateJobCallback * @type {function} @@ -10619,7 +11314,7 @@ */ /** - * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#listJobs}. + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService|listJobs}. * @memberof google.cloud.video.transcoder.v1.TranscoderService * @typedef ListJobsCallback * @type {function} @@ -10652,7 +11347,7 @@ */ /** - * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#getJob}. + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService|getJob}. * @memberof google.cloud.video.transcoder.v1.TranscoderService * @typedef GetJobCallback * @type {function} @@ -10685,7 +11380,7 @@ */ /** - * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#deleteJob}. + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService|deleteJob}. * @memberof google.cloud.video.transcoder.v1.TranscoderService * @typedef DeleteJobCallback * @type {function} @@ -10718,7 +11413,7 @@ */ /** - * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#createJobTemplate}. + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService|createJobTemplate}. * @memberof google.cloud.video.transcoder.v1.TranscoderService * @typedef CreateJobTemplateCallback * @type {function} @@ -10751,7 +11446,7 @@ */ /** - * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#listJobTemplates}. + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService|listJobTemplates}. * @memberof google.cloud.video.transcoder.v1.TranscoderService * @typedef ListJobTemplatesCallback * @type {function} @@ -10784,7 +11479,7 @@ */ /** - * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#getJobTemplate}. + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService|getJobTemplate}. * @memberof google.cloud.video.transcoder.v1.TranscoderService * @typedef GetJobTemplateCallback * @type {function} @@ -10817,7 +11512,7 @@ */ /** - * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService#deleteJobTemplate}. + * Callback as used by {@link google.cloud.video.transcoder.v1.TranscoderService|deleteJobTemplate}. * @memberof google.cloud.video.transcoder.v1.TranscoderService * @typedef DeleteJobTemplateCallback * @type {function} @@ -10955,12 +11650,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.job = $root.google.cloud.video.transcoder.v1.Job.decode(reader, reader.uint32()); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.job = $root.google.cloud.video.transcoder.v1.Job.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -11064,6 +11761,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateJobRequest + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.CreateJobRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.CreateJobRequest"; + }; + return CreateJobRequest; })(); @@ -11203,21 +11915,26 @@ 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; + 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; @@ -11340,6 +12057,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListJobsRequest + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.ListJobsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListJobsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.ListJobsRequest"; + }; + return ListJobsRequest; })(); @@ -11435,9 +12167,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -11527,6 +12260,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetJobRequest + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.GetJobRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.GetJobRequest"; + }; + return GetJobRequest; })(); @@ -11633,12 +12381,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.allowMissing = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.allowMissing = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -11737,6 +12487,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteJobRequest + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.DeleteJobRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.DeleteJobRequest"; + }; + return DeleteJobRequest; })(); @@ -11858,19 +12623,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.jobs && message.jobs.length)) - message.jobs = []; - message.jobs.push($root.google.cloud.video.transcoder.v1.Job.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; + case 1: { + if (!(message.jobs && message.jobs.length)) + message.jobs = []; + message.jobs.push($root.google.cloud.video.transcoder.v1.Job.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; @@ -12007,6 +12775,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListJobsResponse + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.ListJobsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListJobsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.ListJobsResponse"; + }; + return ListJobsResponse; })(); @@ -12124,15 +12907,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.jobTemplate = $root.google.cloud.video.transcoder.v1.JobTemplate.decode(reader, reader.uint32()); - break; - case 3: - message.jobTemplateId = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.jobTemplate = $root.google.cloud.video.transcoder.v1.JobTemplate.decode(reader, reader.uint32()); + break; + } + case 3: { + message.jobTemplateId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -12244,6 +13030,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateJobTemplateRequest + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.CreateJobTemplateRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateJobTemplateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.CreateJobTemplateRequest"; + }; + return CreateJobTemplateRequest; })(); @@ -12381,23 +13182,28 @@ reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.video.transcoder.v1.ListJobTemplatesRequest(); 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; + 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; @@ -12520,6 +13326,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListJobTemplatesRequest + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.ListJobTemplatesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListJobTemplatesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.ListJobTemplatesRequest"; + }; + return ListJobTemplatesRequest; })(); @@ -12615,9 +13436,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -12707,6 +13529,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetJobTemplateRequest + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.GetJobTemplateRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetJobTemplateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.GetJobTemplateRequest"; + }; + return GetJobTemplateRequest; })(); @@ -12813,12 +13650,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.allowMissing = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.allowMissing = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -12917,6 +13756,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteJobTemplateRequest + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.DeleteJobTemplateRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteJobTemplateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.DeleteJobTemplateRequest"; + }; + return DeleteJobTemplateRequest; })(); @@ -13038,19 +13892,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.jobTemplates && message.jobTemplates.length)) - message.jobTemplates = []; - message.jobTemplates.push($root.google.cloud.video.transcoder.v1.JobTemplate.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; + case 1: { + if (!(message.jobTemplates && message.jobTemplates.length)) + message.jobTemplates = []; + message.jobTemplates.push($root.google.cloud.video.transcoder.v1.JobTemplate.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; @@ -13187,6 +14044,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListJobTemplatesResponse + * @function getTypeUrl + * @memberof google.cloud.video.transcoder.v1.ListJobTemplatesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListJobTemplatesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.video.transcoder.v1.ListJobTemplatesResponse"; + }; + return ListJobTemplatesResponse; })(); @@ -13402,36 +14274,43 @@ 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) + 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()); - } else - message.style.push(reader.int32()); - break; + break; + } default: reader.skipType(tag & 7); break; @@ -13629,6 +14508,21 @@ 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 @@ -13765,12 +14659,14 @@ 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; + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -13869,6 +14765,21 @@ 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; })(); @@ -13977,14 +14888,16 @@ 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; + 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; @@ -14100,6 +15013,21 @@ 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; })(); @@ -14310,38 +15238,48 @@ 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; + 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; @@ -14563,6 +15501,21 @@ 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; })(); @@ -14669,12 +15622,14 @@ 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; + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -14773,6 +15728,21 @@ 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; })(); @@ -14882,11 +15852,12 @@ 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; + 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; @@ -14993,6 +15964,21 @@ 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; })(); @@ -15014,6 +16000,7 @@ * @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 */ /** @@ -15134,6 +16121,14 @@ */ 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 @@ -15189,6 +16184,8 @@ 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; }; @@ -15223,66 +16220,82 @@ 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) + 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()); - } 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) + 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()); - } 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; + 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; @@ -15394,6 +16407,9 @@ 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; }; @@ -15486,6 +16502,8 @@ } if (object.syntax != null) message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); return message; }; @@ -15517,6 +16535,7 @@ object.options = null; object.sourceCodeInfo = null; object.syntax = ""; + object.edition = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -15563,6 +16582,8 @@ } if (message.syntax != null && message.hasOwnProperty("syntax")) object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = message.edition; return object; }; @@ -15577,6 +16598,21 @@ 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; })(); @@ -15787,52 +16823,62 @@ 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; + 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; @@ -16133,6 +17179,21 @@ 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() { /** @@ -16247,15 +17308,18 @@ 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; + 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; @@ -16367,6 +17431,21 @@ 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; })(); @@ -16473,12 +17552,14 @@ 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 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -16577,6 +17658,21 @@ 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; })(); @@ -16677,11 +17773,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 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; @@ -16788,6 +17885,21 @@ 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; })(); @@ -16993,39 +18105,50 @@ 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; + 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; @@ -17312,6 +18435,21 @@ 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 @@ -17480,12 +18618,14 @@ 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; + 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; @@ -17589,6 +18729,21 @@ 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; })(); @@ -17734,27 +18889,32 @@ 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; + 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; @@ -17930,6 +19090,21 @@ 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() { /** @@ -18033,12 +19208,14 @@ 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 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -18137,6 +19314,21 @@ 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; })(); @@ -18257,15 +19449,18 @@ 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; + 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; @@ -18377,6 +19572,21 @@ 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; })(); @@ -18496,17 +19706,20 @@ 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; + 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; @@ -18632,8 +19845,23 @@ * @instance * @returns {Object.} JSON object */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + 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; @@ -18786,24 +20014,30 @@ 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; + 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; @@ -18939,6 +20173,21 @@ 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; })(); @@ -19269,76 +20518,98 @@ 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; + 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; @@ -19651,6 +20922,21 @@ 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 @@ -19819,26 +21105,32 @@ 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; + 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; @@ -19992,6 +21284,21 @@ 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; })(); @@ -20005,6 +21312,7 @@ * @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 @@ -20061,6 +21369,14 @@ */ FieldOptions.prototype.lazy = false; + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + /** * FieldOptions deprecated. * @member {boolean} deprecated @@ -20137,6 +21453,8 @@ 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(); @@ -20182,42 +21500,55 @@ 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 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1052: - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; - case 1055: - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -20277,6 +21608,9 @@ 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"; @@ -20362,6 +21696,8 @@ } 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) @@ -20449,6 +21785,7 @@ 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")) @@ -20463,6 +21800,8 @@ object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; if (message.weak != null && message.hasOwnProperty("weak")) object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -20489,6 +21828,21 @@ 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 @@ -20618,11 +21972,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 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; @@ -20729,6 +22084,21 @@ 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; })(); @@ -20848,17 +22218,20 @@ 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; + 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; @@ -20983,6 +22356,21 @@ 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; })(); @@ -21091,14 +22479,16 @@ 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; + 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; @@ -21214,6 +22604,21 @@ 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; })(); @@ -21344,20 +22749,24 @@ 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; + 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; @@ -21490,6 +22899,21 @@ 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; })(); @@ -21633,25 +23057,30 @@ 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; + 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; @@ -21828,6 +23257,21 @@ 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 @@ -22007,29 +23451,36 @@ 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; + 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; @@ -22142,7 +23593,7 @@ 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) + else if (object.stringValue.length >= 0) message.stringValue = object.stringValue; if (object.aggregateValue != null) message.aggregateValue = String(object.aggregateValue); @@ -22223,6 +23674,21 @@ 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() { /** @@ -22324,12 +23790,14 @@ 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; + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -22430,6 +23898,21 @@ 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; })(); @@ -22530,11 +24013,12 @@ 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; + 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; @@ -22641,6 +24125,21 @@ 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() { /** @@ -22789,37 +24288,42 @@ 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) + 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()); - } 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) + 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()); - } 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; + 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; @@ -22980,6 +24484,21 @@ 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; })(); @@ -23080,11 +24599,12 @@ 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; + 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; @@ -23191,6 +24711,21 @@ 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() { /** @@ -23201,6 +24736,7 @@ * @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 */ /** @@ -23251,6 +24787,14 @@ */ 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 @@ -23287,6 +24831,8 @@ 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; }; @@ -23321,25 +24867,33 @@ 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) + 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()); - } 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; + 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; @@ -23391,6 +24945,15 @@ 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; }; @@ -23419,6 +24982,20 @@ message.begin = object.begin | 0; if (object.end != null) message.end = object.end | 0; + switch (object.semantic) { + 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; }; @@ -23441,6 +25018,7 @@ object.sourceFile = ""; object.begin = 0; object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; } if (message.path && message.path.length) { object.path = []; @@ -23453,6 +25031,8 @@ 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] : message.semantic; return object; }; @@ -23467,6 +25047,37 @@ 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; })(); @@ -23576,12 +25187,14 @@ 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; + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -23694,6 +25307,21 @@ 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; })(); @@ -23800,12 +25428,14 @@ 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; + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -23918,6 +25548,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + return Timestamp; })(); @@ -24024,12 +25669,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; + case 1: { + message.type_url = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -24091,7 +25738,7 @@ if (object.value != null) if (typeof object.value === "string") $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) + else if (object.value.length >= 0) message.value = object.value; return message; }; @@ -24137,6 +25784,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + return Any; })(); @@ -24297,6 +25959,21 @@ 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; })(); @@ -24428,17 +26105,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.code = reader.int32(); - break; - case 2: - message.message = reader.string(); - break; - case 3: - if (!(message.details && message.details.length)) - message.details = []; - message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; + case 1: { + message.code = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -24563,6 +26243,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + return Status; })(); diff --git a/packages/google-cloud-video-transcoder/protos/protos.json b/packages/google-cloud-video-transcoder/protos/protos.json index 51c77ebc19f..a77b260e2d5 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.json +++ b/packages/google-cloud-video-transcoder/protos/protos.json @@ -1710,6 +1710,10 @@ "syntax": { "type": "string", "id": 12 + }, + "edition": { + "type": "string", + "id": 13 } } }, @@ -2238,6 +2242,13 @@ "default": false } }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, "deprecated": { "type": "bool", "id": 3, @@ -2530,6 +2541,19 @@ "end": { "type": "int32", "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } } } } From f1fba0ff919f669bc4df806ef3f08d5dc99d530c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sat, 27 Aug 2022 05:10:18 +0000 Subject: [PATCH 105/116] fix: do not import the whole google-gax from proto JS (#1553) (#204) fix: use google-gax v3.3.0 Source-Link: https://github.com/googleapis/synthtool/commit/c73d112a11a1f1a93efa67c50495c19aa3a88910 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:b15a6f06cc06dcffa11e1bebdf1a74b6775a134aac24a0f86f51ddf728eb373e --- packages/google-cloud-video-transcoder/package.json | 2 +- packages/google-cloud-video-transcoder/protos/protos.d.ts | 2 +- packages/google-cloud-video-transcoder/protos/protos.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 5680939ac61..f250a5a8032 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -40,7 +40,7 @@ }, "dependencies": { "@google-cloud/video-transcoder": "^2.0.0", - "google-gax": "^3.0.1" + "google-gax": "^3.3.0" }, "devDependencies": { "@types/mocha": "^9.0.0", diff --git a/packages/google-cloud-video-transcoder/protos/protos.d.ts b/packages/google-cloud-video-transcoder/protos/protos.d.ts index 30a2bd46e60..cf93a5deb9f 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.d.ts +++ b/packages/google-cloud-video-transcoder/protos/protos.d.ts @@ -13,7 +13,7 @@ // limitations under the License. import Long = require("long"); -import {protobuf as $protobuf} from "google-gax"; +import type {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { diff --git a/packages/google-cloud-video-transcoder/protos/protos.js b/packages/google-cloud-video-transcoder/protos/protos.js index ee72d2a3771..6d07e687d07 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.js +++ b/packages/google-cloud-video-transcoder/protos/protos.js @@ -19,7 +19,7 @@ define(["protobufjs/minimal"], factory); /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) - module.exports = factory(require("google-gax").protobufMinimal); + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); })(this, function($protobuf) { "use strict"; From 4ae6662dc0922416889077445521c4f80248e605 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 31 Aug 2022 21:37:33 -0700 Subject: [PATCH 106/116] fix: use _gaxModule when accessing gax for bundling (#205) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: accept google-gax instance as a parameter Please see the documentation of the client constructor for details. PiperOrigin-RevId: 470332808 Source-Link: https://github.com/googleapis/googleapis/commit/d4a23675457cd8f0b44080e0594ec72de1291b89 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e97a1ac204ead4fe7341f91e72db7c6ac6016341 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTk3YTFhYzIwNGVhZDRmZTczNDFmOTFlNzJkYjdjNmFjNjAxNjM0MSJ9 * ๐Ÿฆ‰ Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: use _gaxModule when accessing gax for bundling PiperOrigin-RevId: 470911839 Source-Link: https://github.com/googleapis/googleapis/commit/352756699ebc5b2144c252867c265ea44448712e Source-Link: https://github.com/googleapis/googleapis-gen/commit/f16a1d224f00a630ea43d6a9a1a31f566f45cdea Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjE2YTFkMjI0ZjAwYTYzMGVhNDNkNmE5YTFhMzFmNTY2ZjQ1Y2RlYSJ9 * ๐Ÿฆ‰ Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: Alexander Fenster --- .../src/v1/transcoder_service_client.ts | 51 ++++++++++++------- 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts b/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts index 721b0e2f58e..80f5a69df93 100644 --- a/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts +++ b/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts @@ -17,8 +17,8 @@ // ** All changes to this file may be overwritten. ** /* global window */ -import * as gax from 'google-gax'; -import { +import type * as gax from 'google-gax'; +import type { Callback, CallOptions, Descriptors, @@ -26,7 +26,6 @@ import { PaginationCallback, GaxCall, } from 'google-gax'; - import {Transform} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); @@ -36,7 +35,6 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './transcoder_service_client_config.json'; - const version = require('../../../package.json').version; /** @@ -101,8 +99,18 @@ export class TranscoderServiceClient { * 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 TranscoderServiceClient({fallback: 'rest'}, gax); + * ``` */ - constructor(opts?: ClientOptions) { + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof TranscoderServiceClient; const servicePath = @@ -122,8 +130,13 @@ export class TranscoderServiceClient { 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 ? gax.fallback : 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); @@ -208,7 +221,7 @@ export class TranscoderServiceClient { this.innerApiCalls = {}; // Add a warn function to the client constructor so it can be easily tested. - this.warn = gax.warn; + this.warn = this._gaxModule.warn; } /** @@ -424,7 +437,7 @@ export class TranscoderServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -510,7 +523,7 @@ export class TranscoderServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -605,7 +618,7 @@ export class TranscoderServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -711,7 +724,7 @@ export class TranscoderServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -810,7 +823,7 @@ export class TranscoderServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -911,7 +924,7 @@ export class TranscoderServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1017,7 +1030,7 @@ export class TranscoderServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -1062,7 +1075,7 @@ export class TranscoderServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listJobs']; @@ -1116,7 +1129,7 @@ export class TranscoderServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listJobs']; @@ -1228,7 +1241,7 @@ export class TranscoderServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -1274,7 +1287,7 @@ export class TranscoderServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listJobTemplates']; @@ -1329,7 +1342,7 @@ export class TranscoderServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listJobTemplates']; From bf8cc6a2418e0c06910e2414194f57759704db3b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 8 Sep 2022 16:42:41 -0400 Subject: [PATCH 107/116] chore(main): release 2.2.1 (#194) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 2.2.1 * ๐Ÿฆ‰ Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-cloud-video-transcoder/CHANGELOG.md | 12 ++++++++++++ packages/google-cloud-video-transcoder/package.json | 2 +- ...et_metadata.google.cloud.video.transcoder.v1.json | 2 +- .../samples/package.json | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-video-transcoder/CHANGELOG.md b/packages/google-cloud-video-transcoder/CHANGELOG.md index 1f18b5d6d16..3eaf62a91cc 100644 --- a/packages/google-cloud-video-transcoder/CHANGELOG.md +++ b/packages/google-cloud-video-transcoder/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [2.2.1](https://github.com/googleapis/nodejs-video-transcoder/compare/v2.2.0...v2.2.1) (2022-09-01) + + +### Bug Fixes + +* better support for fallback mode ([#192](https://github.com/googleapis/nodejs-video-transcoder/issues/192)) ([d46c012](https://github.com/googleapis/nodejs-video-transcoder/commit/d46c0120ebb51275b72e4c4538d1031003c10c3d)) +* change import long to require ([#193](https://github.com/googleapis/nodejs-video-transcoder/issues/193)) ([a620922](https://github.com/googleapis/nodejs-video-transcoder/commit/a62092293b4085ec1affca0f0dd8f698622a981b)) +* do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-video-transcoder/issues/1553)) ([#204](https://github.com/googleapis/nodejs-video-transcoder/issues/204)) ([a7bfbd2](https://github.com/googleapis/nodejs-video-transcoder/commit/a7bfbd2a2ee31f8456430adc9f90e365ddcdc98d)) +* remove pip install statements ([#1546](https://github.com/googleapis/nodejs-video-transcoder/issues/1546)) ([#195](https://github.com/googleapis/nodejs-video-transcoder/issues/195)) ([8f21081](https://github.com/googleapis/nodejs-video-transcoder/commit/8f21081c14741ec736b0c418f34a1bd6be329d67)) +* use _gaxModule when accessing gax for bundling ([#205](https://github.com/googleapis/nodejs-video-transcoder/issues/205)) ([836e0f2](https://github.com/googleapis/nodejs-video-transcoder/commit/836e0f2f92ff74d4f5c3a3317ab23ffcdf1ad985)) +* use google-gax v3.3.0 ([a7bfbd2](https://github.com/googleapis/nodejs-video-transcoder/commit/a7bfbd2a2ee31f8456430adc9f90e365ddcdc98d)) + ## [2.2.0](https://github.com/googleapis/nodejs-video-transcoder/compare/v2.1.0...v2.2.0) (2022-06-29) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index f250a5a8032..808150e918f 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/video-transcoder", - "version": "2.2.0", + "version": "2.2.1", "description": "Transcoder client for Node.js", "repository": "googleapis/nodejs-video-transcoder", "license": "Apache-2.0", diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json index 93bd641ab69..ff775ecb39b 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-transcoder", - "version": "2.2.0", + "version": "2.2.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index 124c01de88b..d5d48ce466e 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/video-transcoder": "^2.2.0" + "@google-cloud/video-transcoder": "^2.2.1" }, "devDependencies": { "@google-cloud/storage": "^6.0.0", From 840eca92487c47273b1291f48319f826cd26161d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 8 Sep 2022 23:23:48 +0200 Subject: [PATCH 108/116] chore(deps): update dependency uuid to v9 (#209) --- packages/google-cloud-video-transcoder/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index d5d48ce466e..2eb848d64bf 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -20,6 +20,6 @@ "@google-cloud/storage": "^6.0.0", "c8": "^7.3.0", "mocha": "^8.1.1", - "uuid": "^8.0.0" + "uuid": "^9.0.0" } } From 7f22e058edaedae9c11485aa899cd85206b010b3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 14 Sep 2022 22:32:34 +0000 Subject: [PATCH 109/116] fix: preserve default values in x-goog-request-params header (#210) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 474338479 Source-Link: https://github.com/googleapis/googleapis/commit/d5d35e0353b59719e8917103b1bc7df2782bf6ba Source-Link: https://github.com/googleapis/googleapis-gen/commit/efcd3f93962a103f68f003e2a1eecde6fa216a27 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9 --- .../src/v1/transcoder_service_client.ts | 24 +- .../test/gapic_transcoder_service_v1.ts | 795 +++++++++--------- 2 files changed, 413 insertions(+), 406 deletions(-) diff --git a/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts b/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts index 80f5a69df93..db0d57207b3 100644 --- a/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts +++ b/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts @@ -438,7 +438,7 @@ export class TranscoderServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createJob(request, options, callback); @@ -524,7 +524,7 @@ export class TranscoderServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getJob(request, options, callback); @@ -619,7 +619,7 @@ export class TranscoderServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.deleteJob(request, options, callback); @@ -725,7 +725,7 @@ export class TranscoderServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createJobTemplate(request, options, callback); @@ -824,7 +824,7 @@ export class TranscoderServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getJobTemplate(request, options, callback); @@ -925,7 +925,7 @@ export class TranscoderServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.deleteJobTemplate(request, options, callback); @@ -1031,7 +1031,7 @@ export class TranscoderServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listJobs(request, options, callback); @@ -1076,7 +1076,7 @@ export class TranscoderServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); @@ -1130,7 +1130,7 @@ export class TranscoderServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); @@ -1242,7 +1242,7 @@ export class TranscoderServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listJobTemplates(request, options, callback); @@ -1288,7 +1288,7 @@ export class TranscoderServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listJobTemplates']; const callSettings = defaultCallSettings.merge(options); @@ -1343,7 +1343,7 @@ export class TranscoderServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listJobTemplates']; const callSettings = defaultCallSettings.merge(options); diff --git a/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts b/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts index 0b991f5a12a..1c08c291cfd 100644 --- a/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts +++ b/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts @@ -27,6 +27,21 @@ 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 @@ -222,26 +237,23 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.CreateJobRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateJobRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.Job() ); client.innerApiCalls.createJob = stubSimpleCall(expectedResponse); const [response] = await client.createJob(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createJob without error using callback', async () => { @@ -253,15 +265,9 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.CreateJobRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateJobRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.Job() ); @@ -284,11 +290,14 @@ describe('v1.TranscoderServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createJob with error', async () => { @@ -300,23 +309,20 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.CreateJobRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateJobRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createJob = stubSimpleCall(undefined, expectedError); await assert.rejects(client.createJob(request), expectedError); - assert( - (client.innerApiCalls.createJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createJob with closed client', async () => { @@ -328,7 +334,8 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.CreateJobRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue('CreateJobRequest', ['parent']); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createJob(request), expectedError); @@ -345,26 +352,23 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.GetJobRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetJobRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.Job() ); client.innerApiCalls.getJob = stubSimpleCall(expectedResponse); const [response] = await client.getJob(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = (client.innerApiCalls.getJob as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getJob without error using callback', async () => { @@ -376,15 +380,9 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.GetJobRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetJobRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.Job() ); @@ -407,11 +405,14 @@ describe('v1.TranscoderServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = (client.innerApiCalls.getJob as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getJob with error', async () => { @@ -423,23 +424,20 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.GetJobRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetJobRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getJob = stubSimpleCall(undefined, expectedError); await assert.rejects(client.getJob(request), expectedError); - assert( - (client.innerApiCalls.getJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = (client.innerApiCalls.getJob as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getJob with closed client', async () => { @@ -451,7 +449,8 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.GetJobRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetJobRequest', ['name']); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getJob(request), expectedError); @@ -468,26 +467,23 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.DeleteJobRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteJobRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.deleteJob = stubSimpleCall(expectedResponse); const [response] = await client.deleteJob(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteJob without error using callback', async () => { @@ -499,15 +495,9 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.DeleteJobRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteJobRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -530,11 +520,14 @@ describe('v1.TranscoderServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteJob with error', async () => { @@ -546,23 +539,20 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.DeleteJobRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteJobRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteJob = stubSimpleCall(undefined, expectedError); await assert.rejects(client.deleteJob(request), expectedError); - assert( - (client.innerApiCalls.deleteJob as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteJob with closed client', async () => { @@ -574,7 +564,8 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.DeleteJobRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('DeleteJobRequest', ['name']); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteJob(request), expectedError); @@ -591,26 +582,25 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.CreateJobTemplateRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateJobTemplateRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.JobTemplate() ); client.innerApiCalls.createJobTemplate = stubSimpleCall(expectedResponse); const [response] = await client.createJobTemplate(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createJobTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createJobTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createJobTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createJobTemplate without error using callback', async () => { @@ -622,15 +612,11 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.CreateJobTemplateRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateJobTemplateRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.JobTemplate() ); @@ -653,11 +639,14 @@ describe('v1.TranscoderServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createJobTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createJobTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createJobTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createJobTemplate with error', async () => { @@ -669,26 +658,25 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.CreateJobTemplateRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateJobTemplateRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createJobTemplate = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.createJobTemplate(request), expectedError); - assert( - (client.innerApiCalls.createJobTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createJobTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createJobTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createJobTemplate with closed client', async () => { @@ -700,7 +688,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.CreateJobTemplateRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue('CreateJobTemplateRequest', [ + 'parent', + ]); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createJobTemplate(request), expectedError); @@ -717,26 +708,25 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.GetJobTemplateRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetJobTemplateRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.JobTemplate() ); client.innerApiCalls.getJobTemplate = stubSimpleCall(expectedResponse); const [response] = await client.getJobTemplate(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getJobTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getJobTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getJobTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getJobTemplate without error using callback', async () => { @@ -748,15 +738,11 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.GetJobTemplateRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetJobTemplateRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.JobTemplate() ); @@ -779,11 +765,14 @@ describe('v1.TranscoderServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getJobTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getJobTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getJobTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getJobTemplate with error', async () => { @@ -795,26 +784,25 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.GetJobTemplateRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetJobTemplateRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getJobTemplate = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getJobTemplate(request), expectedError); - assert( - (client.innerApiCalls.getJobTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getJobTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getJobTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getJobTemplate with closed client', async () => { @@ -826,7 +814,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.GetJobTemplateRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetJobTemplateRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getJobTemplate(request), expectedError); @@ -843,26 +834,25 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteJobTemplateRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); client.innerApiCalls.deleteJobTemplate = stubSimpleCall(expectedResponse); const [response] = await client.deleteJobTemplate(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteJobTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteJobTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteJobTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteJobTemplate without error using callback', async () => { @@ -874,15 +864,11 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteJobTemplateRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -905,11 +891,14 @@ describe('v1.TranscoderServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteJobTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteJobTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteJobTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteJobTemplate with error', async () => { @@ -921,26 +910,25 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteJobTemplateRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteJobTemplate = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.deleteJobTemplate(request), expectedError); - assert( - (client.innerApiCalls.deleteJobTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteJobTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteJobTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteJobTemplate with closed client', async () => { @@ -952,7 +940,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('DeleteJobTemplateRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteJobTemplate(request), expectedError); @@ -969,15 +960,9 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListJobsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.video.transcoder.v1.Job() @@ -992,11 +977,14 @@ describe('v1.TranscoderServiceClient', () => { client.innerApiCalls.listJobs = stubSimpleCall(expectedResponse); const [response] = await client.listJobs(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listJobs as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listJobs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listJobs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listJobs without error using callback', async () => { @@ -1008,15 +996,9 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListJobsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.video.transcoder.v1.Job() @@ -1047,11 +1029,14 @@ describe('v1.TranscoderServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listJobs as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listJobs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listJobs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listJobs with error', async () => { @@ -1063,23 +1048,20 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListJobsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listJobs = stubSimpleCall(undefined, expectedError); await assert.rejects(client.listJobs(request), expectedError); - assert( - (client.innerApiCalls.listJobs as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listJobs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listJobs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listJobsStream without error', async () => { @@ -1091,8 +1073,9 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListJobsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.video.transcoder.v1.Job() @@ -1129,10 +1112,12 @@ describe('v1.TranscoderServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listJobs, request) ); - assert.strictEqual( - (client.descriptors.page.listJobs.createStream as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listJobs.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1145,8 +1130,9 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListJobsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listJobs.createStream = stubPageStreamingCall( undefined, @@ -1174,10 +1160,12 @@ describe('v1.TranscoderServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listJobs, request) ); - assert.strictEqual( - (client.descriptors.page.listJobs.createStream as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listJobs.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1190,8 +1178,9 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListJobsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.video.transcoder.v1.Job() @@ -1216,10 +1205,12 @@ describe('v1.TranscoderServiceClient', () => { .args[1], request ); - assert.strictEqual( - (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listJobs.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1232,8 +1223,9 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListJobsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listJobs.asyncIterate = stubAsyncIterationCall( undefined, @@ -1251,10 +1243,12 @@ describe('v1.TranscoderServiceClient', () => { .args[1], request ); - assert.strictEqual( - (client.descriptors.page.listJobs.asyncIterate as SinonStub).getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listJobs.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -1269,15 +1263,11 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobTemplatesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListJobTemplatesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.video.transcoder.v1.JobTemplate() @@ -1292,11 +1282,14 @@ describe('v1.TranscoderServiceClient', () => { client.innerApiCalls.listJobTemplates = stubSimpleCall(expectedResponse); const [response] = await client.listJobTemplates(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listJobTemplates as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listJobTemplates as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listJobTemplates as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listJobTemplates without error using callback', async () => { @@ -1308,15 +1301,11 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobTemplatesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListJobTemplatesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.video.transcoder.v1.JobTemplate() @@ -1349,11 +1338,14 @@ describe('v1.TranscoderServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listJobTemplates as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listJobTemplates as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listJobTemplates as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listJobTemplates with error', async () => { @@ -1365,26 +1357,25 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobTemplatesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListJobTemplatesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listJobTemplates = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listJobTemplates(request), expectedError); - assert( - (client.innerApiCalls.listJobTemplates as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listJobTemplates as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listJobTemplates as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listJobTemplatesStream without error', async () => { @@ -1396,8 +1387,11 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobTemplatesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListJobTemplatesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.video.transcoder.v1.JobTemplate() @@ -1435,11 +1429,12 @@ describe('v1.TranscoderServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listJobTemplates, request) ); - assert.strictEqual( - ( - client.descriptors.page.listJobTemplates.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listJobTemplates.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1452,8 +1447,11 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobTemplatesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListJobTemplatesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listJobTemplates.createStream = stubPageStreamingCall(undefined, expectedError); @@ -1480,11 +1478,12 @@ describe('v1.TranscoderServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listJobTemplates, request) ); - assert.strictEqual( - ( - client.descriptors.page.listJobTemplates.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listJobTemplates.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1497,8 +1496,11 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobTemplatesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListJobTemplatesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.video.transcoder.v1.JobTemplate() @@ -1525,11 +1527,12 @@ describe('v1.TranscoderServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listJobTemplates.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listJobTemplates.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -1542,8 +1545,11 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobTemplatesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListJobTemplatesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listJobTemplates.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -1561,11 +1567,12 @@ describe('v1.TranscoderServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listJobTemplates.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listJobTemplates.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); From 6ba9025ce5b9f3445081c2613c0867f8fb9d02e8 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 23 Sep 2022 14:01:54 -0700 Subject: [PATCH 110/116] test: use fully qualified request type name in tests (#213) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * test: use fully qualified request type name in tests PiperOrigin-RevId: 475685359 Source-Link: https://github.com/googleapis/googleapis/commit/7a129736313ceb1f277c3b7f7e16d2e04cc901dd Source-Link: https://github.com/googleapis/googleapis-gen/commit/370c729e2ba062a167449c27882ba5f379c5c34d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzcwYzcyOWUyYmEwNjJhMTY3NDQ5YzI3ODgyYmE1ZjM3OWM1YzM0ZCJ9 * ๐Ÿฆ‰ Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../test/gapic_transcoder_service_v1.ts | 228 ++++++++++++------ 1 file changed, 152 insertions(+), 76 deletions(-) diff --git a/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts b/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts index 1c08c291cfd..32ce3a22edb 100644 --- a/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts +++ b/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts @@ -237,7 +237,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.CreateJobRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateJobRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.CreateJobRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -265,7 +268,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.CreateJobRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateJobRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.CreateJobRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -309,7 +315,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.CreateJobRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateJobRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.CreateJobRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -334,7 +343,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.CreateJobRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateJobRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.CreateJobRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -352,7 +364,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.GetJobRequest() ); - const defaultValue1 = getTypeDefaultValue('GetJobRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.GetJobRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -380,7 +395,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.GetJobRequest() ); - const defaultValue1 = getTypeDefaultValue('GetJobRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.GetJobRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -424,7 +442,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.GetJobRequest() ); - const defaultValue1 = getTypeDefaultValue('GetJobRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.GetJobRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -449,7 +470,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.GetJobRequest() ); - const defaultValue1 = getTypeDefaultValue('GetJobRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.GetJobRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -467,7 +491,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.DeleteJobRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteJobRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.DeleteJobRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -495,7 +522,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.DeleteJobRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteJobRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.DeleteJobRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -539,7 +569,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.DeleteJobRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteJobRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.DeleteJobRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -564,7 +597,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.DeleteJobRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteJobRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.DeleteJobRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -582,9 +618,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.CreateJobTemplateRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateJobTemplateRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.CreateJobTemplateRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -612,9 +649,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.CreateJobTemplateRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateJobTemplateRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.CreateJobTemplateRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -658,9 +696,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.CreateJobTemplateRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateJobTemplateRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.CreateJobTemplateRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -688,9 +727,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.CreateJobTemplateRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateJobTemplateRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.CreateJobTemplateRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -708,9 +748,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.GetJobTemplateRequest() ); - const defaultValue1 = getTypeDefaultValue('GetJobTemplateRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.GetJobTemplateRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -738,9 +779,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.GetJobTemplateRequest() ); - const defaultValue1 = getTypeDefaultValue('GetJobTemplateRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.GetJobTemplateRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -784,9 +826,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.GetJobTemplateRequest() ); - const defaultValue1 = getTypeDefaultValue('GetJobTemplateRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.GetJobTemplateRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -814,9 +857,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.GetJobTemplateRequest() ); - const defaultValue1 = getTypeDefaultValue('GetJobTemplateRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.GetJobTemplateRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -834,9 +878,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteJobTemplateRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -864,9 +909,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteJobTemplateRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -910,9 +956,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteJobTemplateRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -940,9 +987,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteJobTemplateRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -960,7 +1008,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListJobsRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.ListJobsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -996,7 +1047,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListJobsRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.ListJobsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -1048,7 +1102,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListJobsRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.ListJobsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1073,7 +1130,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListJobsRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.ListJobsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -1130,7 +1190,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListJobsRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.ListJobsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1178,7 +1241,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListJobsRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.ListJobsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -1223,7 +1289,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListJobsRequest', ['parent']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.ListJobsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1263,9 +1332,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobTemplatesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListJobTemplatesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.ListJobTemplatesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -1301,9 +1371,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobTemplatesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListJobTemplatesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.ListJobTemplatesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -1357,9 +1428,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobTemplatesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListJobTemplatesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.ListJobTemplatesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1387,9 +1459,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobTemplatesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListJobTemplatesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.ListJobTemplatesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -1447,9 +1520,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobTemplatesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListJobTemplatesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.ListJobTemplatesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1496,9 +1570,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobTemplatesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListJobTemplatesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.ListJobTemplatesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -1545,9 +1620,10 @@ describe('v1.TranscoderServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobTemplatesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListJobTemplatesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.video.transcoder.v1.ListJobTemplatesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); From ac23ae6b7615fc590f8f0ab5ee7529c8374205b1 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 26 Sep 2022 12:50:42 -0700 Subject: [PATCH 111/116] chore(main): release 2.2.2 (#211) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 2.2.2 * ๐Ÿฆ‰ Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * ๐Ÿฆ‰ Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-cloud-video-transcoder/CHANGELOG.md | 7 +++++++ packages/google-cloud-video-transcoder/package.json | 2 +- .../snippet_metadata.google.cloud.video.transcoder.v1.json | 2 +- .../google-cloud-video-transcoder/samples/package.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-video-transcoder/CHANGELOG.md b/packages/google-cloud-video-transcoder/CHANGELOG.md index 3eaf62a91cc..450db3de10e 100644 --- a/packages/google-cloud-video-transcoder/CHANGELOG.md +++ b/packages/google-cloud-video-transcoder/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.2.2](https://github.com/googleapis/nodejs-video-transcoder/compare/v2.2.1...v2.2.2) (2022-09-23) + + +### Bug Fixes + +* Preserve default values in x-goog-request-params header ([#210](https://github.com/googleapis/nodejs-video-transcoder/issues/210)) ([cd73192](https://github.com/googleapis/nodejs-video-transcoder/commit/cd73192a866208be399035e21b1d51e2a1ae1cfc)) + ## [2.2.1](https://github.com/googleapis/nodejs-video-transcoder/compare/v2.2.0...v2.2.1) (2022-09-01) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 808150e918f..d9b41cb6f7d 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/video-transcoder", - "version": "2.2.1", + "version": "2.2.2", "description": "Transcoder client for Node.js", "repository": "googleapis/nodejs-video-transcoder", "license": "Apache-2.0", diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json index ff775ecb39b..9ba634ee027 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-transcoder", - "version": "2.2.1", + "version": "2.2.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index 2eb848d64bf..f39a1d90488 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/video-transcoder": "^2.2.1" + "@google-cloud/video-transcoder": "^2.2.2" }, "devDependencies": { "@google-cloud/storage": "^6.0.0", From 871f791f58634028000803f546387dea1a66f960 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 3 Nov 2022 23:47:10 -0700 Subject: [PATCH 112/116] fix(deps): use google-gax v3.5.2 (#218) --- packages/google-cloud-video-transcoder/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index d9b41cb6f7d..a35480962de 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -40,7 +40,7 @@ }, "dependencies": { "@google-cloud/video-transcoder": "^2.0.0", - "google-gax": "^3.3.0" + "google-gax": "^3.5.2" }, "devDependencies": { "@types/mocha": "^9.0.0", From ac28cdd72ad9f7bb36ba844ecf7030591607397e Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 10 Nov 2022 10:26:13 +0100 Subject: [PATCH 113/116] chore(deps): update dependency jsdoc to v4 (#221) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jsdoc](https://togithub.com/jsdoc/jsdoc) | [`^3.6.5` -> `^4.0.0`](https://renovatebot.com/diffs/npm/jsdoc/3.6.11/4.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/compatibility-slim/3.6.11)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/confidence-slim/3.6.11)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
jsdoc/jsdoc ### [`v4.0.0`](https://togithub.com/jsdoc/jsdoc/blob/HEAD/CHANGES.md#​400-November-2022) [Compare Source](https://togithub.com/jsdoc/jsdoc/compare/3.6.11...084218523a7d69fec14a852ce680f374f526af28) - JSDoc releases now use [semantic versioning](https://semver.org/). If JSDoc makes backwards-incompatible changes in the future, the major version will be incremented. - JSDoc no longer uses the [`taffydb`](https://taffydb.com/) package. If your JSDoc template or plugin uses the `taffydb` package, see the [instructions for replacing `taffydb` with `@jsdoc/salty`](https://togithub.com/jsdoc/jsdoc/tree/main/packages/jsdoc-salty#use-salty-in-a-jsdoc-template). - JSDoc now supports Node.js 12.0.0 and later.
--- ### Configuration ๐Ÿ“… **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). ๐Ÿšฆ **Automerge**: Disabled by config. Please merge this manually once you are satisfied. โ™ป **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. ๐Ÿ”• **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-video-transcoder). --- packages/google-cloud-video-transcoder/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index a35480962de..cb9e3c32e83 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -48,7 +48,7 @@ "@types/sinon": "^10.0.0", "c8": "^7.3.0", "gts": "^3.1.0", - "jsdoc": "^3.6.5", + "jsdoc": "^4.0.0", "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", From 762bfb58be67f514a7f24124709ea25eaa8f488e Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 10 Nov 2022 11:14:28 +0100 Subject: [PATCH 114/116] chore(deps): update dependency @types/node to v18 (#216) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/node](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped)) | [`^16.0.0` -> `^18.0.0`](https://renovatebot.com/diffs/npm/@types%2fnode/16.18.3/18.11.9) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.11.9/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.11.9/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.11.9/compatibility-slim/16.18.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.11.9/confidence-slim/16.18.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration ๐Ÿ“… **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). ๐Ÿšฆ **Automerge**: Disabled by config. Please merge this manually once you are satisfied. โ™ป **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. ๐Ÿ”• **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-video-transcoder). --- packages/google-cloud-video-transcoder/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index cb9e3c32e83..5ccabff6d6c 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -44,7 +44,7 @@ }, "devDependencies": { "@types/mocha": "^9.0.0", - "@types/node": "^16.0.0", + "@types/node": "^18.0.0", "@types/sinon": "^10.0.0", "c8": "^7.3.0", "gts": "^3.1.0", From a9ab2cb0d3e74d4b4be93eeddcb2f5bfbafe242d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 10 Nov 2022 11:24:14 +0000 Subject: [PATCH 115/116] fix: regenerated protos JS and TS definitions (#222) samples: pull in latest typeless bot, clean up some comments Source-Link: https://togithub.com/googleapis/synthtool/commit/0a68e568b6911b60bb6fd452eba4848b176031d8 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:5b05f26103855c3a15433141389c478d1d3fe088fb5d4e3217c4793f6b3f245e --- .../protos/protos.d.ts | 2 +- .../protos/protos.js | 100 +++++++++++++++--- 2 files changed, 88 insertions(+), 14 deletions(-) diff --git a/packages/google-cloud-video-transcoder/protos/protos.d.ts b/packages/google-cloud-video-transcoder/protos/protos.d.ts index cf93a5deb9f..c6899704b8b 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.d.ts +++ b/packages/google-cloud-video-transcoder/protos/protos.d.ts @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import Long = require("long"); import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); /** Namespace google. */ export namespace google { diff --git a/packages/google-cloud-video-transcoder/protos/protos.js b/packages/google-cloud-video-transcoder/protos/protos.js index 6d07e687d07..165044a87d3 100644 --- a/packages/google-cloud-video-transcoder/protos/protos.js +++ b/packages/google-cloud-video-transcoder/protos/protos.js @@ -502,6 +502,12 @@ message.config = $root.google.cloud.video.transcoder.v1.JobConfig.fromObject(object.config); } switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "PROCESSING_STATE_UNSPECIFIED": case 0: message.state = 0; @@ -598,7 +604,7 @@ object.jobConfig = "config"; } if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.video.transcoder.v1.Job.ProcessingState[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.video.transcoder.v1.Job.ProcessingState[message.state] === undefined ? message.state : $root.google.cloud.video.transcoder.v1.Job.ProcessingState[message.state] : message.state; if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.startTime != null && message.hasOwnProperty("startTime")) @@ -3356,6 +3362,12 @@ if (object.fileName != null) message.fileName = String(object.fileName); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "MANIFEST_TYPE_UNSPECIFIED": case 0: message.type = 0; @@ -3401,7 +3413,7 @@ if (message.fileName != null && message.hasOwnProperty("fileName")) object.fileName = message.fileName; if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.video.transcoder.v1.Manifest.ManifestType[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.video.transcoder.v1.Manifest.ManifestType[message.type] === undefined ? message.type : $root.google.cloud.video.transcoder.v1.Manifest.ManifestType[message.type] : message.type; if (message.muxStreams && message.muxStreams.length) { object.muxStreams = []; for (var j = 0; j < message.muxStreams.length; ++j) @@ -5334,6 +5346,12 @@ return object; var message = new $root.google.cloud.video.transcoder.v1.Overlay.AnimationFade(); switch (object.fadeType) { + default: + if (typeof object.fadeType === "number") { + message.fadeType = object.fadeType; + break; + } + break; case "FADE_TYPE_UNSPECIFIED": case 0: message.fadeType = 0; @@ -5385,7 +5403,7 @@ object.endTimeOffset = null; } if (message.fadeType != null && message.hasOwnProperty("fadeType")) - object.fadeType = options.enums === String ? $root.google.cloud.video.transcoder.v1.Overlay.FadeType[message.fadeType] : message.fadeType; + object.fadeType = options.enums === String ? $root.google.cloud.video.transcoder.v1.Overlay.FadeType[message.fadeType] === undefined ? message.fadeType : $root.google.cloud.video.transcoder.v1.Overlay.FadeType[message.fadeType] : message.fadeType; if (message.xy != null && message.hasOwnProperty("xy")) object.xy = $root.google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate.toObject(message.xy, options); if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) @@ -14413,6 +14431,12 @@ 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; @@ -14437,6 +14461,10 @@ 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; @@ -14484,7 +14512,7 @@ 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] : message.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")) @@ -14492,7 +14520,7 @@ 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]] : message.style[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; }; @@ -18266,6 +18294,12 @@ 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; @@ -18280,6 +18314,12 @@ break; } switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "TYPE_DOUBLE": case 1: message.type = 1; @@ -18406,9 +18446,9 @@ if (message.number != null && message.hasOwnProperty("number")) object.number = message.number; if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + 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] : message.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")) @@ -20755,6 +20795,12 @@ 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; @@ -20863,7 +20909,7 @@ if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) object.javaOuterClassname = message.javaOuterClassname; if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + 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")) @@ -21665,6 +21711,12 @@ 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; @@ -21681,6 +21733,12 @@ 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; @@ -21719,6 +21777,10 @@ 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; @@ -21789,7 +21851,7 @@ object[".google.api.resourceReference"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.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")) @@ -21797,7 +21859,7 @@ if (message.lazy != null && message.hasOwnProperty("lazy")) object.lazy = message.lazy; if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + 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")) @@ -21810,7 +21872,7 @@ if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { object[".google.api.fieldBehavior"] = []; for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + 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); @@ -23167,6 +23229,12 @@ 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; @@ -23230,7 +23298,7 @@ if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + 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) @@ -24983,6 +25051,12 @@ 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; @@ -25032,7 +25106,7 @@ 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] : message.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; }; From 75e84cfa406b9383e25010b969906e12e7b469e6 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 10 Nov 2022 18:09:35 -0800 Subject: [PATCH 116/116] chore(main): release 2.2.3 (#220) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 2.2.3 * ๐Ÿฆ‰ Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-cloud-video-transcoder/CHANGELOG.md | 8 ++++++++ packages/google-cloud-video-transcoder/package.json | 2 +- ...snippet_metadata.google.cloud.video.transcoder.v1.json | 2 +- .../google-cloud-video-transcoder/samples/package.json | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-video-transcoder/CHANGELOG.md b/packages/google-cloud-video-transcoder/CHANGELOG.md index 450db3de10e..3848bd3fc50 100644 --- a/packages/google-cloud-video-transcoder/CHANGELOG.md +++ b/packages/google-cloud-video-transcoder/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [2.2.3](https://github.com/googleapis/nodejs-video-transcoder/compare/v2.2.2...v2.2.3) (2022-11-10) + + +### Bug Fixes + +* **deps:** Use google-gax v3.5.2 ([#218](https://github.com/googleapis/nodejs-video-transcoder/issues/218)) ([57badeb](https://github.com/googleapis/nodejs-video-transcoder/commit/57badebacaabed136b8cf2a1a3c77552a5ef249c)) +* Regenerated protos JS and TS definitions ([#222](https://github.com/googleapis/nodejs-video-transcoder/issues/222)) ([4ee236a](https://github.com/googleapis/nodejs-video-transcoder/commit/4ee236a3a7026daeead3eec97fc8c58f32aad86b)) + ## [2.2.2](https://github.com/googleapis/nodejs-video-transcoder/compare/v2.2.1...v2.2.2) (2022-09-23) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 5ccabff6d6c..4ffb553a91b 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/video-transcoder", - "version": "2.2.2", + "version": "2.2.3", "description": "Transcoder client for Node.js", "repository": "googleapis/nodejs-video-transcoder", "license": "Apache-2.0", diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json index 9ba634ee027..62d981d1bc2 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-transcoder", - "version": "2.2.2", + "version": "2.2.3", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index f39a1d90488..24b23129bdb 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/video-transcoder": "^2.2.2" + "@google-cloud/video-transcoder": "^2.2.3" }, "devDependencies": { "@google-cloud/storage": "^6.0.0",